From nobody Mon Nov 18 00:00:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xs7710jzBz5dZm6; Mon, 18 Nov 2024 00:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xs7706Tgcz4NcL; Mon, 18 Nov 2024 00:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731888028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q6f1LOuuS095LeoUTUFKrUEvkYfj2hieeS0rD/frGoQ=; b=Kc5j/KvDIUHYwD70F6CDRuYD4Ut1Se1rIF0pWkvfhrfyJuxNkyrJvn891L9J++jFj0SdtU 4Klvr3vzFjas+WKkRAS0DAgljX3PFVOq6MuLLcZA8J12P/m4DzXb2sC9m5ZqLYIZGMmTch sFycaBxai8sCuqsV0grGva8hNQSjLNKXL5rsSJUg/A/oFYacu2NB8FZpVZMaKXfMvE/Zsi Oazuvgryzn6iYIWlL858iHGaZDgZW4UPO5zFx9u0vs/j0n3CxMQVQluTkmn1y/w0RWQhDB DFz1SQgmv1xiQYZnEQ6Z+b/QH71j2M9scIerpni1+N/noWrJEYByr4FDv90OGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731888028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q6f1LOuuS095LeoUTUFKrUEvkYfj2hieeS0rD/frGoQ=; b=PBR7KaV9wRogYywymAdEV20nteIocxsT+7Ca9MWvzqJjk4cPgEgq5TmXmkOnN5NuV5aCiU PLKUKK7te329ygIutiRfElPntFBIurElacIVn6aheME/hFJbcEaPBRWPOtfoG3lKVdqRPY XgANsb9C39Ri2FVd1nIL+IV5oa2LHmtGlRbecACebr5/62gjLECjfBgHGodO3m/I5l755Z 7f+vKpkAavwv0EoXUVx8QjPsHitcSH4yg4qyHYkJLeJc5rH1OzziRCxeG2OWjFPvpFoN6/ 7jUUmXQzsXc4eaeQPBbWqZahSZ2BetoOR2angIuIjQNWnqxYtHYgDldlySVerg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731888028; a=rsa-sha256; cv=none; b=SUsivAhZH0VjwwYmjtOxD/W4axGPLukyfPr7pdPybt1qpKSYBABaJAUZpukSEieM5hkxg4 P8SXsSQGZnLARY2/ZEVH700AqyIbVWDdO1kCA3SntseIE6IVrvxczeqP/OTL0YjgSLGBbu ObIBxsENLcXmQaCbuz5SHXyuqrycMuOjxydqSwTFU/he94R38gHF+q88eBN8ussUjDfrEm 71hVVHT2+y3aD8eybiQhcojJH4YL0ohFx8Gb2CMT98hrY145QG9SBiMNpmEzjQmHkE9/yh 9vbv22GdIyRcZ+DpWxCdgU9MEBoPZ61tVtnoKBEgMtXYiZNg1DxvW9WXgra5rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xs77064vDz1CqJ; Mon, 18 Nov 2024 00:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AI00Sdo040310; Mon, 18 Nov 2024 00:00:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AI00Sdu040307; Mon, 18 Nov 2024 00:00:28 GMT (envelope-from git) Date: Mon, 18 Nov 2024 00:00:28 GMT Message-Id: <202411180000.4AI00Sdu040307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 3b8bce6a6be3 - stable/14 - ena.4: optimize apropos and hardware List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3b8bce6a6be3f562db8b291f90ed8cf5f27afb16 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=3b8bce6a6be3f562db8b291f90ed8cf5f27afb16 commit 3b8bce6a6be3f562db8b291f90ed8cf5f27afb16 Author: Alexander Ziaee AuthorDate: 2024-11-14 05:45:23 +0000 Commit: Colin Percival CommitDate: 2024-11-17 23:59:54 +0000 ena.4: optimize apropos and hardware Remove "FreeBSD kernel driver for" and "family", and add "AWS EC2" and "driver" to the document description for better search discoveribility and consistency with other driver manuals. Rewrite the introductory sentance to the HARDWARE section with driver name for inclusion in hardware release notes. MFC after: 3 days Reviewed by: osamaabb Sponsored by: Google Sponsored by: Amazon (cherry picked from commit 13e82893d8588d09e6d721b38ba5d775b9b96a0e) --- share/man/man4/ena.4 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index a3cb9ef5b37a..cb5b9367da43 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -27,12 +27,12 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 4, 2021 +.Dd November 14, 2024 .Dt ENA 4 .Os .Sh NAME .Nm ena -.Nd "FreeBSD kernel driver for Elastic Network Adapter (ENA) family" +.Nd AWS EC2 Elastic Network Adapter (ENA) driver .Sh SYNOPSIS To compile this driver into the kernel, place the following line in the @@ -93,7 +93,9 @@ framework is provided by the driver. Kernel must be built with the DEV_NETMAP option to be able to use this feature. .Sh HARDWARE -Supported PCI vendor ID/device IDs: +The +.Nm +driver supports the following PCI vendor ID/device IDs: .Pp .Bl -bullet -compact .It From nobody Mon Nov 18 00:18:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xs7Wy37vhz5dbgC; Mon, 18 Nov 2024 00:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xs7Wy1n4Rz4QKY; Mon, 18 Nov 2024 00:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731889118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yFA8ZptrZRrsb727MROemPlVFTHNeSWmHZsxzvhoZPc=; b=rh51bNuzGrXGTfeSlei1fovJXxEZyE45FSb4pQIo8FxA2aaoXl+zYV50Z17smhcm2CMa82 qnz/XbqCBQedDdF2hNT+iS7jnuHwDFIemDqlSoZiBTmHW5eYXWpLBUElsdk4GggV6D/5fG a8pW58bCLTGDsINFXFBZB5ckSHzwJiPlBPsGbVXPWXtMHOjmyt3FXvKqZBZuTTLJlnnxaY oBJY4cVkJ+PdTGm8A/IR/vypzOEFl5w72RFRYEUTAOj/TBlU+iAiO7kUuNvWsdDlLhrs+1 IXZkaCKBeoeNxQQnsIdWUTwODiACHfHgOqnpf4sECzMRjLLWFTr9/XkL5yGZnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731889118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yFA8ZptrZRrsb727MROemPlVFTHNeSWmHZsxzvhoZPc=; b=EZm3vkEmLfO+ppKR2VGFAvzsIr9W7SNc4lLS+hSokpcL4L+T5z8LVJzjBjM8we4TVtsf9l Iy/4MzoX/VEJ6We9r2KjBLxuV0lYpOiX32H/V6hSLUrjH8MF9i4eujZZv4YfgbdLzTKLsh EhcWeZ59uzsBq+bsEWTnlPtXr390ylyRtGDLcUUM0Qz6kl6dU5A3V8gIrPIgS5dPfta/w6 eFYADPDk/hUlm09bhh1LkOeTfh9xKr/SuQvl70tz9oHW9fjQY67ubKUQoojqDodlyfb9IE V6yPObvcCHQiJXwGCOuxO71ULbo3JJzT4QaXaZ7HPil52vlEn8nPGGq8LT8QCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731889118; a=rsa-sha256; cv=none; b=LbZ2BnjGeAZrn1NSbqWIQkpdRRZzOlgfa/FlHfV8Dv00dslKfNHnsbqDLtt9Act2ir8f+3 hvpp0S6yaYHdpGIiVhcVZ+r0JeKHeRWnGuRZgURlidP6I4ggwttZt22UxFSNjgN16GTelX 3kgX3lhDx19MPZlGHdhP58TkpZbLxOvXQ6hkWSvw55BphfwxNDEyAi8T97BJ9BJpsNxPRM uA/jawtzLg6xVCnPdPNVnlDx1ylytppNYdNoB84XvArsAJJQkdxDujii7f0JQ1imj9i2wx kfLOz4jtb2ZKZKS58IuOYMHeINrZ+5mWl4YeuflZvBBFC2b8FORqVntF2ZJKJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xs7Wy1B6bz1Cx3; Mon, 18 Nov 2024 00:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AI0Icox068941; Mon, 18 Nov 2024 00:18:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AI0IcFb068938; Mon, 18 Nov 2024 00:18:38 GMT (envelope-from git) Date: Mon, 18 Nov 2024 00:18:38 GMT Message-Id: <202411180018.4AI0IcFb068938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: d54fdd16636b - main - release: Remove empty suffix from file names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/heads/main X-Git-Reftype: branch X-Git-Commit: d54fdd16636bbe6a38a5b0a636dd83cf64aa6e06 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d54fdd16636bbe6a38a5b0a636dd83cf64aa6e06 commit d54fdd16636bbe6a38a5b0a636dd83cf64aa6e06 Author: Colin Percival AuthorDate: 2024-11-18 00:06:17 +0000 Commit: Colin Percival CommitDate: 2024-11-18 00:18:20 +0000 release: Remove empty suffix from file names For "release" builds (as opposed to "snapshot" builds -- in this context BETAs and RCs are "releases") ${SNAP_SUFFIX} is empty; but it stuck into some ociimages filenames via a copy-and-paste error. The final filenames on the download mirrors were not affected, so this does not need to be merged to releng/14.2. MFC after: 3 days Sponsored by: Amazon --- release/Makefile.mirrors | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 8856389979d1..7f7c34e21077 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -360,8 +360,8 @@ oci-images-stage: . endfor . for CHECKSUM in ${CHECKSUM_FILES} cd ${RELEASEDIR}/ociimages && \ - ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} - cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM} \ ${OCI_DIR}/Latest/CHECKSUM.${CHECKSUM} . endfor .endif From nobody Mon Nov 18 04:32:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsF992F09z5dqF8; Mon, 18 Nov 2024 04:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsF991fpKz4lB0; Mon, 18 Nov 2024 04:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731904365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bWYCPM3sAoLD1bFFrU1eRhjFfWApOegXJHMXVFJ+po=; b=gbFH+KhuRHvIFr6eZoT9fYU8AsgSeAPnVAxS8ZrJFtyK/UY6Lk4TY8IZ3w8YUegbLVVFU3 hLy3LNCJMGzhSFmfg2FkKEYVO8m553PGv5gsehGIDbDws74Dr+97hKZa+tklDdHyi04Pb6 /YRoLbazE9bCUZDzUdPImPto64x2MojFzChzgOrVsAt0L7iRhXnH8mERX0PZD8StfmY98q HveAtBxelK2WABHvyuT39UHIZCQ4LfOxPpy11JP76hUQ+PNTZnRER1Qqn4Q8jcwXRn921Q yOtIYWieZSVEpzEAN9wAUrGbyNkCS1QYS7oKbRQZktSw25AyRhBNnSG/kJJL+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731904365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bWYCPM3sAoLD1bFFrU1eRhjFfWApOegXJHMXVFJ+po=; b=OVm0Fd4rXeYbRwJ3cWxfgNpzq0o+JnXqheMCULp34Rz+83B5/miQM8BJ2DUt/q0QNM5BNP Ps/OHW6WeaogWdwUjEZObQLgqEXT4oQPWYRX1NaZVKQBlPDwRUipNK+CWQqUwXv26X7+GP 5Z+BtB+46PS9fdEZz6kwfxXzJ7LCBYNXrE+cH1Z32Wba9egQw2pGhUWDfBY6q5Mw/IDVxO IGzn0rZ2qmI+rnZA6iVIoG8xZa5O/VXzN/nmoDbLjNmaqYyA/qbQQfAek6Ob0TFqEE+wpF k+eT8i6aTu9b5MfyCJ3R6eM5r3/23yp3PhCIAM8aMW+BZ80KjZg+aX7XCWObVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731904365; a=rsa-sha256; cv=none; b=DoPBUqy9uQ5dQJBlSe68w0LjHEJ5Y4boMfXY2XvaIUaBSC33kmuU6DQ2ZIMk7O8YfoOKoP HT/fmXhCHcsjap0/UAeSLHgLPbXi03QGVQMzfHKfXTWruk0i5KJ2eYc14gqd4wiG5MUFVT XqHo+f2a/jRqW9EoVGG4WLJsRJ8vqIp2Jt/3AYwCMXcvOSC3Q9dQhdZxpK4np8mRD4+/WP 6o5EVDzZGJ481mpzcguoapzoGbB1OVnsWB+F0EAKj8WFP80R5RRNpCUkLo1CsIwY/Bjs6h TL5P1VyJqMWH4huOIZi/fPYIfbTL7FU4TUuxPDUCcpdAKLXPxHGbfQq69NAURg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsF991F6nzMNt; Mon, 18 Nov 2024 04:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AI4WjZw051088; Mon, 18 Nov 2024 04:32:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AI4Wj3i051085; Mon, 18 Nov 2024 04:32:45 GMT (envelope-from git) Date: Mon, 18 Nov 2024 04:32:45 GMT Message-Id: <202411180432.4AI4Wj3i051085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 0b5d86b38ae9 - main - uhid(4): update ugd_actlen in USB_GET_REPORT ioctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b5d86b38ae9aec92ef96b9227a404a2df3c9234 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0b5d86b38ae9aec92ef96b9227a404a2df3c9234 commit 0b5d86b38ae9aec92ef96b9227a404a2df3c9234 Author: Matthew Nygard Dodd AuthorDate: 2024-11-18 04:15:01 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-11-18 04:31:24 +0000 uhid(4): update ugd_actlen in USB_GET_REPORT ioctl USB_GET_REPORT ioctl is documented to update ugd_actlen on return with the number of bytes copied. It does not do this. Reviewed by: wulf PR: 282790 MFC after: 1 week --- sys/dev/usb/input/uhid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index 863e04f4e52b..098ec4364df7 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -633,11 +633,13 @@ uhid_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, default: return (EINVAL); } + size = imin(ugd->ugd_maxlen, size); if (id != 0) error = copyin(ugd->ugd_data, &id, 1); if (error == 0) error = uhid_get_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + NULL, ugd->ugd_data, size); + ugd->ugd_actlen = size; break; case USB_SET_REPORT: From nobody Mon Nov 18 04:32:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsF9B319Xz5dqFC; Mon, 18 Nov 2024 04:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsF9B2ZRkz4lTZ; Mon, 18 Nov 2024 04:32:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731904366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSmVKz15ewu3IOzVbvpGEmLtIUP7igT4Pto5UpLTvFo=; b=NPnjhwb+xNBcUIFtzBw51ViQJWDUeE/z54oyoSkzQoisX2qzroxl7OHasj4eXd1120iUu9 lp1CtCP4D+ByV7WWXgP1D2Cd4RH3LJnpzGWsqYrAiFMCU3Ugk+o9AvNWoWIbcepUKMJuWH myxtzbE6Oo27jq/gsYxKKqFC8JuuLXpWxsXFWVlkyaWT7oGvowEg1wFtgCyZVKAmo9YyYv ok4IHOqDISnKMkQxSIG/4cpQjFYaB3xXuDp9xnrpVKI0OrRIB34jRIuqEafqvfLoVGGXEu 9lC3Fqj6qMySDY0jx71ZBeQWzPAOiWflQM5I8dcoA6bQFz1z2VhWp0qv7sBgsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731904366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSmVKz15ewu3IOzVbvpGEmLtIUP7igT4Pto5UpLTvFo=; b=a+6m1CfFjIWCrviENvOQA5lc+p1ceSDPRmszbnONZ6P57F/40w8hMa3VyHn66enjT3/j4j sE0UueARHW0NKWOunJtxeNqX50c+l5yZ7Bx+1/ou0XutxDLay6mBH3VnO6UKvnxTXh9Qm0 p1RylCZn491CLvQXpRDk4BzRhdzFdqNt52fh7zwTiVCLEGzzDDF42pkPTHuLKJjeYwzMG1 QkmUp1WA8LyUTy8eJI6CrZwOsNDDYfCcfI0bFKQBJBA4RcFECoYPl8UXjVX+63cUjoGczU CkwO4O5lRXQaA3hl15U0EWI3MGV7iH7as6wnJiIMV3WPEljTI6NUDMVn340RVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731904366; a=rsa-sha256; cv=none; b=ZQCzJhiZCmywInpBwQ7NU+wFFHZuaGkkcRgMWU7HSz4VeMAfPbS/5OFRM+COqUHQAE5gPj SssyjiFM6x3LpskbAla9nQUhISe7Zn54T/f3r0XQjqG/z1r6VtmKl1upuJ4ZAH/Y9on7ze ScWHK6kM/a0mfByyGAFGQfuJYyZLMmi0XIo6L65nGtobJHQjBAN+cZ1mxy996dFv59Y27k JvN4BZrGNsEXto8BpCNXH1+jlsrmzfcqOE5Pefb4dFMpRuXKOkcHBrzTdKrgrDTkMvIGRl Tew09t0XugqkkHSCIF4U8AePqJV1X55JEd9rcJyaRVucQYbr2lUSfdDk6yWfCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsF9B2BmPzM6k; Mon, 18 Nov 2024 04:32:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AI4Wkiv051133; Mon, 18 Nov 2024 04:32:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AI4WkV7051130; Mon, 18 Nov 2024 04:32:46 GMT (envelope-from git) Date: Mon, 18 Nov 2024 04:32:46 GMT Message-Id: <202411180432.4AI4WkV7051130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: f4f46a2eef3b - main - hidraw(4): update hgd_actlen in HIDRAW_GET_REPORT ioctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4f46a2eef3be6d19c65a4ca4ee70f365dd5be4f Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f46a2eef3be6d19c65a4ca4ee70f365dd5be4f commit f4f46a2eef3be6d19c65a4ca4ee70f365dd5be4f Author: Matthew Nygard Dodd AuthorDate: 2024-11-18 04:25:10 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-11-18 04:31:39 +0000 hidraw(4): update hgd_actlen in HIDRAW_GET_REPORT ioctl HIDRAW_GET_REPORT ioctl is documented to update hgd_actlen on return with the number of bytes copied. It does not do this. Reviewed by: wulf PR: 282790 MFC after: 1 week --- sys/dev/hid/hidraw.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c index 6a05b633cfc8..ccfdcdddf545 100644 --- a/sys/dev/hid/hidraw.c +++ b/sys/dev/hid/hidraw.c @@ -570,6 +570,7 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct hidraw_devinfo *hd; const char *devname; uint32_t size; + hid_size_t actsize; int id, len; int error = 0; @@ -747,16 +748,16 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, } size = MIN(hgd->hgd_maxlen, size); buf = HIDRAW_LOCAL_ALLOC(local_buf, size); - error = hid_get_report(sc->sc_dev, buf, size, NULL, + actsize = 0; + error = hid_get_report(sc->sc_dev, buf, size, &actsize, hgd->hgd_report_type, id); if (!error) - error = copyout(buf, hgd->hgd_data, size); + error = copyout(buf, hgd->hgd_data, actsize); HIDRAW_LOCAL_FREE(local_buf, buf); + hgd->hgd_actlen = actsize; #ifdef COMPAT_FREEBSD32 - /* - * HIDRAW_GET_REPORT is declared _IOWR, but hgd is not written - * so we don't call update_hgd32(). - */ + if (hgd32 != NULL) + update_hgd32(hgd, hgd32); #endif return (error); From nobody Mon Nov 18 09:40:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsN0h3Rbsz5ccrn; Mon, 18 Nov 2024 09:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsN0h0x19z42Gj; Mon, 18 Nov 2024 09:40:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731922852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzEiGe72leN6YX8/JSAT5iAE6uB5JVpEY0KrsPedhXQ=; b=PBWkeqjI9h+8fU1FeYF/07DJoecFbcnUmt6vIDF4TOtQtldKZmoqovUxirVHu8W8ZijZAI ieoAyAg+wCmMp7sC/vaU6paeSk6kzZ57M+FkvNVjc/dZs+HCyrAmOgl2K0KJEkY4Jcts5e NjTb+fDpz9M3BZs8+RL9O6OTJBbQWiBPUd6MovYiGMEhvfOVgFPxW7ALyzxsjzIl1UvMo6 juPLDo4k+1kjH6zhao4W+O8BT+fJ1KNtIuJGGEolo06siFuNTgjBorUhs2U3/R8yGbtRpB kNLDmh8mySTchhyHewVa7KZnlJCd7uLID3kenTOX2WmXog0oEWKrBn/cJuoouA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731922852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzEiGe72leN6YX8/JSAT5iAE6uB5JVpEY0KrsPedhXQ=; b=JStnWc+81Vf9ydFJq7XsF50eOju6nv4Cm0294swi/dAKSqoEd25S4l+/G04v91hCsAUh3x 1XplwfM11EZ17Xk9kbx+Mb5Za9/v255/BCSxU5t43ObdUCiewuzWaJnAP5bU5VsW7y6zWF B9ZmT2VpTc3fZsjyWK+JClFUo0UhliEA2ZYKcX3vDjt0jo9JUBL+qzdLurCiOn7p0PLsm5 npq0TMaq30n/6YrjrlTcBuxdIRx1WQuA1u/rw9W6tgZk/4y7PbjdD0bRahiTz8Dn8prcFQ oJ2qD13TFAh8W3B4bsQ0GGHB+wOLMuR1jm+1qAyHqANsfJT9EktIwoFRKoZ7JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731922852; a=rsa-sha256; cv=none; b=VMsqN6KVzeIZooR+BHwa3OnMDIXHqrtvN64g/to2bieO27gS8vJVdgZ6mo3ekwJVY19TqC 2Zpp37mYbNqOCxPhMP30yDYFee+6L0mIhY9N+/xz8XPUPMvmMfJawFFIUB0rqy2krU7of7 EAjsmOXn6IymEjFyRLnrZ2wkOr+Gbki+P7MplJAhKyLsp6eeWI2bd/GEYfQvoDFvUwW1jl 0UuTc1wLorSEDXJXkIbwrS5+CdldzZNPkouxFkDpEa++IsaaN7syWPaTUFg9NmEZIfa9Ee DuV0h2N/EsO/Ww9GPXbQQaaGo+/RyjTnljLXBryxl6p6qaOx+k04Zm6LeVXIQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsN0h0Xh2zZyD; Mon, 18 Nov 2024 09:40:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AI9eqAS020681; Mon, 18 Nov 2024 09:40:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AI9eqWg020678; Mon, 18 Nov 2024 09:40:52 GMT (envelope-from git) Date: Mon, 18 Nov 2024 09:40:52 GMT Message-Id: <202411180940.4AI9eqWg020678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 55aa53fbf2bb - main - stress2: Added a zfs regression test scenario List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55aa53fbf2bbeb7c032eae1a3767e043390a28da Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=55aa53fbf2bbeb7c032eae1a3767e043390a28da commit 55aa53fbf2bbeb7c032eae1a3767e043390a28da Author: Peter Holm AuthorDate: 2024-11-18 09:40:16 +0000 Commit: Peter Holm CommitDate: 2024-11-18 09:40:16 +0000 stress2: Added a zfs regression test scenario --- tools/test/stress2/misc/zfs18.sh | 134 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/tools/test/stress2/misc/zfs18.sh b/tools/test/stress2/misc/zfs18.sh new file mode 100755 index 000000000000..fb4f301f43c9 --- /dev/null +++ b/tools/test/stress2/misc/zfs18.sh @@ -0,0 +1,134 @@ +#!/bin/sh + +# File corruption scenario. +# Test program obtained from Kyle Evans + +# "panic: VERIFY3(rc->rc_count == number) failed (4849664 == 0)" seen. + +# Page fault seen: +# https://people.freebsd.org/~pho/stress/log/log0560.txt + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +[ `sysctl -n kern.kstack_pages` -lt 4 ] && exit 0 + +. ../default.cfg + +prog=$(basename "$0" .sh) +cat > /tmp/$prog.c < +#include + +#include +#include +#include +#include +#include + +//#define FILE "2" +#define FILE "file" + +int +main(void) +{ + struct stat sb; + ssize_t wsz; + size_t bufsz; + void *buf, *obuf; + int mfd, fd; + int done = 0; + + mfd = open(FILE, O_RDONLY); + assert(mfd >= 0); + + assert(fstat(mfd, &sb) == 0); + bufsz = sb.st_size; + buf = obuf = mmap(NULL, bufsz, PROT_READ, MAP_SHARED, mfd, 0); + assert(buf != MAP_FAILED); + + /* O_RDWR */ + fd = open(FILE, O_RDWR); + if (fd < 0) + err(1, "open"); + assert(fd >= 0); + +again: + while (bufsz > 0) { + wsz = write(fd, buf, bufsz); + if (wsz < 0) + err(1, "write"); + else if (wsz == 0) + fprintf(stderr, "Huh?\n"); + bufsz -= wsz; + buf += wsz; + } + + bufsz = sb.st_size; + buf = obuf; + + if (++done < 2) + goto again; + + close(fd); + munmap(obuf, sb.st_size); + close(mfd); + return (0); +} +EOF +mycc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c || exit 1 +set -u +kldstat -v | grep -q zfs.ko || { kldload zfs.ko || + exit 0; loaded=1; } + +u1=$mdstart +u2=$((u1 + 1)) +mp0=/stress2_tank/test # zfs mount + +mdconfig -l | grep -q md$u1 && mdconfig -d -u $u1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $u2 + +mdconfig -s 4g -u $u1 +mdconfig -s 4g -u $u2 + +zpool list | egrep -q "^stress2_tank" && zpool destroy stress2_tank +[ -d /stress2_tank ] && rm -rf /stress2_tank +zpool create stress2_tank raidz md$u1 md$u2 +zfs create ${mp0#/} + +here=`pwd` +cd /stress2_tank +# Optimized file creation: +#jot -b 'A' -s '' 875998989 > file +dd if=/dev/random of=file bs=1m count=$(((875998990/1024/1024)+1)) status=none +truncate -s 875998990 file +cat file file > file.post +mv file file.orig + +counter=1 +s=0 +start=`date +%s` +while [ $((`date +%s` - start)) -lt 300 ]; do + cp file.orig file + /tmp/$prog + if ! cmp file file.post; then + echo "Iteration #$counter" + od -t x8 file | head -1000 > /tmp/$prog.file1 + od -t x8 file.post | head -1000 > /tmp/$prog.file2 + diff /tmp/$prog.file1 /tmp/$prog.file2 | head -15 + rm /tmp/$prog.file1 /tmp/$prog.file2 + s=1 + break + fi + counter=$((counter + 1)) +done +cd $here + +zfs umount ${mp0#/} +zfs destroy -r stress2_tank +zpool destroy stress2_tank + +mdconfig -d -u $u2 +mdconfig -d -u $u1 +set +u +[ $loaded ] && kldunload zfs.ko +rm /tmp/$prog /tmp/$prog.c +exit $s From nobody Mon Nov 18 09:47:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsN882shCz5cdPM; Mon, 18 Nov 2024 09:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsN882PtYz43FZ; Mon, 18 Nov 2024 09:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731923240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+IkqtU6oLJA8ZRANO4O6hR3WX6FmpH6zZSoEQPMYy/E=; b=XjhNHwPyrwepjkxSaf4DZGfh5GxW7em8Jq4Dh6d7tM+danTUq8znPhZoFTfbwWes/jrilQ Zm0R3xy7E1ZrXK/YBTXGpiaOdUOaMRSOjM0dkNv8beClEFetTMbwqfLEB6Dfv/JwrAZiph LDDII/SuJMysBxANPtg9uFchFEyIPTAlWHjVFG/UPJDyIyHKBww8gykApHfFeuQx5q9JQ9 GF3oWqMtsaqw272994qNH0tTCWA7FKPA2QNfpFEutjcgI1aWbJ9nBH30B55Xv1dXDVIh15 KFLbVL4PrVj7g4MJ0gIgHDBq8hoBob+ahfIjhEbdc2lMdR/s1AC5ncg1+Ji5MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731923240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+IkqtU6oLJA8ZRANO4O6hR3WX6FmpH6zZSoEQPMYy/E=; b=FrNAR+jgmor0iTMUxGoyhbg8pzAy8eti2yk/hBD/pT/nME6o8PQ4kdP/gH6ZOdWnMmWcMk 6VKdajk5BJcrwdNoDP5vg/Z5MTEABLIyevwFbBZglruEHhstKaYoRzEx090Kca+OrZOICO Rm7Vs3oVlPQbCBZDZf6fDJSAjmTlOKovSzSChKKpl+hnpEhvwq2Kxmm05chM408JMCrid/ sczylwMpufz8s9K1P66glyfxjtzcc6OFUqjmHnTDQxyj4bX/Gn9gLN2DFVeBXmJLF7BBae 6wzgEXyzEEh5ohtDcOKPkykt4BmXVT4m++AdEaKuEFwdgvEnK60oyDU1512twg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731923240; a=rsa-sha256; cv=none; b=KsD5Gb4SuVePf6NxlxKEAFi8h2Cq04Nd52uDFOkvr2vahqN88pWWgZ+AyFwD3g+JuY9Ofw KegY9BAHuXNmNrdewMpv4O1idjShLIpaoLTWrmGe391/W7PCUiwXxM+u/hqnJQm4BbFzty zgNGGUoc/+mYfdgL47DFrLFnTPzXRJf+kkHHM2IJzaD03uvR0ToRUfHiqbfQQ9F/L82i5d PdXEoSvyuzjzbRRdj7nhVYO0QMwt1VcY8N1ZlpyL7u+9NokSrFf/tJBAePQSMBE+/jpLPy z5CeTm21ME+ikKTUcX8ewANBr8HP2VLShgj/SA9eXr/4dy+QYw1JnZQuYqay1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsN8821BKzbTR; Mon, 18 Nov 2024 09:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AI9lKRm027854; Mon, 18 Nov 2024 09:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AI9lKZU027851; Mon, 18 Nov 2024 09:47:20 GMT (envelope-from git) Date: Mon, 18 Nov 2024 09:47:20 GMT Message-Id: <202411180947.4AI9lKZU027851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 43778a593f92 - main - stress2: Added zfs test scenarios List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43778a593f92dc09cedee69b47b6486dd579900b Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=43778a593f92dc09cedee69b47b6486dd579900b commit 43778a593f92dc09cedee69b47b6486dd579900b Author: Peter Holm AuthorDate: 2024-11-18 09:46:28 +0000 Commit: Peter Holm CommitDate: 2024-11-18 09:46:28 +0000 stress2: Added zfs test scenarios --- tools/test/stress2/misc/zfs15.sh | 88 ++++++++++++++++++++++++++++++++ tools/test/stress2/misc/zfs16.sh | 105 +++++++++++++++++++++++++++++++++++++++ tools/test/stress2/misc/zfs17.sh | 74 +++++++++++++++++++++++++++ tools/test/stress2/misc/zfs19.sh | 72 +++++++++++++++++++++++++++ 4 files changed, 339 insertions(+) diff --git a/tools/test/stress2/misc/zfs15.sh b/tools/test/stress2/misc/zfs15.sh new file mode 100755 index 000000000000..b40474507517 --- /dev/null +++ b/tools/test/stress2/misc/zfs15.sh @@ -0,0 +1,88 @@ +#!/bin/sh + +# Test scenario suggestion by: markj@ + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +kldstat -v | grep -q zfs.ko || { kldload zfs.ko; loaded=1; } || + exit 0 + +. ../default.cfg + +here=`pwd` +level=`jot -r 1 1 3` # Redundancy levels +mp1=/stress2_tank/test +s=0 +u1=$mdstart +u2=$((u1 + 1)) +u3=$((u1 + 2)) +u4=$((u1 + 3)) +u5=$((u1 + 4)) + +set -e +mdconfig -l | grep -q md$u1 && mdconfig -d -u $u1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $u2 +mdconfig -l | grep -q md$u3 && mdconfig -d -u $u3 +mdconfig -l | grep -q md$u4 && mdconfig -d -u $u4 +mdconfig -l | grep -q md$u5 && mdconfig -d -u $u5 + +mdconfig -s 512m -u $u1 +mdconfig -s 512m -u $u2 +mdconfig -s 512m -u $u3 +mdconfig -s 512m -u $u4 +mdconfig -s 512m -u $u5 + +zpool list | egrep -q "^stress2_tank" && zpool destroy stress2_tank +[ -d /stress2_tank ] && rm -rf /stress2_tank +zpool create stress2_tank raidz$level md$u1 md$u2 md$u3 md$u4 +zfs create stress2_tank/test +set +e + +export RUNDIR=/stress2_tank/test/stressX +export runRUNTIME=5m +export LOAD=80 +export symlinkLOAD=80 +export rwLOAD=80 +export TESTPROGS=" +testcases/lockf2/lockf2 +testcases/symlink/symlink +testcases/openat/openat +testcases/rw/rw +testcases/fts/fts +testcases/link/link +testcases/lockf/lockf +testcases/creat/creat +testcases/mkdir/mkdir +testcases/rename/rename +testcases/mkfifo/mkfifo +testcases/dirnprename/dirnprename +testcases/dirrename/dirrename +testcases/swap/swap +" + +(cd ..; ./testcases/run/run $TESTPROGS > /dev/null 2>&1) & + +sleep 60 +echo "zpool attach stress2_tank raidz$level-0 md$u5" +zpool attach stress2_tank raidz$level-0 md$u5 +sleep 30 +zfs snapshot stress2_tank/test@1 +wait + +while zpool status | grep -q "in progress"; do + sleep 5 +done +zpool scrub stress2_tank +zpool status | grep -q "errors: No known data errors" || + { zpool status; s=1; } + +zfs umount stress2_tank/test +zfs destroy -r stress2_tank +zpool destroy stress2_tank + +mdconfig -d -u $u1 +mdconfig -d -u $u2 +mdconfig -d -u $u3 +mdconfig -d -u $u4 +mdconfig -d -u $u5 +[ -n "$loaded" ] && kldunload zfs.ko +exit $s diff --git a/tools/test/stress2/misc/zfs16.sh b/tools/test/stress2/misc/zfs16.sh new file mode 100755 index 000000000000..258bf9ea4799 --- /dev/null +++ b/tools/test/stress2/misc/zfs16.sh @@ -0,0 +1,105 @@ +#!/bin/sh + +# No problems seen + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +kldstat -v | grep -q zfs.ko || { kldload zfs.ko; loaded=1; } || + exit 0 + +. ../default.cfg + +here=`pwd` +cd /tmp +sed '1,/^EOF/d' < $here/datamove.sh > zfs16.c +mycc -o zfs16 -Wall -O0 -g zfs16.c || exit 1 +rm -f zfs16.c + +mp1=/stress2_tank/test +u1=$mdstart +u2=$((u1 + 1)) + +set -eu +mdconfig -l | grep -q md$u1 && mdconfig -d -u $u1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $u2 + +mdconfig -s 2g -u $u1 +mdconfig -s 2g -u $u2 + +zpool list | egrep -q "^stress2_tank" && zpool destroy stress2_tank +[ -d /stress2_tank ] && rm -rf /stress2_tank +zpool create stress2_tank md$u1 md$u2 +zfs create stress2_tank/test +set +e + +(cd $here/../testcases/swap; ./swap -t 2m -i 20 -l 100 -h > /dev/null) & +sleep 2 +cd $mp1 +while pgrep -q swap; do + /tmp/zfs16; s=$? + rm -f /stress2_tank/test/* +done +cd $here +while pkill swap; do sleep 1; done +wait + +zfs umount stress2_tank/test +zfs destroy -r stress2_tank +zpool destroy stress2_tank +mdconfig -d -u $u1 +mdconfig -d -u $u2 +rm -f /tmp/zfs16 +set +u +[ $loaded ] && kldunload zfs.ko +exit $s +EOF +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SIZ (500UL * 1024 * 1024) + +int +main(int argc __unused, char *argv[]) +{ + off_t hole; + size_t len; + int fd; + char *p, *path; + + len = SIZ; + + path = argv[1]; + if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622)) == -1) + err(1,"open()"); + if (ftruncate(fd, len) == -1) + err(1, "ftruncate"); + if ((p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == + MAP_FAILED) { + if (errno == ENOMEM) + return (1); + err(1, "mmap(1)"); + } + p[1 * 1024] = 1; + p[2 * 1024] = 1; + p[4 * 1024] = 1; + + if (msync(p, len, MS_SYNC | MS_INVALIDATE) == -1) + err(1, "msync()"); + + if ((hole = lseek(fd, 0, SEEK_HOLE)) == -1) + err(1, "lseek(SEEK_HOLE)"); + if (hole != SIZ) + printf("--> hole = %jd, file size=%jd\n", + (intmax_t)hole, (intmax_t)SIZ); + close(fd); + + return (hole == SIZ ? 0 : 1); +} diff --git a/tools/test/stress2/misc/zfs17.sh b/tools/test/stress2/misc/zfs17.sh new file mode 100755 index 000000000000..d20e39765afa --- /dev/null +++ b/tools/test/stress2/misc/zfs17.sh @@ -0,0 +1,74 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Copy from nullfs over zfs to nullfs over ufs +# Test scenario description by: mjguzik + +# Page fault seen: +# https://people.freebsd.org/~pho/stress/log/log0498.txt + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +[ `sysctl -n kern.kstack_pages` -lt 4 ] && exit 0 + +. ../default.cfg + +set -u +kldstat -v | grep -q zfs.ko || { kldload zfs.ko || + exit 0; loaded=1; } + +u1=$mdstart +u2=$((u1 + 1)) +u3=$((u2 + 1)) +mp0=/stress2_tank/test # zfs mount +mp1=$mntpoint # nullfs of zfs +mp2=$mntpoint$mdstart # ufs +mp3=$mntpoint$((mdstart + 1)) # nullfs of ufs +mkdir -p $mp2 $mp3 + +mdconfig -l | grep -q md$u1 && mdconfig -d -u $u1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $u2 + +mdconfig -s 2g -u $u1 +mdconfig -s 2g -u $u2 + +zpool list | egrep -q "^stress2_tank" && zpool destroy stress2_tank +[ -d /stress2_tank ] && rm -rf /stress2_tank +zpool create stress2_tank raidz md$u1 md$u2 +zfs create ${mp0#/} + +mount | grep -q $mp1 && umount -f $mp1 +mount -t nullfs $mp0 $mp1 + +mdconfig -a -t swap -s 1g -u $u3 +newfs $newfs_flags /dev/md$u3 > /dev/null +mount /dev/md$u3 $mp2 +mount -t nullfs $mp2 $mp3 + +dd if=/dev/zero of=$diskimage bs=1m count=50 status=none +cp $diskimage $mp1 +cp $mp1/diskimage $mp3 +rm -f $diskimage + +umount $mp3 +umount $mp2 +mdconfig -d -u $u3 + +while mount | grep -q "on $mntpoint "; do + umount $mntpoint && break + sleep 1 +done + +zfs umount ${mp0#/} +zfs destroy -r stress2_tank +zpool destroy stress2_tank + +mdconfig -d -u $u2 +mdconfig -d -u $u1 +set +u +[ -n "$loaded" ] && kldunload zfs.ko +exit 0 diff --git a/tools/test/stress2/misc/zfs19.sh b/tools/test/stress2/misc/zfs19.sh new file mode 100755 index 000000000000..a3bb19c8be07 --- /dev/null +++ b/tools/test/stress2/misc/zfs19.sh @@ -0,0 +1,72 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Hunt for "vm_fault: pager read error, pid 99058 (mmap)" + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +kldstat -v | grep -q zfs.ko || { kldload zfs.ko; loaded=1; } || + exit 0 + +. ../default.cfg + +prog=$(basename "$0" .sh) +here=`pwd` +log=/tmp/$prog.log +mp1=/stress2_tank/test +u1=$mdstart +u2=$((u1 + 1)) + +set -e +mdconfig -l | grep -q md$u1 && mdconfig -d -u $u1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $u2 + +mdconfig -s 2g -u $u1 +mdconfig -s 2g -u $u2 + +zpool list | egrep -q "^stress2_tank" && zpool destroy stress2_tank +[ -d /stress2_tank ] && rm -rf /stress2_tank +zpool create stress2_tank md$u1 md$u2 +zfs create stress2_tank/test +set +e + +export RUNDIR=/stress2_tank/test/stressX +export runRUNTIME=2m +export LOAD=70 +export mmapLOAD=100 +export TESTPROGS="testcases/mmap/mmap testcases/swap/swap" + +(cd ..; ./testcases/run/run $TESTPROGS > /dev/null 2>&1) & rpid=$! +sleep 5 + +tail -F -n 0 /var/log/messages > $log & lpid=$! + +start=`date +%s` +while [ $((`date +%s` - start)) -lt 120 ]; do + zfs umount -f stress2_tank/test && + zfs mount stress2_tank/test + sleep 5 + zfs list | grep -q /stress2_tank/test || break + pgrep -q mmap || break +done +pkill run swap mmap +while pgrep -q swap; do pkill swap; done +wait $rpid + +zfs umount stress2_tank/test +zfs destroy -r stress2_tank +zpool destroy stress2_tank + +mdconfig -d -u $u1 +mdconfig -d -u $u2 +[ -n "$loaded" ] && kldunload zfs.ko + +kill $lpid && wait $lpid +grep -m 1 "pager read error" $log && s=1 || s=0 +rm $log +s=0 # This is an expected behavior for zfs +exit $s From nobody Mon Nov 18 11:22:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsQFz45P6z5ck96; Mon, 18 Nov 2024 11:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsQFz3S1Zz4HnY; Mon, 18 Nov 2024 11:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731928951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ec8Xy85a0KN5nnivXhlL6ZYlEN77d6NTSB3Cn4z+jSc=; b=ZpP1990hN+XL4Kx1bO2cRhefjMXN0fKQnFAmLp9xwMvys91DW/bkw4l58oVvWEE8S8A1fB 9nddknaTMWFZa38o5gXBitGi0kXQjwMcjQUpM/Liu6/zrJWmk7voVn1zPVC8ztKaUqTDe3 9+sAJSa00AawkAE7sJweW78O1fZuD7kte+PX7fJrPfMg6Cvw/yvQH8MlST5PqdnZyuZ9GZ orvtstOyXpsRrxxSS3/HRaVj0376e9lM0mfOnSZSdy0ZaaIUiUnyvAjftFBuRDbBPSK3SJ slAhMv9+1jCTdMIAAh2b7cHgPko5mBL+FX667ESPv3AowCg8DGReGjYDrqsxSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731928951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ec8Xy85a0KN5nnivXhlL6ZYlEN77d6NTSB3Cn4z+jSc=; b=oq4o+wnH5mxhNUO/6qahuOVIbcfe8uFlOgN+frucVPQFjjmnYSMfe4ya8HmQlbydRGtoqn BEZpqjPAgN/fAaAKsTW1Jxoioa4ESqkWzVsUAruVHzFOflfDc0nyPuK2NSclTGdJrnJM/z ETk9m1MoQrtIwfNtRRfBMM/Ku7V2tMe66K9t/7frkmQ50xbc9ziVBMQVASnBNxgJfa6Fvi xu9IlhaBCPR13YiTpCfO7FHesI8NncpCuqWrYyjn3w4U+KvryAyGt3Y7Kn16OjSCuQtEaJ 22oPjFB0KDHDtLpdxBjQm8Lmn1hyxpftoNWMOg3gfcX+LpRB/5AGFZUN8oVBjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731928951; a=rsa-sha256; cv=none; b=fvzEhTeBYlHgntxgPPRQQ8y2CmpR3KGakEEU43hA2ZfDb4oekZ/hSFY6QOpA+Izpe53w51 aoekTjujpNoPUiyyT26VjO9rLsJyTKF9ZFiunKUEZavQ5q7grhIQgftMMweHcSsGovQYhk qe24MKMlddq3fAMnm2YYF59y/NpXYewqAXRBheie+Dmu1QkVNw8mrv/uVX9kAx3ZXgsd3W FwLEK89OFs9dVtiYTWmCDV/s1K3BBaK0WU8BgAg8tVMit0A+mgvcfe2u2wnzNiazUuLCQz 2XtpNcFJ6beiKRbxM0ZKTubO3i+KjclWjKJf3ueHLTkc9ZAAH1tqXKB0WejMqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsQFz2m49zdYv; Mon, 18 Nov 2024 11:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AIBMV3W012276; Mon, 18 Nov 2024 11:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AIBMV16012273; Mon, 18 Nov 2024 11:22:31 GMT (envelope-from git) Date: Mon, 18 Nov 2024 11:22:31 GMT Message-Id: <202411181122.4AIBMV16012273@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: 83641335f96c - main - pf: clean up pflow sockets on jail removal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 83641335f96cf7eb590c07eb911a8117ec363fd0 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=83641335f96cf7eb590c07eb911a8117ec363fd0 commit 83641335f96cf7eb590c07eb911a8117ec363fd0 Author: Kristof Provost AuthorDate: 2024-11-18 10:06:41 +0000 Commit: Kristof Provost CommitDate: 2024-11-18 10:06:46 +0000 pf: clean up pflow sockets on jail removal pflow opens sockets in the kernel to transmit netflow information. If this is done in a (vnet) jail these sockets end up preventing the removal of the jail. The VNET_SYSUNINIT() vnet_pflowdetach() function doesn't get called, but that's the function that would remove the sockets. Install a callback on the PR_METHOD_REMOVE jail callback and close the sockets there. This ensures that the jail can get cleaned up. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47545 --- sys/netpfil/pf/pflow.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pflow.c b/sys/netpfil/pf/pflow.c index 5ce1369d9f14..36b528290306 100644 --- a/sys/netpfil/pf/pflow.c +++ b/sys/netpfil/pf/pflow.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -184,15 +185,28 @@ vnet_pflowattach(void) VNET_SYSINIT(vnet_pflowattach, SI_SUB_PROTO_FIREWALL, SI_ORDER_ANY, vnet_pflowattach, NULL); -static void -vnet_pflowdetach(void) +static int +pflow_jail_remove(void *obj, void *data __unused) { +#ifdef VIMAGE + const struct prison *pr = obj; +#endif struct pflow_softc *sc; + CURVNET_SET(pr->pr_vnet); CK_LIST_FOREACH(sc, &V_pflowif_list, sc_next) { pflow_destroy(sc->sc_id, false); } + CURVNET_RESTORE(); + + return (0); +} +static void +vnet_pflowdetach(void) +{ + + /* Should have been done by pflow_jail_remove() */ MPASS(CK_LIST_EMPTY(&V_pflowif_list)); delete_unrhdr(V_pflow_unr); mtx_destroy(&V_pflowif_list_mtx); @@ -1776,6 +1790,8 @@ static const struct nlhdr_parser *all_parsers[] = { &set_parser, }; +static unsigned pflow_do_osd_jail_slot; + static int pflow_init(void) { @@ -1784,6 +1800,11 @@ pflow_init(void) NL_VERIFY_PARSERS(all_parsers); + static osd_method_t methods[PR_MAXMETHOD] = { + [PR_METHOD_REMOVE] = pflow_jail_remove, + }; + pflow_do_osd_jail_slot = osd_jail_register(NULL, methods); + family_id = genl_register_family(PFLOWNL_FAMILY_NAME, 0, 2, PFLOWNL_CMD_MAX); MPASS(family_id != 0); ret = genl_register_cmds(PFLOWNL_FAMILY_NAME, pflow_cmds, NL_ARRAY_LEN(pflow_cmds)); @@ -1794,6 +1815,7 @@ pflow_init(void) static void pflow_uninit(void) { + osd_jail_deregister(pflow_do_osd_jail_slot); genl_unregister_family(PFLOWNL_FAMILY_NAME); } From nobody Mon Nov 18 12:24:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsRdZ266jz5d2nH; Mon, 18 Nov 2024 12:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsRdZ1MLWz4QPX; Mon, 18 Nov 2024 12:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731932674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BOmmbSbUXE27gT4JHZ3+fcyVdovlvqwPGjbxudYsBMg=; b=FEyP0pQy1YP19hk5VVEcjfx/679RPjsseg0ixY9AMzIbjLY/pfidQt975GV2b7KDHyUJ8L x8rocQ10KgKNAOPshx9jUkZx98AQ0wYeZSRZX6RTXp9xf/ENwa0MMXqpDh3tX0XwwAaA9i oYvXmNY+t1u+0XIEeXdotiqIm1SgHEoDrwsqF2I6VWBWXcGH68ra8A8hrV1zVs2KihAo8e oywqXBbeB1x0IuxTpBmeoFjLtPEEcIozB6vw28Z9XBfwqPJLApj0nzjyp2gb4dsR6SkBeC VkCfv/fEWSmQcHF9CBUJwJM+FyCz1rC+wzlvlrQKVnLDJ1nr6z8OKrxDLa0G1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731932674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BOmmbSbUXE27gT4JHZ3+fcyVdovlvqwPGjbxudYsBMg=; b=pIIb9X9xmMlTIdE+l0x7cmJu5wE2o3Z2Fn9qb1qvUt+Rf0tMsxHCArXU2uKPagqHje77lB 7VVdxhmKXmY4hMcE6cMoZZtkDHPLb7y8biUCrM7FKyMv4T9ahbP3F4riYkXCgJ5tTd6wXX zgl2Txbm5uJi45he2XtVGKCUk4Z2hmVudccmhjS5R0zmm5vxbDC2JARBW4xXvbF17vNqkW ktkAuYyI1wtbGZT9KYTtB7X5XKrPkCLTga7rR4bqCcLw8l2HCm0cFY2424M+eZuf2hQLsh Ns2x8Fk1tabUJsyjVbOOiZsvZH+xyr438ROHwQHK5kT3V8vsXFnnySATqpdo1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731932674; a=rsa-sha256; cv=none; b=ZlNDos/KzNsqlx/ctAJktC3fEhr1EKzpEc2gDHLfytcaUbvmOHAKmM7VxWrDp7HR9hKnXk nz9f/feBYxslpSGwxfTRwWM6bCJDrFd2KQopHnKnJlZV+wpwTYccX9C8RyllyWJCl/HRKK fSzJ8NVvXrkQjqiP3oIQMW/PNLSS0MPjPNLFUhjvEWHRlOYx8Hluum29b+/706+03QJnf9 /DDbuSjwl/Qtvapggp/gZuPfkdOmzcqjvI8WaDcZYbJqVNcYdar7jATdIBd4OxBcQ8mNQs IpOtkGe2Y3mEBJMYl6f5CsHKgFqx1utghuSUR6OfVQcXrxUpWihRNzzjOG5CzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsRdZ0sz0zgNb; Mon, 18 Nov 2024 12:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AICOYc1024376; Mon, 18 Nov 2024 12:24:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AICOYFM024373; Mon, 18 Nov 2024 12:24:34 GMT (envelope-from git) Date: Mon, 18 Nov 2024 12:24:34 GMT Message-Id: <202411181224.4AICOYFM024373@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: 645f8bcba9c8 - main - ps.1: remove stray tab which breaks columns 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 645f8bcba9c8cf4eac69cc66d4112800a496193f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=645f8bcba9c8cf4eac69cc66d4112800a496193f commit 645f8bcba9c8cf4eac69cc66d4112800a496193f Author: Konstantin Belousov AuthorDate: 2024-11-18 12:23:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-18 12:23:43 +0000 ps.1: remove stray tab which breaks columns alignment Sponsored by: The FreeBSD Foundation MFC after: 3 days --- bin/ps/ps.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index 8ece5b1bbfad..5f3c6d122dbb 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -377,7 +377,7 @@ the include file .It Dv "P2_PROTMAX_ENABLE" Ta No "0x00000200" Ta "Force enable implied PROT_MAX" .It Dv "P2_PROTMAX_DISABLE" Ta No "0x00000400" Ta "Force disable implied PROT_MAX" .It Dv "P2_STKGAP_DISABLE" Ta No "0x00000800" Ta "Disable stack gap for MAP_STACK" -.It Dv "P2_STKGAP_DISABLE_EXEC" Ta No " 0x00001000" Ta "Stack gap disabled after exec" +.It Dv "P2_STKGAP_DISABLE_EXEC" Ta No "0x00001000" Ta "Stack gap disabled after exec" .It Dv "P2_ITSTOPPED" Ta No "0x00002000" Ta "itimers stopped (as part of process stop)" .It Dv "P2_PTRACEREQ" Ta No "0x00004000" Ta "Active ptrace req" .It Dv "P2_NO_NEW_PRIVS" Ta No "0x00008000" Ta "Ignore setuid on exec" From nobody Mon Nov 18 16:24:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsXyN2ykNz5dJ5g; Mon, 18 Nov 2024 16:24:28 +0000 (UTC) (envelope-from brooks@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsXyN2C4lz4vs7; Mon, 18 Nov 2024 16:24:28 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731947068; 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=7kHcCgnZox+D51/+P6XDflWB3JRm1MaoxGP1pEMf8p8=; b=dN9/II/GIuou3tWR0vmS5pPGJAeGZsA1CQa9yB7VlZ83c1LjrLoKIcMUjpxoz0AOBs8S5B IkXcpGcVcOsvPQabgrOr4/hFP4QMDNAgTCPSZDvJa2H6P27i2E7CM/L6vd5uwslcYH/P5S 9iqxy7xF3DAsHSL9oeRUB0CiHpbmrlcs8MC6snAh73iAVcMb5DQQW5ALKXEz35d8Ew77yc PLzM2AwV72inctzRZYBs+79wjAAWRUTYH23XDTMaIb9kZ+53UV9vB81VpxZnBbtdMjyU22 qUcKcdAQPL7aRG8C9oonSIgWdL0G+1ZsseWZCaJFbOcICcSnZcomgwjElDB4vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731947068; 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=7kHcCgnZox+D51/+P6XDflWB3JRm1MaoxGP1pEMf8p8=; b=aAEKwBHV048qW86w+WyJXS2j2rDdPKZQuICq6zPiy+IZ0lBbzvkzxdqeeIpeswkVrNQUIv zy0NsJivlBynOu8+IEX/2+/pvZDZaPg3mD2KVuiXy3sBQ0y2UyqHzJIvMDGHmViMeZUqKz sIUXkBaOQjoXxkfTiuaU1QfiU3T7GnSQryW/nDJHg0OlQWvyAlMbLfPHj8NMJtaVA6LtQ3 kgRibSkEtshArsxbOprLHHaz4v9axtqPDeEvj6FAPu0/S3/yIxxnYLlX0YzVNRTk9oyTGP EFcb/ESh4Z/kiy4xCKGGRviq5rgzTYPyzf53TC84bizsQ36ay5AlEGFNWl4WQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731947068; a=rsa-sha256; cv=none; b=LfTvq1XQRcoJQxJCzk+2TtM4YnwBWE4hHBHKkvdd1ytNzLOtUH2/E7rNsrqPmRKxHh/xxR GPFvhUAl4FlDVSQZYXfB4ID96KL4AmXBwAeer8ROhu7h0itFodG8sIsS6iih6T8S9kg+FR 5NpoWYXnjDUaTrZD9RsEAHwb071ZEDPYGesnnhFr3D4PiLRq2iWSlbbIRKQIjVojVaEu3h 9kksjnv+xhWUMNRX1vNKb2fmD72QKwXiu5x2AXp8unPpMg5V6G7OiUUGMqURhq9rCRLwQI MpO2US5x6e1Ns6h2K4/Mj4ZBEfB6SSEfeYa+msrTZ72T+Jbj8mk7BapP7UcNvA== 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) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XsXyN1VqVz14Yn; Mon, 18 Nov 2024 16:24:28 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 630423C019B; Mon, 18 Nov 2024 16:24:27 +0000 (UTC) Date: Mon, 18 Nov 2024 16:24:27 +0000 From: Brooks Davis To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4ef07eb0802a - main - getentropy: Add Git hashes corresponding to SVN references Message-ID: References: <202411161523.4AGFNBcu010436@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202411161523.4AGFNBcu010436@gitrepo.freebsd.org> On Sat, Nov 16, 2024 at 03:23:11PM +0000, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4ef07eb0802a6353faf79d58719d8008decabae0 > > commit 4ef07eb0802a6353faf79d58719d8008decabae0 > Author: Ed Maste > AuthorDate: 2024-11-16 15:18:16 +0000 > Commit: Ed Maste > CommitDate: 2024-11-16 15:22:46 +0000 > > getentropy: Add Git hashes corresponding to SVN references > > getentropy has a comment about a special case to support kernels between > SVN revisions r331280 and r337999. Add the corresponding Git hashes so > there's a usable reference after Subversion infrastructure disappears. This code should likely be removed soon as the fix commit is in 12.0.0. It's not completely clear cut as it is post ino64 and thus not completely in the "can't possibably work" category. -- Brooks From nobody Mon Nov 18 16:49:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsYWD3YWsz5dKPK for ; Mon, 18 Nov 2024 16:49:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsYWC6m2sz41dp for ; Mon, 18 Nov 2024 16:49:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-7eab7622b61so3350920a12.1 for ; Mon, 18 Nov 2024 08:49:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1731948566; x=1732553366; 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=PbBocjXC8QH/v4XO/Wca6fkVjYHmFFmJn2IuWSwfiZg=; b=SiBjx4bgEt1b2brdgulB24xDZV66u1b4oojZbCnfFxy7MLNxQBSZ7p6K52SSUUSw1G FUXE5xszs625TlFOf9/6W8E9Pv8QZy5vFTj0jaZpLGMztmzxAiSxWHHTWVCRJjkeugbr 5HjHFJTAiXkC3gKiqb9gRuUaPDb613PMfLfJdOHPPkkXwmMYuOiBAvR9sCquvQuqKIIl nPoIxyRBc4mPdlfmZXF/fX2dxB9ENmzHPnqVnlTJ2Q0N4rUXChYyVMyiak7F6jy2NttN 7VJJD4VjevXMgghqdrdcdxVMw272tRMF/DJbenUD+/Ct49JMZPjRyRrgFb9FjAUMguJw h7Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731948566; x=1732553366; 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=PbBocjXC8QH/v4XO/Wca6fkVjYHmFFmJn2IuWSwfiZg=; b=k7maN/shHpszVt6Xa7SZfRgXbzBmlmqI+pdATAs63i4tbPFVokPpzcUC5LEH+wMmUS M+AvnRlhXwn6gYuFR+KDtJExYQRjQlto9u54TlQVVOwaVPWRSopXyrfhCyUgfM/CXnLL Sewm61dM19ql+rBxNKG/fYYgBhS/o45tudX6MYRpdSK/yFQvj+Y3FMAl9zGFewlT2mbi Ssqg7x1UKAm8lqJL/XaKQdCt0r/3Z+5g7jCiWOtRqqjBLYcmp8lVcsljmDDZhz7lHc6m t5XFJIaZ5tHcmih1PTwjdQ+GwqF+E3WiCPTQy3qyfaQ+K8yRGm0i8/Mqsrf8ieBQkpzn Odpw== X-Forwarded-Encrypted: i=1; AJvYcCWzkHoD9h6NUgiSvCQxXVf1buXTgXc+sGW1JgweGwjYYV/ZMFFNj+Dszn5gCZX3DgiU/tvskGkF/hob6UOAwhkYOSne@freebsd.org X-Gm-Message-State: AOJu0YwY5LD9+aIyVlPPu2u0Mmi6auoQPGQD5mB0ZRHTdqY8TuD0X1BP DwPZpZtnyZ+LO6GYf1+MkLRuOM7/Q2oKLumvs4l5jOEYnIJCZ36XSci2l60wlTDjd0HlKUhXg16 SwHeB9XdfSisjR/VaW4Danlm6otsNbG4CohIl8g== X-Google-Smtp-Source: AGHT+IFjkEfQcR2bbXbN9G8iaofEMpoOnv4fFxddqM4uqllRioMUlYAT2AC16AajYwQjzqLw4MPiv8cZYvRpER84Em4= X-Received: by 2002:a05:6a21:9988:b0:1dc:1147:9ff4 with SMTP id adf61e73a8af0-1dc90aea245mr18159436637.1.1731948566313; Mon, 18 Nov 2024 08:49:26 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411161523.4AGFNBcu010436@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 18 Nov 2024 09:49:15 -0700 Message-ID: Subject: Re: git: 4ef07eb0802a - main - getentropy: Add Git hashes corresponding to SVN references To: Brooks Davis Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000001096b0062732b387" 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: 4XsYWC6m2sz41dp X-Spamd-Bar: ---- --0000000000001096b0062732b387 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 18, 2024 at 9:24=E2=80=AFAM Brooks Davis w= rote: > On Sat, Nov 16, 2024 at 03:23:11PM +0000, Ed Maste wrote: > > The branch main has been updated by emaste: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D4ef07eb0802a6353faf79d58719d800= 8decabae0 > > > > commit 4ef07eb0802a6353faf79d58719d8008decabae0 > > Author: Ed Maste > > AuthorDate: 2024-11-16 15:18:16 +0000 > > Commit: Ed Maste > > CommitDate: 2024-11-16 15:22:46 +0000 > > > > getentropy: Add Git hashes corresponding to SVN references > > > > getentropy has a comment about a special case to support kernels > between > > SVN revisions r331280 and r337999. Add the corresponding Git hashe= s > so > > there's a usable reference after Subversion infrastructure > disappears. > > This code should likely be removed soon as the fix commit is in 12.0.0. > It's not completely clear cut as it is post ino64 and thus not > completely in the "can't possibably work" category. > So we can just delete it. This code is for running newly compiled binaries with kernels that are in a 4 month window in 2018. This is 'forwar= d compat' code. Generally, we don't provide forward compatibility code, except when it affects the upgrade for a "short" window or other very well defined exceptions. One could quibble over the exact bounds of this purposely fuzzy rule, but this is so far outside those bounds that we can just delete this code. As brooks points out, there's dozens of new system calls since then that are also used, in addition to the ino64 changes, that have no 'forward compat code'. In the past, we've said we officially we don't support forward compat at all, though had the softer line due to the difficulty in rollback. But BE's likely will make the 'no forward compat' more often, rather than less, since the kernel and user space can trivially be rolled back. The 'fuzzy' rules developed in a UFS-only world which required greater care and efforts to not brick systems. It might be a good thing for srcmgr to document the policy to provide better guidance than the current tribal knowledge we need. Warner --0000000000001096b0062732b387 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
purposely fuzzy rule, but this is so far outside those bounds that we<= /div>
can just delete this code. As brooks points out, there's doze= ns of new
system calls since then that are also used, in addition= to the ino64 changes,
that have no 'forward compat code'= . In the past, we've said we officially
we don't support = forward compat at all, though had the softer line due
to the diff= iculty in rollback. But BE's likely will make the 'no forward compa= t'
more often, rather than less, since the kernel and user sp= ace can trivially
be rolled back. The 'fuzzy' rules devel= oped in a UFS-only world which
required greater care and efforts = to not brick systems.

It might be a good thing for= srcmgr to document the policy to provide
better guidance than th= e current tribal knowledge we need.

Warner
--0000000000001096b0062732b387-- From nobody Mon Nov 18 17:31:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsZRb2jLYz5dMZq; Mon, 18 Nov 2024 17:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsZRb08xLz45JV; Mon, 18 Nov 2024 17:31:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731951083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=87q2TwsAVnoW1XEt8nCdeOdJ+ZPHGWFjhCrFUrCQbDU=; b=Q7i/AECnOWWNDf4UDyRMyn+avexAmnLxp3V1D2J33lWRFTDxJ5OpGNPHvRT+QKgW6TpTHy I5P+oDOj55SPTgKK/hpuDpK3TZOinBJxSVyNDKnSnNNOY8tzI0ePyqvLD7K7t+Ypc+Tusy MqoO1D8coxO8cR8Aw2lJcdxgpBM7a6Qw490jStT3AFGzSNqhsiju0Pog2sZF3RQtKu3IcD eXYZMNidPsS3xhGV5K66U2PjldjzKubgUiIAlHIpNWUl2TCdII3l6zqipff5ZgKwGsKZ55 pyEyap/+v7LQcFBGmvUzUoD6X3C+DLGzEVZWdRHsiq+67ab58sW7wUN5Va78Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731951083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=87q2TwsAVnoW1XEt8nCdeOdJ+ZPHGWFjhCrFUrCQbDU=; b=fIKySithv9n6PZINzaFx0a0fCyZDU0LOZ4ObHeeiJ0Y1BGZCm49Jo+WK584THKGVo1G9yP cP9xKKv6IQ35MI0Yk7sc/QNq4YaClLSfOOPn9CD2gFvEEjiUpjZMbVBWlVdcE3tgx3oGsP gzjdw+P/+5KQEnzorC8R5/2hy6FpVTap+XNVqXzeHcLCvZplTZPHo+x9qba3AZzHfl9JCL 0s3ZX9J/GazlldoCdumzQfoU57txBv5tXClGVIcIlV0nOho1dqGqrY3QIj3nhKbfP6/cAl 6vyQ97PPPXZMVaJa4eOo2AkGPcF2EV5JmdXpLo8qn57rgBatUhWuEeZvVaXKFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731951083; a=rsa-sha256; cv=none; b=qzFkXOHMq03pZqXKDU1rjT+cpf77Gtw6sSA0x7mHg+X+VSdxgalFnXMNvE3j3Tu+8yOL83 zpbcFpycvB3A3DnTyIMvNPzct0Md/qVgRZFA24epp5r9Lg652t4aUepNm7tCPd7SDd37kc 3FkaowtlOWi6f72xqOM/P4TgruguzE2mCuh+lUExF5jiXUkMURXS0uz120767blMjp95K7 jWKYfeFZFL7lqwFtF5xsvtMXU1NxAsJVG4J26S1fH3zCmjcbdPYFdQx7MKmMfJcMNDYHeF my0wp5E5TjgAJAjZsUJ09S26tssDQNJclOqo7icLFQd1IntsQh9DiNeGnmc5wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsZRZ6Fcvzq04; Mon, 18 Nov 2024 17:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AIHVMRn091524; Mon, 18 Nov 2024 17:31:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AIHVMtO091521; Mon, 18 Nov 2024 17:31:22 GMT (envelope-from git) Date: Mon, 18 Nov 2024 17:31:22 GMT Message-Id: <202411181731.4AIHVMtO091521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 10343013a4da - main - manuals: Fix some .Bl -tag lists List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10343013a4daff5e009a2fe980086ce915fb5a28 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=10343013a4daff5e009a2fe980086ce915fb5a28 commit 10343013a4daff5e009a2fe980086ce915fb5a28 Author: Graham Percival AuthorDate: 2024-11-15 17:44:57 +0000 Commit: Mitchell Horne CommitDate: 2024-11-18 17:30:40 +0000 manuals: Fix some .Bl -tag lists Signed-off-by: Graham Percival Reviewed by: mhorne, Alexander Ziaee MFC after: 3 days Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1528 --- lib/msun/man/cospi.3 | 20 +++++++------------- lib/msun/man/sinpi.3 | 14 +++++--------- lib/msun/man/tanpi.3 | 17 ++++++----------- 3 files changed, 18 insertions(+), 33 deletions(-) diff --git a/lib/msun/man/cospi.3 b/lib/msun/man/cospi.3 index 5b33fe2555a1..86e63fb77498 100644 --- a/lib/msun/man/cospi.3 +++ b/lib/msun/man/cospi.3 @@ -62,27 +62,21 @@ where p is the floating\(enpoint precision of .Ar x , then the returned value is 1 and it has no significance. .Sh SPECIAL VALUES -.Bl -tag -.It -.Fn cospi \*(Pm0 +.Bl -tag -width "cospi(+n/2)" +.It Fn cospi \*(Pm0 returns 1. -.It -.Fn cospi \*(Pmn/2 +.It Fn cospi \*(Pmn/2 returns 0 for positive integers .Ar n . -.It -.Fn cospi n +.It Fn cospi n returns 1 for even integers .Ar n . -.It -.Fn cospi n +.It Fn cospi n returns \-1 for odd integers .Ar n . -.It -.Fn cospi \*(Pm\(if +.It Fn cospi \*(Pm\(if return an \*(Na and raises an FE_INVALID exception. -.It -.Fn cospi \*(Na +.It Fn cospi \*(Na return an \*(Na and raises an FE_INVALID exception. .El .Sh SEE ALSO diff --git a/lib/msun/man/sinpi.3 b/lib/msun/man/sinpi.3 index a5f514d3979f..63a1e3010de5 100644 --- a/lib/msun/man/sinpi.3 +++ b/lib/msun/man/sinpi.3 @@ -62,19 +62,15 @@ where p is the floating\(enpoint precision of .Ar x , then the returned value is \*(Pm0 and it has no significance. .Sh SPECIAL VALUES -.Bl -tag -.It -.Fn sinpi \*(Pm0 +.Bl -tag -width "sinpi(NaN)" +.It Fn sinpi \*(Pm0 returns \*(Pm0. -.It -.Fn sinpi \*(Pmn +.It Fn sinpi \*(Pmn returns \*(Pm0 for positive integers .Ar n . -.It -.Fn sinpi \*(Pm\(if +.It Fn sinpi \*(Pm\(if return an \*(Na and raises an FE_INVALID exception. -.It -.Fn sinpi \*(Na +.It Fn sinpi \*(Na return an \*(Na and raises an FE_INVALID exception. .El .Sh SEE ALSO diff --git a/lib/msun/man/tanpi.3 b/lib/msun/man/tanpi.3 index 2b95f5daa8b1..b11d54031b71 100644 --- a/lib/msun/man/tanpi.3 +++ b/lib/msun/man/tanpi.3 @@ -62,22 +62,17 @@ where p is the floating\(enpoint precision of .Ar x , then the returned value is \*(Pm0 and it has no significance. .Sh SPECIAL VALUES -.Bl -tag -.It -.Fn tanpi \*(Pm0 +.Bl -tag -width "tanpi(+n/2)" +.It Fn tanpi \*(Pm0 returns \*(Pm0. -.It -.Fn tanpi \*(Pmn +.It Fn tanpi \*(Pmn returns \*(Pm0 for positive integers .Ar n . -.It -.Fn tanpi \*(Pmn/2 +.It Fn tanpi \*(Pmn/2 returns \*(Na for n > 0 and raises an FE_INVALID exception. -.It -.Fn tanpi \*(Pm\(if +.It Fn tanpi \*(Pm\(if return an \*(Na and raises an FE_INVALID exception. -.It -.Fn tanpi \*(Na +.It Fn tanpi \*(Na return an \*(Na and raises an FE_INVALID exception. .El .Sh SEE ALSO From nobody Mon Nov 18 17:58:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xsb2m2Cgtz5dNbw; Mon, 18 Nov 2024 17:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xsb2m1kk6z46sP; Mon, 18 Nov 2024 17:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731952704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OCYFnezNqDrIcn45WMfmqjSoZnPeGN60IbKi2HXIOGA=; b=yjTvvh9P4lvJqCOLuogiDdPMcuNUTbIYFKOvu4vbFbipjwCylVG5Ct9iEg+cPnfGXMuVXw 28qCpSCsq0j/xQ79OTDqCok5QQggVV718yJTeLktGHLmZqQW78+4GpfO5vG1oTq6KEFM1B GSweUrkqOhVprBfxls88IeGdRKs6UxseVRNpvZUdvtedET4V1l6/kVDlhOAhvJ1AIba5fj 2yKA9djcZ7EQfRVKW8NEauVzZ0iHkU1DK4/PVwaMZhWEgLpFAHTvTMJ1A9gJBBJu2C+O4N UaX9md8zHkqroeYspG9sXSAkOu49rFj4rxJluMSTcXtaEiYZ2tLGr7aKL2DPnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731952704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OCYFnezNqDrIcn45WMfmqjSoZnPeGN60IbKi2HXIOGA=; b=B/uk/A8A8V/rkDxW52q9Gom3PlQmVpNCClpjOmrfuauGhuWedxNk9H0XRq36lHhkOhXrAD 4RPH1pD/h669YemWLDQ5gGyYH5NfN1XEW05Se85Ve3OZsMQMBtpUTHCPUK7gNnZ3ry6dw3 abJeO/lFh+VHQrUJDCl7DyQjgr1IfYbJHWXPQkhGU9OoVvjW9ygxwSswPZSM0rCWqH3QrF /md8kn8pJm+rUxTQQIHhz1w8AEvOd0mLxVjaMwL287pD9/whMcwCcHQc2+rnAdIM3ipXUE lS71JGu3gVKoU+njI4GfxkAdnm26xL1ZYLKrj+d7ECYN+tEdlLRf68F0rzlzEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731952704; a=rsa-sha256; cv=none; b=uPITMG3mX9mhIWZQTk0ZwuOZ47XvuwYCTarQeWwQ7SO25okGgj6BE0nWeASzvEP7Kl/q7A fIb+bzU6VxNqUddY2uZGq2VGxOvkMJguZQyLmTB24uXljCUJmfAazMBFLP/+Ce7Omjk7oq gxI8DTVSonbpYVJ/dJBKnhh42+RoSfBZCmUwSy5RJ3SImRjwJuV/1m9L5Tys7IBPgwCP/v Z56SsPsjnqM2uCYkGXz5uM5wN+zHoFOA3Zoke/7I7EtLlJr8cf1an62bNqXKeUnYTNOzTy UMsNz0DT5CZuQAkGDfSpUf4xvQBj98loXNyVcVTresxzKLUuQU7jN3rusNTBhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xsb2m0x9Rzqyg; Mon, 18 Nov 2024 17:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AIHwNYu038235; Mon, 18 Nov 2024 17:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AIHwNYY038232; Mon, 18 Nov 2024 17:58:23 GMT (envelope-from git) Date: Mon, 18 Nov 2024 17:58:23 GMT Message-Id: <202411181758.4AIHwNYY038232@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: 5eee34fa0351 - main - pf tests: check counters on anchors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5eee34fa0351f1fdb240f7d085145c05e9ed95d5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5eee34fa0351f1fdb240f7d085145c05e9ed95d5 commit 5eee34fa0351f1fdb240f7d085145c05e9ed95d5 Author: Kristof Provost AuthorDate: 2024-11-18 13:40:01 +0000 Commit: Kristof Provost CommitDate: 2024-11-18 17:57:53 +0000 pf tests: check counters on anchors Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/anchor.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/tests/sys/netpfil/pf/anchor.sh b/tests/sys/netpfil/pf/anchor.sh index 25d9d5b6df03..847f8d4f6dab 100644 --- a/tests/sys/netpfil/pf/anchor.sh +++ b/tests/sys/netpfil/pf/anchor.sh @@ -233,6 +233,44 @@ quick_cleanup() pft_cleanup } +atf_test_case "counter" "cleanup" +counter_head() +{ + atf_set descr 'Test counters on anchors' + atf_set require.user root +} + +counter_body() +{ + pft_init + + epair=$(vnet_mkepair) + vnet_mkjail alcatraz ${epair}a + + ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "anchor \"foo\" {\n\ + pass\n\ + }" + + # Generate traffic + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.1 + atf_check -s exit:0 -e ignore \ + -o match:'[ Evaluations: 1 Packets: 2 Bytes: 168 States: 1 ]' \ + jexec alcatraz pfctl -sr -vv +} + +counter_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "pr183198" @@ -241,4 +279,5 @@ atf_init_test_cases() atf_add_test_case "wildcard" atf_add_test_case "nested_label" atf_add_test_case "quick" + atf_add_test_case "counter" } From nobody Mon Nov 18 18:37:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsbvS3x2Rz5dQWH; Mon, 18 Nov 2024 18:37: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsbvS36gTz4Bt8; Mon, 18 Nov 2024 18:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731955028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XIoGVRSzd8yTggUN6OoND//UzDLQ3TLOPNsljDk9DNw=; b=pK90qBpfhpQ0kOB6fUUytAp3vE6Dk85aHJNbSz136fwWqZgIRdqf0ZgDnoS7VRUBtRyGJ1 EzMx+Q18jDjLMbj+9EUAGiUC51zJtkExGhaQ7s5eCt4+bKJdI2xGrXLHMxDwMNiL2rPLi4 HfACF2uOVYvmb1bdR2K354dfegqEzU9VBvh8cxGxVAxvE597AE5dJtHgNOLyxDgRRg9Dpj Xjc1QoA89JNhbVFkyh/wQcAiD/T5oTGyLXzT+JteuJUfSpZ2XkVuvnhRpPbYzcB7bDKK2D hL8nQlJrlaTbbpcWqD5e8kjA5rMiX0Sb5ntPWWWrCo392W/Dx4JV63zCb1WGYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731955028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XIoGVRSzd8yTggUN6OoND//UzDLQ3TLOPNsljDk9DNw=; b=T+uVU1cyXLncljNDvnwI85kktRUCTViwAgmfWFu+kqXFgm1cqED86nfgyS8Q53gddK8CTf ZM1Flstvsj58nPu8hqFHFYs5R/jnlkqw/THFSnsu0VoMrtM49j4Q94vKb6WT6npEmp7uwT 6e3fImYBKRGQzL73QUCekKs2aWTjZFmYLz3aDbhQNkJt4YG1DmNc8ftnl6WNYXqVkCgKrw qKjFFs0sTVOjHX+Oj6i8mQuFwt7C+am9x+gPdEbF/B0R+7F7tvzZPzW8oZJgZttPJfqHnx jRljaMvXp+JZZo5Js16r33j50erNWn35Ssvxo4+v2MElz6WaBeVU6hEE+U2i5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731955028; a=rsa-sha256; cv=none; b=NyoXemxL7yLbr1NS9X5LHdFqdCKJuj75OXW+vGFyA6YZTZtKtw6RhXu9w8OIDJc0i9n2gd 91PF0nZk69BlmhdLuwbJcX86bKafy/xJsw9uc/677bkVz0K34ZtxKRC/Z/ljQbqN+D2PQm BzhNPdBJV4b2Qeb6kMTjctH6K5be2xFBal/G1/1p/5DkeLGKa8yS+CsBoRU9nkbdwk/4ny wLHiRUtg0kzL/uITo8ZLLVU49Nt4CRUFe1qD0Kv2fQl4ndL1PMkfycwL45F7U8mlx0FxW1 UF0ZUpZtBoaAGhh6yN7sphlO/UOYDd7cVg3oPAQgLmUVOLUwaSMINmGcmmLIRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsbvS2kJjzrqL; Mon, 18 Nov 2024 18:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AIIb8YZ012220; Mon, 18 Nov 2024 18:37:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AIIb8ts012217; Mon, 18 Nov 2024 18:37:08 GMT (envelope-from git) Date: Mon, 18 Nov 2024 18:37:08 GMT Message-Id: <202411181837.4AIIb8ts012217@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: 43e045c1733d - main - atf: Guard libexec/atf with WITH_TESTS_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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 43e045c1733d50fad79f3a53e05140b8dc0d7fa6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=43e045c1733d50fad79f3a53e05140b8dc0d7fa6 commit 43e045c1733d50fad79f3a53e05140b8dc0d7fa6 Author: Franco Fichtner AuthorDate: 2024-11-18 18:36:46 +0000 Commit: Mark Johnston CommitDate: 2024-11-18 18:36:46 +0000 atf: Guard libexec/atf with WITH_TESTS_SUPPORT Other atf components are guarded by WITH_TESTS_SUPPORT already. WITH_TESTS is for actual tests. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47660 --- libexec/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libexec/Makefile b/libexec/Makefile index 8287690eeb3c..55e586434087 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -116,10 +116,13 @@ SUBDIR+= tftpd .endif .if ${MK_TESTS} != "no" -_atf= atf _tests= tests .endif +.if ${MK_TESTS_SUPPORT} != "no" +_atf= atf +.endif + .if ${MK_NUAGEINIT} != "no" _nuageinit= nuageinit .endif From nobody Mon Nov 18 19:21:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsctK3crwz5dSyH; Mon, 18 Nov 2024 19:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsctK2rL6z4G4S; Mon, 18 Nov 2024 19:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731957673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kgQAI6MQDAUIRIburYRSJodsCEjVyuXzmEI3tI4G1Pk=; b=u1iGU9G6np7veMQuNmbhKmeBDS8fl8qyHBsVtU/Wvm07X+0QnvAxDWVc28bGJO6iZdlQ2T L/eice6ls1Wgj4G6eV0K0TLDqHqKaJpLj+FBXw2eokCpP/1zG5LHapUHSkLU6gJuWxcGSg sJBXgi1YvUGF4+JmochEBVzjdYn1Id3pZUNiSyrHEXMbBrTtcxjO9PTzLiABW8cwj2ufZH UtQ+AhnYW03ZMOgGIbbB73W9j3kEAFH+UCWPg5GvWKdRhbB1RIA6MeSVxG7V/5tyVAtH4H 7FLAWWaF322URtqzGRWBbgQ/reeL6xTzm8G3CCEpJRsgNVOmZx73UBnhUNGBtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731957673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kgQAI6MQDAUIRIburYRSJodsCEjVyuXzmEI3tI4G1Pk=; b=yXz6GCAT3AGzIZdt2Qkm7rjXYRwX3q87HQbdFlc32ox11cRnvShs3ZN+/kfTOIgG5S3u0c 7vpSJp7PUslhdnKcjtc7d/Fnql1aDpm3LEWPY+7s17pDTMlrPHKrp/tFtbbhnTQFH79Aq+ dMwod99AutAamBsmtVici0wwwyCQHLjDG/UPEAqcFxnbYkqIeWd++tfUND3pv2eD7OQwKk WtS17/dEv1i2v+KExU9YglzNrXeo+adcezy5itIBp7i+hlcM7xOqhwutbswdeyn0HVnlRT TjoFRQWjy8/u4SrjgwNEdZkFaKG4blkjZSGhbYo0C9lxX2ceJfgm98Jk5U1bow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731957673; a=rsa-sha256; cv=none; b=F44Z62A/ERKDMBkjHRuvGpL1RNZ0pPu8D2Oqc6QKRhUNe4s9eeOaXoYLVng8ygcjGriLQc 0R3ZYmpWmRvcbqaLT6qD1Znu4JJcL2S7C1mLOtFScXHD3T9t5Q753g6seyZN4q/IfjJNEB GzyteDjDVcHSIkVuKilB1+GSo+pTrH48+i0iqUq4o4TbPYU2ZVSPAz/HyGgzLa9K5a3B0/ xeBg+k4oWTGu4IRDpM6DSMeAQ5kN8RnjhILG/uPSwUVDnXvbAEGmSwm0rxIqOKlRj2cbF3 mwiMb0cCpEE3rBkJw0LHSFKtn5V/Bmq/iYLFgnWg+PK3VtatainnNLJJFRh4TA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsctK2KdSzsPN; Mon, 18 Nov 2024 19:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AIJLDJf099864; Mon, 18 Nov 2024 19:21:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AIJLDId099861; Mon, 18 Nov 2024 19:21:13 GMT (envelope-from git) Date: Mon, 18 Nov 2024 19:21:13 GMT Message-Id: <202411181921.4AIJLDId099861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 8b0dcdec411d - releng/14.2 - 14.2: Switch from "quarterly" to "release" pkgs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 8b0dcdec411ddc93dab4392602825b51877f7f9c Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8b0dcdec411ddc93dab4392602825b51877f7f9c commit 8b0dcdec411ddc93dab4392602825b51877f7f9c Author: Colin Percival AuthorDate: 2024-11-18 19:20:41 +0000 Commit: Colin Percival CommitDate: 2024-11-18 19:20:41 +0000 14.2: Switch from "quarterly" to "release" pkgs Approved by: re (implicit) Sponsored by: Amazon --- release/pkg_repos/release-dvd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/pkg_repos/release-dvd.conf b/release/pkg_repos/release-dvd.conf index 600c309d5979..5988200b26e3 100644 --- a/release/pkg_repos/release-dvd.conf +++ b/release/pkg_repos/release-dvd.conf @@ -1,5 +1,5 @@ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_2", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From nobody Mon Nov 18 20:12:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xsf1H2Hfhz5dVtf; Mon, 18 Nov 2024 20:12:19 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xsf1G22JTz4JbD; Mon, 18 Nov 2024 20:12:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-f45.google.com with SMTP id ca18e2360f4ac-83aba237c03so117938339f.3; Mon, 18 Nov 2024 12:12:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731960737; x=1732565537; 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=bTCX3B9TCr7C3YOtyHPrsda/w5YxV4559oFhSHH+pVU=; b=cc+CL8WgWlIcyV0U3uWhmHFCDe4fh386ngj7MiiJHHKOPnzDt2FqsMLDKWJjpakwX9 UQtRXdVtl8zmTrLVEBn4ND+ql+O8M8OL0x9RgLlI2NqinXI26Wg2TF1thdokcuQ4Q2jd N3ZNTweWFjVQZ4A3/TwCCMJxgSvil9UV+b382cU+/Wst3G/B1u+Re5JB+loQK0e1/156 bUKvwK5auARxUt2hu1xFg8OONFzf6x7SRCF+3mzMaL83X/PBoZt65CBLtOl/ay57e3Q9 jrnQPQ16ZFkeFYlvPyIsR4JWczJpobJcL/DCMotpGUNWOSYnba8j62Mew2D6W4Q2t4hA DNpw== X-Forwarded-Encrypted: i=1; AJvYcCWL8PJC1MXGPs3kTvHH3bZ0370jzt6Wd9E0topyMW7DJC1OYOLX7k5ZGI96yD+NbBAyTNQOvfsVmZwyunQ6pbhW20eohv4=@freebsd.org, AJvYcCX4wYue5GM2D4zY8/v8QutUtqDc/UDr/FfQnR00C32wQjNF5L2wdIc/5MZqJz/GrUAHZqBMbpqTPYSnVxP8w810C3Wr@freebsd.org X-Gm-Message-State: AOJu0YzDQ1M5gSHv24RVYGWUyWYKR1/qxDNpmNkahfgKQATN3VZVP+ST ysNTHrTGRRDMTTQ0UxleC+cT9wVpfmlgEiALItY7ixi3CKMl5BVi/s8AJGx4oQ+W5nRnoSYTZi/ M/711XTOG/DJDcNbBINoVgAeG0Hxe05Gf X-Google-Smtp-Source: AGHT+IHa6ylo5hpUAbtgseKy4pTnqhwOOFaRHfc2JSqiz2FlPBQLuCiYhuUceaIkglKhxkGnBXrRjTuodQOuyJRjAg8= X-Received: by 2002:a05:6602:6d8d:b0:83a:b901:3150 with SMTP id ca18e2360f4ac-83e6c0b4529mr1361543039f.8.1731960736848; Mon, 18 Nov 2024 12:12:16 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411161523.4AGFNBcu010436@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Mon, 18 Nov 2024 15:12:05 -0500 Message-ID: Subject: Re: git: 4ef07eb0802a - main - getentropy: Add Git hashes corresponding to SVN references To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-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: 4Xsf1G22JTz4JbD X-Spamd-Bar: ---- On Mon, 18 Nov 2024 at 11:24, Brooks Davis wrote: > > On Sat, Nov 16, 2024 at 03:23:11PM +0000, Ed Maste wrote: > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=4ef07eb0802a6353faf79d58719d8008decabae0 > > > > commit 4ef07eb0802a6353faf79d58719d8008decabae0 > > Author: Ed Maste > > AuthorDate: 2024-11-16 15:18:16 +0000 > > Commit: Ed Maste > > CommitDate: 2024-11-16 15:22:46 +0000 > > > > getentropy: Add Git hashes corresponding to SVN references > > > > getentropy has a comment about a special case to support kernels between > > SVN revisions r331280 and r337999. Add the corresponding Git hashes so > > there's a usable reference after Subversion infrastructure disappears. > > This code should likely be removed soon as the fix commit is in 12.0.0. > It's not completely clear cut as it is post ino64 and thus not > completely in the "can't possibably work" category. Yes. I added these while preparing the patch to remove the fallback code -- not just the special case for the Capsicum issue in the small window referenced here, but all support for kernels without the syscall. That change is in review https://reviews.freebsd.org/D47636. I won't MFC the fallback removal but will MFC the comment update to stable/14 and stable/13. From nobody Mon Nov 18 22:13:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xshhz0vPvz5dd7J; Mon, 18 Nov 2024 22:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xshhz08Smz4RgT; Mon, 18 Nov 2024 22:13:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731968003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pupTgApSf88y5rXPqoVB9VP1fAJk/3hTxUZzbpRdy24=; b=OfzsjC04Vmn6ZYCa47wZAUqjkbD1PW3sop6qsJ+dKnmhQXAnDkKXpZ95F2x07sLq5u8c4s JUFctgjJLkjJUse/xR2Psb4q6LUI+Laq2fNzas1swr03No96vI3YUsnS4Q04U7hdeq1n7z 4bO2rFftY8+fR6QPNEuBYbCoF7kinrNyx1TeE+Y+K/1wFnIki6e2mOVfegttC2kapE12sh lM9GkOLKCnCXwDqTBiMDU3l7i9B+1ux1qIS0qRWWKynIG80QxTj4xVvDNqsSSvVPRyDemB mZs2eW7liAupLfe4WDQhBPvTBH8Fkk8jE8YrFwZx9ZScq7kU+T2KgKfum9scYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731968003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pupTgApSf88y5rXPqoVB9VP1fAJk/3hTxUZzbpRdy24=; b=jRflwhG5f1+L/dwxgYOt/ALoYXAO2F04qVB2C25vSf1k3ozZpc4H6v/8Ah2A+eW+AOEMf7 cnFmFZWS4c18vobXacoyRqWzOnbK00UWNDwAzxdmTBE2TI0DcFxBuSMq1IjpIc+Sj68hiQ /MY36NMZAvmBz828zodQj0dZE0UCS2tQzWXeawkcaxUMtrHZUG5hSxj6o7C5gwIj2qgSN0 pLwTJH5tqTm8/7Ajoq5Yh+5KUF7NGWTuzaFgJn42zxCN26+SfsXgUMLr6+/5xRawIdmWFb GAo6xBq5xUMoMbvVH8JwOAhUueqxRFPqbmiLVy+UWwkX3me2RJe8B5wQNtAzMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731968003; a=rsa-sha256; cv=none; b=ILc71Qh8M6IPWkxpegJS0GtU1h2gfjucyySEaoTvj7/XTv0cIO+tb7QNYPwLSK38/NTf21 UM78PFvFs2xPp5yrVPzVmxsRqNXHeQQCgJ4nQ6fIFyHAvXBOEGnEPUDVKk4NOtou+lfeV9 4Fh/2S5MqP8wkRcpcrl+TDEtX3O9WKRrAnAqiw/jy+qNYrKfXe6LnRN11sm+ItF0ygqzpy /adJR4mkijcGW9YoPNVPRE97eNzWaz9rLi/IvDZyorvm77TLmOuLNn3M+FFpAhkilkL5rN YNyup9yk8sL6gCxQqAJUHtgDdvR3RTCjT3dTz4roCHBdFgH11uuAvvI7dvJ0Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xshhy6sh9zyJ1; Mon, 18 Nov 2024 22:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AIMDMeW020367; Mon, 18 Nov 2024 22:13:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AIMDMsO020364; Mon, 18 Nov 2024 22:13:22 GMT (envelope-from git) Date: Mon, 18 Nov 2024 22:13:22 GMT Message-Id: <202411182213.4AIMDMsO020364@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: dae64402b3e8 - main - rtsock: fix panic in rtsock_msg_buffer() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: dae64402b3e8ef7488db0df8003361f242573905 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=dae64402b3e8ef7488db0df8003361f242573905 commit dae64402b3e8ef7488db0df8003361f242573905 Author: Gleb Smirnoff AuthorDate: 2024-11-18 22:12:42 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-18 22:12:42 +0000 rtsock: fix panic in rtsock_msg_buffer() The rtsock_msg_buffer() can be called without walkarg, just to calculate required length. It can also be called with a degenerate walkarg, that doesn't have a w_req. The latter happens when the function is called from update_rtm_from_info() for the second time. Zero init walkarg in update_rtm_from_info() and don't pass random stack garbage as w_req. In rtsock_msg_buffer() initialize compat32 boolean only once and take of possible empty w_req. Simplify the rest of code once compat32 is already set. Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D47662 Reported-by: syzbot+d4a2682059e23179e76e@syzkaller.appspotmail.com Reported-by: syzbot+66d7c9b3062e27a56f3f@syzkaller.appspotmail.com --- sys/net/rtsock.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 09d463dc17af..a5395dcf1469 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -921,8 +921,10 @@ update_rtm_from_info(struct rt_addrinfo *info, struct rt_msghdr **prtm, */ } - w.w_tmem = (caddr_t)rtm; - w.w_tmemsize = alloc_len; + w = (struct walkarg ){ + .w_tmem = (caddr_t)rtm, + .w_tmemsize = alloc_len, + }; rtsock_msg_buffer(rtm->rtm_type, info, &w, &len); rtm->rtm_addrs = info->rti_addrs; @@ -1774,7 +1776,10 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * struct sockaddr_in6 *sin6; #endif #ifdef COMPAT_FREEBSD32 - bool compat32 = false; + bool compat32; + + compat32 = w != NULL && w->w_req != NULL && + (w->w_req->flags & SCTL_MASK32); #endif switch (type) { @@ -1782,10 +1787,9 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * case RTM_NEWADDR: if (w != NULL && w->w_op == NET_RT_IFLISTL) { #ifdef COMPAT_FREEBSD32 - if (w->w_req->flags & SCTL_MASK32) { + if (compat32) len = sizeof(struct ifa_msghdrl32); - compat32 = true; - } else + else #endif len = sizeof(struct ifa_msghdrl); } else @@ -1793,20 +1797,21 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * break; case RTM_IFINFO: + if (w != NULL && w->w_op == NET_RT_IFLISTL) { #ifdef COMPAT_FREEBSD32 - if (w != NULL && w->w_req->flags & SCTL_MASK32) { - if (w->w_op == NET_RT_IFLISTL) + if (compat32) len = sizeof(struct if_msghdrl32); else +#endif + len = sizeof(struct if_msghdrl); + } else { +#ifdef COMPAT_FREEBSD32 + if (compat32) len = sizeof(struct if_msghdr32); - compat32 = true; - break; - } + else #endif - if (w != NULL && w->w_op == NET_RT_IFLISTL) - len = sizeof(struct if_msghdrl); - else - len = sizeof(struct if_msghdr); + len = sizeof(struct if_msghdr); + } break; case RTM_NEWMADDR: From nobody Tue Nov 19 00:07:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XslF60tnvz5dkqB; Tue, 19 Nov 2024 00:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XslF60N4mz4bbq; Tue, 19 Nov 2024 00:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731974874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jszs66A7F8GBzYVpHNN7sHOMO9WA3N3jHOPae23cprs=; b=k5SXdoMk7Hqx9gRJ1+hsiUUEP07Q7PIUuuVoMS8/BgmuQAH8pJ/aTV4WQCEsc1Fv+pZkle buTuSjvGEb8IUZMOvNLZM11uTeYPsHzCG78NQFmmz7iQqR91z9kaASejtpZuusp/W8FtJ1 6YG6kenV58Q4Jpej64nfYREdNpd6HumBjbSXfuLqtZMAB4yeQ9+wLvkPf7xO3HkU2atFo3 gZT+B3Juk25FAfi52PeQ39GbQQu6dW8IY4UizJq5G/huK96bapGhztZu0O9VNg7m2Sc23d tH4vI8GBamJmLYvcRBkXpBTyaAIWoEmgTagAAJ6BhRNmTLVXvVdS95zFka0qQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731974874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jszs66A7F8GBzYVpHNN7sHOMO9WA3N3jHOPae23cprs=; b=PVJ7KKiUHRl/KFnzZb/v6euxIvsOvNdFjr0ikU85at+Y8NitbC5xd6uqgqnutSDKPujWjS SzklUScRAYU5fcFGLQGJU5jxuk2JkXoO3O+1hjdNsXpZud6hDN5oiR1pkIs1sIWbDAtCxt qDzC9KNfDUrvpka7XF+ZEopumEY77R0rSgvhA8bKWrkjiTFLIMkFXCJH8o+ddhic/7ogbM C0Q2+c806Q/Vr7K+HvDbLOsi3RhczkY2auoKpb1W+gEEr8+7MfNWa9VYUc7Xi0npnuoK8k +qDcqFId585kvI9YJjiVxibFSJuE8UrEMBGM6E2dKV42gerb3Yrb8bGl6VEYig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731974874; a=rsa-sha256; cv=none; b=bI/ua83dV50HZ0rkbLIGyc707q63aKE5P48M4BY83GwkFjGb4gMVdQJcjogfIDC0Zwc5MO iLB3spCK4T29DNtOU0nTmgZUXo4WWuKI4Z7w3UJysdqIOkRjHNAoy114UnN2pBXp+fWOxq W9dUSsz6jP/8ZCPOO7ptl+iV4dynBpQN61LKven33VNNTyRFQZwCQ81923z9A6a8Kcke+k nJYUcWU50YUtsaSg1qyQJt4mKFqbTBfQ3hgOjF4g62w22kVkbIoJQ1sGSYKRL3Lae+kDSz RJK1nAdHGFp6UfKU8ELYKdpylke0l4d4E5Iy3EBMUkuexGurmXrH8VuJBxkUiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XslF575HTz11kH; Tue, 19 Nov 2024 00:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ07rZQ027467; Tue, 19 Nov 2024 00:07:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ07rDD027464; Tue, 19 Nov 2024 00:07:53 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:07:53 GMT Message-Id: <202411190007.4AJ07rDD027464@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: 5399052c63a7 - main - bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5399052c63a7a3d2f54615d31bfd092ab887a600 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5399052c63a7a3d2f54615d31bfd092ab887a600 commit 5399052c63a7a3d2f54615d31bfd092ab887a600 Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:06:16 +0000 bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant Make sure an interface is back up before (re-)starting wpa_supplicant in wlanconfig not relying on wpa to UP the interface (though we fixed that). Sponsored by: The FreeBSD Foundation Reviewed by: emaste (in D47491) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47491 --- usr.sbin/bsdinstall/scripts/wlanconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index f044bc1cba98..8ac64858eaba 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -55,7 +55,8 @@ country_set() "$WLAN_IFACE" "$ifconfig_args" error_str="${error_str#ifconfig: }" # Restart wpa_supplicant(8) (should not fail). - [ "$iface_up" ] && f_eval_catch -d wlanconfig wpa_supplicant \ + [ "$iface_up" ] && ifconfig "$WLAN_IFACE" up && \ + f_eval_catch -d wlanconfig wpa_supplicant \ 'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \ "$WLAN_IFACE" "$BSDINSTALL_TMPETC" if [ "$error_str" ]; then From nobody Tue Nov 19 00:26:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslft4rQYz5dGb3; Tue, 19 Nov 2024 00:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslft2JBQz4db9; Tue, 19 Nov 2024 00:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/iAZMolzmDXVW77aEsV4fdb1DTB4foFwzHMVJsPcrQE=; b=XCf0i2Aru4q0UuKXypJ02Y/GFRv/wVU3t0Ou0G8CqGvVePQHTVWPHlRvGVNJbMg+MUmg6p IjR4wgFD8PJqbrxvVgnHC7KDvVH3Cq6EIvxdAl3Dzk1by3vtQa+BoXBYUxQNlkiFzTgi4y bmqfI6jU6iRiU1eFFh7AmILgwvB1uMsGfE/usPwaTzUGPno7PkDrCfSimd8q7NGx62d0ec 6LwQu+r69EotWTlseCDZ1VqN8QhN1+0mIlN7rpK7R2b3Gshe6jt9ewNuWvp41gkSs8RVek MlVzP0CUihIaep/GPNqN2cTkthn+DLIaSvP5HVjET8HeJixoFaKpH1j5PWuBmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/iAZMolzmDXVW77aEsV4fdb1DTB4foFwzHMVJsPcrQE=; b=bgYWFdxF+GmmLYX9lgldwRsdqbdxQiD0jRwUVT425yDV5+HYnr8ITlAHbhsWgjpKfmrpuf lRq7pMGvIG6lDJNM09zrN+M03l2iTXEofYCX0TPXN8S/y/WUvGhW3XFocCYN88gH/YP0rX emvtHkBdChzt9LqcO/2lhOxmbxRjQLpRVXS2Royue13xiLkCoWINL2dzhqMcNMcY6tDD2Z EHOTHoIx6zyvWg9epc/z/lsTHd1VXPxB7ivEHNxyyvAvwZa8ALSnqL1kyvXhsCi//XSQXy 0jvbhdflPPL49k3VFpAKUr7Jm40oG082xjhr7roSZ6FSP8n3Tl14LfAfMjnJBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976006; a=rsa-sha256; cv=none; b=rRam0uypzs8hAp15473VVsNUhVpY+3LqwRLKQ37dyTqaAOsXvQu1MbDxZiO4LinG8kwlaa ekYjRNB0ZRax7m4nRS68/kmLXK+HHgmpA8+G7W+b8mMuvCs8rgFMY20zKZOaiKInFALKbW AXlQo4Zo5eJ9mxc7lNEjFqixNRSrzFePbAcU1cnEywLURNSmkxsKEgRVmiJgmeG8ROMRBr YRVYt9K7g0UY6b20VFQpK3rpg4exj0ZZRusdAjVImK5ZP+dD9SCZf17oq7rAyZGFyZLSyJ NfYV2imF9EIVafMlCFplB+4vIr+RZgsH2WT37HPV+NWU7RIj6Ec+F22VQsCbxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslft1vphz12Vb; Tue, 19 Nov 2024 00:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0QkTk063631; Tue, 19 Nov 2024 00:26:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0QkpF063628; Tue, 19 Nov 2024 00:26:46 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:46 GMT Message-Id: <202411190026.4AJ0QkpF063628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d46948338cd2 - stable/14 - ipfilter: Avoid overrunning the message buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: d46948338cd2565f4845ac53ddd810bf47068a2f Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d46948338cd2565f4845ac53ddd810bf47068a2f commit d46948338cd2565f4845ac53ddd810bf47068a2f Author: Cy Schubert AuthorDate: 2024-11-07 01:22:57 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:04 +0000 ipfilter: Avoid overrunning the message buffer Avoid overrunning the message buffer when printing an ippool btree error. We do this in two ways. First we increase the message buffer from 80 to 255 bytes and secondly we replace strcat(3) with strlcat(3). (cherry picked from commit 42935716286e7887bfeb9dd8daea72d6a5d40908) --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 5c9fd838bfa0..8d65f019da43 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -52,11 +52,11 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { - char msg[80]; + char msg[255]; snprintf(msg, sizeof(msg), "%s pool node(%s/", what, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4)); + strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:26:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslfv5JWLz5dlJM; Tue, 19 Nov 2024 00:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslfv3BQWz4dPP; Tue, 19 Nov 2024 00:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w93Tl6Fl7fiK2kxQxmGyPsIJMZqZcHCrTEFGwbjhUaQ=; b=wIkfpvZ/H8VR+NM47VWuMNtQDmPeadbSQHxqFC8RHjU5mKHRvElkCvnH69Lj/h6VlBi+uC KytXyLUxgU9r02SJ4mM08Ztnj7pUP6AE3bJaqkIrC/eX4AUHm3tTVwJBOXPpuPmrorJbtj ytwXg3dFCvHLBzQFFx2bYIIdhHaWM8kWoPi1mg+xXBrmektFpqOnpMzk73vU/c4nT91BQq WABV+VRcTa2hpM+ryYA2whqzaUCanEZW/tSopUWngUi7MbHOUTY8CkBcIYkJGhM6+hWIFD SKK5xokZstoq78vec6Q4+za9+CXOpxvruQFYZZXqSLH5m+2lkKmzK8+a7bUlMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w93Tl6Fl7fiK2kxQxmGyPsIJMZqZcHCrTEFGwbjhUaQ=; b=PyNOiWPWt4DDiOOAS8DB2JXYrWA3eJGzF3iTrkc/SVXR2eFW/0sY/gwoHtEgN/4Ts/Vg6R wCHQRtlB3DmeLNn9+oB7ppm2DgDvCYiBdiqG+GF/zXjeYT/p/a0KRHnyWa1EUWLLzP8y3P DjyTJ8gKmpv1ctr2pMrTEWG57yDW++m79itF+K6VVbcV+TQqpEzkMXwaUeoYwQ7U8Fwp3Q 6Ad1ZfTjVksDsSHDya4PXqslcyzqe9hz0nMAGTl3BkXNfe1wfjOyrV2AEeuExlk2dQWgVV SA+xIDT/at7asTB1hgca9Cp+mh/TGN6OdGVostinhOEEg/pfWdkz2+D8lWNgMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976007; a=rsa-sha256; cv=none; b=vSwZUzC2ZB5xm6DBBnbj95ep3WGQL6W+SUc+xxyL5U9RtZsOq4ifgpQ6/CyWiUDl+l08Vo qRV+RlgYdkzQsWl+qwkNT8rAEOQ2mcEwqQLsR1VSDjP9HhEmSG9oIRL+ISizFeuZ/pxtCQ c/oThUBd7xQev20KAhuw1PIRlXyfYFYgT0dRG9iiGxFNQr9mVXEkQu8/JbACufwd11fNyq 94RLMGltF1e4jcFA0Hpi4t6+DZRIBU4mDANvYqcvV+GAgbgUSnRXzyfGbXBXl0aVkghKyv ZGJAD5nyImXeZDRX4MoIgK22heQyqPXCxfHYXftMi8198VH2qTl0mo+ydfbXSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslfv2nzfz12qQ; Tue, 19 Nov 2024 00:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0Ql2o063694; Tue, 19 Nov 2024 00:26:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0Ql4C063691; Tue, 19 Nov 2024 00:26:47 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:47 GMT Message-Id: <202411190026.4AJ0Ql4C063691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: c6385ba2c9ff - stable/14 - ipfilter: Print the pool name when adding a poolnode fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: c6385ba2c9ff20d6cdc4ff673ff993a1adbd49a2 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c6385ba2c9ff20d6cdc4ff673ff993a1adbd49a2 commit c6385ba2c9ff20d6cdc4ff673ff993a1adbd49a2 Author: Cy Schubert AuthorDate: 2024-11-07 01:26:37 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:04 +0000 ipfilter: Print the pool name when adding a poolnode fails Printing the pool node (IP address) only leads to speculation which pool the failed add occurred. This is especially useful when the same IP address is listed in multiple pools. (cherry picked from commit 470c680cfbf5f6cd9ac392b210b97b41d02cd969) --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 8d65f019da43..7a01da9df94b 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -54,8 +54,8 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if ((opts & OPT_DONOTHING) == 0) { char msg[255]; - snprintf(msg, sizeof(msg), "%s pool node(%s/", what, - inet_ntoa(pn.ipn_addr.adf_addr.in4)); + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, + name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } From nobody Tue Nov 19 00:26:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslfw4ks5z5dGb4; Tue, 19 Nov 2024 00:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslfw3qCjz4dJy; Tue, 19 Nov 2024 00:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykZ/k6vLUdDEfqJImfhpevfJGbus9JKGUSz3MjtHaPg=; b=wqCnPB+aXuLWHlfc/f8Pa6ffDw2HfVFSPybuTmTEut6dUnIAwhmQTBwdjLlACPh4QebJS/ YzKsER+MObT4FKtinIsZnDsfaqpv3cJi3OoncFmRyjInUgXrPp935JP1Flw/fVamnWWEpi pclrEEMeMUAYQ7jGaCbHcgRhfwNDhK+bjKzIX++XTrw7hG1hW/foNG3VOYSqmy76czlVBf /W5otxPajURLuI65XeOG1TgVa4ccWyhBnLwRxORxOetYbp5+9VaxQJG1/lGkRJbg2vueAp kwtjk0pQwKrUzF2KzsOrtlHFNKa8X9nyCh9bHeYkeAIne4GKjWtT5EYuvN3GNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykZ/k6vLUdDEfqJImfhpevfJGbus9JKGUSz3MjtHaPg=; b=OZzJAQ1f/W2hO88SypGOoe0IjPYH6yJirqLDcyTMWF5PQw3Ngyef0j3xsKCjnYc4PG+F/m MqYXp5i53WXqY1zDM20vjxct68U9XtPqPHKh+aScVMoWu7fVQiJyIPy5sSuSFngoh1PjQG waJkIIMREJd+7klS0SvDHVxbNt59GvHQo9tLeIVF65YK9jADOX7qUcYKZI3klKXNTXP1Rc RIFcCa53mxTr4fR0KT5w4ZxRtIS5E3FwPb3B6LxsCbF+QTxaXXRuIP5jLeVIwSl8c1poqS 6HuH3tgFzKgCs6TBx7tYe2J0KH8ZVOtIpX56UARZcpNA+Pv7MnaRkhGVZfLTYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976008; a=rsa-sha256; cv=none; b=L3d/jN5LPz63ZvXpjbpkokPalP8vHEA9j2x2dmIT1sYeDqUcK1uJ2IUaqF6x7BGtqgDTaU cP9kRRdOb5AARXBl7Fnq1G8oS5TtwqgaYaMhByhtTBeop3W5nDieE+zBlxMnleD+EwEB47 mFoz0uqLicVmzS2behqb7DtqFWM/7Lftvw1sq21AvnnjiRP6ymnD1wnA/jXipd7xrpE9mW m2WrEXG1MfAq8Bf6ma06ADQKPxfsX08piL+c7xOZQpc1l/LkKfrLPcBXXPNatw1hyJppcm XIXO3RkMJorpuHGlkr7ZZ1mB+ExZrgEiJbJF+5gAHh4TGhIbuq9kY0qz+cDiCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslfw3RKHz12Vc; Tue, 19 Nov 2024 00:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0QmdC063751; Tue, 19 Nov 2024 00:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0QmLK063748; Tue, 19 Nov 2024 00:26:48 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:48 GMT Message-Id: <202411190026.4AJ0QmLK063748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: f9d3c2a44353 - stable/14 - ipfilter: Print the hash name when adding a hashnode fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: f9d3c2a44353f3d987b5443d6fc30ee270ea0061 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f9d3c2a44353f3d987b5443d6fc30ee270ea0061 commit f9d3c2a44353f3d987b5443d6fc30ee270ea0061 Author: Cy Schubert AuthorDate: 2024-11-07 15:51:12 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:04 +0000 ipfilter: Print the hash name when adding a hashnode fails As with when printing errors for failed poolnodes, printing the hash node (IP address) only leads to speculation which hash pool the failed add occurred. This is especially useful when the same IP address is listed in multiple hash pools. (cherry picked from commit 8aae4220d76602f22291d7567ba0c61b9aa8c188) --- sbin/ipf/libipf/load_hashnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index 11525dc96e35..bf22edb9be87 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -55,7 +55,7 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (!(opts & OPT_DONOTHING)) { char msg[80]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table", what); + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 19 00:26:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslfx6SLmz5dGLB; Tue, 19 Nov 2024 00:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslfx52Psz4dK0; Tue, 19 Nov 2024 00:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EJ+BOwY1kZ9PUY6QXuIxIgLPI05OoqfKIMueiypHv4k=; b=DyM0bBBnAbKn7NF41qaB7D68+x6QRKyDeZF7jRsDniLONSVCB6ZfAL4P41UGgF0Qbd4n9R g4t/ACfDBdjQATXXj55QELEVFtdDUZLRnpV9WAUU3V6ayaiiE2nRoLyO9vb7dWsMF7nU1a C/TW9AEWXqjnOBDa9QAtDFJ4nKUWjn9+8zyLJMl7FOKVAXD4ClyN+WoBJ+FYi4UepoV1jL lnRZJC5UIo0I3ovjhgnoznxEPbp+wo4UHESTOmr0yWcPQ+cfE11B9lBk9fK3hHaAbL/y3a GJKBqq9uJNcbiscmCmTsVBWfihLV/jJWAE9Uz5z6bSz4X4l75HDZopkljfLhXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EJ+BOwY1kZ9PUY6QXuIxIgLPI05OoqfKIMueiypHv4k=; b=Vt95J2F8PDbFI1YI58SHz6XUU9+r2dJpkI26iy6dqB+QGkjBNi+Wxq2uQb7NnJWuhn/5M/ Q15ONrNjPK2stkt75vJg3asct7IwXtTni4jxWHb9ffcMINDFEi4lvwQ1gV5/vlnkyLhvlR +HV7OS5DK3b2jiXO2rJl0Y25Kw6tvYXY5xeTNrygOPBRa6lVMkqMCHle8NqwJXFtO5JUV/ kikFmTkF4Kd8Zs8cEkuORIWkpUsJtltZ8SVEhI5ybSYWdPz0JVt9WGrqb4xcOOhAkr18Jf g0RKTzNOiu8TwealXVBq62ZOThXKSYzqBngIrpH+/AkoltPPHvuZSqEwe43yLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976009; a=rsa-sha256; cv=none; b=a1SJrKy/8qwMswB0AmjfKYIDjhxH/Le5OYJz3ncRqewGoDNXpUvgEM52u7PtH2uvTudygz qvhpS7+6lP0Al2WAfHuRAuCltROZYaiIL9hMH5bA7stGhT0R4aIdYSw5sF52KoPaD4cK6x NdYZBN6NDz/+XR45pUNAuGlGHXDmb9WjSL1SkWv+tjcqcwnJqbqDuUQr0sE3AcrvXg/zYM PRhsYcFMYuoTakAECVk3cZI21H+jbqT8edPepErMZ2dzVmJX8JyHzuiAbf5/wyY9VRKa2O 7IHHGKVFA/GihlcwLG/CKyiZjSeZTSNthZp37Fwk55UZo7VqpQ9pdJ1angB4ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslfx4SrPz12w3; Tue, 19 Nov 2024 00:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0Qns7063810; Tue, 19 Nov 2024 00:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0Qn2J063807; Tue, 19 Nov 2024 00:26:49 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:49 GMT Message-Id: <202411190026.4AJ0Qn2J063807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ced92eab36f3 - stable/14 - ipfilter: Close a bracket in the poolnode error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: ced92eab36f37e4babacbee72e708af02af87a05 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ced92eab36f37e4babacbee72e708af02af87a05 commit ced92eab36f37e4babacbee72e708af02af87a05 Author: Cy Schubert AuthorDate: 2024-11-07 16:48:00 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:05 +0000 ipfilter: Close a bracket in the poolnode error message When a node in a tree is discovered in error, i.e. duplicate, the IP address of the node is printed but no closing bracket completes the node in the message. Fix this. (cherry picked from commit 858a7a27f5c82c8364a0eb8bf1d9f0b1315422aa) --- sbin/ipf/libipf/load_poolnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 7a01da9df94b..0e41a3921b71 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -57,6 +57,7 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); + strcat(msg, ")"); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:26:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslfz14p1z5dGbL; Tue, 19 Nov 2024 00:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslfy5wkYz4dPb; Tue, 19 Nov 2024 00:26:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfhh/ZfPgTazw1fTM4pfKtq66HAKdDXZumv4Ob9JPf0=; b=OFg8XLCCA4b0q7wvew+XAyLofhGmqWhWA9Pshd61eWF48f6gjACGMtOBN3Ngvxz54pwJRg 4a3PcL1FlIjPW9DoQjRHG4KDV6vjLIy2NJANNYz1NBRLiok8o57pN8dsYioV3btPwMJQ6J F8dQl8XQwmI/FYyRI3MO50PotDqXIn9wEBRNT+L9Dozs/juBKh7iFRX0zI1ZGYQzN1Wf4W UYlGG13bEUw6zdAX3fHZYenUi+N77gMfsq0SwahZ+MBO5GKgDvC7iN4ZOP673RO8wBZykz 0llt4U/BoyY93veBUzrRCttFjLlx5LMYn+CAxYG4N9fd4xsrLEPBesZ7toY3oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfhh/ZfPgTazw1fTM4pfKtq66HAKdDXZumv4Ob9JPf0=; b=KuoFc60qD/FTs7lca5PJukLNIAHtjSgKbniAU4Wme4Xu/YBFLVDHq0QJeoFOy1VGuKj4VW 14opc4Yfid92lPUGbfbhelI297A+ZRRGvl6weNhDS1VivddoMMNdwDn3tkIIgzfCrRHNmd X4AxoYyEt3Vg2jSfydqGclZqp4BjSDzxfl/W4slpwtWRJ4PtrIWdjGr71v3ydPxgR8x0vJ 5r2eNEQQa8AEo2KzxNDGYvMjYg1arH8XlYSKQsD8E9zltUA+v2CoYLuD9uYPCjLVb0E2i0 pMgqZzeaU/hwB+Gtmt93QdXAbGXrdQubRm/T137/Hx8fw7BFt7sA2p3C3+Rn1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976010; a=rsa-sha256; cv=none; b=qCYowtPhw1UPIM9E3dPlN1oNXl0193vnQNdhCKOADPOChu6v/kt1jNJpPNSZVCSJd7AmcC 1qbQfTvP36v83kd0oGEMBMZaZ63gr+me+8Komv7cHgc7XGD9W6i44HuqZbbIh1JQWowGu+ ULwU25/gVsPYRXYiUaBVtEVypMR8f6LPOGWWTkPlUI/U8Neeu3e+T1RQhJ1dyecaV2qM1G BHwVf9ynsYxq93APTshQHP+srBdKwUCCSxQzMQjRfrKzpDdD49Z2Y5ffBvBKUUnpdyIBMx FGrgsl4QRgoaFDlmAp0+aBwdtofzUqOwywCbVr1UEXZAM9PqaI4hs96ItPxhpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslfy5VYjz11qF; Tue, 19 Nov 2024 00:26:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0QovP063887; Tue, 19 Nov 2024 00:26:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0Qove063884; Tue, 19 Nov 2024 00:26:50 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:50 GMT Message-Id: <202411190026.4AJ0Qove063884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 17c21e9e5205 - stable/14 - ipfilter: Support printing of IPv6 addresses in error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 17c21e9e520559087658cb171774afb310744a81 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=17c21e9e520559087658cb171774afb310744a81 commit 17c21e9e520559087658cb171774afb310744a81 Author: Cy Schubert AuthorDate: 2024-11-08 07:39:11 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:05 +0000 ipfilter: Support printing of IPv6 addresses in error message Replace inet_ntoa(3) with inet_ntop(3). This supporting the printing of IPv6 IP addresses in addition to IPv4 IP addresses in error message. (cherry picked from commit 3a2cb65b6e6dc1e71013db27ce143eb8670a1755) --- sbin/ipf/libipf/load_poolnode.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 0e41a3921b71..880a6cd1c681 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -53,11 +53,29 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, - name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); - strcat(msg, ")"); + inet_ntop(pn.ipn_addr.adf_family, + pn.ipn_addr.adf_addr.vptr, ipaddr, + sizeof(ipaddr)); + +#ifdef USE_INET6 + if (pn.ipn_mask.adf_family == AF_INET) { +#endif + inet_ntop(pn.ipn_mask.adf_family, + pn.ipn_mask.adf_addr.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s%s)", + what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:26:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslg02W6Lz5dGfk; Tue, 19 Nov 2024 00:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslfz6yZCz4dhF; Tue, 19 Nov 2024 00:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OStCKpIvff5mmFIPtyDcAOBg3YGRUAiuok9LuUgwODw=; b=UN1+XZyoX96tSAdSOaQ8a/CFyyhieko4Ek+uQWWx6qeqyPh5gBgVvDnglUVcOH1DklUlrQ m1AJfwkEC2t4Ybsx4tEJunP5YeyvrZjKMLjd2Fiflu6Axhe/MivYqfmo1Con8qt/broIQT JNzmgsaFcrHAfC/uj2Fw//zxx/hho+ZoBlID/YieLEGG49N/RQMGd7AAKymCzufE1ltmGy iXXF3Ink9y+X7/ecmp+PdiXNG/GoMrhwOho0JqLGGUqrvC79lkM9uDhIHKVcWhZ0S38BCv zha9pfvzVV3ggKOcw2Gw3Lka/Ffna0bOTnuFktu9WTMW0TkQAIMaDCtir5gAqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OStCKpIvff5mmFIPtyDcAOBg3YGRUAiuok9LuUgwODw=; b=DjxWAjqiFoeCx8ZlYAy54hO8W8rOh9+zQt/X9u9CzxWRiXWMw67vqdYNJaRJ/Suh8oVhfJ tITsh39VJDUYPAPXOncU81ZdwNmBBpyRiz3pC5j3/yPSXc5VNqDLYGfChNXMxV9W3DoFIm cpG5p6gRf3N8FBAsIRuMSWfIPHX2l36EMfqtbSm5QRkEK1p4ILMT2OAtTp6IS5fACk32SS jsIzqCwUMUAOnY+BQt85z7oA/nOKQ7BzzCCgnJJpbj4b0GLbYBZyKekuTzH4nUb277ZD4J ZAIXdexkxF5Q7wQFqV/s4Ro2ZDL8qYnM+g4bw8Dwt5Z1C7uY5SLWKEGnCAMDjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976012; a=rsa-sha256; cv=none; b=giPdPHIOEqvONsJlsMCRKnqmoFvO4dbAMSYQuQ8DUkOCHx+LZJBoPQ0w9VQGg5L3G/OHTE 9kHiLC68Jx/e9K9rdY+Aa+xvaSZ4kJGC902kHjZ75u51WBQWFaBd25uh+vEPiP5IMC8BR0 gFuw2/u6h3Nm5aVzyZmCKLiRpEx9SJOgOQuvKkOkA+qSNzmQcDNAdMznxlqbjPg2M/vMyq 5Nj/Gj03f1osE/x1ukLytTOj9oRdlIIGpBHOfnrPe6ByYuU74Bs6hTZI4PaeJUXKaJVFj5 H9Ttp6Cj2p4rJqLNX/XinLg2qjTWaV/MQVjY+p3zlF/KfV/Q+mFPsNHfKrDBXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslfz6YCvz12Vd; Tue, 19 Nov 2024 00:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0QpEE063939; Tue, 19 Nov 2024 00:26:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0QpKv063936; Tue, 19 Nov 2024 00:26:51 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:51 GMT Message-Id: <202411190026.4AJ0QpKv063936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 43d49c178e12 - stable/14 - ipfilter: Include the IP address in error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 43d49c178e12a93e54742e999cb4233553b11064 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=43d49c178e12a93e54742e999cb4233553b11064 commit 43d49c178e12a93e54742e999cb4233553b11064 Author: Cy Schubert AuthorDate: 2024-11-08 16:30:53 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:05 +0000 ipfilter: Include the IP address in error message Include the IP address in the message when a hashnode add error occurs. This helps to identify the ippool.conf statement that the error occurred. (cherry picked from commit 9da30a23a5ecae151ae1db045354fab105c69e12) --- sbin/ipf/libipf/load_hashnode.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index bf22edb9be87..12b11687710d 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -53,9 +53,28 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (err != 0) if (!(opts & OPT_DONOTHING)) { - char msg[80]; + char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); + inet_ntop(ipe.ipe_family, + ipe.ipe_addr.vptr, ipaddr, + sizeof(ipaddr)); +#ifdef USE_INET6 + if (ipe.ipe_family == AF_INET) { +#endif + inet_ntop(ipe.ipe_family, + ipe.ipe_mask.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s) node(%s%s)", what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 19 00:28:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XslhX5q5Fz5dGLS; Tue, 19 Nov 2024 00:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XslhX5Lfhz4gM8; Tue, 19 Nov 2024 00:28:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vkga5q4z+RGUkVTdCfO89MvGno0p5xhn3kfcf83QCHU=; b=NKnQhBmnooKzg24YSE72qHS694oJAxEJotOTqgb8jIh1STeTdnyK6t0bR7kYdQkuHEFSsp rXExYAvzQ3KG2OrU8r9/4mXPuidCa3vUgtjUwoBOk1vqzMksv7cQ9DHmqKAlbksY51Pvh5 bjDe1cZJGP4XNIa/a9x2BI6F8MUqlV0+HE4AhuThjtMFLHEDkHoDoIzbbZ4Bh+/buS9Et1 eXz91lUgNUzxz3D4RdcNZipURGSwCN0ooTkKX8yIaSrQdqa8YS2jWlsJ0pvWl4s/GAzG9O S3Ev+lY4wCPlCv2hwFdQyIpk80+yiu2bYnL0uYknNvWjVf6Ims76z460K/P6UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vkga5q4z+RGUkVTdCfO89MvGno0p5xhn3kfcf83QCHU=; b=wFYEkW8y41L5wT16p5VG9yDAK217KfsG/z9jOI90a94lml6YFPSe+Rvzwb9kMwN9KhGpvr wajveOnK2108UdI5o7i6iLf7FEB1T0Mf+Xib++h7hbYudyjggAZPfJw3bFDgRySR9eYdRb 0Z5C7pUY/jnrSHlVQcNP0Sc7lmPoIImQVoje8GhWpEmLA/VUUcb02F5Ix5IH2qWO6XHG4g JBDGdW8MGZCmfrjP1xNkSI6GkmTsJztVATv8zXZ+Wji2tATRdTh+CI6OvEhKZg2dX0Rbix wxeEOi42bMC+zHZmcl4FmfUWfqQMVFVy82Hp2mgA3WpOT33urCR1kpEx2bYDtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976092; a=rsa-sha256; cv=none; b=QL4jSYC6frIgYiQxlSa+/ETwFqI5wOZGi3c1zzgxY9XJmYe17P1mjiUS38iFaSAvpuz7lp 3Mqf34FDhcjtnZaMhEVbVodox8Z2OSa63hVz2MHu7PEHrGVFGGO92rGoNi92/y8TKkTNPp 0fF+uYJ7sl7sHPQ9lmR89N4GYRGc21yBrg1v45JQ8QOenZTY+j3DOyjhYRkC0V8dIi+zXv 2f0Km6yJbUuzS7Do89xyMxOgcI3g4acKsyPbPEpSiaghdPRpM5h4LsFwaYwmFeVmo/72oD XqJv35ZfmniVqovqOkU7p7ahg53vM+pcTaO939AjZtfPKIZY/bGkdEc+3bBUmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XslhX4yKhz12Q2; Tue, 19 Nov 2024 00:28:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0SC2Z064549; Tue, 19 Nov 2024 00:28:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SC3a064546; Tue, 19 Nov 2024 00:28:12 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:12 GMT Message-Id: <202411190028.4AJ0SC3a064546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 6739198793e4 - stable/13 - ipfilter: Set ipf -T optionlist at 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6739198793e469f9f9c414ddad49b7c0e08eb03e Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6739198793e469f9f9c414ddad49b7c0e08eb03e commit 6739198793e469f9f9c414ddad49b7c0e08eb03e Author: Cy Schubert AuthorDate: 2024-10-30 19:28:31 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:06 +0000 ipfilter: Set ipf -T optionlist at boot There is no easy way to set ipfilter optionlist variables during boot. Add plumbing to the rc script to support this. PR: 130555 Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D47346 (cherry picked from commit 8d6feaaaa26f444abb209360e52b993e39cb81bb) --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/ipfilter | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 6c9a58ff72c1..5e70aa5cbc06 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -217,6 +217,7 @@ ipfilter_program="/sbin/ipf" # where the ipfilter program lives ipfilter_rules="/etc/ipf.rules" # rules definition file for ipfilter, see # /usr/src/contrib/ipfilter/rules for examples ipfilter_flags="" # additional flags for ipfilter +ipfilter_optionlist="" # optionlist for ipf(8) -T ippool_enable="NO" # Set to YES to enable ip filter pools ippool_program="/sbin/ippool" # where the ippool program lives ippool_rules="/etc/ippool.tables" # rules definition file for ippool diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter index 816db50540ff..de406f8e1740 100755 --- a/libexec/rc/rc.d/ipfilter +++ b/libexec/rc/rc.d/ipfilter @@ -30,7 +30,13 @@ required_modules="ipl:ipfilter" ipfilter_start() { echo "Enabling ipfilter." - if ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then + if [ -n "${ifilter_optionlist}" ]; then + if ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then + ${ipfilter_program:-/sbin/ipf} -D + fi + ${ipfilter_program:-/sbin/ipf} -T "${ipfilter_optionlist}" + ${ipfilter_program:-/sbin/ipf} -E + elif ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then ${ipfilter_program:-/sbin/ipf} -E fi ${ipfilter_program:-/sbin/ipf} -Fa From nobody Tue Nov 19 00:28:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XslhY6m9Nz5dG9H; Tue, 19 Nov 2024 00:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XslhY6LnQz4gD5; Tue, 19 Nov 2024 00:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrQQq0F1gSb5MPYyNRDAsWytCUEiLjgezsUrP0g568I=; b=ZXZTLLkIzrYjxyRY3UBJqEkeQjgD4JRPMKcC7ghmyn+kFyYylLV7aGgFDi5+3J+2zZ6ONJ RJuyy2zaAMv2af17r6RIO7V5uWg/GEQjynZKVAww3RywFYbAyqxmM13TGisRcpa2vwMLUU OWNtrevWNecrLVDG6Ee8luFtJE6BZO4N4Q0dogJHUdk1eJBogt+uk+ifxnFIsHr8+/5PQE FJNBZT0pAhy5IIUfiHroA511KrluvIQTtcT5/NBqrNEsIduY+UAmrLrvI5Z8icCKM4MmSk COvUwPyabmUk3eacLKxerxjJKyd9oHeLGnum6Lwc+6O+3v9uxXoeHZ3GAWpOog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrQQq0F1gSb5MPYyNRDAsWytCUEiLjgezsUrP0g568I=; b=ZY+tHWpKCCgTVPZLFi1IKL+NVEuLTRVkVO9yZyV2eiDmHItwAyR7YqVnFx/BXoIDgoOXs9 l+TMd6azKl1bnNpBl/JXLR8kYCUAUjy0J9oK7w6/xz0832+IJ9mxg7ORNh9AbMy2lsY8bL moGawKLha1FVGw6FF8gznpakQi1cHOIcrq1w3WdsDSFTyKwFD9m/GhKzWrr8+iKxaNghbr OHv0MNilH9kcvwCfjDrx55mzxa9MMCYcBpUqROJAcsudzScZwQtxiy5CbE0c4IOpp82Gac NBYQlzpzup1Djt8Chji4azeQvhvyJwPZZ6UlSo5+rywyiLA2D/jarQM4xFKLcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976093; a=rsa-sha256; cv=none; b=ZqLEYwtzzY3GPgHQFhvCg3nOOmKHstiS4os4Ab1RAgq2RI4E9yyyD6Fq/EP+rCskFLVnxk H3Tv/O7B3fRCtXxoHAhsrQUa5tzzIrljsVBjpD5x6obWSUMctITkKQIUU5JbiHPv0pqYRw E3zNntGRxE3sz3Lh8Qe/m6qOw9jfM5BopG9u1LmUkcB6C1UzN5RDCbX7j/RIdf2DcU0yvi AxYQM+0nlIaWmbUsP8qUC4DfY166j1uA3zEAot8tqUPjJSIg5qhszwZ59LyWu+JevE/mm5 iJ4qhMSfFxnaFWtV5k+7/a6WJO5Tr0fgvGeu99J5DBfcCBia0KpWHmFXv3/0Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XslhY5yGbz12Vh; Tue, 19 Nov 2024 00:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0SD3q064603; Tue, 19 Nov 2024 00:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SDlZ064600; Tue, 19 Nov 2024 00:28:13 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:13 GMT Message-Id: <202411190028.4AJ0SDlZ064600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 36f7ee7346cb - stable/13 - ipfilter: Avoid overrunning the message buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 36f7ee7346cbdc9d19edb62da1526e1d970271b4 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=36f7ee7346cbdc9d19edb62da1526e1d970271b4 commit 36f7ee7346cbdc9d19edb62da1526e1d970271b4 Author: Cy Schubert AuthorDate: 2024-11-07 01:22:57 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Avoid overrunning the message buffer Avoid overrunning the message buffer when printing an ippool btree error. We do this in two ways. First we increase the message buffer from 80 to 255 bytes and secondly we replace strcat(3) with strlcat(3). (cherry picked from commit 42935716286e7887bfeb9dd8daea72d6a5d40908) --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 5c9fd838bfa0..8d65f019da43 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -52,11 +52,11 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { - char msg[80]; + char msg[255]; snprintf(msg, sizeof(msg), "%s pool node(%s/", what, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4)); + strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:28:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslhb2gWzz5dGbV; Tue, 19 Nov 2024 00:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslhb0J2xz4gML; Tue, 19 Nov 2024 00:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2T0quof4F9oTxIhqvpfU0/V9P9SzzLqFjBEIg4S9n3c=; b=gyXyeTh8hJXOoJB1blfVH2Ocb+PB1tfvneIaSA3nzEypgqmj4rlcaEC+cVrEDToW9dvlzn gow26jnfkxaTYth7KDxALs6bb6/j9gr0r5SnJbRRtAYtOac6JSmtFlgmQqu04K/8J76WU2 RouxYacbfbctOJjKtROoa+6z6AFBew7uVSYegx8kGIMtw9q2d4hcYc9foApXCBSBYbvVGJ 5YfsavamONN1nflqyGGIDcQRf+Gbemzsxm2a1buQRHwFHXxV1DiiwPkxTnbhkWDjwmJiCQ jZVb5L/+wmEKRYIGL/H7N0U3I8XHimQGvOXJguXSUV/Jm2dKVCyN3Pz1czlw/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2T0quof4F9oTxIhqvpfU0/V9P9SzzLqFjBEIg4S9n3c=; b=spXwTwd+C9pAEQhS/9X+L08RT1eqSDQsRdbd6G35jXSVwLNhjYeTTz+amJl2w/6BNm17s2 jgMuMcCzAy3GAOiKraiARJB5ZUh47ELts3nHdcSc2ShtOYAArmbUN7btDF9ioTfCl6qB4X 554UsuQqdPtR0OOYbUPcMLw1OY6Dujb3Bpb9peYHpRMecGgnmZ2sAc9MPCMpPGP6YQK/MU 9I0LCDOyZbFrDMbKBQCOguECrPD+qq4SId553xYDRUwb7wTKF93/bRCZd93ONpZZTvtASV eHod6EVh7GkEXhFgOOPs4yalMSzDlrFw6sWZY0lLon+4Fa8hVYHr4bAyoAESUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976095; a=rsa-sha256; cv=none; b=ns9qz4e/63H4DOz7eVhqjYzgFhT1D+jAtPwC4V55GO4zXK/nrb4W0xHvvAKdZWyOZG3A7n 4kzGmsjI/5m+3Qk/wpVeiXNoDjcsH27w+bi//WKO396SVrtEDgGME/dW6SSQzPH6x0Z03d cLf2HRHLLbaqdnIvMEXMrtWzuzBh7eyEDL5/wcdUB0nh4WyRJhOVLDdaBMMK8C2FQ0WKWq J4jcbAlEmHmuS/TcJXaGyAVhGfbd6aTSFGfzkZLCrUS4d8PrKF1QUI+R41w4khWUloWISX zcny3aknuuaNE7KO57zjM7V+P7Fnjf3R3ENlE97Saj/CdJFVUhEcx2JQqyr+AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XslhZ71fDz12t6; Tue, 19 Nov 2024 00:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0SEqp064660; Tue, 19 Nov 2024 00:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SE26064657; Tue, 19 Nov 2024 00:28:14 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:14 GMT Message-Id: <202411190028.4AJ0SE26064657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ed2ecba890e5 - stable/13 - ipfilter: Print the pool name when adding a poolnode fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: ed2ecba890e58c6164fb5f21a89119bb8347c088 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ed2ecba890e58c6164fb5f21a89119bb8347c088 commit ed2ecba890e58c6164fb5f21a89119bb8347c088 Author: Cy Schubert AuthorDate: 2024-11-07 01:26:37 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Print the pool name when adding a poolnode fails Printing the pool node (IP address) only leads to speculation which pool the failed add occurred. This is especially useful when the same IP address is listed in multiple pools. (cherry picked from commit 470c680cfbf5f6cd9ac392b210b97b41d02cd969) --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 8d65f019da43..7a01da9df94b 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -54,8 +54,8 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if ((opts & OPT_DONOTHING) == 0) { char msg[255]; - snprintf(msg, sizeof(msg), "%s pool node(%s/", what, - inet_ntoa(pn.ipn_addr.adf_addr.in4)); + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, + name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } From nobody Tue Nov 19 00:28:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslhc2xFSz5dGcl; Tue, 19 Nov 2024 00:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslhc1MW2z4gH2; Tue, 19 Nov 2024 00:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PTJ04vcHOG+nxZdBnmH1OUtz8LZAsxp2Pxqc5PiXfVw=; b=J+N4S7fKIBM1Cz6llo2Vohht9vV0IGstzaMI8lB4kIGsy5jP78JOVaqX3V4E6fBQEMpfSD j8jyGG2qPLZ/8OandsVNETc6ILlXl+m57MF9SKErffS/wHVy/aRB+ZGUdKPQPfiSYgMxeh 1KBv5rfcUzftMPFJNgiRQltNRlf0bqjzldH/DWf9SJhz/e1bynsvG5QTEFwtsQmX2lFePD 66qNA9o65QYpgPBcK3LG67k1Ews8hzwD7R9b2g03vw4CV695LqZEAxVMWYwjmnLSVXSPdt w5CBdU29+SdkygiwrNbiIZrsw9KF2LApwwgkAcGbLNAwb20zh+m2WkyjkA6vEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PTJ04vcHOG+nxZdBnmH1OUtz8LZAsxp2Pxqc5PiXfVw=; b=Na8k0QL6FLcd6dZyzhwmw7r0QtAyQ359/VDSdPzsHgXxVG81BmT6AFwLRch07uJzrXNmNq BOdNRdPOigqHasQjpEqcg7Ls9G7X6rnpqPwBFJdTXox9yDy0BTZzlS05Q/Y52OFpY/iRwr Bfc92Thy1je61LiRHyYlC2JVRX+FIcfdueTcPhEnF4FiYmzNiPDUx4LK5Fv13u/TaCt/c/ vI24ctGZAE9xXUafprh/qsiyjszebCM9bu0ctQ+13vJP03y9yqqx/7hGttJO3uqQBETCng P1Vuto4IGDPTQEqkRxXlo+eHYVErOc0yB9pQBjT/ira4I+v5sOMq+AlJZVb5Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976096; a=rsa-sha256; cv=none; b=BpdF3fuKIkrLBdihZp0BCgufM2qMOtkgS8vx62VZIId7vbMjWUODCHJ9DSIhFjDanNHd/3 k5XmLUH5FMauz90v0dn2jtO3s7+L+FoCuQ5EcTgXrW1kHZVusV8R/d/gWoMo91MPN9KSGR FC2n09FIvH191yTnZL2FbxHpK+ii6yNgZCsxDQDc44vK2iUND48nxNrxtVBZ3RMwWLOcfM X8TE0kvCcWAJAdVS78s8Mb2Vt1vWl2Hy6AQ/0hJxOLYHyJNB4SLSMetDb5g8Ym+RfDJRhO 02kFDSwgu8hn28IQ/Wz09ZBRM4U3v78PiEWDSvh3LegpMQrTA1G4SRK0jfohFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslhc0wj7z12Vj; Tue, 19 Nov 2024 00:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0SGl8064724; Tue, 19 Nov 2024 00:28:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SGUC064722; Tue, 19 Nov 2024 00:28:16 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:16 GMT Message-Id: <202411190028.4AJ0SGUC064722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 7bc49d8b1e49 - stable/13 - ipfilter: Print the hash name when adding a hashnode fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7bc49d8b1e490eba0710923ef149d52418197472 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7bc49d8b1e490eba0710923ef149d52418197472 commit 7bc49d8b1e490eba0710923ef149d52418197472 Author: Cy Schubert AuthorDate: 2024-11-07 15:51:12 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Print the hash name when adding a hashnode fails As with when printing errors for failed poolnodes, printing the hash node (IP address) only leads to speculation which hash pool the failed add occurred. This is especially useful when the same IP address is listed in multiple hash pools. (cherry picked from commit 8aae4220d76602f22291d7567ba0c61b9aa8c188) --- sbin/ipf/libipf/load_hashnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index 11525dc96e35..bf22edb9be87 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -55,7 +55,7 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (!(opts & OPT_DONOTHING)) { char msg[80]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table", what); + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 19 00:28:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslhd2zNRz5dGHZ; Tue, 19 Nov 2024 00:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslhd2M0tz4gDk; Tue, 19 Nov 2024 00:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2eCWmIVbjyUuj9lO7FOu2zHrbsk6FlNfb4owLnn9VZY=; b=UhFHDZ99EkD8hf2RhBoXh/DgfQFvuM15iAKHqdcfhO7y8NrfOD7+nm/Mnok1XbT1gpxWzI vBMBRlOs/il8r+0JHalxwlJESPHloXK7et020dF+vszfdxHyqyEInZj56eST80cz23U35W mJ1EcfI7Juv6Eu8GXH3xVZAeLAUMsWAOjCBycdhzFCc8qIzrtbb5Lw66TZHCetTsCBi+Xq h/UL5evrKudi0HB+/hAtggZ0KOCNBggVSpIcWOXUoLVfnvztS46pka+luimusxBPSzbblu +Mcs6LVV6vzRTy5sHgdtFn/QvO0vKFXnC5voUSp+pm8A6ZpyDHCLeWHVdCNbqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2eCWmIVbjyUuj9lO7FOu2zHrbsk6FlNfb4owLnn9VZY=; b=eTGauzUYun1NMuvSSPOqMo5TPUgNz/mt+wjXRhF/EOJI8bG/n+WqJnz0QgHGdK7j150e+2 A3Mbu3YTnJlKBGojcWJGFopVyfdkGFPoB26lJMRRn5TwUzBBDArZVtsDaMxr6l179J/Mw8 GYgMpXuEvN3AciY+jpQiVUDDeL89oC/F7ZveIP0FZegNvKec62IvRojM6YUd5RYf6I5E7B tLHHljHQWxWcmpdjf5NY7u3xYTn+EWiIMN3BX7P0SpMPLOxc4ySuBRtu/FIigSmpcnLZuR ZPh0EoywyKZFFqkDLFcykgV4NSi8JH6KXubNJ0/1zswUFoVEqURvG+7CPfvBZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976097; a=rsa-sha256; cv=none; b=VnTlf0VHpZT3fMj0fxwoKZ1Hv8jiazHs2l0W/hkMwf352dw/Jbjq7tUicaWmjp17f7D1F0 1LzDm0I7pqDwK9708ferL6dufL7/hkbteu7NTgizxM2LUc5G5pgLU9q0YfhnPi3L86YOkL 1dYGk6Ube49b4gX+Wo9VdQ0MpbUMhdQ/3Io9WP6e8trENKcMJyad2oibcJ62xDJi0HfAuU rqelHwy1PnpEUSrWqTb5bBk6PnwcRTbq9NYMGS66rMZoh19gzuEyCWW+WZ+s2h+cKaW5/w QHSM27ViNuPftNThQWgDUtlhkrjWAJR4srsUIsgJVxg6FjuGlUvNv+EHnkAgVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslhd1xrhz12w5; Tue, 19 Nov 2024 00:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0SHHQ064778; Tue, 19 Nov 2024 00:28:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SHg2064775; Tue, 19 Nov 2024 00:28:17 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:17 GMT Message-Id: <202411190028.4AJ0SHg2064775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 0195893f9408 - stable/13 - ipfilter: Close a bracket in the poolnode error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0195893f9408e043505dd8599ebbcbc8e843c302 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=0195893f9408e043505dd8599ebbcbc8e843c302 commit 0195893f9408e043505dd8599ebbcbc8e843c302 Author: Cy Schubert AuthorDate: 2024-11-07 16:48:00 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Close a bracket in the poolnode error message When a node in a tree is discovered in error, i.e. duplicate, the IP address of the node is printed but no closing bracket completes the node in the message. Fix this. (cherry picked from commit 858a7a27f5c82c8364a0eb8bf1d9f0b1315422aa) --- sbin/ipf/libipf/load_poolnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 7a01da9df94b..0e41a3921b71 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -57,6 +57,7 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); + strcat(msg, ")"); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:28:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslhf4nhlz5dlJd; Tue, 19 Nov 2024 00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslhf34k7z4gHd; Tue, 19 Nov 2024 00: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=1731976098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kTiVbUFhQbOcwURlelTbPL/1M8AG0UYfdpcgec5rUyg=; b=dnBYsCPivhixTHuM8oxYML7PkGSNH2giQoC0/RgE4//jBVHdaBnktW3DUZeFCM3aVJoeoK 7nC991GPXyxCvWM0ft/0oT1ks0x25pMTHGlim4vBykmDU3jZkDb+uJhyEKEogWX3eNDW6L 73LkdSNnQePrGIIFJ3WbGlmskZ/chBSdUAre1zDlvfR5SA12eOqnxD9+I8LSHQY8JG7R5X 2m0tlrbJRkxY3yM4HT6w8W7K//V0AvPWBcl/U7SeHXyTOaxaOebj70LCs2sIw2jd6iihd/ 5T7+Ed4QtzcFxPQr8kt4ejh/j4CuqH3dyy/XsXhxd+KoA6VNoA2k1+fOsukNww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kTiVbUFhQbOcwURlelTbPL/1M8AG0UYfdpcgec5rUyg=; b=oZ+MLH3V73cgKjYdaM68Zio1G4AzvN2gRyNB+5vLEDboxJMc9/HYVqTsMet4aOfx2uJPoN w5q7LoPFQ/u1BlxDh8HJxcf69aVWnkJZHPwi+AeHCw5xLQaw6STmNn1ymgsVOxhm6k/i5f J5TBcYs22Fgd6UMBzRv7dKo6ddz7MS7CRvKNyqyHV6k3P3Thj3PV3RL6MYqKndL7vNuAPa lPK2JG5GLDWn0pM5VIr00VDkqsyMQRMaL/24qewYQ4pyPnn7wRZOfhAQfKrg1Rny/JXvm6 plWDG66cEl3wdxKNzcL42BmEx12VQz3/csT3hcMR3jgNErxcEtxxnBjDYWrVtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976098; a=rsa-sha256; cv=none; b=g9ia8A2cuDvNvX+Yxx16CYIFfaFHM8B5rnCcf/fQIsF0hmyxGhGJ+5WFdQz3+NOadbe6Y/ myj9fWTCaCs/9gDv84y08vMIgBO9nF+morzcuvwlCR+gYQbYGxe8P626jWBkKIQE55b5dd E8rVX5oWclnPJJUtpyIAB1FLtYypeLo8fWnvrdriPgM+2kAQA5qIYlpfZUnRH5l35B5fT7 RqkaNV88Llr0kLSmRgtD1d6Oogje271nUEw/UM1cjqbrKkYNsCs4QKfAT0RSLQWUl2J3Zk saQudGNQ8yfmnuB+ZUcW6EuAyUPoYrm7IMAN4JjyJ04st/u+L53FRtBM6buHyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslhf2fmBz12yM; Tue, 19 Nov 2024 00:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0SIvK064848; Tue, 19 Nov 2024 00:28:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SItV064845; Tue, 19 Nov 2024 00:28:18 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:18 GMT Message-Id: <202411190028.4AJ0SItV064845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 9bfba304a8a3 - stable/13 - ipfilter: Support printing of IPv6 addresses in error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9bfba304a8a36d3b2b8c8d2efa2caeb65955474e Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9bfba304a8a36d3b2b8c8d2efa2caeb65955474e commit 9bfba304a8a36d3b2b8c8d2efa2caeb65955474e Author: Cy Schubert AuthorDate: 2024-11-08 07:39:11 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Support printing of IPv6 addresses in error message Replace inet_ntoa(3) with inet_ntop(3). This supporting the printing of IPv6 IP addresses in addition to IPv4 IP addresses in error message. (cherry picked from commit 3a2cb65b6e6dc1e71013db27ce143eb8670a1755) --- sbin/ipf/libipf/load_poolnode.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 0e41a3921b71..880a6cd1c681 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -53,11 +53,29 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, - name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); - strcat(msg, ")"); + inet_ntop(pn.ipn_addr.adf_family, + pn.ipn_addr.adf_addr.vptr, ipaddr, + sizeof(ipaddr)); + +#ifdef USE_INET6 + if (pn.ipn_mask.adf_family == AF_INET) { +#endif + inet_ntop(pn.ipn_mask.adf_family, + pn.ipn_mask.adf_addr.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s%s)", + what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:28:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslhh07hCz5dGbm; Tue, 19 Nov 2024 00:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslhg4B3pz4gVx; Tue, 19 Nov 2024 00:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UX+9uAsT22dBhXc0aXjuWlv23/bl7sWfkF0ozUiOccY=; b=yxIO9ZK/3MyJOS7VIoKLHAMHtaIxbwBo+ExzWJ/C/JfCotuv8OkdqXaIJOy3et0sVSdEMe xkNHalmzlKQl0oKpJOQuwU9y4HVIgYI8kkgbV9OQNLmlO6sT+jjqp1/74QVKnJxhox5H9v PPJLxODCnAA6X4RZ/fsZv0z4xs20XT8qT2MqHR4qdRxPD3wh+PyqeSL2D8Gv4eotKdNfsY sww9Kz1sGS1O8XobsKu2nc1txcGIgydBvMU0+8ASHELHMLG/ljkd5Gbt0+sOcN+70ZCsUp gc6cOqFPW9f8r2D6wqpfDyl3BZ2zMl2oWBA/gvnv9hPbT0erjtF0QP3TScwfoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UX+9uAsT22dBhXc0aXjuWlv23/bl7sWfkF0ozUiOccY=; b=r3HNeN2+pAutSYo/NLDiALqOy1cA3fECYU0yvV8nLq2i2quPmyvbxvMDbeBGjJq0GRQaYp ibNFguK0Ui0FbQSuu4iR8jsNLpCafsIWt1apYafrxXypLPXruBn7aOtUpxzCT9ZnAH3orE //ZfSdikHyKagSAfotn90MQkHuZQf+YTabXCb0Y60PNBI+xPMV1TZm85aC9U3muxSQwnyp CYpTPbmW/hwwHwB8ZF4rZa7RauM+ZQgxsvmNz4CqXMCxHyqiAhjgh0I6xAK8PytrinNtpB hX+iXVGbLfQ1zuYHSIMsSbPK1LDqN3DAFENOYe3kw8Pr04cTwLqoF9mFn3vTsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976099; a=rsa-sha256; cv=none; b=dSy+a7QlFVgL7biPNM1VnhtsdKAveHsueW/TLbcpEyYffXU3s7CJXisW08e77WM86cS/b5 zKJzFrilci0iB8ncQzWApC6hMA4OeCYNhz+DDd7JA8u2xSU9kCUhOVaXNDEzY26Bfmz1mg QvdrEiN+yuxrT07p/wOJ6zuZcxDAluF5J5wbo/zC+UJIUqvZOjahnWTvRp9FnLJQjwyznZ s61FrrZvY0ZsujdDzTF5ScksXKVtMChPBdYlRuR5k0IiwgpoHaSoRd0FBvPGHwX0QyEk5F xkfXZYqjaNMkevF6fcnJpMk8jmgfnkSlnyz19/eR3GmGhlWMj2STBRU3HF0vBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslhg3grnz12yN; Tue, 19 Nov 2024 00:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0SJDC064903; Tue, 19 Nov 2024 00:28:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SJnF064900; Tue, 19 Nov 2024 00:28:19 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:19 GMT Message-Id: <202411190028.4AJ0SJnF064900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 16d1a55b63f5 - stable/13 - ipfilter: Include the IP address in error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 16d1a55b63f5e2a9e1b5307cad1c91da9cf9bd5d Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=16d1a55b63f5e2a9e1b5307cad1c91da9cf9bd5d commit 16d1a55b63f5e2a9e1b5307cad1c91da9cf9bd5d Author: Cy Schubert AuthorDate: 2024-11-08 16:30:53 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Include the IP address in error message Include the IP address in the message when a hashnode add error occurs. This helps to identify the ippool.conf statement that the error occurred. (cherry picked from commit 9da30a23a5ecae151ae1db045354fab105c69e12) --- sbin/ipf/libipf/load_hashnode.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index bf22edb9be87..12b11687710d 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -53,9 +53,28 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (err != 0) if (!(opts & OPT_DONOTHING)) { - char msg[80]; + char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); + inet_ntop(ipe.ipe_family, + ipe.ipe_addr.vptr, ipaddr, + sizeof(ipaddr)); +#ifdef USE_INET6 + if (ipe.ipe_family == AF_INET) { +#endif + inet_ntop(ipe.ipe_family, + ipe.ipe_mask.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s) node(%s%s)", what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 19 00:38:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslwd6DKSz5dGnn; Tue, 19 Nov 2024 00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslwd5kJ2z4jbk; Tue, 19 Nov 2024 00: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=1731976721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POFpJF1AFCEVBI2tzQ0ikCYPGasKwDmd0ftNnwm0L3o=; b=rNzOsp/w2QgGIuZm+MIT6SGfN1QVGettDQHPTYz5lRmzBPNn8HWu0g7hSTmIYk0HWMpufh q+Tevtuv7WsnDSfSB7PtO1v62/3Rkv/xQfXfVltQK1gthrl6h7NPlKQywvLOwx41b2LD0z sY9g11Zyk7JI9nJ1lw0GbGRfNd14ev1k7y5XFEE+MQhvxYS9tpnm+9yHvW5pBmgpCpIud8 eTfIW2C+Ou6lPRgUfYSllpF7yasKHlnChxwzOgpnkLhBtzHUgJNxzWCACk1Ael8JIjRpaC BcfetseWHvxizLPfwKClT3/gFntun5bJ6dKF2yuCS9pXcXAH76Iyz5xc1Rpluw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POFpJF1AFCEVBI2tzQ0ikCYPGasKwDmd0ftNnwm0L3o=; b=rqAEu1LOsWlAWAKUqxQuPqDIOsnGvVqQ9BUBdAZG6K8imzNMSU3ijrgwb5UK3SNyEKBZbt p4RIWk4TTWgPsKSZ0nakCSQqIuf+sMOmPU/aLoNjxfSC0GHu11Nv1VZa+cGi9bD/B72LBT BJmWiyVOJk0aRj1SUebwQxkB6vwzobO54gOKwfD8s6vKqVHN4CQIxqWYGgOAFsyhHuYb5u UYuHsRcLH2stkhFkzAs5ax46JBhKn3LGBWjB1nVn97BIm8yQtytm/28iEo5dWaHfSkmCLD qRDrN/lkReSSomKehx/iOeQ/nu4tB9jNXuDlls+go39OZQ9st0yjo6fiv0AcLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976721; a=rsa-sha256; cv=none; b=Dh6VUaAUQbH2gbb+99vNcuHNQcFnvLeKJrCT58NCtTqllWaaGQtiGp40UHIDb+Lzv09J7B rv7ukUGZ4QJezpbeEOS5/0KlCDcLzfKgAPwmL3O8oKZn9h7GZdBfKk12fU0pr6qXFMIbi0 casb+83YfYZEa3Nxe/Z/Pjmhf/MdoGsMfox7yCO5kpQovZjV1zSQux1Ihv4m3IPY0T2dl0 +PM3nzoGK3gU3avibp/M/YKd2zPePYfvbEwDhWu0CqOrdZ4s4lL1BybGqIjEv7Zr9QQw9U isOoCEgW6DTAkbWKJZ+/ZTRUXQwB86lWbBoC2ftfTMMU6aCN6uuZ6a0n6PWXgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslwd5Bl4z132b; Tue, 19 Nov 2024 00:38:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0cfFM083862; Tue, 19 Nov 2024 00:38:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0cfZY083859; Tue, 19 Nov 2024 00:38:41 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:38:41 GMT Message-Id: <202411190038.4AJ0cfZY083859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: de5496958c86 - releng/14.2 - LinuxKPI: lockdep fix #includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: de5496958c8651fd62e9d65722ad36d322a59574 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de5496958c8651fd62e9d65722ad36d322a59574 commit de5496958c8651fd62e9d65722ad36d322a59574 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 01:21:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:36:04 +0000 LinuxKPI: lockdep fix #includes Add sys/sytm.h for __diagused which unbreaks compilation of drm-kmod 5.10-lts on main. Sponsored by: The FreeBSD Foundation Reported by: Evgenii Khramtsov PR: 282479 Fixes: 5c92f84bb607 Approved by: re (cperciva) (cherry picked from commit 9b2705121ba230bf71a1509cc928f0481dfbf31c) (cherry picked from commit 06733ceca677b2d8ea2ae738bbb624d510fc9df8) --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index 70a4e45867fe..93fe445f7057 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -30,6 +30,7 @@ #ifndef _LINUXKPI_LINUX_LOCKDEP_H_ #define _LINUXKPI_LINUX_LOCKDEP_H_ +#include #include #include From nobody Tue Nov 19 00:38:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslwg0YH4z5dGgd; Tue, 19 Nov 2024 00:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslwg00XGz4jpT; Tue, 19 Nov 2024 00:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZN1bje9JpWp1V34m0xAG2aw4i/VCOYGvP4gu/RFqfoY=; b=SEfCzPc6bWe/cupzBRJN1nsFMJp5TY+8+h/guGSGjc6QEdOwckU5Sbt5i935jhvcy6pLJo 9bu7JPwXUphhRjME+2WwebXYvIgbAgwelxyYBEtQLkUC0Iuiv6V1taNT9Phylz70a8G602 jVS/knfWTgEKz1iD+ZCRSC8XfiuTJFEYXkbSMWXm6b3G7DPx7uDGi1QWM3dnzNsAjs7tgt 92wRHyvDni4WfPKvBxR162LxAijXQhmbQzNLLC3bQ5RP2J7MypIXxe9oUoyZ2eF/g5FsFK n6HYwKSf1iHiEXBIcuB+0upbBwd8hYpqbNLU/lWvZ2PIYOG/pG17ZpPO3lNm8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZN1bje9JpWp1V34m0xAG2aw4i/VCOYGvP4gu/RFqfoY=; b=utdiloIQ1SOKS+Bwylzja+xid+5p8rFoacCwooDT82aPUu6Pyajw7DPXrAUfIc2bzdvTlg +rw5ajd4KFsv9bxdnhFWsoiMcxhCB6fsnFPtAGdFISNZdWpgsJXxAfU7mNprMHhvKdiKVv +nITcoTtejt678LSxgbDvwUPbg49f0JL+k24iSjeoWV6MFSl+shdNyzBeOMQ8C9wZLQtAA tnT8sf95orLW8D4af723kXXMwCMF4T3LXNALjbzD0eBYW6VBOUthC1n6yX30g9l3vy+Ojk wqraxHfQvOpD8CC81KaihYKI5Fo+Evr5w4i7Y7jX6noxE1JGGXYC0YR+MDP5RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976723; a=rsa-sha256; cv=none; b=lzT3DX+CKS2OpDCPhoIQIe1Y8kW0DC3a2n55Z6uqmPhJf6IjUhFuoaIdwoOp6KI9zZJail RcID11WpMPQRxmAdogWjll67sc8CUw9sxzRZGV8KpvPx+d+POJGpTwTVsKpXHFouWEV34i UfCN0HCLPvJi5B3o0gu38jJxJH5KD50tsBQ55+bDGQk/+7tjav1FdzR9PinHvHiBexwrx7 iRu+0Mo/SS6Vysw7s+3ro8L0lKzSU2zpRbwJzcfwp3Q8IsGyDURvQUIjgYsgx8HmxSSZVe jtwYEmIqMyyXrkr4NoWtgQNEHtPMG3HWGKhBAz3g7b4SgqsWVnya/ruf8+VKnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslwf6W4jz12wf; Tue, 19 Nov 2024 00:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0cgCr083937; Tue, 19 Nov 2024 00:38:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0cgFu083934; Tue, 19 Nov 2024 00:38:42 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:38:42 GMT Message-Id: <202411190038.4AJ0cgFu083934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8c6df7ead19c - releng/14.2 - release: add wifi-firmware-kmod@release to ship as package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 8c6df7ead19cae1e1d799c3e5576a2d792c74b13 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8c6df7ead19cae1e1d799c3e5576a2d792c74b13 commit 8c6df7ead19cae1e1d799c3e5576a2d792c74b13 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 23:47:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:36:40 +0000 release: add wifi-firmware-kmod@release to ship as package Add the flavored port for all the supported wireless drivers we recently added support for. Sponsored by: The FreeBSD Foundation Pointed out by: cperciva (as part of the set of changes) Reviewed by: cperciva (#releng) Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47406 (cherry picked from commit 2483a2d36803896d27861c03e1f53dd9546b1e73) (cherry picked from commit f21cb43c91ef5ff54173b15f550e711c9f87eec6) --- release/scripts/pkg-stage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 5742f84b0258..8f96bd5cf5a1 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -19,6 +19,7 @@ graphics/drm-515-kmod misc/freebsd-doc-all net/mpd5 net/rsync +net/wifi-firmware-kmod@release ports-mgmt/pkg shells/bash shells/zsh From nobody Tue Nov 19 00:38:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslwh33zgz5dGnp; Tue, 19 Nov 2024 00:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslwh14FTz4jdb; Tue, 19 Nov 2024 00:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pZrvPl8YaCI4AsKRJP2WbzRHauTPBIGPcBmwMuJQcdI=; b=nEP98sbVwsUhjhhlGCTYjoXcf2ngfiwAR9UwndME9qoeUHlC6Y2xW/kIsT71pw3nkLNE2N KFYYBSp/nlFbdOCMo1oOMw4YI6Zs13SGWEMrWMmmB8EoHUoG4HEzzLi24o5O87d0W5m9q9 FiA9rzDeBXYQsYgCOoskzWxY83QNMakiCO+rZksfNhc+G6+zT8rXfpxy+/Ds5S6B3WvFHj MBR87zcaDFcIu45VeJLoQz9KQ68tVBDfhHwqYu5G++bMRIZA82RiB7/+4gOg5A27jgEAEy B3A+OyzstJHI0g6hv63DsWe9GcpmbuwZzVnifEoTRtSkQwKUjRAlJoh9GGmdbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pZrvPl8YaCI4AsKRJP2WbzRHauTPBIGPcBmwMuJQcdI=; b=rM2UQyJvtKkpw7tbCVSsn3IZUzcC3Koc1V/GtCWmCgZZDQdOIoztRpxkIFhMbVCu+j/aJL pYaH20iu2LMjT60CmNacakCdgT5lg8xPAhIK0C/4sZl1CXhGM21uBTLBNIee0f66TVE4ds WWdBDqT9x2Od0wFHFaGIQpTRRg1VBWF9ajVRkOyAaCVKRu9XBAkJAn2zPJs9MACG/rc7zA nZYGuNzFa6Xm7AOeBwztmNQ/Qn5mcusP1+S8sDSDfT1SHo9WdiulCHpJK0tWUQm7NmMVg8 H3g/LbLL+uJX4WHeo3ThcGdEEgaegzAQOHPh0Zvtgxe6nhTmKFywFwlE3AXDcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976724; a=rsa-sha256; cv=none; b=AN9xPaeFrd/ZSaT113oiSgcxOYtieN25dr4X+SXDFVh9ieCJk8+9mmHVHiCp8lX7rnsf9B lds0AlVTBHx59Xna2ex73tlCZ0aq9qsy4PiNwmTs391SDxdMtMfs5nbse4ubUeiXsYYb4A kK7OLN+MuP6mhx4pol+45xi8s1JWn2kFva0fCxW6pVetD5Ze0IsseU7ptpvES3qZU4wKas Bjk9SpCa9xDPxmsUW9hXvY2k4S6qzeVP35vO2vhMinIpHCrvrMhbmsUlj4Qo2jCxHTeQFu oaCMgiQN/mBgPTL3QCRKSe8W4FKGPl9KrkubuuzBfkkdRx3+r+tuecP0BC5vdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslwg75p9z132c; Tue, 19 Nov 2024 00:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0chce083993; Tue, 19 Nov 2024 00:38:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0chxq083990; Tue, 19 Nov 2024 00:38:43 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:38:43 GMT Message-Id: <202411190038.4AJ0chxq083990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: dc647e4df990 - releng/14.2 - fwget: add -q for quiet 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: dc647e4df9900eae1611803ba481d9cc355fc5e3 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dc647e4df9900eae1611803ba481d9cc355fc5e3 commit dc647e4df9900eae1611803ba481d9cc355fc5e3 Author: Bjoern A. Zeeb AuthorDate: 2024-11-04 23:59:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:36:49 +0000 fwget: add -q for quiet output Introduce -q to quieten other output (unless -v is also given). pkg-install(8) currently has no option to allow skipping unavail packages but it will just fail. We would realy want to try to install as much firmware found as possible from the installer. Work around this by doing one firmware package at a time. For that it is highly helpful to be able to query (or possibly re-query) all outstanding fimrware packages. -q together with -n only shows each package to be installed one by line. Once https://github.com/freebsd/pkg/issues/2195 will be implemented we could undo this part of the change and future changes to the installer and use the new option for pkg-install(8) there. While here switch to getopts so -qn works and not just -q -n. Sponsored by: The FreeBSD Foundation Reviewed by: manu Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47445 (cherry picked from commit 1eb3f15c149b9a2e5b6f5e10aed454fc85945bbd) (cherry picked from commit 814a49d65ace83b7a955cca32ff243f4abe7cd50) --- usr.sbin/fwget/fwget.sh | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh old mode 100644 new mode 100755 index 154fb7dc92e1..3e2181e53b73 --- a/usr.sbin/fwget/fwget.sh +++ b/usr.sbin/fwget/fwget.sh @@ -38,7 +38,8 @@ Supported subsystems pci Options: - -n -- Do not install package, only print the results + -n -- Do not install packages, only print the results + -q -- Quiet mode. If used with -n only prints a package a line -v -- More verbose EOF exit 1 @@ -75,22 +76,27 @@ addpkg() } DRY_RUN=n +QUIET=n VERBOSE=n -while [ $# -gt 0 ]; do - case $1 in - -n) - DRY_RUN=y - ;; - -v) - VERBOSE=y - ;; - *) - subsystems="${subsystems} $1" - ;; +while getopts ":nqv" _arg; do + case ${_arg} in + n) + DRY_RUN=y + ;; + q) + QUIET=y + ;; + v) + VERBOSE=y + ;; + ?) + usage + ;; esac - shift done +shift $(($OPTIND - 1)) +subsystems="$@" # Default searching PCI subsystem if [ -z "${subsystems}" ]; then @@ -112,13 +118,25 @@ done case "${packages}" in ""|^[[:space:]]*$) - echo "No firmware packages to install." + if [ "${QUIET}" != "y" ]; then + echo "No firmware packages to install." + fi exit 0 ;; esac -echo "Needed firmware packages: '${packages}'" +if [ "${QUIET}" != "y" ]; then + echo "Needed firmware packages: '${packages}'" +fi if [ "${DRY_RUN}" = "y" ]; then + if [ "${QUIET}" = "y" ]; then + for pkg in ${packages}; do + case "${pkg}" in + ""|^[[:space:]]*$) continue ;; + esac + echo "${pkg}" + done + fi exit 0 fi From nobody Tue Nov 19 00:38:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xslwj5b0pz5dGrW; Tue, 19 Nov 2024 00:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslwj18MNz4jgy; Tue, 19 Nov 2024 00:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpEcNlU+i3Gf+uu/FGWVkstFugboaS4vZlzaxz1g038=; b=FnHfjQPI3APiouKlj8WAjwoCF0Pv0mF8qDlG4GhxktuPqD0ZOoUHQ7QGQDp5okMcsVcB1t 1aaNLVSUMf4+WnNOdjVGZh6p0f6/sJ18kdzmnLKbZAN4ailNlfWczt+7pjiwYyzaXfHq51 Bfle3BEtiqcUMheJrTNpRek4vqrboHWAyxkF03oRDJuXJ6yy70Lt22g0MXz+8owsU3a6k2 n+GaudnCTmaDCzB6t8pNg0PxortMAbtJzQlLStSMVQSj3Ls1CrOQ9uOkR5pRlf9HaUvEPo iqYUScP6LgnxHnEJAhWSAq3pyTVoOimZ/HnPxV3SpYauM6anygxqjbIQqrbf1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpEcNlU+i3Gf+uu/FGWVkstFugboaS4vZlzaxz1g038=; b=ytvSHYxk5EwIdrBqAQhjj2i9tL+1A46x05p/E/EKl+/XO7l1A62MBMkf6GNdEOj3GwupbQ RgVVjFgBxfOLwMX7C3ivETyoB22UjBCTiloHcxvZcm2fItoF5IOmAgncs4EboGhPHbkZUD FUsXTvEuzvrvheBAdfkLJdyLoTRgnJxgKPHEDSqrPYAj1VI2QxmWjobRoJguOrO9lCYlMq 2aP5TRdIkSlpg+bejaKbz46DwpPfYsm60TI1efWDntMLplXd2ZBj8kiPWZe8Xe28rePczM VRVEfWRRYntlvRJLg3hwcOFQ4Fotx8jDfSNFLlry8iDybDmcS4mQSuIapJ21Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976725; a=rsa-sha256; cv=none; b=PwZNn/otUFhcS4VsQjWSz69+pURxUi7hlGktTfeZVpn6ZYU9gPpMEjqo+aw6GdMxOMrfzz 6Z/6yIQob4PRert04K7zRsmxrOonFtoKxpktBYunASNPS/r6cYazYE9z7IKrzc3LkTc/9G xVbFmSRtrqpjViWWb8TSu9pO7fzvHq2XFwJ4Gwfbv141++xWY0+fmmtO4T9IRACqRRTe83 kn/bug0vs8c2aHI8ai8CioE5saghI4hUdKZhoX3B4ykAqFZ7KBXz2YZtaM6F0zgmcMV8/S cdY8zlYrWPeHgOyEH3dAg2tQML/dpXZhVJKH8SOkVB2OdYKT5MwUBQXtCfSCLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xslwj0RwKz12WR; Tue, 19 Nov 2024 00:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ0cj6r084055; Tue, 19 Nov 2024 00:38:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0ciaA084052; Tue, 19 Nov 2024 00:38:44 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:38:44 GMT Message-Id: <202411190038.4AJ0ciaA084052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 5252ae96ad2d - releng/14.2 - man4: wifi manuals: revise .Sh HARDWARE + polish some List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 5252ae96ad2df7d812d4e9689cb234b036dc7a98 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5252ae96ad2df7d812d4e9689cb234b036dc7a98 commit 5252ae96ad2df7d812d4e9689cb234b036dc7a98 Author: Alexander Ziaee AuthorDate: 2024-11-10 19:28:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:36:55 +0000 man4: wifi manuals: revise .Sh HARDWARE + polish some The Release Hardware Notes are generated from hardware sections in the manual pages. Create or organize these sections in Wi-Fi driver manuals for information flow, and perform minor maintenance on them while here. After some testing, we have determined that a compact column list is the best for a single column listing in the hardware release notes. This makes very clean subsections and is for some reason denser than using a tagged list. This adds the long requested conversion from netmask to cidr examples. These examples probably shouldn't even be here, but that is a discussion for another day. Reported by: bz (relnotes generation, cidr, test-net-1 ip4addr) Reported by: grahamperrin (HARDWARE order mentioned in fdp-primer) Reported by: Graham Percival (don't prompt) Reviewed by: bz (anything wrong likely is my polishing fault; incl. iwm.4) Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47508 (cherry picked from commit 8f1a2d507e25e77d20a5d7675dc8eee9b83d3570) (cherry picked from commit 93b30f1b6caec5083efacf3fb5049b72e75cc09e) (cherry picked from commit 6c140ba1266b7957e1c2861e6ce41d9b88381f8a) --- share/man/man4/ipw.4 | 39 +++++---- share/man/man4/iwi.4 | 47 +++++++---- share/man/man4/iwlwifi.4 | 67 ++++++++++----- share/man/man4/iwm.4 | 96 ++++++++++++--------- share/man/man4/mt7915.4 | 38 ++++++--- share/man/man4/mt7921.4 | 38 ++++++--- share/man/man4/otus.4 | 94 +++++++++++++-------- share/man/man4/ral.4 | 27 +++--- share/man/man4/rsu.4 | 83 ++++++++++-------- share/man/man4/rtw88.4 | 60 +++++++------ share/man/man4/rtw89.4 | 63 ++++++++------ share/man/man4/rtwn.4 | 104 ++++++++++++++--------- share/man/man4/rtwn_pci.4 | 26 ++++-- share/man/man4/rtwn_usb.4 | 21 +++-- share/man/man4/rum.4 | 23 ++--- share/man/man4/run.4 | 211 ++++++++++++++++++++++++++++++---------------- share/man/man4/ural.4 | 30 ++++--- share/man/man4/urtw.4 | 44 +++++----- share/man/man4/zyd.4 | 147 +++++++++++++++++++++----------- 19 files changed, 777 insertions(+), 481 deletions(-) diff --git a/share/man/man4/ipw.4 b/share/man/man4/ipw.4 index c1010b798290..0ebee0f1e6eb 100644 --- a/share/man/man4/ipw.4 +++ b/share/man/man4/ipw.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IPW 4 .Os .Sh NAME .Nm ipw -.Nd "Intel PRO/Wireless 2100 IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2100 IEEE 802.11a/b driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -57,19 +60,14 @@ legal.intel_ipw.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for the -.Tn Intel -PRO/Wireless 2100 MiniPCI network adapter. -.Nm -supports +driver provides support for Intel PRO/Wireless 2100 802.11a/b +wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm ipwfw @@ -80,28 +78,34 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_ipw.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for the +Intel PRO/Wireless 2100a/b MiniPCI network adapter. .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_ipw.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_ipw.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev ipw0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev ipw0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev ipw0 ssid my_net up" +.Dl ifconfig wlan create wlandev ipw0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev ipw0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -144,6 +148,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwi.4 b/share/man/man4/iwi.4 index 9de9b3e6c490..31ef4ec83d32 100644 --- a/share/man/man4/iwi.4 +++ b/share/man/man4/iwi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IWI 4 .Os .Sh NAME .Nm iwi -.Nd "Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 network driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -57,19 +60,14 @@ legal.intel_iwi.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for -.Tn Intel -PRO/Wireless 2200BG/2915ABG MiniPCI and 2225BG PCI network adapters. -.Nm -supports +driver provides support for Intel PRO/Wireless 2200BG/2225BG/2915ABG +IEEE 802.11a/b/g wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm iwifw @@ -80,28 +78,42 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_iwi.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports the following wireless network devices: +.Pp +.Bl -bullet -compact +.It +Intel PRO/Wireless 2200BG MiniPCI Network Connection +.It +Intel PRO/Wireless 2225BG PCI Network Connection +.It +Intel PRO/Wireless 2915ABG MiniPCI Network Connection +.El .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_iwi.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_iwi.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwi0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwi0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwi0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwi0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwi0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -149,6 +161,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index ddeeb549d0f4..b4dce91f1ee4 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2021-2024 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from @@ -25,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt IWLWIFI 4 .Os .Sh NAME @@ -54,11 +56,11 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from Intel's Linux iwlwifi driver +driver provides support for Intel Wireless network devices. .Pp .Nm -will be a successor to -.Xr iwm 4 +is derived from Intel's Linux iwlwifi driver, will be a successor to +.Xr iwm 4 , and may supersede that driver in the future. It still complements the .Xr iwn 4 @@ -66,33 +68,51 @@ driver which supports older chipsets. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac/ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned. .Sh HARDWARE The .Nm driver supports PCIe devices from the -.Em mvm -sub-driver with the following chipsets: +.Sy mvm +sub-driver with the following chipset generations: .Pp +.\" awk -F\\t '{ print $5 }' ~/tmp/iwlwifi_pci_ids_name.txt | \ +.\" grep -v undefined | sort -V | uniq | grep -v ^$ | \ +.\" awk '{ printf ".It\n%s\n", $0 }' .Bl -bullet -compact -.\" --------------------------------------------------------------------- +.It +7000 +.It +8000 +.It +9000 +.It +22000 +.It +AX210 +.It +BZ +.It +SC +.El +.Pp +These chipset generations match the following common device names: +.Pp +.Bl -bullet -compact +.\" -------------------------------------------------------------------- .\" This list is manually generated from a sysctl and post-processing. .\" Edits will be overwritten on next update. -.\" --------------------------------------------------------------------- +.\" awk -F\\t '{ if ($2 == "") { next; } if (seen[$2]) { next; } \ +.\" seen[$2]=1; printf ".It\n%s\n", $2; }' iwlwifi_pci_ids_name.txt +.\" -------------------------------------------------------------------- .It Intel(R) Dual Band Wireless AC 7260 .It @@ -209,15 +229,15 @@ Intel(R) TBD Bz device Intel(R) Wi-Fi 6 AX204 160MHz .It Intel(R) TBD Sc device -.\" --------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr iwlwififw 4 , .Xr iwm 4 , .Xr iwn 4 , .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -225,3 +245,12 @@ The .Nm driver first appeared in .Fx 13.1 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. +802.11ax and 6Ghz support are planned. diff --git a/share/man/man4/iwm.4 b/share/man/man4/iwm.4 index b810f7016e54..5249959cd3f6 100644 --- a/share/man/man4/iwm.4 +++ b/share/man/man4/iwm.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 20, 2024 +.Dd November 10, 2024 .Dt IWM 4 .Os .Sh NAME @@ -31,8 +34,7 @@ .Nd Intel IEEE 802.11ac wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, -include the following lines in your -kernel configuration file: +include the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iwm" .Cd "device pci" @@ -79,55 +81,59 @@ iwm9260fw_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Intel Dual Band Wireless AC 3160 -.It Intel Dual Band Wireless AC 3165 -.It Intel Dual Band Wireless AC 3168 -.It Intel Dual Band Wireless AC 7260 -.It Intel Dual Band Wireless AC 7265 -.It Intel Dual Band Wireless AC 8260 -.It Intel Dual Band Wireless AC 8265 -.It Intel Dual Band Wireless AC 9260 -.It Intel Dual Band Wireless AC 9270 -.It Intel Dual Band Wireless AC 946X -.It Intel Dual Band Wireless AC 9560 -.El -.Pp -.Nm -supports +driver supports running most Intel Wireless AC series network devices in .Cm station mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . -.Pp This driver requires the firmware built with the -.Nm iwmfw +.Xr iwmfw 4 module to work. .Pp -Currently, +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The .Nm -only supports 802.11b and 802.11g modes. -It will not associate to access points that are configured to operate only -in 802.11n or 802.11ac modes. +driver supports the following PCIe Wi-Fi devices: +.Pp +.Bl -bullet -compact +.It +Intel Dual Band Wireless AC 3160 +.It +Intel Dual Band Wireless AC 3165 +.It +Intel Dual Band Wireless AC 3168 +.It +Intel Dual Band Wireless AC 7260 +.It +Intel Dual Band Wireless AC 7265 +.It +Intel Dual Band Wireless AC 8260 +.It +Intel Dual Band Wireless AC 8265 +.It +Intel Dual Band Wireless AC 9260 +.It +Intel Dual Band Wireless AC 9270 +.It +Intel Dual Band Wireless AC 946X +.It +Intel Dual Band Wireless AC 9560 +.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwm0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwm0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwm0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwm0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwm0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -155,15 +161,16 @@ Verify the .Xr iwmfw 4 firmware module is present. .It "iwm%d: could not load boot firmware" -An attempt to upload the boot firmware image to the onboard microcontroller -failed. +An attempt to upload the boot firmware image +to the onboard microcontroller failed. This should not happen. .It "iwm%d: could not load microcode" -An attempt to upload the microcode image to the onboard microcontroller failed. +An attempt to upload the microcode image +to the onboard microcontroller failed. This should not happen. .It "iwm%d: could not load main firmware" -An attempt to upload the main firmware image to the onboard microcontroller -failed. +An attempt to upload the main firmware image +to the onboard microcontroller failed. This should not happen. .El .Sh SEE ALSO @@ -174,5 +181,12 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 +.Sh BUGS +Currently, +.Nm +only supports 802.11a/b/g modes. +It will not associate to access points that are configured to operate +only in 802.11n/ac modes. diff --git a/share/man/man4/mt7915.4 b/share/man/man4/mt7915.4 index eece142c11a5..ba67a77af735 100644 --- a/share/man/man4/mt7915.4 +++ b/share/man/man4/mt7915.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt MT7915 4 .Os .Sh NAME @@ -50,7 +52,9 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver. +driver provides support for MediaTek MT7915E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -62,36 +66,34 @@ Otherwise no .Xr wlan 4 interface can be created using .Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac and ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. .Sh HARDWARE The .Nm driver supports PCIe devices with the following chipsets: .Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7915E +.Bl -bullet -offset indent -compact +.It +MediaTek MT7915E .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -99,3 +101,11 @@ The .Nm driver first appeared in .Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. diff --git a/share/man/man4/mt7921.4 b/share/man/man4/mt7921.4 index d28dc520de6b..fe9efa77e35d 100644 --- a/share/man/man4/mt7921.4 +++ b/share/man/man4/mt7921.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt MT7921 4 .Os .Sh NAME @@ -50,7 +52,9 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver. +driver provides support for MediaTek MT7921E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -62,36 +66,34 @@ Otherwise no .Xr wlan 4 interface can be created using .Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac and ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. .Sh HARDWARE The .Nm driver supports PCIe devices with the following chipsets: .Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7921E +.Bl -bullet -offset indent -compact +.It +MediaTek MT7921E .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -99,3 +101,11 @@ The .Nm driver first appeared in .Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is to come. diff --git a/share/man/man4/otus.4 b/share/man/man4/otus.4 index 1e2d1e0a402f..06f73bfe3338 100644 --- a/share/man/man4/otus.4 +++ b/share/man/man4/otus.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: ISC .\" .\" Copyright (c) 2015 Adrian Chadd .\" @@ -13,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd September 25, 2015 +.Dd November 10, 2024 .Dt OTUS 4 .Os .Sh NAME .Nm otus -.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device +.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -79,6 +81,51 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for Atheros AR9170 USB IEEE 802.11b/g/n +wireless network adapters, including: +.Pp +.Bl -bullet -offset indent -compact +.It +3Com 3CRUSBN275 +.It +Arcadyan WN7512 +.\" .It AVM FRITZ!WLAN USB Stick N +.It +CACE AirPcap \&Nx +.It +D-Link DWA-130 rev \&D1 +.It +D-Link DWA-160 rev A1 +.It +D-Link DWA-160 rev A2 +.It +IO-Data WN-GDN/US2 +.It +NEC Aterm WL300NU-G +.It +Netgear WNDA3100 +.It +Netgear WN111 v2 +.It +Planex GW-US300 +.It +SMC Networks SMCWUSB-N2 +.It +TP-Link TL-WN821N v1, v2 +.It +Ubiquiti SR71 USB +.It +Unex DNUA-81 +.It +Z-Com UB81 +.It +Z-Com UB82 +.It +ZyXEL NWD-271N +.El .Sh FILES The driver needs at least version 1.0 of the following firmware files, which is loaded when an interface is attached: @@ -87,49 +134,20 @@ which is loaded when an interface is attached: .It Pa /boot/kernel/otusfw-init.ko .It Pa /boot/kernel/otusfw-main.ko .El -.Sh HARDWARE -The -.Nm -driver provices support for Atheros AR9170 USB IEEE 802.11b/g/n -wireless network adapters, including: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It 3Com 3CRUSBN275 -.It Arcadyan WN7512 -.\" .It AVM FRITZ!WLAN USB Stick N -.It CACE AirPcap \&Nx -.It D-Link DWA-130 rev \&D1 -.It D-Link DWA-160 rev A1 -.It D-Link DWA-160 rev A2 -.It IO-Data WN-GDN/US2 -.It NEC Aterm WL300NU-G -.It Netgear WNDA3100 -.It Netgear WN111 v2 -.It Planex GW-US300 -.It SMC Networks SMCWUSB-N2 -.It TP-Link TL-WN821N v1, v2 -.It Ubiquiti SR71 USB -.It Unex DNUA-81 -.It Z-Com UB81 -.It Z-Com UB82 -.It ZyXEL NWD-271N -.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev otus0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev otus0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev otus0 ssid my_net up" +.Dl ifconfig wlan create wlandev otus0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev otus0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh DIAGNOSTICS .Bl -diag @@ -152,7 +170,9 @@ The file might be missing or corrupted. The .Nm driver first appeared in -.Ox 4.6 . +.Ox 4.6 +and +.Fx 11 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/ral.4 b/share/man/man4/ral.4 index dbdc017dc33a..ad385e5f09d6 100644 --- a/share/man/man4/ral.4 +++ b/share/man/man4/ral.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" Copyright (c) 2005-2010 Damien Bergamini .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -12,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd April 4, 2017 +.Dd November 10, 2024 .Dt RAL 4 .Os .Sh NAME .Nm ral -.Nd "Ralink Technology IEEE 802.11a/g/n wireless network device" +.Nd Ralink Technology IEEE 802.11a/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -119,7 +122,7 @@ The driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology chipsets, including: .Pp -.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" +.Bl -column -offset indent -compact "Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" .It Em Card Ta Em MAC/BBP Ta Em Bus .It "A-Link WL54H" Ta RT2560 Ta PCI .It "A-Link WL54PC" Ta RT2560 Ta CardBus @@ -212,26 +215,25 @@ chipsets, including: .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Pp -.Dl "ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00" +.Dl ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net .Ed .Pp Join a specific BSS network with 40-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net wepmode on wepkey 0x1234567890 weptxkey 1 .Ed .Pp Join a specific BSS network with 104-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net \e wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 .Ed .Sh DIAGNOSTICS @@ -254,6 +256,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 diff --git a/share/man/man4/rsu.4 b/share/man/man4/rsu.4 index 34cebc598c0a..7aaacb8112a0 100644 --- a/share/man/man4/rsu.4 +++ b/share/man/man4/rsu.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" $OpenBSD: rsu.4,v 1.11 2013/02/14 07:40:42 jmc Exp $ .\" .\" Copyright (c) 2010 Damien Bergamini @@ -14,12 +17,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd May 23, 2021 +.Dd November 10, 2024 .Dt RSU 4 .Os .Sh NAME .Nm rsu -.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network device +.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -93,8 +96,46 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm *** 1326 LINES SKIPPED *** From nobody Tue Nov 19 01:05:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsmWY6WcKz5dJnw; Tue, 19 Nov 2024 01:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsmWY5Yp8z4mkf; Tue, 19 Nov 2024 01:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731978329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W9smL6mRThqfoH9Fvz/fcZNgPnOOeiCuDvIRRi5tL7Q=; b=QE61819NjwiCwIMS3Hlp1dN7RrXYrrsDCQrEdRLXn2J0OT1siIwT5OXOzmGILW+esTqHz5 5wX2Yi9MEBOU02bL8uPIZLWrZM/Yop7PhjcxmfENSxks+Tpewru9yzXg5zyZrbFr4s7bSs sFHc0lddixoJC2wRT5SbIoNZVGlGQIxV13QvkR/uUo5qpac+eo5EBlA2DB3oGLx1+tmeLS az+LTMewOdUv8GAsqI5QN6zz+N1mFkbEtfBq1sdjQpmx6Sdi3cRVvhknZN0q9vwSU7bRks PeFoxmufJW5+IRZxoCnQSuwh8BIC3pcycddr7RKSEPITgo8x3t52T51o68GwZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731978329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W9smL6mRThqfoH9Fvz/fcZNgPnOOeiCuDvIRRi5tL7Q=; b=q2rV9itiQnvPzwCbaTfgD1oSGPSUGn/4cDmM3nogL6olYH/VBpLoSHNDbrJJMsv4AvPMFU d091swPFkDdM0aMlFdBA0nuaYmq2zqVX4TFbE9vKKpuUSgiXg227msjrBtb13QqoXPpEJ2 fSb3SPpT+irJakTShItC7oSfu6RjPAsjSAR+03VsS1r+gHEVLCE0r+X7KMFD4McSQJBHEZ TAzYeJiOSBq1A/ffrUhlZ3miz0vAUi08L6MzOtZ1KWm2A5VU5UHnxN6TBHahIJaF8AOvv8 JnJJuvz5vUIMOgGRcMg0pKng8202waoADcRZkmjG7J9OtVXewB0Pdz0j+FLdRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731978329; a=rsa-sha256; cv=none; b=eUpwdp4SZENIy45Dbev8ePJs/hWv/lfnKaKzOOIh3or2tHrylrhbmRV6lpqr0xDjre2AmK mN1w7tghUjtH/Q+ze7hQPQyfnPG8m7waEOs+FM8E8pfJXzfHQJNfhR+yI0XWn9xirJ+CnY +tYgQMvTOzbFoGQOU6V5NiTT892dXbj5bhNpc8DfoHCmijcfQhJFVFrVt8j4IsFVt+LndP W5UxuruidKnykrZ0VgmnkT35cRmvEsufpS2JIDNq2UztpG6XJ525DmV/M7I0BL+SDzn5U+ zUhNUlE2TWB5xkniK1JDed3BPgoqxyIq3BSNZOE0RNKOLqoaqtFpAakdrZADFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsmWY598wz131Q; Tue, 19 Nov 2024 01:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ15Tt3039414; Tue, 19 Nov 2024 01:05:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ15TBb039411; Tue, 19 Nov 2024 01:05:29 GMT (envelope-from git) Date: Tue, 19 Nov 2024 01:05:29 GMT Message-Id: <202411190105.4AJ15TBb039411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 21ca690b5668 - main - ppp.8: Fix typo cuad0 -> cuau0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21ca690b5668d6b19b93327da3d4a423ea183fe4 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=21ca690b5668d6b19b93327da3d4a423ea183fe4 commit 21ca690b5668d6b19b93327da3d4a423ea183fe4 Author: Jose Luis Duran AuthorDate: 2024-11-05 04:07:07 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-19 01:04:20 +0000 ppp.8: Fix typo cuad0 -> cuau0 Fix a typo that was missed probably because it was capitalized. Mark up with .Pa and fix capitalization. Specify that cuaUX and cuauX are for USB and UART attachments respectively. - Silence most lint warnings - Update outdated links - Minor style fixes - Some igor(1) warnings were ignored on purpose PR: 248359 Reviewed by: imp, mhorne, Alexander Ziaee Approved by: emaste (mentor) Fixes: 839f11a4fe18 ("A number of places in the source tree still reference cuad.* after sio(4) was deprecated by uart(4).") MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1515 --- usr.sbin/ppp/ppp.8 | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8 index 95b833c73c5c..9242a9c337a0 100644 --- a/usr.sbin/ppp/ppp.8 +++ b/usr.sbin/ppp/ppp.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 27, 2022 +.Dd November 18, 2024 .Dt PPP 8 .Os .Sh NAME @@ -263,7 +263,8 @@ will force it to exit. .It Supports client callback. .Nm can use either the standard LCP callback protocol or the Microsoft -CallBack Control Protocol (https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-CBCP/[MS-CBCP].pdf). +CallBack Control Protocol +.Pq Lk https://winprotocoldocs-bhdugrdyduf5h2e4.b02.azurefd.net/MS-CBCP/%5bMS-CBCP%5d.pdf . .It Supports NAT or packet aliasing. Packet aliasing (a.k.a.\& IP masquerading) allows computers on a private, unregistered network to access the Internet. @@ -339,7 +340,7 @@ to check the packet flow over the link. .It Supports PPP over TCP and PPP over UDP. If a device name is specified as -.Em host Ns No : Ns Em port Ns +.Em host : Ns Em port Ns .Xo .Op / Ns tcp|udp , .Xc @@ -353,7 +354,7 @@ into synchronous mode. If .Nm is given a device specification of the format -.No PPPoE: Ns Ar iface Ns Xo +.No PPPoE\&: Ns Ar iface Ns Xo .Op \&: Ns Ar provider Ns .Xc and if @@ -2166,13 +2167,22 @@ set device /dev/cuau0 set speed 115200 .Ed .Pp -Cuad0 is the first serial port on -.Fx . +.Pa cuaU0 +and +.Pa cuau0 +are the first +.Xr usb 4 +and +.Xr uart 4 +serial ports found by +.Fx , +respectively. If you are running .Nm on .Ox , -cua00 is the first. +.Pa cua00 +is the first. A speed of 115200 should be specified if you have a modem capable of bit rates of 28800 or more. In general, the serial speed should be about four times the modem speed. @@ -2734,7 +2744,7 @@ Default: Disabled and Denied. This option allows DNS negotiation. .Pp If -.Dq enable Ns No d, +.Dq enable Ns No d , .Nm will request that the peer confirms the entries in .Pa /etc/resolv.conf . @@ -2743,7 +2753,7 @@ If the peer NAKs our request (suggesting new IP numbers), is updated and another request is sent to confirm the new entries. .Pp If -.Dq accept Ns No ed, +.Dq accept Ns No ed , .Nm will answer any DNS queries requested by the peer rather than rejecting them. @@ -3446,8 +3456,7 @@ This command gives a summary of available nat commands. This option causes various NAT statistics and information to be logged to the file .Pa /var/log/alias.log . -.It nat port Ar proto Ar targetIP Ns Xo -.No : Ns Ar targetPort Ns +.It nat port Ar proto Ar targetIP Ns Xo : Ns Ar targetPort Ns .Oo .No - Ns Ar targetPort .Oc Ar aliasPort Ns @@ -4390,8 +4399,8 @@ This is required (in addition to one or more other callback options) if you wish callback to be optional. .El .It set cbcp Oo -.No *| Ns Ar number Ns Oo -.No , Ns Ar number Ns ...\& Oc +.No *| Ns Ar number Ns +.Oo , Ns Ar number Ns ...\& Oc .Op Ar delay Op Ar retry .Oc If no arguments are given, CBCP (Microsoft's CallBack Control Protocol) @@ -4403,7 +4412,7 @@ requesting no callback in the CBCP phase. Otherwise, .Nm attempts to use the given phone -.Ar number Ns No (s). +.Ar number Ns No (s) . .Pp In server mode .Pq Fl direct , @@ -4421,7 +4430,7 @@ is specified, .Nm will expect the peer to specify the number. .It set cd Oo -.No off| Ns Ar seconds Ns Op !\& +.No off\&| Ns Ar seconds Ns Op !\& .Oc Normally, .Nm @@ -4578,7 +4587,7 @@ does not begin with it must either begin with an exclamation mark .Pq Dq !\& , be of the format -.No PPPoE: Ns Ar iface Ns Xo +.No PPPoE\&: Ns Ar iface Ns Xo .Op \&: Ns Ar provider Ns .Xc (on @@ -4596,7 +4605,7 @@ Standard input, output and error are fed back to and are read and written as if they were a regular device. .Pp If a -.No PPPoE: Ns Ar iface Ns Xo +.No PPPoE\&: Ns Ar iface Ns Xo .Op \&: Ns Ar provider Ns .Xc specification is given, @@ -4635,7 +4644,7 @@ and for further details. .Pp If a -.Ar host Ns No : Ns Ar port Ns Oo +.Ar host : Ns Ar port Ns Oo .No /tcp|udp .Oc specification is given, @@ -4864,7 +4873,7 @@ It allows the user to specify a set of characters that will be .Sq escaped as they travel across the link. .It set filter dial|alive|in|out Ar rule-no Xo -.No permit|deny|clear| Ns Ar rule-no +.No permit|deny|clear\&| Ns Ar rule-no .Op !\& .Oo Op host .Ar src_addr Ns Op / Ns Ar width From nobody Tue Nov 19 01:45:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsnQH5Jr0z5dMWC; Tue, 19 Nov 2024 01:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XsnQH4v4lz4vB4; Tue, 19 Nov 2024 01:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731980759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4NCTw3yL4gNxrFrh8y+tLw1Frc43G6wO3pkSMxvOdpQ=; b=vkA87D9fMj8ugqZh0Jg3fiZ/G5BvAGj1F0yEDhR/Re89sixERH37tSBqvc86Q96/IQzEhl Ot8dGiEZjX39UK+Xrcs9dcilR5cfnmR35t+ZEGvZJAM2TudOzxAGFSCDLfjiELfIaC6Rpy GVIBrSNLmkFrCUHdx/ohyKswr2M2qazTJTKOT6r57UniHfa+vPLOzEoJhCD3QeIDf8PjHk 70bDwVPPjJGNm2f70upXEqRKWD4lXpCmdO5DiSNFYbpIx/5oHIwrY+D/+fVniB7sN02aJs 07PEPPq2zeGTEZbdooiaENwPUztuwQH8anvuDuM3GCHFf6UiVMTVmhR5ZdDO1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731980759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4NCTw3yL4gNxrFrh8y+tLw1Frc43G6wO3pkSMxvOdpQ=; b=E543qutOdNlwKMAiY4xHzu3Xpg1xkNMEV02eORBMbFPfLjW50d3nEQRYBr7WRpEmSiRUzp /OfgziXRLCPASUkpvqMTCuZJUbDZU0wv8RRCvafUY5DqYCgRiSa/tlsTOnmmZvsrpan2wZ o6PTy5r35aGXmWWYjPjEckh4exCrYztsoUSit9WfGKJbXJqdywwQoXTaeZnMxUz2QGdnfS yGaZeahy/Y8+rgEcHMpPtuwzMbaR90L7HSJj8/GDFtoingUro30cHQvVm5VOTfsFE63f3Y 7b6VfxKy+yZaOHOSIK5pjOgP3SoRlHyO9HerFPp7MUk2K2DF1Bwo5iUFZeGDig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731980759; a=rsa-sha256; cv=none; b=m6RDIiru1Z2JfHv1WwOsBfeF0TeHRvCHLDRKfySK7sTcpzk6GCCTgBJw8bORmz6uRKixF1 NdXHOkblNK4tcEZC62X45MYC2FoVi8XEKVQbpoecpaFV1kvIRvmz1ca28R91dndB6ZGwfg 58+PeiHwVbaaptMItSrbNVh5esYPPlqVS9nYf+mGt+vCQ0Q/EmdlSRu+jhJObaKHzh7gz4 mNNRUBXQ8q22Pt7Q/Sy2pYV61dLe/H85/94E7Ae3VBGReM5T8OhvWVnAdI8js6GKV47nhA J4ysuhwo2KnoWy6N10ecIgnSrODh/8zgKg5FJyT0NwhJDUBKItVvrpekvSu7jA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XsnQH4VRzz14t5; Tue, 19 Nov 2024 01:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ1jxI7013474; Tue, 19 Nov 2024 01:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ1jxvX013471; Tue, 19 Nov 2024 01:45:59 GMT (envelope-from git) Date: Tue, 19 Nov 2024 01:45:59 GMT Message-Id: <202411190145.4AJ1jxvX013471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 2fb5f137668c - stable/14 - sound: Include ai2s and davbus for 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2fb5f137668c56bce084b5dda948724be96cf15e Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2fb5f137668c56bce084b5dda948724be96cf15e commit 2fb5f137668c56bce084b5dda948724be96cf15e Author: Jose Luis Duran AuthorDate: 2024-11-10 02:44:14 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-19 01:19:20 +0000 sound: Include ai2s and davbus for PowerPC Include PowerPC ai2s and davbus sound modules in the metadriver. Reviewed by: christos, emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47467 (cherry picked from commit cdd3234186b19e1b9d7cfc985ef8d247552b0f11) --- sys/dev/sound/driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/sound/driver.c b/sys/dev/sound/driver.c index b9d530dce921..7fcc86c63c5e 100644 --- a/sys/dev/sound/driver.c +++ b/sys/dev/sound/driver.c @@ -55,6 +55,9 @@ static moduledata_t snd_mod = { DECLARE_MODULE(snd_driver, snd_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_VERSION(snd_driver, 1); +#if defined(__powerpc__) +MODULE_DEPEND(snd_driver, snd_ai2s, 1, 1, 1); +#endif MODULE_DEPEND(snd_driver, snd_als4000, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_atiixp, 1, 1, 1); #if defined(__i386__) || defined(__amd64__) @@ -63,6 +66,9 @@ MODULE_DEPEND(snd_driver, snd_cmi, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_cs4281, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_csa, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_csapcm, 1, 1, 1); +#if defined(__powerpc__) +MODULE_DEPEND(snd_driver, snd_davbus, 1, 1, 1); +#endif MODULE_DEPEND(snd_driver, snd_emu10kx, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_envy24, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_envy24ht, 1, 1, 1); From nobody Tue Nov 19 02:39:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XspbW34kcz5dQsq; Tue, 19 Nov 2024 02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XspbW2Cybz4113; Tue, 19 Nov 2024 02: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=1731983943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvVvydrlnCu76S1b7170Jv6TpIXy+VPfihojEoSQCXU=; b=diCM/PyAcE7mA8ezP/jjIFzdLkdOSTPTlGkNYY3cFWkQU8SZcScN2ZYn9L5TjvtYnlCktm IWSWffhS231hxnBZ86fOOBGylfpwwbirefdpYY3jqufFVHaFR/IJAf+0/F4Q3ZKV+mFGHq taMOMlWjFY2INRFcKEjp4j0VpCrlFyPh4CfxFYSO9M5ST5fMCqN0qHEnDQ4eIdz9AvCYHh xDJgXndccxDlaDXDCgyFWeDl72crow019jTT1O+bp3wa8w/XmCj8+5HqfhfTGdOMkcV+lc trC98Zbow/vQqIEPfwPNs3dXvt0pNx587E7bhT39hpGwMQePrgrgZZIS3/9vBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731983943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvVvydrlnCu76S1b7170Jv6TpIXy+VPfihojEoSQCXU=; b=UbHo79+mD8h9f5gsoXNEEtoL058SV4PGYklAkWO10fBDw2j2O9df3wp302Z8ecH6XjTcOf 2eJ3DRXVWzM+nuWuubZRFb4+il4bWqNplPNssmxIgsXIJB+h3U+wD76OzBmp5uT8FlYtDF suk5TzJiNn5dlGByXvXIzRvnell3dD6e1i/akmCdzt+zmJx3tI3bj+FGZSkbnEytvHxTZr W7SmY11RiiwqSmtTP3r9PdR26IASCvh2OHD6G7aQ82tuDQ1BSDXXsyJbCtZTkyu+QqAj/z yiO2nkkymuVhEmRJ/oNYFJXjDYixhFWIchKsTOVd1Tr/fY9VFTiopLJKsvvZsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731983943; a=rsa-sha256; cv=none; b=KtZYv3aTiyq1U0dYGOxk4dg/0AcL1GWIc8KImuhOG6cNZ/HGOJBtTuwOSHbPC+Ik/J+ndx IhTAubXlSST1rlJqIjv0tnwhNHJpRwKtupcZMyPetwaO6SdCvezrqGK7QW2sDqwT05CPMw UGxUUBi/mcDmX/5NI6T/xmitLCCcbMi5QCYf1W93dFQkbcUfAUJWR2yZoM1aYM4SeUN9eL OlVKBQGW/hyM3LrFpSgi/B2nbBJln37Ysx1JfubN2KdRCuG5ed7XHJSD+8rc4pj57uB5VX OBuKDep3Ty3mSHfxJvAMZ8gTKnrWumHzH69kF9TTH4yfzEXIcGkUywrawC4YXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XspbW1M3Sz16Bc; Tue, 19 Nov 2024 02:39:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ2d3c6006969; Tue, 19 Nov 2024 02:39:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ2d372006966; Tue, 19 Nov 2024 02:39:03 GMT (envelope-from git) Date: Tue, 19 Nov 2024 02:39:03 GMT Message-Id: <202411190239.4AJ2d372006966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 8b29ab3aff13 - stable/14 - ipfilter: Avoid holding a lock while stopping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b29ab3aff13366f1032ec28611db5200e3badf5 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=8b29ab3aff13366f1032ec28611db5200e3badf5 commit 8b29ab3aff13366f1032ec28611db5200e3badf5 Author: Jose Luis Duran AuthorDate: 2024-11-02 17:58:59 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-19 02:32:59 +0000 ipfilter: Avoid holding a lock while stopping Avoid calling _callout_stop_safe with a non-sleepable lock held when detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK, and avoiding re-initialization inside the timer function. PR: 282478 Reviewed by: cy, emaste, jhb, markj Tested by: cy Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47530 (cherry picked from commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d) (cherry picked from commit a0618fbe19dfedcdf01b4c232fe6669ae19505c4) (cherry picked from commit 650900cc2f607458d32d333bd7ab0aa10be13ba4) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 95f9fa1dd278..2a6ff68649b9 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -172,7 +172,6 @@ ipf_timer_func(void *arg) SPL_INT(s); SPL_NET(s); - READ_ENTER(&softc->ipf_global); if (softc->ipf_running > 0) ipf_slowtimer(softc); @@ -181,12 +180,10 @@ ipf_timer_func(void *arg) #if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); #endif - callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); } - RWLOCK_EXIT(&softc->ipf_global); SPL_X(s); } @@ -221,7 +218,7 @@ ipfattach(ipf_main_softc_t *softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init(&softc->ipf_slow_ch, 1); + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return (0); From nobody Tue Nov 19 02:39:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xspbv1FSlz5dQsv; Tue, 19 Nov 2024 02:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xspbv0kBFz417Z; Tue, 19 Nov 2024 02:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731983963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=du7FhkTYAgrGwnGPCFZRvay/yLK/HfI8VqdWtU96PzE=; b=JB+H0jQj81CVaayrqSFtzS3rc+ZSFIF614FVj94n6Sf/edoN4WnpHkkn/5xI8+Kb8l6DJK 7Z639/sB5prPhiD8U+WNnuDfjP0e7KMhNxwtFlg3t5w82ViVdUmGON1ZaUCDlvv1i6WOFn CxcX8LPOsTTxyCM3dzcjd2fdypv0+upv8ijRHG7cnsREFECee9D1hsKsmV+jDuUpnDw3PR N9nG8qS5HTMotOsaS/UN9GyaNxtGOAQMgCKPwJwAO7F7eT9jrARk5ScBVN6fF4gEG/R06Y JmZ4p97X8x4pe9xW11U7x46J7cSK/hrBigGL9Q+incWwdl4HTs/gh8vrty80fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731983963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=du7FhkTYAgrGwnGPCFZRvay/yLK/HfI8VqdWtU96PzE=; b=JzofADnzg1MCHwz57XbG33NhQid6FqQjlMdEptJ8GYv0/3ne8EAkB4BlrKxmhvsEdh5Web Vw+NC1TrZE/7mN2bE9d7OeK7Z+NHjeMe2dL9AGtfq4TmXwg9GJ83OHKCw2jfQKS39fiwI4 ZWlE6ef+h8uqXbbFYKriEt3pxPd9YwieicCgD8AVyZuz2TAU1nvZenpAepeXuLT6c7t0uT Y2f0puTKiPdwT+b12ALXefH1EL+1cJwxQXKK9+TTWNvMxpzKFDOHnznL+3iDSGqAk2Srnk btQvMsaCv1TZpHAW2cJk9HN2i8ISWEmEFcSKk5U6TjnA/urPBgYwRsfJWTKsZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731983963; a=rsa-sha256; cv=none; b=pvSsn9m7heNZhG+yO6mkHSqKHJPZeBDtwnXlNdC9CkyNq8EDzzbsD+hxzoBOLe9oHN/xcj 7/KIlBwzh3/sFeKlZ80t4DVJTbJHx9QjygeymE5nQ+OVcmRKmF9FP0+2ZcjDm47Fl4t3Zo SG0IO7d6fUNrbDwzgwkOCsOZyBfCI2g1Ii3KDnxzCjnd8brqKtVgxxrnVgztMmyyDZcRMm rgCikeh8suoa9DKsYc41zDrm34lAneLhgJL6vqEiwkNPkQFUqGtGhl9611WAKXdeniOkqx dFgzXOUxIe2JqiscljQOEOkilZq6+UJ/D8iUath97SFEmG4ck+he7v+qSqPrVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xspbv0G7Tz16Dd; Tue, 19 Nov 2024 02:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ2dMhl007178; Tue, 19 Nov 2024 02:39:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ2dMmr007175; Tue, 19 Nov 2024 02:39:22 GMT (envelope-from git) Date: Tue, 19 Nov 2024 02:39:22 GMT Message-Id: <202411190239.4AJ2dMmr007175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 5006b9b4223c - stable/13 - ipfilter: Avoid holding a lock while stopping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5006b9b4223c9a6620ce6513cf5f14161bbafd81 Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5006b9b4223c9a6620ce6513cf5f14161bbafd81 commit 5006b9b4223c9a6620ce6513cf5f14161bbafd81 Author: Jose Luis Duran AuthorDate: 2024-11-02 17:58:59 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-19 02:36:57 +0000 ipfilter: Avoid holding a lock while stopping Avoid calling _callout_stop_safe with a non-sleepable lock held when detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK, and avoiding re-initialization inside the timer function. PR: 282478 Reviewed by: cy, emaste, jhb, markj Tested by: cy Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47530 (cherry picked from commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d) (cherry picked from commit a0618fbe19dfedcdf01b4c232fe6669ae19505c4) (cherry picked from commit 650900cc2f607458d32d333bd7ab0aa10be13ba4) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index a09316163619..89e5be506be2 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -172,7 +172,6 @@ ipf_timer_func(void *arg) SPL_INT(s); SPL_NET(s); - READ_ENTER(&softc->ipf_global); if (softc->ipf_running > 0) ipf_slowtimer(softc); @@ -181,12 +180,10 @@ ipf_timer_func(void *arg) #if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); #endif - callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); } - RWLOCK_EXIT(&softc->ipf_global); SPL_X(s); } @@ -221,7 +218,7 @@ ipfattach(ipf_main_softc_t *softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init(&softc->ipf_slow_ch, 1); + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return (0); From nobody Tue Nov 19 04:52:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XssYw2Y4Vz5dYlt; Tue, 19 Nov 2024 04:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XssYw1YcJz4Cb0; Tue, 19 Nov 2024 04:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731991972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=60mee6Ja4kW9jNANwXCY9qJypOSj0GEr4rlF5+K9Ty0=; b=T7Mn5G0+UL09KWnaJC6PvrzwjJeOHMVESajxV0IAVFVZdu7Mm7ElGWZWDHMk03ffd2X0xF O5VMLoLsdSXWVunno4fsn+7Gn74KmU3CCsYLdUlAAYPTyY8RU2wa9QB1SfsGoViXIStc2U 3oerW7vwjQoP8jTpMx75jRp27jirSIZ/Xn6UsYL3cuN3nni0jwIOs4wujiATiPK+l2/nQ7 kqPVryj9KHyfvmH9DZXRts43MOpO6ZSUZNMmRNp4v2tNYcoW+rrpLbx6Mmeb/UeN5DB0ui Hy0tlEFc+X/OI5nln8E3WMTGF8Lq4UzTUpDYgotevkxLIrlkE3rPqzoT+aSGvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731991972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=60mee6Ja4kW9jNANwXCY9qJypOSj0GEr4rlF5+K9Ty0=; b=a3Dv+QRYUQXFB3NgER6ie+u3Gsr5S+xqfLgp9Ay4cYtXydTHwz1tFGrD58O7NCgxeYz+Y/ n02GWr67D5oj3HLZzilWw1Q0N4KLlxerHz7iw7c1YqzwAA4gTH8idNlV7aS/CGRuN71Ax2 sg5jPe9YhiuptIeQMcEt+fWymNNGdUpPRODfkp4STYB97VWQqLNPjoEEL89VIzObHTKUU+ AjOT4nw4fhDY308J//465Z86dfTcZH08tgsKt2GExjwzT/HQ8VGSFaUR9guzlz2SQK6U9j qkqJvdqAx/razP4HvgfDxxr7ZwiGwGtZoAaXFCGaTEhQGGGItCBG36DJrlifIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731991972; a=rsa-sha256; cv=none; b=WNRXM6J9YPnR/uc2XVluWTFRV8zcAO/sCF3YN+bLQ73RMaHxy70dtoKfkQNbH1FFf5ULow 6vY9dF9aMm6Tt4X2cmSzmmdPwZp5+HaMV69VyLB6oC9ZpCy1qCVa0fgJ+qlMQiGrCHi0qx tKKUGuom8s2jic0qLBv2PReakFtLANRQ24SSPUfS8xZ1H3I4Ax7t5iHaj32mSdbHnMILxO noWGRO09k9pQgsjqLvD9ys2gR2+3PS53uvz8rIynDVGy9q2fSfVpYMxer+fUYsHBp5cCl/ Bkw7zN3wAyPiUQhx/asiHalZ+B/bbYCwrrKggCCgNDYRH5QjZnPc3cHM3OmQ4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XssYw16j0z19l8; Tue, 19 Nov 2024 04:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ4qqDt066353; Tue, 19 Nov 2024 04:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ4qqIN066350; Tue, 19 Nov 2024 04:52:52 GMT (envelope-from git) Date: Tue, 19 Nov 2024 04:52:52 GMT Message-Id: <202411190452.4AJ4qqIN066350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 1375790a15b1 - main - net80211: add IEEE80211_IS_QOS_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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1375790a15b122518b779b111c18ee2da5702728 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=1375790a15b122518b779b111c18ee2da5702728 commit 1375790a15b122518b779b111c18ee2da5702728 Author: Adrian Chadd AuthorDate: 2024-11-17 06:06:11 +0000 Commit: Adrian Chadd CommitDate: 2024-11-19 04:50:17 +0000 net80211: add IEEE80211_IS_QOS_NULL() This will be useful when fixing up the sequence number generation and checks, as the rules around how sequence numbers are generated have been clarified in 802.11-2016 and later. QoS-NULL frames are explicitly marked as "any sequence number". But for now, just create a macro and use it in the one place it's currently being used as a check - ath(4). * Add IEEE80211_IS_QOS_NULL(). * Change the "will this frame go into the TX block-ack window" check in the ath(4) transmit path. Note this changes the check to be more specific, but both paths already had previous checks to ensure they're QoS data frames. Locally tested: * ath(4), AR9380, STA mode w/ AMPDU TX/RX enabled and negotiated Differential Revision: https://reviews.freebsd.org/D47645 --- sys/dev/ath/if_ath_tx.c | 4 ++-- sys/net80211/ieee80211.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 1ec23972f283..1559b66a7c7d 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -2050,7 +2050,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, */ if (IEEE80211_QOS_HAS_SEQ(wh) && (! IEEE80211_IS_MULTICAST(wh->i_addr1)) && - (subtype != IEEE80211_FC0_SUBTYPE_QOS_NULL)) { + (! IEEE80211_IS_QOS_NULL(wh))) { bf->bf_state.bfs_dobaw = 1; } } @@ -2991,7 +2991,7 @@ ath_tx_tid_seqno_assign(struct ath_softc *sc, struct ieee80211_node *ni, * RX side. */ subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; - if (subtype == IEEE80211_FC0_SUBTYPE_QOS_NULL) { + if (IEEE80211_IS_QOS_NULL(wh)) { /* XXX no locking for this TID? This is a bit of a problem. */ seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]; INCR(ni->ni_txseqs[IEEE80211_NONQOS_TID], IEEE80211_SEQ_RANGE); diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index eb83d0a40a33..e62b8c16d68f 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -274,6 +274,16 @@ struct ieee80211_qosframe_addr4 { IEEE80211_FC0_TYPE_DATA, \ IEEE80211_FC0_SUBTYPE_QOS_DATA)) +/* + * Return true if this frame is a QoS NULL data frame. + */ +#define IEEE80211_IS_QOS_NULL(wh) \ + (IEEE80211_IS_FC0_CHECK_VER_TYPE_SUBTYPE(wh, \ + IEEE80211_FC0_VERSION_0, \ + IEEE80211_FC0_TYPE_DATA, \ + IEEE80211_FC0_SUBTYPE_QOS_NULL)) + + #define IEEE80211_FC1_DIR_MASK 0x03 #define IEEE80211_FC1_DIR_NODS 0x00 /* STA->STA */ #define IEEE80211_FC1_DIR_TODS 0x01 /* STA->AP */ From nobody Tue Nov 19 04:52:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XssYx3sfRz5dYRn; Tue, 19 Nov 2024 04:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XssYx2ZYlz4CYc; Tue, 19 Nov 2024 04:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731991973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b89kqNtnP7Y9luY7bshD1DLOT4cSb9vYsc7xlypd3qc=; b=BsTxcuA8C9YXRee3KN6ZOdTgCQux5Nz3evWRqKzUVM7+CRdV/7khN4bOQdswQoYzr/tIAw h/I/oLmMIbOZKIf7y/MUh/IRnzsPhag+l0HIOcjFpOMskzB1h4yhbZ2fKAl2l3NuWYvnY2 HeHJ540S0JjJujwFnAuL5gJ4dYLRZHYFlPGyNgH6kuGurbKmzxwDWd+1OlblyJm3r/OgzU IiU+t798jF7Md54MJm0Kn3ljXd2bES4Snbvh8xW2mWjrbzFAEcP6DHODV/dX+6vhsdfF/y np5Rjz8bQ61USVUy+K8dEKTJIf1qbgHnl4PayRUDVWaO/vw96X+rMJWwYsWrZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731991973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b89kqNtnP7Y9luY7bshD1DLOT4cSb9vYsc7xlypd3qc=; b=fjy1oVJGW0EXtSDZhOAa4bSsr8+hKdjmLRkr8IQ+TqmQ0AZgk6WT2xwJFxlacr6gEwn4eD K7MVGI/iWr2oGQcsoqBehvoy8Nyc23sCQwmg8X895Ovh7baF0iHz3If5kryz6qFNzTkEDQ 60PCEISj47pEmjaqeWerHlQbQ64YfD5KhHtZtczT8z+14w2vW+2OpOejO6CpzOUJPVXm4W 81Mk1/ccrLLDhQKSJnCh3jmLP4fJlkZ2P05kpdIXHLoNyWfoBO0co82hKZQD2q7mQjDZWM wmhyU2gIE96fCA9ab1vxCpKIjuUrr8vfTqiyJB88YKGi0oP/a/xrgz7/LOMw/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731991973; a=rsa-sha256; cv=none; b=frFrzSoQC6RO9AvRIK3pC8scB/qcGKsznJXTsEDSXxUm/XLAVsVu/9ZjMg0FdlANLm0CQc WvIxNDn1ZiRViK5c/0S+K1ZiPZ83WxZHilpx8ZmQXsGbTE5F/Id1kcEkQ4xrcJNlIB/KW4 j84RBJ6cUDVeeIeTKJu2z/WS0jp0p48Xxa3AudvQ6yFPLkiaKaRD43HHNMUCmIz5a6VHcc RihXvnkiVzQEMIBxA4VpP97K16hkwDeaO4XjWwGYiLoj0MbD+dzf5iAcR91S4piBiqr93y 6cf1FDh5pyoxiVNTUkrY/CLU5ElT0si+c9/dZSOAkJwTCbAQeSZ3ZrrsOMe7pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XssYx290lz1B8w; Tue, 19 Nov 2024 04:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ4qrqF066413; Tue, 19 Nov 2024 04:52:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ4qrnT066410; Tue, 19 Nov 2024 04:52:53 GMT (envelope-from git) Date: Tue, 19 Nov 2024 04:52:53 GMT Message-Id: <202411190452.4AJ4qrnT066410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 7098b90152dd - main - usb: fix the ID for the dual-band Wistron AR5523 USB NIC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7098b90152dddcaf10c43ff31a8f1f3a952267d5 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=7098b90152dddcaf10c43ff31a8f1f3a952267d5 commit 7098b90152dddcaf10c43ff31a8f1f3a952267d5 Author: Adrian Chadd AuthorDate: 2024-11-18 05:10:32 +0000 Commit: Adrian Chadd CommitDate: 2024-11-19 04:50:24 +0000 usb: fix the ID for the dual-band Wistron AR5523 USB NIC Use the correct ID, as I have one of these NICs. Add the previous one back in case it's out there in the wild. @emaste did a bit of a dig into the product numbers. @sam did change the ID from 0x0828 -> 082a in a commit a long while back. It's worth reading the code review for further details. However, I do have one of these NICs and I verified that it indeed has the given ID, and with some follow-up work to fix some race conditions, it works fine in 2GHz 11bg and 5GHz 11a operation. Differential Revision: https://reviews.freebsd.org/D47654 Obtained from: Linux, drivers/net/wireless/ath/ar5523/ar5523.c --- sys/dev/usb/usbdevs | 3 ++- sys/dev/usb/wlan/if_uath.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index a368cf84d9d5..50968a2c80cf 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -5025,7 +5025,8 @@ product WISTRONNEWEB UR055G 0x0711 UR055G product WISTRONNEWEB O8494 0x0804 ORiNOCO 802.11n product WISTRONNEWEB AR5523_1 0x0826 AR5523 product WISTRONNEWEB AR5523_1_NF 0x0827 AR5523 (no firmware) -product WISTRONNEWEB AR5523_2 0x082a AR5523 +product WISTRONNEWEB AR5523_2 0x0828 AR5523 +product WISTRONNEWEB AR5523_2_ALT 0x082a AR5523 product WISTRONNEWEB AR5523_2_NF 0x0829 AR5523 (no firmware) /* Xerox products */ diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index e78003bc250a..580022f5a0c5 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -183,6 +183,7 @@ static const STRUCT_USB_HOST_ID uath_devs[] = { UATH_DEV(UMEDIA, AR5523_2), UATH_DEV(WISTRONNEWEB, AR5523_1), UATH_DEV(WISTRONNEWEB, AR5523_2), + UATH_DEV(WISTRONNEWEB, AR5523_2_ALT), UATH_DEV(ZCOM, AR5523) #undef UATH_DEV }; From nobody Tue Nov 19 04:52:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XssYy51Ljz5dYJq; Tue, 19 Nov 2024 04:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XssYy3X8Tz4Cb7; Tue, 19 Nov 2024 04:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731991974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JqrFOSBilJd6fYprUq4SuKOyXTux8UFohDMulHmRXiE=; b=bIM0Kx2SONq8zU9c493Y6f+KWUjzon6Ln1PzQkdTJ020kHFMyoS1krhMOt/vG2lsbctK8P XsQ7ujkVEflY88vIfW6EPsg5+tKlZj2QlNMEp0MucUYvLrPG3Gjxcm8XZ7C1Cl05lyClI/ uIMjFdYppNlZaDyRXFjEzgUS0rmB7YjaQeh3RLZ29/dF3sYyUOAPwWFJxqA6VnBk0LhjOK bgLG8zq92EgQcQgP116Zk5miGWq3sH7kt6jn4JyDHJ6xOD3IC/JyrenaiJ6PjNDmKUbStb UYmhP7Qv6ld3vJL6dwQxDE7Sx3rB+C/T5Dow/lAkA5vyT0N5Q6ewNBAvofeCWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731991974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JqrFOSBilJd6fYprUq4SuKOyXTux8UFohDMulHmRXiE=; b=YxlX3PetzKEitWN5HSvFmqBXZ3Lu7oPCY+enQ9sA0FTekYZJ63wvAoka/8Bnhq3+YWqWnL RAudFyF7RWfjWColJuDQHQc3BLe7pLOwlsG/QPkzm2BWq0lL+2lJEsDwDHduP4EFi6GDXg jQtIua4VCO/DPlp6hWh0hR4NVyD7LnMGFLQZBLZqX0SjiIDfJJX6/Yy6OIf3Mtjd1WojwT og9OovJR8b+kkqB/ONTuMMJcmMfTqCNQ6UEUHboviAbYM7/CZ1q+2VwOFps1B7LOdCHWTW HPea/5L/rZBIfPmf9o8jjBGOVk5VGt4ziw7DLtElvS3szOY4dBbXzMEYXJzMtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731991974; a=rsa-sha256; cv=none; b=o8clJVoVgDuZqiK/5sbIxcUniiWnthooRfQMLqDYWl2eZLxhGbR5aCtGbaCfHm0hu9+35G qyWT8gv5jrBJ/GxqW2t+oO1Mrxuwb4fdntJpLAc1LWL8SCYZojUadRqLtEACnrpCeszShE wFTEI9iNd4a742VdJ5kR4iAhJtwUCLMfyMU6olaqeyjqUZAmefR4GQ3U5p1Mq5Tl8L89L3 agZgJ7l2H9lt6e814QCFnBYv/1ULYBrjshlYMc5I+M6hYi+2gk6y3gjJ7KcZL0Aho6UNog cf49k57colDFi3TzHKp/Y2Wz7pt+lnqp1COGZvLauKXmZwLwDG/kT7lkF/s6bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XssYy36Y4z19fN; Tue, 19 Nov 2024 04:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ4qsnm066475; Tue, 19 Nov 2024 04:52:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ4qsAe066472; Tue, 19 Nov 2024 04:52:54 GMT (envelope-from git) Date: Tue, 19 Nov 2024 04:52:54 GMT Message-Id: <202411190452.4AJ4qsAe066472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 842a2c1ad396 - main - uath: flush data/commands to the firmware before changing channel / state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 842a2c1ad39637e91547bf725e8b4ce8773c5935 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=842a2c1ad39637e91547bf725e8b4ce8773c5935 commit 842a2c1ad39637e91547bf725e8b4ce8773c5935 Author: Adrian Chadd AuthorDate: 2024-11-18 05:12:10 +0000 Commit: Adrian Chadd CommitDate: 2024-11-19 04:50:41 +0000 uath: flush data/commands to the firmware before changing channel / state The driver wasn't stable - it would start fine, but during scan it would eventually hang and no further command endpoint transfers would complete. After adding some debugging and looking at the logs I noticed that things went sideways once a /data/ frame was sent. The channel change config happened between the data frame being sent and being completed. My guess is that the firmware doesn't like a channel change and reset whilst there's pending data frames. Checking the Linux driver I found that it was doing a flush before a channel change, and we're doing it afterwards. This acts like a fence around ensuring scheduled TX work has completed. In net80211 the transmit path and the control path aren't serialised, so it's very often the case that ioctls, state changes, etc occur whilst in parallel there are frame transmits being scheduled. This seems to happen more frequently on a more recent, high core (8) machine with XHCI. I remember testing this driver years ago on single and dual core CPU laptops with no problems. So, add some flushes - before a channel change, and during a transition to AUTH when the BSS config is being programmed into the firmware. These two fences seem enough to reliably associate as a 2GHz and 5GHz STA. Note that this isn't entirely blocking all newly queued transmit work from occuring until after the NIC has finished configuration. That will need some further investigation. Locally tested: * Wistron NuWeb AR5523 dual-band NIC, STA mode, 2/5GHz Differential Revision: https://reviews.freebsd.org/D47655 --- sys/dev/usb/wlan/if_uath.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 580022f5a0c5..32e3c0325c6e 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -1831,6 +1831,8 @@ uath_set_channel(struct ieee80211com *ic) UATH_UNLOCK(sc); return; } + /* flush data & control requests into the target */ + (void)uath_flush(sc); (void)uath_switch_channel(sc, ic->ic_curchan); UATH_UNLOCK(sc); } @@ -2015,6 +2017,8 @@ uath_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) break; case IEEE80211_S_AUTH: + /* flush data & control requests into the target */ + (void)uath_flush(sc); /* XXX good place? set RTS threshold */ uath_config(sc, CFG_USER_RTS_THRESHOLD, vap->iv_rtsthreshold); /* XXX bad place */ From nobody Tue Nov 19 05:20:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xst9X6Gttz5dZhX; Tue, 19 Nov 2024 05:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xst9X5rFtz4GHy; Tue, 19 Nov 2024 05:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnuPIrTq/t3WWaKHRak+Uu/9P/v+xm6XXkExJrxudsM=; b=YHpmhmXuxj67Ie9rQDQzXr18IekZRpbWgIyWzz3aNeC3RgxX3mjZHCDk7bitmx1y+Rrjpp dtQJvCKqSHOf41Gd4daZj2MMQpl7BUj24D1AACN9xKQ8IS93XmBqQGrLwnZGiPlpReUr33 PBsTcA/Mw34QtWDBSQBIG9WFI9TimtJxnxXVT1g1IkV8G0cxJHw2Sw9uU2Sn39QOeHUgux Rx3N6yTlZIXfhc9+azcQQh/4jSAbD6wTpprkpIIZDks6n3auejLekzHEnnU1B8feOWO2Kl MDmZDqb1HFUwJndJjbBSYmfs3ni+k/PNHpI6bz7kEJG/dkGfDfyJh89sEDOKgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnuPIrTq/t3WWaKHRak+Uu/9P/v+xm6XXkExJrxudsM=; b=hK8fF+CfCBvqbQM1puTp5hDi1uTk9+u+2yT14sZThP8I0qp+XU4P41fIljmG0umLzKUXSX Mm3XTRmP9fipItiWIkUoaYXXuc7sV6PpqjgvXESHWHFIlSHq5oGwAggHFs6aq96jpeII0L apt9q5qaFyzBQHaP+L3H770UVLeBSKD/g4kELC70VttMpeOW1NneStGnvUNMgQSXLMA/6e 6ZSGQ+e+sp5c6CdAeBljvVyiWAayuPr1AePH67ckrU0ARc6uholDdPg3YDpuB2ObTfZ/Fc HZD7uW/WnSYAqSwLypOhJmnNv3wtvr/osc8e6Si62XzZP1tRIU94KYI2Rg1rLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731993616; a=rsa-sha256; cv=none; b=ud5jQM42zGbs+/3awgLmpKxBKTTKCQ0xTH3X9/a0i6DqZQqAQOoRV5PuVPX5ajr7VRPWgF CRF65IzEGHnjdl8rdbK48W5OgAxJGTLd+58TrkMYzSnputlSRY+tOKceGkZasRi1t4GGsf 0WzPfQ4pADYkOu3Oec64sgZcbCXXXNd4N4Xtj0uC3O7gW2aGpeCBxnxAtvBA+FH9eusHFJ y/7FhT4Y05/nKWr2sYxOSeGXxSwsTLqcW9sP243a7YYOZbC+gcyHMqYtDZPXcKPx5WG3hX v+SupxhqmzPvmAgcJwm7ViYN5e44QU/p3iTtIzo1cc2MxxzXiSi6xgZ/UnbaDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xst9X5GcRz1BSm; Tue, 19 Nov 2024 05:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ5KGl1014907; Tue, 19 Nov 2024 05:20:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ5KGLi014903; Tue, 19 Nov 2024 05:20:16 GMT (envelope-from git) Date: Tue, 19 Nov 2024 05:20:16 GMT Message-Id: <202411190520.4AJ5KGLi014903@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: 8925ea58c206 - stable/14 - mlx5en: improve reporting of kernel TLS, IPSEC offload, and ratelimit caps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 8925ea58c20600fb740e5aa370af70b6b9b5febe Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8925ea58c20600fb740e5aa370af70b6b9b5febe commit 8925ea58c20600fb740e5aa370af70b6b9b5febe Author: Konstantin Belousov AuthorDate: 2024-10-15 22:34:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-19 05:20:09 +0000 mlx5en: improve reporting of kernel TLS, IPSEC offload, and ratelimit caps Sponsored by: NVidia networking (cherry picked from commit de7a92756f0ab50e5e243ce9ac680e27f5c41370) --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 55a4bc3cec79..4399af43b93b 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -4518,13 +4518,25 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) if_setcapabilitiesbit(ifp, IFCAP_TSO | IFCAP_VLAN_HWTSO, 0); if_setcapabilitiesbit(ifp, IFCAP_HWSTATS | IFCAP_HWRXTSTMP, 0); if_setcapabilitiesbit(ifp, IFCAP_MEXTPG, 0); - if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); +#ifdef KERN_TLS + if (MLX5_CAP_GEN(mdev, tls_tx) != 0 && + MLX5_CAP_GEN(mdev, log_max_dek) != 0) + if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); + if (MLX5_CAP_GEN(mdev, tls_rx) != 0 && + MLX5_CAP_GEN(mdev, log_max_dek) != 0 && + MLX5_CAP_FLOWTABLE_NIC_RX(mdev, + ft_field_support.outer_ip_version) != 0) + if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | + IFCAP2_BIT(IFCAP2_RXTLS6), 0); +#endif #ifdef RATELIMIT - if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, 0); + if (MLX5_CAP_GEN(mdev, qos) && + MLX5_CAP_QOS(mdev, packet_pacing)) + if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, + 0); #endif if_setcapabilitiesbit(ifp, IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO, 0); - if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | - IFCAP2_BIT(IFCAP2_RXTLS6), 0); + if_setsndtagallocfn(ifp, mlx5e_snd_tag_alloc); #ifdef RATELIMIT if_setratelimitqueryfn(ifp, mlx5e_ratelimit_query); From nobody Tue Nov 19 05:20:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xst9Z0Drlz5dZhd; Tue, 19 Nov 2024 05:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xst9Y6C2zz4G28; Tue, 19 Nov 2024 05:20:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ou28MGmeTYZLLDETYZNWg9DtcJtPVtL6Z/GbZwOzKoE=; b=P8hcNjyHKMD6DQCSQAdg+RyRaG5OmBkKJmL3z8T9hlWBLHqI/5ocSeFwdgIrWGqh7powiH GulJiIH7HxJFdC6X8DWk7OFJmb43JktcmIXhCHauOIwi60xU1RlYAMVAVn3VpZ3ft6qkB+ ExI2RxgBTnd7ovn089Psx2uyMUft3ECAzfz20fxEXRrUqD06kbvgpETXU1/4bAKjIcyXqp 58Y45Vt/US33pLmq+LpjzuMRGGufEJWF5xvxVkZc0owNkN9xRSQ3WV5IggeXyxUQCEHdwv 69LLHv2HMFm6cvW2Ng5hYqMjFdjJ0ps7fnXx9KfM2YVzSWU9l2Ys84aTg1E6yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ou28MGmeTYZLLDETYZNWg9DtcJtPVtL6Z/GbZwOzKoE=; b=QheL+1Pfg/HYwI5E/CZ4DrxpymW0plpa3DFkJgH4MGV6NpQVLZtayTxyril0vpbLJ47RjS wTHh3ZBcMJQE81x62pfZ4hYF74mUgn76k1m5Li28J4qSdbewxHUXKc1lK8ZzBnZeDtB1kd G/nxsolx6L6Yb02zIIgBofkYT+NACxXG4KjZujgyvIT7YSOJ1i5WOILCHggyj7Uvcxw3Nu ltMGU/EOoQdmopnRKSOYQoMJPBgYZaj5xg+CKm+GYkFA2ez3DLsggRKemZaRNRGciWzKJu OQomkuVnnsk35kpKFviB1P/QH2qdx41ChZ6/pHNS54JLAVgbx9ld2KQ6xhz/2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731993617; a=rsa-sha256; cv=none; b=cpujTTSB/uXFt34a/cSOWUD2rAHPwkBSTiWPY3s7KOP6Ud7VdZgzN35s9SC8v7I1yvvtUs Ac3k0gKdzXFHYH5CQsxVkfICFVloxbUXyFp8nPmy6zp7Sf/A1qUd8NK6IEieV19ltQvFAQ uy1X+O75kSX9AWXikosIzS3JWixdLt1avY744ZBCwJ6hDK+h7Uel5qMvhYD7Az8G4VudtV gGsNbRUpAGDDksqP0RY29Aj3Sql1jCQAx0dDT7D/Q4alNnkW+Rxa9U0W36ezSMXx2yShNn 7m+YH1fXTbKP/4B84+rujhjRt0f1vcngFGBpzUOqdDW24BVHjwJxvwOs/39tqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xst9Y5pF9z1BhZ; Tue, 19 Nov 2024 05:20:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ5KHeu015554; Tue, 19 Nov 2024 05:20:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ5KHtR015546; Tue, 19 Nov 2024 05:20:17 GMT (envelope-from git) Date: Tue, 19 Nov 2024 05:20:17 GMT Message-Id: <202411190520.4AJ5KHtR015546@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: ab2dfb93e372 - stable/14 - ps.1: remove stray tab which breaks columns 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: ab2dfb93e3723144c648e1cc508298d41af60e4d Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ab2dfb93e3723144c648e1cc508298d41af60e4d commit ab2dfb93e3723144c648e1cc508298d41af60e4d Author: Konstantin Belousov AuthorDate: 2024-11-18 12:23:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-19 05:20:09 +0000 ps.1: remove stray tab which breaks columns alignment (cherry picked from commit 645f8bcba9c8cf4eac69cc66d4112800a496193f) --- bin/ps/ps.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index cd29f4a0d70e..95f7f15e26ad 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -384,7 +384,7 @@ the include file .It Dv "P2_PROTMAX_ENABLE" Ta No "0x00000200" Ta "Force enable implied PROT_MAX" .It Dv "P2_PROTMAX_DISABLE" Ta No "0x00000400" Ta "Force disable implied PROT_MAX" .It Dv "P2_STKGAP_DISABLE" Ta No "0x00000800" Ta "Disable stack gap for MAP_STACK" -.It Dv "P2_STKGAP_DISABLE_EXEC" Ta No " 0x00001000" Ta "Stack gap disabled after exec" +.It Dv "P2_STKGAP_DISABLE_EXEC" Ta No "0x00001000" Ta "Stack gap disabled after exec" .It Dv "P2_ITSTOPPED" Ta No "0x00002000" Ta "itimers stopped (as part of process stop)" .It Dv "P2_PTRACEREQ" Ta No "0x00004000" Ta "Active ptrace req" .It Dv "P2_NO_NEW_PRIVS" Ta No "0x00008000" Ta "Ignore setuid on exec" From nobody Tue Nov 19 06:30:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XsvkZ2TZnz5dfQF; Tue, 19 Nov 2024 06:30:30 +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 4XsvkY2myFz4MSD; Tue, 19 Nov 2024 06:30:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 4AJ6UKLh065190; Tue, 19 Nov 2024 08:30:23 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 4AJ6UKLh065190 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 4AJ6UKLZ065189; Tue, 19 Nov 2024 08:30:20 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 19 Nov 2024 08:30:20 +0200 From: Konstantin Belousov To: John Baldwin Cc: Jessica Clarke , Andrew Turner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: e85eaa930862 - main - Have rtld query the page size from the kernel Message-ID: References: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> <768D45F9-2F02-4BA1-BFB7-51685486CFCC@freebsd.org> <4d81d34f-4749-4911-b302-eca9166e4be7@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: <4d81d34f-4749-4911-b302-eca9166e4be7@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.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Result: default: False [-2.98 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.977]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_XAW(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4XsvkY2myFz4MSD X-Spamd-Bar: -- On Thu, Nov 14, 2024 at 09:47:30AM -0500, John Baldwin wrote: > On 11/13/24 12:10, Jessica Clarke wrote: > > On 13 Nov 2024, at 19:44, John Baldwin wrote: > > > > > > On 4/7/22 07:38, Andrew Turner wrote: > > > > The branch main has been updated by andrew: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e85eaa930862d5b4dc917bc31e8d7254a693635d > > > > commit e85eaa930862d5b4dc917bc31e8d7254a693635d > > > > Author: Andrew Turner > > > > AuthorDate: 2022-04-04 15:05:40 +0000 > > > > Commit: Andrew Turner > > > > CommitDate: 2022-04-07 14:37:37 +0000 > > > > Have rtld query the page size from the kernel > > > > To allow for a dynamic page size on arm64 have the runtime linker > > > > query the kernel for the currentl page size. > > > > Reviewed by: kib > > > > Sponsored by: The FreeBSD Foundation > > > > Differential Revision: https://reviews.freebsd.org/D34765 > > > > > > This broke relro handling for rtld. The reason is that init_pagesizes() is > > > called after parsing the program headers for rltd in init_rtld(). As a result, > > > page_size is 0 when rtld_round_page() is called so the relro_size is 0. The > > > RTLD_INIT_EARLY_PAGESIZES case was for ia64, and in the early case it's probably > > > not safe to call sysctl? If it is safe to call sysctl, we could just always > > > init pagesizes early? > > > > It looks like there are a few things going on: > > > > 1. relocate_object calls obj_enforce_relro if !obj->mainprog, so will > > try to enforce RELRO for RTLD itself whilst page_size is 0 > > > > 2. init_rtld later calls obj_enforce_relro for obj_rtld, after > > page_size has been initialised > > > > 3. init_rtld is careful to avoid using global variables until it’s > > called relocate_objects for RTLD itself, but by hiding accesses to > > page_size away in rtld_*_page that’s no longer true (definitely not > > true in the case of text relocations, for example, though whether it > > also occurs for other cases we care more about I don’t know) > > > > So I think there are a couple of things to fix: > > > > 1. Stop accessing page_size prior to relocate_objects returning for > > RTLD itself > > > > 2. Stop enforcing RELRO twice for RTLD (e.g. add && obj != rtldobj to > > relocate_object’s case) > > > > At least, that’s what I’ve inferred from reading the code. > > > > Though, to be honest, things might be rather nicer if we just made > > .rtld_start responsible for relocating RTLD itself prior to calling > > init_rtld, that’s what we have to do for CHERI, as do arm, powerpc and > > powerpc64, and it means you can use globals from the start in init_rtld. > > I've done 2) locally which fixed my immediate issue. Can you provide some more info please? obj_enforce_relro() only acts if obj_relro_size is > 0, which requires the call to parse_rtld_phdr() to fill it. This is indeed called after the rtld is relocated by relocate_object(s), but so it was before the Andrew' change. I can see a problem if plt is mapped ro and requires relro to remap it rw before relocation, but I do not believe this is the case for rtld and any static linker. And what is the arch? The RTLD_INIT_PAGESIZES_EARLY symbol indeed should be eliminated, I have the patch. But let's sort out the page size issue as well. > > I agree though that having all arches implement rtld_relocate_nonplt_self() > which is called before rtld() would be nicer. > > -- > John Baldwin From nobody Tue Nov 19 09:29:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xszj95jnnz5dpmv; Tue, 19 Nov 2024 09:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xszj94hnWz4bmN; Tue, 19 Nov 2024 09:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732008573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0w4UXnjMbKPOh7tAMtUxOh4Aj3T7s2BZpAUXGkOzftw=; b=oN/HrMR/DqRwQlsRqP8Q71tI13MOhKt8nI9HsNgOshCEz6AL6CRDSidnDOaceo+WGVPYiK Xu8L+G/1FaLDqvXGgfuGlHiz6Ehiq+AvprQZR75PtJ1TLEgdiAKF9yxbA84wuDvLmxySce nf5sxenLspN6G1lHE9I+z3URl2BiZeTa2aaDPRiBkPc/JeQahft5T+gZDDt8Us8SHLCKrD q8lmjr6Z9CGCd/hHbts2EzqhWSIESyvBxySf8QNmgPGrLnRhhR0EBZ601y/YnjFXclTW4U QpV7QmZFELQ2UiaUUk/CkRO6A5dUc+2l1bNQnYw1mNkSVfg4renT98c/QFT/FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732008573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0w4UXnjMbKPOh7tAMtUxOh4Aj3T7s2BZpAUXGkOzftw=; b=vwbg4z+dLLEjg3BRhptEStUa/EdbuvBfllq8PDceldqJQdBOOddwDSXeg7TwOrIdVb1zQr iH2J61Wa+/huiZn35rG58Tql0c0N3fetef12/w7qjhgBz5Hk8OocqgZl4Tpv7nv4xheb0M fkxfPXrsRH2EqVXNq2mQFI1bNYHKo2QxdJvJzn6akcyoyhDnDVXWywwl6t41YHuQMgZBB5 cdQ2A72uRBuLlB8PMMux9FooB8/V4hR9hcLSv4n/GlMH4RQ36bWkyfVzRIZvTZTbvcXJ9A XHu1J1pWajVNXe7oU14XhV8kLhc+92Ry5Mu8LD9lMMTZ6mTJixGH5rJPyoc4zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732008573; a=rsa-sha256; cv=none; b=o7CaiA1eo+BZCzZoHxiBCbArsTH0YN7rXjBUkPOeSTE1iIYXOwD93QmVk4P9F/HnZGJpr9 xXSLfe2TVE/ad3VS4ImhpLPXBXTSQlEU/L02h5s7sUB+lxFhNb60O0up02sPCI93KFWcqa +qW/9WCt6mwSXaGmBQpOdYDDb3OkE1QZvMQNRFt7gaJ4aayXt8Wq5qxyABSKU9Q+yP5Kb8 N2zJFEcXQsjZPyl5b+sC7QlG2DKVztgSpfyMm/y8/KeMtyebvqKkJXooNW2Za1QhrvaOO1 rpo5c4IQxDCrPjNcPCp5bvGpJbrJYstRgSukWaBrHbsE6vQMn46twx+IrHC2Qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xszj93j6Jz1K3R; Tue, 19 Nov 2024 09:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ9TXGK070475; Tue, 19 Nov 2024 09:29:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ9TX71070472; Tue, 19 Nov 2024 09:29:33 GMT (envelope-from git) Date: Tue, 19 Nov 2024 09:29:33 GMT Message-Id: <202411190929.4AJ9TX71070472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2822a7953316 - main - mv: Convert tests to ATF. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2822a7953316f99418425bf3aa403d668e5af402 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2822a7953316f99418425bf3aa403d668e5af402 commit 2822a7953316f99418425bf3aa403d668e5af402 Author: Dag-Erling Smørgrav AuthorDate: 2024-11-19 09:29:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 09:29:11 +0000 mv: Convert tests to ATF. Sponsored by: Klara, Inc. Reviewed by: asomers, markj Differential Revision: https://reviews.freebsd.org/D47569 --- ObsoleteFiles.inc | 3 + bin/mv/tests/Makefile | 2 +- bin/mv/tests/legacy_test.sh | 295 --------------------------------- bin/mv/tests/mv_test.sh | 391 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 395 insertions(+), 296 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 57e0f4609050..1378d6b6dcfa 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20241119: rewrite mv tests +OLD_FILES+=usr/tests/bin/mv/legacy_test + # 20241112: Retire MK_PROFILE support OLD_FILES+=usr/lib/lib80211_p.a OLD_FILES+=usr/lib/lib9p_p.a diff --git a/bin/mv/tests/Makefile b/bin/mv/tests/Makefile index 0e8da4c0981d..d0c65138c9c7 100644 --- a/bin/mv/tests/Makefile +++ b/bin/mv/tests/Makefile @@ -1,5 +1,5 @@ .include -TAP_TESTS_SH= legacy_test +ATF_TESTS_SH= mv_test .include diff --git a/bin/mv/tests/legacy_test.sh b/bin/mv/tests/legacy_test.sh deleted file mode 100644 index 8af025a0d011..000000000000 --- a/bin/mv/tests/legacy_test.sh +++ /dev/null @@ -1,295 +0,0 @@ -#!/bin/sh - -# A directory in a device different from that where the tests are run -TMPDIR=/tmp/regress.$$ -COUNT=0 - -# Begin an individual test -begin() -{ - COUNT=`expr $COUNT + 1` - OK=1 - if [ -z "$FS" ] - then - NAME="$1" - else - NAME="$1 (cross device)" - fi - rm -rf testdir $TMPDIR/testdir - mkdir -p testdir $TMPDIR/testdir - cd testdir -} - -# End an individual test -end() -{ - if [ $OK = 1 ] - then - printf 'ok ' - else - printf 'not ok ' - fi - echo "$COUNT - $NAME" - cd .. - rm -rf testdir $TMPDIR/testdir -} - -# Make a file that can later be verified -mkf() -{ - CN=`basename $1` - echo "$CN-$CN" >$1 -} - -# Verify that the file specified is correct -ckf() -{ - if [ -f $2 ] && echo "$1-$1" | diff - $2 >/dev/null - then - ok - else - notok - fi -} - -# Make a fifo that can later be verified -mkp() -{ - mkfifo $1 -} - -# Verify that the file specified is correct -ckp() -{ - if [ -p $2 ] - then - ok - else - notok - fi -} - -# Make a directory that can later be verified -mkd() -{ - CN=`basename $1` - mkdir -p $1/"$CN-$CN" -} - -# Verify that the directory specified is correct -ckd() -{ - if [ -d $2/$1-$1 ] - then - ok - else - notok - fi -} - -# Verify that the specified file does not exist -# (is not there) -cknt() -{ - if [ -r $1 ] - then - notok - else - ok - fi -} - -# A part of a test succeeds -ok() -{ - : -} - -# A part of a test fails -notok() -{ - OK=0 -} - -# Verify that the exit code passed is for unsuccessful termination -ckfail() -{ - if [ $1 -gt 0 ] - then - ok - else - notok - fi -} - -# Verify that the exit code passed is for successful termination -ckok() -{ - if [ $1 -eq 0 ] - then - ok - else - notok - fi -} - -# Run all tests locally and across devices -echo 1..32 -for FS in '' $TMPDIR/testdir/ -do - begin 'Rename file' - mkf fa - mv fa ${FS}fb - ckok $? - ckf fa ${FS}fb - cknt fa - end - - begin 'Move files into directory' - mkf fa - mkf fb - mkdir -p ${FS}1/2/3 - mv fa fb ${FS}1/2/3 - ckok $? - ckf fa ${FS}1/2/3/fa - ckf fb ${FS}1/2/3/fb - cknt fa - cknt fb - end - - begin 'Move file from directory to file' - mkdir -p 1/2/3 - mkf 1/2/3/fa - mv 1/2/3/fa ${FS}fb - ckok $? - ckf fa ${FS}fb - cknt 1/2/3/fa - end - - begin 'Move file from directory to existing file' - mkdir -p 1/2/3 - mkf 1/2/3/fa - :> ${FS}fb - mv 1/2/3/fa ${FS}fb - ckok $? - ckf fa ${FS}fb - cknt 1/2/3/fa - end - - begin 'Move file from directory to existing directory' - mkdir -p 1/2/3 - mkf 1/2/3/fa - mkdir -p ${FS}db/fa - # Should fail per POSIX step 3a: - # Destination path is a file of type directory and - # source_file is not a file of type directory - mv 1/2/3/fa ${FS}db 2>/dev/null - ckfail $? - ckf fa 1/2/3/fa - end - - begin 'Move file from directory to directory' - mkdir -p da1/da2/da3 - mkdir -p ${FS}db1/db2/db3 - mkf da1/da2/da3/fa - mv da1/da2/da3/fa ${FS}db1/db2/db3/fb - ckok $? - ckf fa ${FS}db1/db2/db3/fb - cknt da1/da2/da3/fa - end - - begin 'Rename directory' - mkd da - mv da ${FS}db - ckok $? - ckd da ${FS}db - cknt da - end - - begin 'Move directory to directory name' - mkd da1/da2/da3/da - mkdir -p ${FS}db1/db2/db3 - mv da1/da2/da3/da ${FS}db1/db2/db3/db - ckok $? - ckd da ${FS}db1/db2/db3/db - cknt da1/da2/da3/da - end - - begin 'Move directory to directory' - mkd da1/da2/da3/da - mkdir -p ${FS}db1/db2/db3 - mv da1/da2/da3/da ${FS}db1/db2/db3 - ckok $? - ckd da ${FS}db1/db2/db3/da - cknt da1/da2/da3/da - end - - begin 'Move directory to existing empty directory' - mkd da1/da2/da3/da - mkdir -p ${FS}db1/db2/db3/da - mv da1/da2/da3/da ${FS}db1/db2/db3 - ckok $? - ckd da ${FS}db1/db2/db3/da - cknt da1/da2/da3/da - end - - begin 'Move directory to existing non-empty directory' - mkd da1/da2/da3/da - mkdir -p ${FS}db1/db2/db3/da/full - # Should fail (per the semantics of rename(2)) - mv da1/da2/da3/da ${FS}db1/db2/db3 2>/dev/null - ckfail $? - ckd da da1/da2/da3/da - end - - begin 'Move directory to existing file' - mkd da1/da2/da3/da - mkdir -p ${FS}db1/db2/db3 - :> ${FS}db1/db2/db3/da - # Should fail per POSIX step 3b: - # Destination path is a file not of type directory - # and source_file is a file of type directory - mv da1/da2/da3/da ${FS}db1/db2/db3/da 2>/dev/null - ckfail $? - ckd da da1/da2/da3/da - end - - begin 'Rename fifo' - mkp fa - mv fa ${FS}fb - ckok $? - ckp fa ${FS}fb - cknt fa - end - - begin 'Move fifos into directory' - mkp fa - mkp fb - mkdir -p ${FS}1/2/3 - mv fa fb ${FS}1/2/3 - ckok $? - ckp fa ${FS}1/2/3/fa - ckp fb ${FS}1/2/3/fb - cknt fa - cknt fb - end - - begin 'Move fifo from directory to fifo' - mkdir -p 1/2/3 - mkp 1/2/3/fa - mv 1/2/3/fa ${FS}fb - ckok $? - ckp fa ${FS}fb - cknt 1/2/3/fa - end - - begin 'Move fifo from directory to directory' - mkdir -p da1/da2/da3 - mkdir -p ${FS}db1/db2/db3 - mkp da1/da2/da3/fa - mv da1/da2/da3/fa ${FS}db1/db2/db3/fb - ckok $? - ckp fa ${FS}db1/db2/db3/fb - cknt da1/da2/da3/fa - end -done diff --git a/bin/mv/tests/mv_test.sh b/bin/mv/tests/mv_test.sh new file mode 100644 index 000000000000..aae4bc3f9297 --- /dev/null +++ b/bin/mv/tests/mv_test.sh @@ -0,0 +1,391 @@ +# +# Copyright (c) 2007 Diomidis Spinellis +# Copyright (c) 2023 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +mv_setup() { + atf_check mkdir fs + atf_check mount -t tmpfs -o size=1m tmp fs +} + +mv_cleanup() { + umount fs || true +} + +# Make a file that can later be verified +mv_makefile() { + local cn="${1##*/}" + echo "$cn-$cn" >"$1" +} + +# Verify that the file specified is correct +mv_checkfile() { + atf_check -o inline:"$1-$1\n" cat "$2" +} + +# Make a fifo that can later be verified +mv_makepipe() { + atf_check mkfifo $1 +} + +# Verify that the file specified is correct +mv_checkpipe() { + atf_check test -p "$2" +} + +# Make a directory that can later be verified +mv_makedir() { + local cn="${1##*/}" + atf_check mkdir -p "$1/$cn-$cn" +} + +# Verify that the directory specified is correct +mv_checkdir() { + atf_check test -d "$2/$1-$1" +} + +# Verify that the specified file does not exist +# (is not there) +mv_checkabsent() { + atf_check -s exit:1 test -r "$1" +} + +atf_test_case rename_file cleanup +rename_file_head() { + atf_set "descr" "Rename file" + atf_set "require.user" "root" +} +rename_file_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makefile fa + atf_check mv fa ${FS}fb + mv_checkfile fa ${FS}fb + mv_checkabsent fa + done +} +rename_file_cleanup() { + mv_cleanup +} + +atf_test_case file_into_dir cleanup +file_into_dir_head() { + atf_set "descr" "Move files into directory" + atf_set "require.user" "root" +} +file_into_dir_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makefile fa + mv_makefile fb + atf_check mkdir -p ${FS}1/2/3 + atf_check mv fa fb ${FS}1/2/3 + mv_checkfile fa ${FS}1/2/3/fa + mv_checkfile fb ${FS}1/2/3/fb + mv_checkabsent fa + mv_checkabsent fb + done +} +file_into_dir_cleanup() { + mv_cleanup +} + +atf_test_case file_from_dir cleanup +file_from_dir_head() { + atf_set "descr" "Move file from directory to file" + atf_set "require.user" "root" +} +file_from_dir_body() { + mv_setup + atf_check mkdir -p 1/2/3 + for FS in "" "fs/" ; do + mv_makefile 1/2/3/fa + atf_check mv 1/2/3/fa ${FS}fb + mv_checkfile fa ${FS}fb + mv_checkabsent 1/2/3/fa + done +} +file_from_dir_cleanup() { + mv_cleanup +} + +atf_test_case file_from_dir_replace cleanup +file_from_dir_replace_head() { + atf_set "descr" "Move file from directory to existing file" + atf_set "require.user" "root" +} +file_from_dir_replace_body() { + mv_setup + atf_check mkdir -p 1/2/3 + for FS in "" "fs/" ; do + mv_makefile 1/2/3/fa + :> ${FS}fb + atf_check mv 1/2/3/fa ${FS}fb + mv_checkfile fa ${FS}fb + mv_checkabsent 1/2/3/fa + done +} +file_from_dir_replace_cleanup() { + mv_cleanup +} + +atf_test_case file_to_dir cleanup +file_to_dir_head() { + atf_set "descr" "Move file from directory to existing directory" + atf_set "require.user" "root" +} +file_to_dir_body() { + mv_setup + atf_check mkdir -p 1/2/3 + for FS in "" "fs/" ; do + mv_makefile 1/2/3/fa + atf_check mkdir -p ${FS}db/fa + # Should fail per POSIX step 3a: + # Destination path is a file of type directory and + # source_file is not a file of type directory + atf_check -s not-exit:0 -e match:"Is a directory" \ + mv 1/2/3/fa ${FS}db + mv_checkfile fa 1/2/3/fa + done +} +file_to_dir_cleanup() { + mv_cleanup +} + +atf_test_case file_from_rename_dir cleanup +file_from_rename_dir_head() { + atf_set "descr" "Move file from directory to directory" + atf_set "require.user" "root" +} +file_from_rename_dir_body() { + mv_setup + atf_check mkdir -p da1/da2/da3 + for FS in "" "fs/" ; do + atf_check mkdir -p ${FS}db1/db2/db3 + mv_makefile da1/da2/da3/fa + atf_check mv da1/da2/da3/fa ${FS}db1/db2/db3/fb + mv_checkfile fa ${FS}db1/db2/db3/fb + mv_checkabsent da1/da2/da3/fa + done +} +file_from_rename_dir_cleanup() { + mv_cleanup +} + +atf_test_case rename_dir cleanup +rename_dir_head() { + atf_set "descr" "Rename directory" + atf_set "require.user" "root" +} +rename_dir_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makedir da + atf_check mv da ${FS}db + mv_checkdir da ${FS}db + mv_checkabsent da + done +} +rename_dir_cleanup() { + mv_cleanup +} + +atf_test_case dir_to_dir cleanup +dir_to_dir_head() { + atf_set "descr" "Move directory to directory name" + atf_set "require.user" "root" +} +dir_to_dir_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makedir da1/da2/da3/da + atf_check mkdir -p ${FS}db1/db2/db3 + atf_check mv da1/da2/da3/da ${FS}db1/db2/db3/db + mv_checkdir da ${FS}db1/db2/db3/db + mv_checkabsent da1/da2/da3/da + done +} +dir_to_dir_cleanup() { + mv_cleanup +} + +atf_test_case dir_into_dir cleanup +dir_into_dir_head() { + atf_set "descr" "Move directory to directory" + atf_set "require.user" "root" +} +dir_into_dir_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makedir da1/da2/da3/da + atf_check mkdir -p ${FS}db1/db2/db3 + atf_check mv da1/da2/da3/da ${FS}db1/db2/db3 + mv_checkdir da ${FS}db1/db2/db3/da + mv_checkabsent da1/da2/da3/da + done +} +dir_into_dir_cleanup() { + mv_cleanup +} + +atf_test_case dir_to_empty_dir cleanup +dir_to_empty_dir_head() { + atf_set "descr" "Move directory to existing empty directory" + atf_set "require.user" "root" +} +dir_to_empty_dir_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makedir da1/da2/da3/da + atf_check mkdir -p ${FS}db1/db2/db3/da + atf_check mv da1/da2/da3/da ${FS}db1/db2/db3 + mv_checkdir da ${FS}db1/db2/db3/da + mv_checkabsent da1/da2/da3/da + done +} +dir_to_empty_dir_cleanup() { + mv_cleanup +} + +atf_test_case dir_to_nonempty_dir cleanup +dir_to_nonempty_dir_head() { + atf_set "descr" "Move directory to existing non-empty directory" + atf_set "require.user" "root" +} +dir_to_nonempty_dir_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makedir da1/da2/da3/da + atf_check mkdir -p ${FS}db1/db2/db3/da/full + # Should fail (per the semantics of rename(2)) + atf_check -s not-exit:0 -e match:"Directory not empty" \ + mv da1/da2/da3/da ${FS}db1/db2/db3 + mv_checkdir da da1/da2/da3/da + done +} +dir_to_nonempty_dir_cleanup() { + mv_cleanup +} + +atf_test_case dir_to_file cleanup +dir_to_file_head() { + atf_set "descr" "Move directory to existing file" + atf_set "require.user" "root" +} +dir_to_file_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makedir da1/da2/da3/da + atf_check mkdir -p ${FS}db1/db2/db3 + :> ${FS}db1/db2/db3/da + # Should fail per POSIX step 3b: + # Destination path is a file not of type directory + # and source_file is a file of type directory + atf_check -s not-exit:0 -e match:"Not a directory" \ + mv da1/da2/da3/da ${FS}db1/db2/db3/da + mv_checkdir da da1/da2/da3/da + done +} +dir_to_file_cleanup() { + mv_cleanup +} + +atf_test_case rename_fifo cleanup +rename_fifo_head() { + atf_set "descr" "Rename fifo" + atf_set "require.user" "root" +} +rename_fifo_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makepipe fa + atf_check mv fa ${FS}fb + mv_checkpipe fa ${FS}fb + mv_checkabsent fa + done +} +rename_fifo_cleanup() { + mv_cleanup +} + +atf_test_case fifo_into_dir cleanup +fifo_into_dir_head() { + atf_set "descr" "Move fifos into directory" + atf_set "require.user" "root" +} +fifo_into_dir_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makepipe fa + mv_makepipe fb + atf_check mkdir -p ${FS}1/2/3 + atf_check mv fa fb ${FS}1/2/3 + mv_checkpipe fa ${FS}1/2/3/fa + mv_checkpipe fb ${FS}1/2/3/fb + mv_checkabsent fa + mv_checkabsent fb + done +} +fifo_into_dir_cleanup() { + mv_cleanup +} + +atf_test_case fifo_from_dir cleanup +fifo_from_dir_head() { + atf_set "descr" "Move fifo from directory to fifo" + atf_set "require.user" "root" +} +fifo_from_dir_body() { + mv_setup + atf_check mkdir -p 1/2/3 + for FS in "" "fs/" ; do + mv_makepipe 1/2/3/fa + atf_check mv 1/2/3/fa ${FS}fb + mv_checkpipe fa ${FS}fb + mv_checkabsent 1/2/3/fa + done +} +fifo_from_dir_cleanup() { + mv_cleanup +} + +atf_test_case fifo_from_dir_into_dir cleanup +fifo_from_dir_into_dir_head() { + atf_set "descr" "Move fifo from directory to directory" + atf_set "require.user" "root" +} +fifo_from_dir_into_dir_body() { + mv_setup + atf_check mkdir -p da1/da2/da3 + for FS in "" "fs/" ; do + atf_check mkdir -p ${FS}db1/db2/db3 + mv_makepipe da1/da2/da3/fa + atf_check mv da1/da2/da3/fa ${FS}db1/db2/db3/fb + mv_checkpipe fa ${FS}db1/db2/db3/fb + mv_checkabsent da1/da2/da3/fa + done +} +fifo_from_dir_into_dir_cleanup() { + mv_cleanup +} + +atf_init_test_cases() { + atf_add_test_case rename_file + atf_add_test_case file_into_dir + atf_add_test_case file_from_dir + atf_add_test_case file_from_dir_replace + atf_add_test_case file_to_dir + atf_add_test_case file_from_rename_dir + atf_add_test_case rename_dir + atf_add_test_case dir_to_dir + atf_add_test_case dir_into_dir + atf_add_test_case dir_to_empty_dir + atf_add_test_case dir_to_nonempty_dir + atf_add_test_case dir_to_file + atf_add_test_case rename_fifo + atf_add_test_case fifo_into_dir + atf_add_test_case fifo_from_dir + atf_add_test_case fifo_from_dir_into_dir +} From nobody Tue Nov 19 09:29:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xszj86tJRz5dpmt; Tue, 19 Nov 2024 09:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xszj83FsGz4bv5; Tue, 19 Nov 2024 09:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732008572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DZ++YxgZrOPBKK1uxDKlCjxyaWc4aeRvEWm650/Qdrs=; b=L2wW/w3S6I+1MQrIKnSwlPCrm5eiA/4aZLW8MRrjCTXuDQw0C1HlwtYwTUiBiMGtiRUSCG JBUQkBZ7EyBBUc7EyiWBK86IgKKEGSXQ1bHB0AmBDS4y6F5UEh0NWa4kMxgLbCsk4U0lm6 RITzGQGTj8S5y5k3b9oRtPjP85yhWsngxXq0CKA+SOwDuxdwekx+X2VGro5fCCyyk36k8M uRpIIR+GdgNk4YUyyvA1CNCpFV8tyWwOx+73ukOG58t+LCtU4+oSCm8kZQS96jGgb04oG0 lxz3qrFdiFiLpUj/qcAG8/jsd3CmYSRmuYlWTl+CIm3fbciDACCfw7jDgKaDCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732008572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DZ++YxgZrOPBKK1uxDKlCjxyaWc4aeRvEWm650/Qdrs=; b=hemRTVf477PHRxtl/MnefVnOkvhJqFiiAU99vpbIwa8vvQhjitxiK+u/NY20BBIAaTwHWq Zk4wXinWXO5pcAzpAFboiToVdzd4f0327f9GYT2aVHF5OGkbP6Axk4T0L7Hu4il7Jm7jEj li/xhSNgH+lhsYGH+mUIwyVm5G9rRckrnCmo4LEMBfLK5D037WCHEAijggcWqeoNOuNQci roillV6LsR+fHPfZwOLsjkfW4A0hxvqGV+ezGasNG31pMxi4wOwizeD2wckFj48jQQXWf+ h4z3e86jNX6MdjNc9YhiB4UcCNWgjAjje+HwtnryGq7PbDFGCGSYDwWtxg5xWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732008572; a=rsa-sha256; cv=none; b=fLq5sEYt88tjDoLMd0puS8Acjz2iE+EwdWZHEZsLs6O5kHZDdKRvZfolgjqfHJpe/uj5ba kOu9c0aUH7hCtSYn3PInMm+pseOV8IMpkc9sQ59ConQEUsZP32fnsOnARBwKjdGmOZAzDM fvP6XDC06PV0b0iGZnq1ha63/Bv2k+r5JnZosMsiI//FmW59hhnDx4zpyymAJo9ZQx8QYX w1+J0PepqBFiYS4lLW1dAypsPUupg2V2K2Tb8Jc+ITZ12sjQl42UERnKslX7atxJSMI0CJ LbE6+pH1WP64+Ah8Pud1eZrMHI2SGbMgIt90pJg/Rcdkcm0oVXQpWzyA5/u9aA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xszj82q8Gz1JdC; Tue, 19 Nov 2024 09:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ9TWls070430; Tue, 19 Nov 2024 09:29:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ9TWeT070427; Tue, 19 Nov 2024 09:29:32 GMT (envelope-from git) Date: Tue, 19 Nov 2024 09:29:32 GMT Message-Id: <202411190929.4AJ9TWeT070427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: dc6105ebedcf - main - mv: More style nits. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc6105ebedcf762d0c6b42785bb2a914f8ade12c Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dc6105ebedcf762d0c6b42785bb2a914f8ade12c commit dc6105ebedcf762d0c6b42785bb2a914f8ade12c Author: Dag-Erling Smørgrav AuthorDate: 2024-11-19 09:29:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 09:29:05 +0000 mv: More style nits. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47568 --- bin/mv/mv.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/bin/mv/mv.c b/bin/mv/mv.c index c3080112cee5..801ac52dc31e 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -32,13 +32,12 @@ * SUCH DAMAGE. */ -#include -#include #include +#include +#include +#include #include #include -#include -#include #include #include @@ -62,18 +61,16 @@ static int copy(const char *, const char *); static int do_move(const char *, const char *); static int fastcopy(const char *, const char *, struct stat *); static void usage(void); -static void preserve_fd_acls(int source_fd, int dest_fd, const char *source_path, - const char *dest_path); +static void preserve_fd_acls(int, int, const char *, const char *); int main(int argc, char *argv[]) { - size_t baselen, len; - int rval; - char *p, *endp; - struct stat sb; - int ch; char path[PATH_MAX]; + struct stat sb; + char *p, *endp; + size_t baselen, len; + int ch, rval; while ((ch = getopt(argc, argv, "fhinv")) != -1) switch (ch) { @@ -161,9 +158,10 @@ main(int argc, char *argv[]) static int do_move(const char *from, const char *to) { + char path[PATH_MAX], modep[15]; + struct statfs sfs; struct stat sb; int ask, ch, first; - char modep[15]; /* * Check access. If interactive and file exists, ask user if it @@ -171,9 +169,8 @@ do_move(const char *from, const char *to) * make sure the user wants to clobber it. */ if (!fflg && !access(to, F_OK)) { - /* prompt only if source exists */ - if (lstat(from, &sb) == -1) { + if (lstat(from, &sb) == -1) { warn("%s", from); return (1); } @@ -217,9 +214,6 @@ do_move(const char *from, const char *to) } if (errno == EXDEV) { - struct statfs sfs; - char path[PATH_MAX]; - /* * If the source is a symbolic link and is on another * filesystem, it can be recreated at the destination. @@ -305,8 +299,8 @@ err: if (unlink(to)) warn("%s: set owner/group (was: %lu/%lu)", to, (u_long)sbp->st_uid, (u_long)sbp->st_gid); if (oldmode & (S_ISUID | S_ISGID)) { - warnx( -"%s: owner/group changed; clearing suid/sgid (mode was 0%03o)", + warnx("%s: owner/group changed; " + "clearing suid/sgid (mode was 0%03o)", to, oldmode); sbp->st_mode &= ~(S_ISUID | S_ISGID); } @@ -494,9 +488,8 @@ preserve_fd_acls(int source_fd, int dest_fd, const char *source_path, static void usage(void) { - (void)fprintf(stderr, "%s\n%s\n", - "usage: mv [-f | -i | -n] [-hv] source target", - " mv [-f | -i | -n] [-v] source ... directory"); + "usage: mv [-f | -i | -n] [-hv] source target", + " mv [-f | -i | -n] [-v] source ... directory"); exit(EX_USAGE); } From nobody Tue Nov 19 09:29:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XszjB6R12z5dpkZ; Tue, 19 Nov 2024 09:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XszjB4z2zz4bs1; Tue, 19 Nov 2024 09:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732008574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o+HBIfeRq2oIAo3FYT/Q+SeupJtqp64n8DxEH9sfy38=; b=rLPYMy0epoGr1+RBQdA2eo98+m6sy/D0DxL29xziHOcHIuSZiu2ki6Gx3S6SrZYnQMradx CJIpHySQaN8VZ9ZZzuQjPPpVCMTKlTOOxNSOXWM7AsqUZauz+tHC0sR/XHezoK4nbpniOS P+5HDs9d35lt0PSh1c/lWamo8svRhkt35WkPGnodQpdd0qpU3xybVSlePZb/LcOqMktOBj QiWR9PFS0eX+9WUonwKWNoT20M6/uCtO/7MI5eq53HVSjsoZMdJU4QgKwJO024V6/fk2nI Ait2oUZV7Ak0J2GMVGX5xOk2rpvlZoCiE48l89sOGvebLDqFIlbinlS+sutxSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732008574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o+HBIfeRq2oIAo3FYT/Q+SeupJtqp64n8DxEH9sfy38=; b=A9tTAiimRqGzDGcyW57ItuBJ5NkOaVYoANSJOC+j/YfGf6fPUS9abZlMt5xJ0pZf5AcLRi io1R0hKP0pwq583aPjm+glEu5FGqFD7ouByNe7HneDI08+m7ObcdVROCgOmnqRQl7q7BAC e8MMi9IrTamPMUGAwylUkODffsBxcL28AIGdMISS1B3v1MR+tDvfqPuygwGB6gSVSqve2B d74ff7mEaBBpwTeGpANGphFxJ7owyGMnwtgqBS4lgthwtFe62Qj8rPDalc3UApBHl1pJN1 QEyDEMunZFIFmF6cQeoFF5V6nD8Ca0ADpflDBn3coclN5bs6aiVE83QcOeYobQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732008574; a=rsa-sha256; cv=none; b=H91vnLleHh0U+PRnk+H9Bki5xU1KxeIjewyxvgVgdwSCgAFNzOC5IEM8ekDIHQ5gl2ttM1 FtyOgBD27sk0f/reUOSmf/eO6RsuU5Wqnqg9nMZWx4f6xa9dCIwsnhdJjjY0YGEvh0dDG/ 8tyCdL2RBQC6tYs5Lj15dUlQdBX9qlDzia3a8cuQhnGKucf6fLg+EYa3wJ6PbOduiYqZPw T9KZDLSbNiL2Zi6DTLyLX7cUkCTn1omgnwvQBLhhbd8jxa3FZvLiNRFv6pP1Jpb4c9i/HK hfa7yPUeHORKr4w4Arz0YWrE+HDE0ncZeQNICjFBZV5gAUtA0eO8P3SAMrH7wA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XszjB4SQXz1J3k; Tue, 19 Nov 2024 09:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ9TYbU070526; Tue, 19 Nov 2024 09:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ9TYZo070523; Tue, 19 Nov 2024 09:29:34 GMT (envelope-from git) Date: Tue, 19 Nov 2024 09:29:34 GMT Message-Id: <202411190929.4AJ9TYZo070523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d4fb5984ab0b - main - mv: Add test cases for command-line 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4fb5984ab0b96cc784c907e622deda910d020f2 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d4fb5984ab0b96cc784c907e622deda910d020f2 commit d4fb5984ab0b96cc784c907e622deda910d020f2 Author: Dag-Erling Smørgrav AuthorDate: 2024-11-19 09:29:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 09:29:15 +0000 mv: Add test cases for command-line options. Sponsored by: Klara, Inc. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D47582 --- bin/mv/tests/mv_test.sh | 117 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/bin/mv/tests/mv_test.sh b/bin/mv/tests/mv_test.sh index aae4bc3f9297..4412d5e88c5e 100644 --- a/bin/mv/tests/mv_test.sh +++ b/bin/mv/tests/mv_test.sh @@ -371,6 +371,118 @@ fifo_from_dir_into_dir_cleanup() { mv_cleanup } +atf_test_case mv_f cleanup +mv_f_head() { + atf_set "descr" "Force replacement" + atf_set "require.user" "root" +} +mv_f_body() { + mv_setup + for FS in "" "fs/" ; do + mv_makefile fa + atf_check mv fa ${FS}fb + mv_checkfile fa ${FS}fb + mv_checkabsent fa + mv_makefile fa + :> ${FS}fb + atf_check mv -i -n -f fa ${FS}fb + mv_checkfile fa ${FS}fb + mv_checkabsent fa + done +} +mv_f_cleanup() { + mv_cleanup +} + +atf_test_case mv_h cleanup +mv_h_head() { + atf_set "descr" "Replace symbolic link" + atf_set "require.user" "root" +} +mv_h_body() { + mv_setup + for FS in "" "fs/" ; do + atf_check mkdir ${FS}da + atf_check ln -s da ${FS}db + # First test without -h, file goes into symlink target + mv_makefile fa + atf_check mv fa ${FS}db + mv_checkfile fa ${FS}da/fa + # Second test with -h, file replaces symlink + mv_makefile fa + atf_check mv -h fa ${FS}db + mv_checkfile fa ${FS}db + done +} +mv_h_cleanup() { + mv_cleanup +} + +atf_test_case mv_i cleanup +mv_i_head() { + atf_set "descr" "Confirm replacement" + atf_set "require.user" "root" +} +mv_i_body() { + mv_setup + echo n >n + echo y >y + for FS in "" "fs/" ; do + mv_makefile fa + mv_makefile ${FS}fb + # First test, answer no, file is not replaced + atf_check -e match:"^overwrite ${FS}fb\\?" \ + mv -i fa ${FS}fb ${FS}da/fa\n" \ + mv -v fa ${FS}da + done +} +mv_v_cleanup() { + mv_cleanup +} + atf_init_test_cases() { atf_add_test_case rename_file atf_add_test_case file_into_dir @@ -388,4 +500,9 @@ atf_init_test_cases() { atf_add_test_case fifo_into_dir atf_add_test_case fifo_from_dir atf_add_test_case fifo_from_dir_into_dir + atf_add_test_case mv_f + atf_add_test_case mv_h + atf_add_test_case mv_i + atf_add_test_case mv_n + atf_add_test_case mv_v } From nobody Tue Nov 19 10:45:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt1NR56D3z5dt7B; Tue, 19 Nov 2024 10:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt1NR4MzNz4hsr; Tue, 19 Nov 2024 10:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732013111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KCoKeKnLNmZOWwayhM8EvrAbvzvq7ihaejKG869cSNA=; b=c5PZQmeKuwLBzqyLqM98khF8NuEaP2jRk1r7ciNZiteosT+kHimS5FiooMpKqdtbnhcPZ6 2P8RinxDIS0RL+Ra7fTc3mpejFAIxT/1cMaGfiP0tCOTK+Xm/CPzs3uE9sy6kfmks5CxBh LYpPk0MhijHBnTvWAQ00MvPunUc1IiNefZJwy/W0cKMbbiKlyhezEq0c68SgoVX/3Psc1e jX3S+cthAMHu6pz/phoMFUEw1g+4HU6jvNOQfV72KzNImSDQtLlXbGqdIn6XnZw330ynZZ 420HhI0OpO26Pkv6WJpQzfy4EnEndF5lIpIJQIy8wMnsWYX/JbAws8c0RtYWYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732013111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KCoKeKnLNmZOWwayhM8EvrAbvzvq7ihaejKG869cSNA=; b=DWwQGCqpOFRw4I+bvPVC52fRnXetObYMwfXPxm02CO2CZrj1C1Jc48vxNQ+3jA1V/ti19S hsFIJIyupU/+MYISmwpKdvZjY4aIXcYK7jOGmeXDBUz9C4fa009Riqc3kNFJrNrm8sNt73 1lylF658Pyh/tmZ0H9NTlaoyc/LPtqQ8UdbzAYVhqHXFebkn1QzEKrw55+hhoEZl3/jTln HjC3x1/PxkorSCEWSxIw5lwb+XXdJipfRvZ/CcUSqV8909G0VYkM46aQGhwkPmwYIwXFZ7 v9OrpESJF3VUyc+mGAfYYBPRiyi4AjEDbBd5ItUsqRsj8OWQDl461lr+ECnWwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732013111; a=rsa-sha256; cv=none; b=xcHpmxpaIQT65B035tP93e6KlN36ws6iuwCqbHaNORFjZs8NFfxjEIp7MR2XXsAlzUTFoy HRztVzJ5YdzgqCyEDTPXnd4cwyc6fIzWA1PUwehU3fMQOF0TLXIanImtFCA+q3m5M3BV2k vbxsCYgmUppRP1ZqGtYoM7t0glI+zO6fzeMykAWiXWraeqf7D9qPGCG/Az43wFeRG4pX82 Bs7SiTh1yxuWD8IPMZ9OCj3iuQH2j62i+zHNT2jOu/y3egYHlch2kKzZ1iNss3bvniIoSt BrdL3l0owKzYqu1odGIsggCiVcirruuFyxEw+RtsFexev0ID7+uzhkQ7a+YOVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt1NR3z9Xz1Lqg; Tue, 19 Nov 2024 10:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJAjBTZ017616; Tue, 19 Nov 2024 10:45:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJAjBWu017613; Tue, 19 Nov 2024 10:45:11 GMT (envelope-from git) Date: Tue, 19 Nov 2024 10:45:11 GMT Message-Id: <202411191045.4AJAjBWu017613@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: ca1f1d2c9419 - main - release: Add missing dependencies in the minimal OCI image List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: ca1f1d2c9419a5d66929ca6880b69901254645a6 Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=ca1f1d2c9419a5d66929ca6880b69901254645a6 commit ca1f1d2c9419a5d66929ca6880b69901254645a6 Author: Doug Rabson AuthorDate: 2024-11-18 10:05:29 +0000 Commit: Doug Rabson CommitDate: 2024-11-19 10:39:14 +0000 release: Add missing dependencies in the minimal OCI image The pkg-bootstrap binary depends on fetch. Reviewed by: cperciva, emaste, bapt Differential Revision: https://reviews.freebsd.org/D47661 MFC after: 1 day --- release/tools/oci-image-minimal.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/tools/oci-image-minimal.conf b/release/tools/oci-image-minimal.conf index 122da1905436..82e2ce6a1bd3 100644 --- a/release/tools/oci-image-minimal.conf +++ b/release/tools/oci-image-minimal.conf @@ -12,7 +12,10 @@ oci_image_build() { FreeBSD-runtime \ FreeBSD-certctl \ FreeBSD-kerberos-lib \ + FreeBSD-libarchive \ FreeBSD-libexecinfo \ + FreeBSD-libucl \ + FreeBSD-fetch \ FreeBSD-rc \ FreeBSD-pkg-bootstrap \ FreeBSD-mtree From nobody Tue Nov 19 11:40:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt2cj6gxMz5dwPT; Tue, 19 Nov 2024 11:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt2cj648Xz4mKC; Tue, 19 Nov 2024 11:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732016453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BMsoTRA9x81x40QnwiEUxBI3lLe++xU8fBlC8zMMvnY=; b=ygK2lLzrdm+IGCrVPpu8fZasoppnOxPm6VSIev0qpP8m2d1FmmYoxTIWqzwKwPYXi1WSv8 CbrUtlhrVkjDPxj2F9O01w0U8JgkaHI2NvyxBTZHrxxrRghsBOUCifhz4LIOx/Kk42rnEP DIAb7IACM9n/ib3EM7BtSEWV6YPWdQKMCHnC5L7UuFBHMnLnFbG+Y8s29x5Oohf1lUBk2K V/jDO1v+D/DM1Lx0q/IoiCWGoynQB0xYiiDoL0LUTPb9+c74Hm9FgigATltcgh4FCoMEa6 HkLWTE/rDaqnq1ltSVVKTuS4LRlKgI5wg1HOgC5CpbFz4OO3X6gyqpXvknNUfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732016453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BMsoTRA9x81x40QnwiEUxBI3lLe++xU8fBlC8zMMvnY=; b=JjpLyi8ChBYh/68mRLl3B0qF+jo0GHka09ivP+Fd4lmniOkNANl2Gk2S3LKCPMiRo6RXT0 CbQcOsSw3RIpqdZb/KgnyRf+2Zu3hQ+52+Wh5/Z2ve4UGoQNTnv+IleQzbBkOvFi0oaDe8 ORVU3SnsNUAWX7jVHZ9siS33ej5ZeUpv/9fSUkXHbE8V5vb7A62sJ142Z6BrTaflNLCsJo f3AE6FOY9RYcofiY0vD3n7iAuPHAxrzA6uFnWolu7OCczLfBo+VPhxTJbAQxlBQcVH9dKW JQqJDQooO1ooIJs90YbkJVI+Oz/JqLSbP4bEluv+v+Rsv7XuENIEjMVtGMOzQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732016453; a=rsa-sha256; cv=none; b=muaB+7+CbHEdZLZtih76+5W7JdDiyD8b5zgNwxAKCCvCvkaPSAGYyL1eN2Ibf4qtOROMH+ BkVHqzOnptyHQRjkYnkTRli793W+Sdsosop02jfr4k075j+wKoi0FlrXXsSCYLmjDRJ3hE lIvEYmgFQ9Z3BMrPrP5zuQuHcBGzLwGusAbOKsvvz3j+SYZogo7DmfSMkCXj/DVdoBFoFM O34RfHp/+TrQYFn2zTsNnq88a1wWIAkpT85g1YING6FasUG/5W4ChbVWU/hYFe49Y+H1Gd eIVG2xEiQh6CO235QyPe6sewqfLfBaRSiP/qdH2RzEcB9Kp+leg5KHSEuqXTRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt2cj5g9Yz1MTt; Tue, 19 Nov 2024 11:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJBerJG021238; Tue, 19 Nov 2024 11:40:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJBergW021235; Tue, 19 Nov 2024 11:40:53 GMT (envelope-from git) Date: Tue, 19 Nov 2024 11:40:53 GMT Message-Id: <202411191140.4AJBergW021235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 3bcbd391dd7e - stable/14 - gpiospi: Fix module dependencies. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3bcbd391dd7e1376ab7ad37e94f5b746abfc0591 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3bcbd391dd7e1376ab7ad37e94f5b746abfc0591 commit 3bcbd391dd7e1376ab7ad37e94f5b746abfc0591 Author: Dag-Erling Smørgrav AuthorDate: 2024-11-15 05:53:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 11:40:29 +0000 gpiospi: Fix module dependencies. MFC after: 3 days Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D47570 (cherry picked from commit 79af8f72b3aff993703778423e83320df0953a37) --- sys/dev/gpio/gpiospi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpiospi.c b/sys/dev/gpio/gpiospi.c index 15517f74f0b3..682ee5e0c176 100644 --- a/sys/dev/gpio/gpiospi.c +++ b/sys/dev/gpio/gpiospi.c @@ -396,5 +396,5 @@ static driver_t gpio_spi_driver = { DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, 0, 0); DRIVER_MODULE(spibus, gpiospi, spibus_driver, 0, 0); -MODULE_DEPEND(spi, gpiospi, 1, 1, 1); -MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1); +MODULE_DEPEND(gpiospi, spibus, 1, 1, 1); +MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1); From nobody Tue Nov 19 11:41:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt2dC5J2pz5dwXV; Tue, 19 Nov 2024 11:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt2dB4Tpnz4mXW; Tue, 19 Nov 2024 11:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732016478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSNaMQ3i8/Zqz2930oVCWLhO/I9riiYYIrNJTqkzBMc=; b=Sm003DdunqPHVkFdbcnOMP4SWU35x1Jb89TzNQ0SaRKiIoIvbqBtUze1jmFBTTcuqa3GLy OA8h2Wg0eSOjp79XTSSMlBW4ayXX7un1Gi5ygbxk3wc3Si5NM5Rh034MhZljwr0nbW7RjX xX/4LGSqXMVgPjDy0PgNtKr2+8GtchRQMEp3mFtPI+tLYhSULvfeXfKc1vGAupbYMOCTU4 hc/OYSlP9WicyV7o8aTg9kIxtYTS00Yb5e3e0EVCKVSlXMtovwwElRHKDA75ju/S8FS5yg yQhOs+SC00csaxl4WfNQ0XVC/rcicSuniB6MVsXB4iGo3CDltG70bYHj99w8Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732016478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSNaMQ3i8/Zqz2930oVCWLhO/I9riiYYIrNJTqkzBMc=; b=iEBSXmcW8uyavB0pELpRrsaMkf7Aht1CMStQ/Qpn+fDFNhq1ieecZ1r1Ce4zx0ZuZMd2GF Qr96N+hGSDrvpqpVsGopSXN1c5fyktF1ELWXRGu9/tEIfDI/Vw+IHfo6Ln8neXk0M9NmuI 8tKk6Npu6nC7kZ/iiZaZeMujL/z/IxHp8pNS6M0OkEFOaeLPzfzSy/87DqU3tEt0N5qUKt 3/f7P3QYsUf1LZuLlj9nEgmoJWHDxf2D/fKuOluNdQmH5ZXcQmuU5z/JLyh//orQL8I9YC 4SMDiOuLKQzdWwS9k7dKvXeaWaGVaKGs/0k2z43w7NuOWPuRh5MEtd27TBxE5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732016478; a=rsa-sha256; cv=none; b=FZcp+KXuM3TyBopWSxrwJ/kzQLfm5HGMU30SWlZB7siq6+a7cHMQmgun+oWLUJHIb6DmRy Vtw7QxS4eIAuwsPrh/XJPxuSUuiAhZjanptYfIxkpySDxi5BvxScGmgu5w9TZ8nG7nkeQn yiAZ4P/xkvU6qR+las6pl3NDZ3Fnu5nzkbkOJFwFH8lsTCqZe1z+QC2uoa6frqA2ci7FxP kmHiM3euyvRvNgQr3f10GFlFN3tYBnlZfkMw/U7iWEJxLeY+RUnZgIePEb2fK/WnA5XP4c +9bmFR1cDR2tK2b96PpJO+9cEgLpUshrf7e67rK3xTvLFFykJyPujVHGTZmJWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt2dB45nVz1MvS; Tue, 19 Nov 2024 11:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJBfIie023668; Tue, 19 Nov 2024 11:41:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJBfI9p023665; Tue, 19 Nov 2024 11:41:18 GMT (envelope-from git) Date: Tue, 19 Nov 2024 11:41:18 GMT Message-Id: <202411191141.4AJBfI9p023665@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5d7079bedcca - stable/13 - gpiospi: Fix module dependencies. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d7079bedcca72fd2ab14b2bf1df914234050dd5 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5d7079bedcca72fd2ab14b2bf1df914234050dd5 commit 5d7079bedcca72fd2ab14b2bf1df914234050dd5 Author: Dag-Erling Smørgrav AuthorDate: 2024-11-15 05:53:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 11:40:25 +0000 gpiospi: Fix module dependencies. MFC after: 3 days Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D47570 (cherry picked from commit 79af8f72b3aff993703778423e83320df0953a37) --- sys/dev/gpio/gpiospi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpiospi.c b/sys/dev/gpio/gpiospi.c index 678dfaa70764..c453406ab767 100644 --- a/sys/dev/gpio/gpiospi.c +++ b/sys/dev/gpio/gpiospi.c @@ -398,5 +398,5 @@ static devclass_t gpio_spi_devclass; DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, gpio_spi_devclass, 0, 0); DRIVER_MODULE(spibus, gpiospi, spibus_driver, spibus_devclass, 0, 0); -MODULE_DEPEND(spi, gpiospi, 1, 1, 1); -MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1); +MODULE_DEPEND(gpiospi, spibus, 1, 1, 1); +MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1); From nobody Tue Nov 19 13:57:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt5fv0834z5f448; Tue, 19 Nov 2024 13:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt5ft6nSFz40pv; Tue, 19 Nov 2024 13:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732024679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d8km0XcUvH1vA3QRIQaUW8rjroJ6hnefsiphfmtlHLM=; b=lH5yavyG74udX+D83jwIj26u2mfIIgSCB2xmmv2ayu2DEHEt2McwItTzOBsttGWPCZj55y t1p/VOvxNCZ5y+7AxHyQaittaldto4RZtvvpFzYdYMX7f8law0hiMLGvy2UqF11RtS7GUg xAf5XUOLx0afhhnZzN0zr/kyffPPXCM0bY/0Y5Ls1u6kZju/S6HYVPuBhJmkaiI8zeqTXJ 27np0B4nfC48Rg3pCL8tX9ZIOW4n1rvjJAlqsFgdO5CRwkUqENV3Wph2Zx7ToMs3lNTnyu Q1N+N1RBaMWHG7WccNLFiINzsMBu4bd377poFL7yBO+ldJr/FOfZCXdOcXsk+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732024679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d8km0XcUvH1vA3QRIQaUW8rjroJ6hnefsiphfmtlHLM=; b=DZD3G+PvPcajjkfkKuQP7GrzniIpU4h6Ev2D0CQwmNGSL2BrRS0dtYffWrRHSwjdhhszeE xU8Or4FcG6DsslgXt8YnLi/XhV7iquZxjaU5mNhrmT1AC3GvTlBS4+1S8gi2wjdvs/TEVw LmOCkhDTGwFPEMn0a7eCCaZRRx5ZvElxxB2ho37LDUkHGEWogDDHDPEYnjO5nkAUjNEEdo K2l9j6Sa9nEglrlhM4V3Q8XS42zCdSm3tJKiD9bRH/2tnNVHvu20vTtKKItXql45JEWPXU gTLhvxm+XkO8b/0MfyBs7NVJJRR4qpnjRhkGRBejI6p4liSe8SM+Dx1YuEE3HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732024679; a=rsa-sha256; cv=none; b=fM95+gH4xO7Kt5AdEMbxNXvJ2EGTftuXPPIauiQaRLL7AjzlNdxvBrjFjbiyQdgea0CZgK hPY25FXIBaZ8QiqNH7+FBOptQP/GXM+lAuq0wJjXpqvTFoHgOPqyZABDZrdlLyXqDLlf2J Qsh4VzUfu4+q//tXD6IL6/dN18sH/Bz/7Zc4hG1kYnzgvmDBYYzSIKx9tnyAYZnME0Pw2c gVG6efZ1c2k0XmXFY9QOw3LtCDqU1i1AobDqRFjd22KV04P0Dw+NZH6QOxGBcmw5FIQMhm 6X7QAwaXpZiNzJgKFMczVLi/XyTwkoCd+zVjkFa5BbMify0YBqjWRLspIjbCPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt5ft6Gvfz1RmP; Tue, 19 Nov 2024 13:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJDvwTX072594; Tue, 19 Nov 2024 13:57:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJDvwXx072591; Tue, 19 Nov 2024 13:57:58 GMT (envelope-from git) Date: Tue, 19 Nov 2024 13:57:58 GMT Message-Id: <202411191357.4AJDvwXx072591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d45fb7b612fd - stable/14 - getentropy: Add Git hashes corresponding to SVN references List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d45fb7b612fdab4172b9d348103c46145108810d Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d45fb7b612fdab4172b9d348103c46145108810d commit d45fb7b612fdab4172b9d348103c46145108810d Author: Ed Maste AuthorDate: 2024-11-16 15:18:16 +0000 Commit: Ed Maste CommitDate: 2024-11-19 13:57:43 +0000 getentropy: Add Git hashes corresponding to SVN references getentropy has a comment about a special case to support kernels between SVN revisions r331280 and r337999. Add the corresponding Git hashes so there's a usable reference after Subversion infrastructure disappears. Sponsored by: The FreeBSD Foundation (cherry picked from commit 4ef07eb0802a6353faf79d58719d8008decabae0) --- lib/libc/gen/getentropy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/getentropy.c b/lib/libc/gen/getentropy.c index 38cd515e74d7..060c2760bfad 100644 --- a/lib/libc/gen/getentropy.c +++ b/lib/libc/gen/getentropy.c @@ -124,11 +124,11 @@ getentropy(void *buf, size_t buflen) switch (errno) { case ECAPMODE: /* - * Kernel >= r331280 and < r337999 - * will return ECAPMODE when the - * caller is already in capability - * mode, fallback to traditional - * method in this case. + * Kernel >= r331280 (4948f7bf1153) + * and < r337999 (ed1fa01ac45a) will + * return ECAPMODE when the caller is + * already in capability mode; fallback + * to traditional method in this case. */ have_getrandom = false; continue; From nobody Tue Nov 19 13:58:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt5gc4yFFz5f3Sp; Tue, 19 Nov 2024 13:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt5gc41k4z413r; Tue, 19 Nov 2024 13:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732024716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJgIgHtkv7yTq5Nt4NmB5T/pnpJx/kafjk0h/SZX/zQ=; b=HDneFuRuEmx0OU1K5rbqLvEDH/4yCRkdBPvs/hyOUOC27wNl3NQI2n/Z7mBSzk2iseYGRF sohl1fFXh67mlUUVj0v3kUYYOdBg/1vRqURCMC2S/UcSrOOi2QVuaQn+fjsGCuKbpU6P0o SATCk3eAifoN+quldhKHCcJqKG2G+CtiWwbRvXlj3JlA8egHwpyoOu4SIcGbW7dP/Sfspy E6x0mntAg0bdBqEqNZC+h5a07y7NPbpfdUwlJ2V5Jv+HDvKbnH0QRmMfn0zMiR6R8ZxMkq D2NekWxyscw3QdYDuiepISxVlOlITfde2Kzio/Yp3DUxTyVQQmiBSy9NqVPUkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732024716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJgIgHtkv7yTq5Nt4NmB5T/pnpJx/kafjk0h/SZX/zQ=; b=wEX8SaxKxbYy+8uY2XKQOmSRcoCTlzgHSc1klDzQ7AWnnBPvoh1ZTdLQPMEB+gwULPHcyX s/eYAZOOI+aH+d0AMLSLoaLLPSIs/MV8fOmKeTlipLYvrDipM5rYyj6DGDuy9flVPUu6mu 8+FaVwYLLoJbk0OnZCb440oaTfoiJLICw7VhzgsoI/R44rhGeH5V43/4zuY1CehqFWdgY4 VMEHDitpLxFc2a2zr/WjH1OnWx9Q3T0ZXmHOP03BRC5ZHZmJJcYmgNl84fz3Ed2u1fEnEO 8TvRno3bGnHEt3QRtolxIkfU74iMaBn+V7s4MBviSTv7fkXMj/LbY7Qg+8tMDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732024716; a=rsa-sha256; cv=none; b=rFSg0Y4zFt2e1yqEg9kU49Xz8sBhWwU9Gmbx/rWBeTQlp93yQ8njjhz0aRMbAcQtuCSfMf Cs1UrIcJZdNG05MoE/ZogM/U1lPBr36pX+d4nxtglvKF82XXDtn0LvmG3mwmPw9v19N6Da SdBIlIQncxgN5hkBpxzdf5ogjvxRTpmBrybWSBiM7QwAU5QRrwXnjwzjt2oje9/Mzna76h vG3GjMxoVBOJyLra2koMcPKVMSimaIZcSQ583eyrKUYxnaancAJb3cRdnjQ5JaoNFPdpFK SDdw5BzGd7NMeiIMSH8xWpTM7cyXzQ+HfUZ5GbBCQG+q6fbHLNbRWzpClMj6ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt5gc3Ncfz1Rsy; Tue, 19 Nov 2024 13:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJDwaWu072912; Tue, 19 Nov 2024 13:58:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJDwa10072909; Tue, 19 Nov 2024 13:58:36 GMT (envelope-from git) Date: Tue, 19 Nov 2024 13:58:36 GMT Message-Id: <202411191358.4AJDwa10072909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8db85ff95433 - stable/13 - getentropy: Add Git hashes corresponding to SVN references List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8db85ff95433802935487c0a93b04b8debd3849e Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8db85ff95433802935487c0a93b04b8debd3849e commit 8db85ff95433802935487c0a93b04b8debd3849e Author: Ed Maste AuthorDate: 2024-11-16 15:18:16 +0000 Commit: Ed Maste CommitDate: 2024-11-19 13:58:26 +0000 getentropy: Add Git hashes corresponding to SVN references getentropy has a comment about a special case to support kernels between SVN revisions r331280 and r337999. Add the corresponding Git hashes so there's a usable reference after Subversion infrastructure disappears. Sponsored by: The FreeBSD Foundation (cherry picked from commit 4ef07eb0802a6353faf79d58719d8008decabae0) (cherry picked from commit d45fb7b612fdab4172b9d348103c46145108810d) --- lib/libc/gen/getentropy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/getentropy.c b/lib/libc/gen/getentropy.c index 44cb190f0237..10e7a274958f 100644 --- a/lib/libc/gen/getentropy.c +++ b/lib/libc/gen/getentropy.c @@ -125,11 +125,11 @@ getentropy(void *buf, size_t buflen) switch (errno) { case ECAPMODE: /* - * Kernel >= r331280 and < r337999 - * will return ECAPMODE when the - * caller is already in capability - * mode, fallback to traditional - * method in this case. + * Kernel >= r331280 (4948f7bf1153) + * and < r337999 (ed1fa01ac45a) will + * return ECAPMODE when the caller is + * already in capability mode; fallback + * to traditional method in this case. */ have_getrandom = false; continue; From nobody Tue Nov 19 14:31:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt6PL1Qx3z5f4qv; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PL0wz9z42q7; Tue, 19 Nov 2024 14:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h1+nTSoie1B3Py63PCV7vE3Aog/w6QLl0lbtD57w52c=; b=j4k1a2vnm+fhhcL+8FQGqwHVmFEMMfbt7FsvzcnFzrd/hew/jZI79jKm85UtUuElG7ORmQ NwZdcCN4QcKAD/QhdC5Pct45VfzaTf1MN5wYScij3QQ1byZGCwYzBKfcR7Or+rTK7mFWqH suoRZZ/FX2cE4IKnVy54vJPFhIDDwS+MHIbjK2je7R6P4TJO53BGmed0kjbWyuC2MIsTKW iAnztbJRkB04RqCe3gwwQ7lgseUgpBgO4EWzNdSfujODrAx99+EcBVWUFPAHauvyk8Hkii 5y95/EPyglavNqtq+izCAyePZy1IpsgwCBvkK1NnRuStEt53LghJm9Xf5pWAhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h1+nTSoie1B3Py63PCV7vE3Aog/w6QLl0lbtD57w52c=; b=cjywaKPIPBFEr//g/s9gjoMOxAqojpjRoIhGmtWyjUoPR5KlO/qcl71Ov7lYlzN4yEe+tC 9ExLS19GeineoTkVHQeXRekka/ibv6CAEuIjzCJ2TnRO+tOB0NWpp5NzeTFRfkndDv6gKY o/g59ge7Ac2exgb0+a13NFAtsS+K8LSJblro/fYjr+UhvOGwcqPkBoxoMvAlvFryaSNQ+9 r3O9HSoU3qbnEwFTrcdX9S+/4iJAKPS0L/Sx+mcp7bAveTd9OC51kDsE+qwvGlMESBUoPV q3GYeyR37Naysz5eipwgyCzDH9s5hHl/h7aUDAME6HE6I3yuErjgm+fbEqvhHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026678; a=rsa-sha256; cv=none; b=TQMa53sMsqT7Gs8BbN1JH1fyuY9n7Zf1Lahp7LgE0GeUA6zPEhjOHOp9o0/M9fcpWWrHed /RZphuSAFP5NU02/488Xcnvn23cMwt2VGNC6p2jEd0YpTB5ezM1SDLjxhluSF9omFGwMs9 lSAbOqISqK+9j+aylMTIaGtvydmaHLEi8tDujIE1QYEOTTgH/gjr3sSnbvKzV7V8VfV2/D H6TSFq+drsel69EgtiOLgpEObCLzbZBOLSaNfwy97RDCFmcO+wVXpPjopoZtumkULBuxIm PhFxiwRKayPYdy4ZDaRVPtxTZu7D3kBbfgWMA8NQQ92nhroSIcv5W4UI/NfGrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt6PL0D0Cz1Rd1; Tue, 19 Nov 2024 14:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJEVHVB040782; Tue, 19 Nov 2024 14:31:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVHGC040779; Tue, 19 Nov 2024 14:31:17 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:17 GMT Message-Id: <202411191431.4AJEVHGC040779@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: 1fce096e2a0d - stable/14 - nvmecontrol tests: Fix nvmecontrol usage in a couple of tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 1fce096e2a0d27d53962938c4cc09448d681c079 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1fce096e2a0d27d53962938c4cc09448d681c079 commit 1fce096e2a0d27d53962938c4cc09448d681c079 Author: Mark Johnston AuthorDate: 2024-11-09 19:59:46 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:06 +0000 nvmecontrol tests: Fix nvmecontrol usage in a couple of tests nvmecontrol {admin,io}-passthru's -r option doesn't take an argument, so the tests which added one failed because they tried to open /dev/0. MFC after: 1 week (cherry picked from commit f7c45c012201aff52a83c45c1ba516a855b11ed9) --- sbin/nvmecontrol/tests/basic.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbin/nvmecontrol/tests/basic.sh b/sbin/nvmecontrol/tests/basic.sh index f4a6b9504a3e..83b74721c66b 100755 --- a/sbin/nvmecontrol/tests/basic.sh +++ b/sbin/nvmecontrol/tests/basic.sh @@ -94,11 +94,11 @@ admin_passthru_head() admin_passthru_body() { if [ -c "${TEST_DEV_PATH}" ] ; then - atf_check -o not-empty -e empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV} + atf_check -o not-empty -e empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV} else - atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV} + atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV} fi - atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol admin-passthru ${INV_OPT} --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV} + atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol admin-passthru ${INV_OPT} --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV} } atf_test_case devlist @@ -142,11 +142,11 @@ io_passthru_head() io_passthru_body() { if [ -c "${TEST_DEV_PATH}" ] ; then - atf_check -o not-empty -e empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV} + atf_check -o not-empty -e empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV} else - atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV} + atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV} fi - atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol io-passthru ${INV_OPT} --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV} + atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol io-passthru ${INV_OPT} --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV} } atf_test_case logpage From nobody Tue Nov 19 14:31:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt6PM3lkfz5f5X6; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PM1jTsz436r; Tue, 19 Nov 2024 14:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWJzV2N86RkVbbUlEKm+TPIW5ifXcRy+31AerWpUmHE=; b=TCX9fdl51BmydykWbJJLM5r/nraroO4Ka1kOpkk+aMjtE/Df5RAknnNBuVfcYNsG7A8516 +tN0TvvhjrsQdWOL2NwMaA4ANJwVylpOdchaYEcijVPdNKvjQ7RiEaBtHCHaTZsTvIP2JP UjIJdlBpmt9unVHrg5wIMFIouAFbCiyNfcd6/LhlwBi2LtMHfbuu41wSERYiK7H2Vow92Q kMhb3QKm8rsCdkYjt9cqY+r9Kg3+XIKDRNx19T6l5Aj5ZlKHVdUOlYP3ZDndhsGwybcQMQ Cm7XrfjOU42AtE1vIcGjdWMZUPgMeCrtnfH0KlU5ADet16swIEaaP8Fj8Hd0ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWJzV2N86RkVbbUlEKm+TPIW5ifXcRy+31AerWpUmHE=; b=EY1rErY3E17I7M6w05sfCHrJMbr7PjXaCfizOT80ke5Ngz3TNPFVlDtmoPyPiaWLnGta4v oaB11yEPLDRHHxnJj+ISJTrVuAzh2mTi6SUrGF8q9OgAyzav3N383g1zCWctobs9pTlsbN XZgQ/Hx6FqUi7RJt3/Y1CPGbysAklQ/lt9rMZEyXxKSQXgntbIM8FKJtE1mwan7ACdhDe5 icCjgs+b07PcrX5YtysdJQ8PIvuqfWuXKOCB3ltW5ryXD894xPQ1T1rDY3Ycevgu+daM/3 CQfhmZmgb174yYgnxJPeBuIzuxRkynG83Z/cEQVMXiaHEED2IGqh1aEp69o8AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026679; a=rsa-sha256; cv=none; b=WP+o/jK0FjOcVliP3zqeCeBO7R6mw1xo+STu+DHkmixCzXuAw+7LIrc6bOHytfs0ZQuPlZ LCMcUbTOHNZwhhR0rAHG0bFYbzux77SUyrFSX7ZRzV9/konbF6Vnd96AEQzlKjlJDSe46Z mPNRwRJGqih4Cv2y1GRQ8kXSbN7wjRmW3Y3Q2JtrcNy9kkRHNogSQXl+Vf+63q394L+CWX Vvxh6V/u85dy8dqfD6CrjAW3c+IBdR6V+aQNdUJYAl3HGDib4HMMYJ4lhZVfSTsNYJrPo7 Iu6IDOhrXAOoAyJ7sSRfI9I38CQPA5yUxlPP+RV4El4L0ezTIifk2Lyt0W8yKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt6PM10NSzDdC; Tue, 19 Nov 2024 14:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJEVJug040821; Tue, 19 Nov 2024 14:31:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVJ65040818; Tue, 19 Nov 2024 14:31:19 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:19 GMT Message-Id: <202411191431.4AJEVJ65040818@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: b837ead1d46f - stable/14 - tftpd: Address flaky tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b837ead1d46ff7ae8f715b18277929d8579496c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b837ead1d46ff7ae8f715b18277929d8579496c7 commit b837ead1d46ff7ae8f715b18277929d8579496c7 Author: Mark Johnston AuthorDate: 2024-11-03 14:43:38 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:06 +0000 tftpd: Address flaky tests The tftpd tests all follow the same pattern: 1. open a UDP socket, 2. fork a child to exec tftpd, which subsequently handles requests on the socket, 3. use a client socket to send some message to the tftpd daemon. However, tftpd's first action is to mark its socket as non-blocking and then read a request from it. If no data is present in the socket, tftpd exits immediately with an error. So, there is a race; we often see tftpd test timeouts when running tests in parallel. These timeouts also arise periodically in CI runs. One solution is to restructure each test to create the server socket, then write the request to the client socket, then fork tftpd. This closes the race. However, this involves a lot of churn. This patch fixes the problem a different way, by adding a new -b flag to tftpd which makes it block to read the initial request. Each test is modified to use -b, closing the race. Reviewed by: imp, asomers MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47404 (cherry picked from commit 79c342aaf86feb4efbd15383f54e4fe7bdc9da7b) --- libexec/tftpd/tests/functional.c | 2 ++ libexec/tftpd/tftpd.8 | 14 ++++++++++++-- libexec/tftpd/tftpd.c | 19 +++++++++++-------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c index 32e5f85cf421..3194f266faa5 100644 --- a/libexec/tftpd/tests/functional.c +++ b/libexec/tftpd/tests/functional.c @@ -324,6 +324,7 @@ setup(struct sockaddr_storage *to, uint16_t idx) { int client_s, server_s, pid, argv_idx; char execname[] = "/usr/libexec/tftpd"; + char b_flag_str[] = "-b"; char s_flag_str[] = "-s"; char w_flag_str[] = "-w"; char pwd[MAXPATHLEN]; @@ -383,6 +384,7 @@ setup(struct sockaddr_storage *to, uint16_t idx) bzero(argv, sizeof(argv)); argv[0] = execname; argv_idx = 1; + argv[argv_idx++] = b_flag_str; if (w_flag) argv[argv_idx++] = w_flag_str; if (s_flag) diff --git a/libexec/tftpd/tftpd.8 b/libexec/tftpd/tftpd.8 index 24a743a92e14..1cbbe6975944 100644 --- a/libexec/tftpd/tftpd.8 +++ b/libexec/tftpd/tftpd.8 @@ -27,7 +27,7 @@ .\" .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 .\" -.Dd May 8, 2024 +.Dd November 3, 2024 .Dt TFTPD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd Internet Trivial File Transfer Protocol server .Sh SYNOPSIS .Nm tftpd -.Op Fl CcdlnoSw +.Op Fl bCcdlnoSw .Op Fl F Ar strftime-format .Op Fl s Ar directory .Op Fl U Ar umask @@ -121,6 +121,16 @@ option is specified. .Pp The options are: .Bl -tag -width Ds +.It Fl b +By default, +.Nm +expects an initial message to be available on its input socket. +If no data is available, the server exits immediately. +If +.Fl b +is specified, +.Nm +will block waiting for the initial message. .It Fl c Changes the default root directory of a connecting host via .Xr chroot 2 diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index cef8d0278a55..81bc79fc2c12 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -133,15 +133,18 @@ main(int argc, char *argv[]) struct passwd *nobody; const char *chuser = "nobody"; char recvbuffer[MAXPKTSIZE]; - int allow_ro = 1, allow_wo = 1, on = 1; + int allow_ro = 1, allow_wo = 1, block = 0, on = 1; pid_t pid; tzset(); /* syslog in localtime */ acting_as_client = 0; tftp_openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP); - while ((ch = getopt(argc, argv, "cCd::F:lnoOp:s:Su:U:wW")) != -1) { + while ((ch = getopt(argc, argv, "bcCd::F:lnoOp:s:Su:U:wW")) != -1) { switch (ch) { + case 'b': + block = 1; + break; case 'c': ipchroot = 1; break; @@ -225,14 +228,9 @@ main(int argc, char *argv[]) umask(mask); - if (ioctl(0, FIONBIO, &on) < 0) { - tftp_log(LOG_ERR, "ioctl(FIONBIO): %s", strerror(errno)); - exit(1); - } - /* Find out who we are talking to and what we are going to do */ peerlen = sizeof(peer_sock); - n = recvfrom(0, recvbuffer, MAXPKTSIZE, 0, + n = recvfrom(0, recvbuffer, MAXPKTSIZE, block ? 0 : MSG_DONTWAIT, (struct sockaddr *)&peer_sock, &peerlen); if (n < 0) { tftp_log(LOG_ERR, "recvfrom: %s", strerror(errno)); @@ -246,6 +244,11 @@ main(int argc, char *argv[]) exit(1); } + if (ioctl(0, FIONBIO, &on) < 0) { + tftp_log(LOG_ERR, "ioctl(FIONBIO): %s", strerror(errno)); + exit(1); + } + /* * Now that we have read the message out of the UDP * socket, we fork and exit. Thus, inetd will go back From nobody Tue Nov 19 14:31:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt6PN5kNWz5f4qx; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PN2tB2z42t4; Tue, 19 Nov 2024 14:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1UfRqYl/3ROvVWhfjSxAKBGNQdfNp5/puJWw5Y+TwXI=; b=WgEvgvZp6z2e3xDPlm98V74zNenJWEUsNJURWmJ7U7xPN66tUBdX43Oa6aOxeR1NoGisYD y3DkDd7pzlYtqHKyjThBjBGDffBkcLPDnsySK1jee2GEdiMKjwnuno13R5lvYRhKZwHCRe YjWbnG85sj30pQFMRmpOMdoUmnIIw0kXOVt/Vzz/16Y/Q/pQtYywLeZtTMZTAUcZLN9rfy 5yuy31iTHxSj6RLdW1ZPEgsOUmSLFj7ZU/JXQwzOuwb7QUgUDoZjPbM/1PTKxrqMB4NBVX 7VBJHuppby5zYmGLDnBc/aT7YyFWuqcmb0v5VEzD+Cl7449xPmdgVx6lkPjC7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1UfRqYl/3ROvVWhfjSxAKBGNQdfNp5/puJWw5Y+TwXI=; b=vRY7POgZ1QgKHz6lgXPKW150uM1rEU6Uo2IeqBRh3EaAvtBYRsslgF2iz0KWIXclOJG/ja tveKbkrOZVqKnbduABiE/tppPM9CSP1N+UYDyQdTT1yjXtqiBpUnoqAnivQ2PN29ggk8Dh AiWhrL4gMXklsGbeHTam2R2erYtMJ1apd36Jg6IJlBTHz9/x4/ZRgfAJIf3aN7xXA+8cdM R0uNfe31wnwOywI5tQncnD/El4xU1mBVK6pDOYVLohUA8dvVYczX1LCNSYEfkDwFGvChkg jv0ICgNFGbBX8YJjIp6uZC2f5Q+j9bn3jf/OuPOTZ/dmABfpNr416muog/BP9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026680; a=rsa-sha256; cv=none; b=Q5iiObGOfk0LC1iWPcomsekL5+yMEl3RxLP3ZfQD/hLu+4m26uyH39fsk4UA0W78Y2P0AU 8YyhCI2sehIgv9L0nOw1XOMVgmIHiDZweT7jUD2tgMlaf/5sPi2bZzMWcU1U7pfWUJThNc DgGQWaNWIMAg4T8hBQvP1eqIPogJwzU27kBQma1tON4+8IWSIOZ1OIf5s5Hs1HUu9Z6w4p MyY4j5rc5aARimIIsKt3//w6iPtuz3mhff0j0L5zcy0XdW7LT0dJMlgKZQsbFnjQcYd+4F IsMBPNfd+375dYBWiztr3tgF1WcxNFRA9pu9G0QBT25/cGWwY0JM88D/ATE/Eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt6PN21h4z1SYG; Tue, 19 Nov 2024 14:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJEVKJT040881; Tue, 19 Nov 2024 14:31:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVKCG040878; Tue, 19 Nov 2024 14:31:20 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:20 GMT Message-Id: <202411191431.4AJEVKCG040878@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: 9623b69b1dc3 - stable/14 - file: The f_ops table pointer can be a pointer to 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9623b69b1dc3040f532ff1731a577b63afec9b10 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9623b69b1dc3040f532ff1731a577b63afec9b10 commit 9623b69b1dc3040f532ff1731a577b63afec9b10 Author: Mark Johnston AuthorDate: 2024-11-04 19:38:33 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:07 +0000 file: The f_ops table pointer can be a pointer to const No functional change intended. MFC after: 2 weeks (cherry picked from commit c477d8974374402a16a42f5d62fbda19070a12a3) --- sys/sys/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/file.h b/sys/sys/file.h index bfc2c6ab4652..c1439b9bbaac 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -188,7 +188,7 @@ struct file { volatile u_int f_flag; /* see fcntl.h */ volatile u_int f_count; /* reference count */ void *f_data; /* file descriptor specific data */ - struct fileops *f_ops; /* File operations */ + const struct fileops *f_ops; /* File operations */ struct vnode *f_vnode; /* NULL or applicable vnode */ struct ucred *f_cred; /* associated credentials. */ short f_type; /* descriptor type */ From nobody Tue Nov 19 14:31:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt6PP57wRz5f5LY; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PP3Pk9z42lx; Tue, 19 Nov 2024 14:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zkScUdjlDNAjs1171B6J1LTRyqboE2ommXm8OOIK87I=; b=OUDLNlKNFL0Yk02BLSNARWzKqx+pfaONGooPjTpcZ7o+v3uV5Mp31GSJsQ3Xg3S/hy3okh rZcEbXF1Rdpv/Ka0T5Zfa2sqhUAavUobQDWs3z4Mr9kTrnwQefWoQE+bngMTVMiAqcMn6z LULYrM+d4ZhLgxQCEkX2je3xuIPKRLuvIoOqkqn8INxuUCdLnkUxORGeqkb3O0bu0HKBo4 u5DETO94EnBiVotXRVzXvRvmSe/nzQHQEju2n127lyNvLkUW/nos9Ol40hM37DEiQzZilI GgCeimxXYjIE2xV01kj0iFGXCkQCtDbR9riFtGdWIv6LVcmMR1KqvrXLVumxAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zkScUdjlDNAjs1171B6J1LTRyqboE2ommXm8OOIK87I=; b=ICm5wLnP3AOqeRzC4MDpmKoRDm+rmqxvHUe8rtSzezSvpfDEkwzxqX3oQOlrpWOjhhuLtT cnx7qKvGrvm1ZB5d0HiL7MZ+v5g5Xn6uCdsFVzpLvO+wUTlC1kerS26HGGSt105J0EjI6R OsBBU5XL542ISBHGw0+G+/z6htOM5fFRRqRiGxH8nfTz44fHBzq3/+/klAgDEaiU0Rsnng rSmvCftxKKKd4E5+YFgDyp1IEKHUPUEBrYgf32zEJtUm9hl1eohfhkZKanb14qqiSMshUl qvUfZgT3GT2QbpqbGIqAts+fUZmJLVmCyGXWe9H4enaAA40D/Vvyvi0uBj5giA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026681; a=rsa-sha256; cv=none; b=cZexN2BXZdjcbWU6imyff/hQ8ZcWoEObabbHKZgB5oO+dFGdhxNEOvzv2n/NdDi9wlubn4 n7iLmE/0UjdTj7PhZgulPDxRR2hxTXdDHJmHk/wG+wL13LoRG6H+S2qBp2nKaK1xyhHxK8 BUU5meBzV3RbFBL7HNjjpCMYGkkia8iLJKn7UGcsR3jO1+Aub3QCn2X7oUK+XTMwOxUsYe LAr+suOxgjg2CqporV6o+BxoU8B/qLm8rRMnD9E4byQo0XGAUt5dZR8hkJ5vQ/xu70CrPm 9SUs6uHKymE/RRi6GkCF7DSH4YKN7BJPHTMUwTSLozBExThwzretG/yX4csqMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt6PP31Sgz1Rq6; Tue, 19 Nov 2024 14:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJEVLg9040935; Tue, 19 Nov 2024 14:31:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVLsT040932; Tue, 19 Nov 2024 14:31:21 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:21 GMT Message-Id: <202411191431.4AJEVLsT040932@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: b9f9be5d92a3 - stable/14 - sleepqueue: Fix the comment for sleepq_switch() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b9f9be5d92a345a52e1dedffb5fdd2e7b6bbc2e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b9f9be5d92a345a52e1dedffb5fdd2e7b6bbc2e2 commit b9f9be5d92a345a52e1dedffb5fdd2e7b6bbc2e2 Author: Mark Johnston AuthorDate: 2024-11-12 01:57:24 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:07 +0000 sleepqueue: Fix the comment for sleepq_switch() The comment from mi_switch() applies here. PR: 279708 Fixes: 686bcb5c14ab ("schedlock 4/4") MFC after: 1 week (cherry picked from commit 1030ee9128373e7819e5d4a45475ad8cda24fec9) --- sys/kern/subr_sleepqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index bbbf753e3df0..ef921df3b64e 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -539,7 +539,8 @@ sleepq_catch_signals(const void *wchan, int pri) /* * Switches to another thread if we are still asleep on a sleep queue. - * Returns with thread lock. + * + * The thread lock is required on entry and is no longer held on return. */ static void sleepq_switch(const void *wchan, int pri) From nobody Tue Nov 19 14:31:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt6PQ6XPlz5f5BX; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PQ4PR9z439J; Tue, 19 Nov 2024 14:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yQXlgg5/JPwL7MNcMGgPkWpnqUEPdTbCShFSUWFCYds=; b=Z7UPTSxwi3AJ1tqwsPaW1mIkjpznl130v3yikcTOXTEX5DefwddQawiu7+DfMgjDwUQCuE tFhRkvM7dymleV/D/kSEfjxfT+DR1JvNh8VjaECBduh1kHQBZc4fTgccLDtw3CstVOw6oN ii1I86qVQ+sKIlEYNFFhpE+CPIaABlshxRaGs6UoLJgMlRLXDxRHQFeQyGCuVrfBr/ywk4 bg6zfl39a2wGrwRaFj7gbfudmjYCdfR+OKOjMrYGdajNQXPdnX5qTWSt8qMMDoQPQ5/Xes Fm8JaxFqsC9VGF0+WZXoJvQkRAzPx0mxydvgr71m1cy95P2azkvHm15DAx1auA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yQXlgg5/JPwL7MNcMGgPkWpnqUEPdTbCShFSUWFCYds=; b=hQLWZQlbl1VggAb4EOjx7h7T7o8En1BIuXqw7/NVouY5dF/t6s4XVi1xRTLNYN4zpEHE69 XIArwCUlWddfTGRURof0+vr8ycsfDXj39SYrJvtDkyZtrBFgTuhZqaEZsyTsTlAEEvPG4b psvwjNXx3n7FUoZFmhwLFfy7jZY2AiJIVUE/k0h36pZo10W4o0ESAfL4w/FMf2G0x2e9BK stwHoKThSC3eRyUZNQHy92AJ9xe5owrleDp2oQj1RH7xkK2WdKa3F5YEFtSOLE4tQHJhyd x7NemWFmCgyEhGHUXLEFu3UPuIIyVDkb42z5e1zSIgHfYf0D+roX9tV3+77ylA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026682; a=rsa-sha256; cv=none; b=skNiGd9Z+7i/sisn8s1ojbHRq0Ao0JNruHmnTB0SToSO8aVn7z9HfiJHmiT1ieqgJfbDle xhLJUXchO0TZiCqMgfBNwEhiTklsyWOeUSUXCEjg0nt8w9+YyD0ma8po+W/c4NXizse7af hP2AZgjNJN2SMOAeVx6+W/ZhSwoUWju4t9wPiua4AFoxXGs5IhwSXUt4CDWqh3dL3XorQe rX5W8g6aUTPsiob8av/IrC9mSPFAxlmd+VTHz/pdqN+LAO1wsB1S/81kq2k4lbFjgGHQ/8 axfKwTjAlW2P2fCXYlvn2+rXTJePicb09Tfe40iTossmJCHUeF850bq7ifvJGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt6PQ3dRMz1Rd2; Tue, 19 Nov 2024 14:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJEVMg2040995; Tue, 19 Nov 2024 14:31:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVMtu040992; Tue, 19 Nov 2024 14:31:22 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:22 GMT Message-Id: <202411191431.4AJEVMtu040992@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: 476d590738cf - stable/14 - busdma_bounce: Replace a SYSINIT with static initializations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 476d590738cf6cbecb9d2f62ec962d49d02ec96c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=476d590738cf6cbecb9d2f62ec962d49d02ec96c commit 476d590738cf6cbecb9d2f62ec962d49d02ec96c Author: Mark Johnston AuthorDate: 2024-11-12 01:57:35 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:21 +0000 busdma_bounce: Replace a SYSINIT with static initializations No functional change intended. MFC after: 1 week (cherry picked from commit 195402c5c5b7b3236c0680f06b60b7f9465982c8) --- sys/kern/subr_busdma_bounce.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c index f5f27dae9b05..134bc6a5eb68 100644 --- a/sys/kern/subr_busdma_bounce.c +++ b/sys/kern/subr_busdma_bounce.c @@ -85,11 +85,14 @@ struct bounce_zone { }; static struct mtx bounce_lock; +MTX_SYSINIT(bounce_lock, &bounce_lock, "bounce pages lock", MTX_DEF); static int total_bpages; static int busdma_zonecount; -static STAILQ_HEAD(, bounce_zone) bounce_zone_list; -static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; +static STAILQ_HEAD(, bounce_zone) bounce_zone_list = + STAILQ_HEAD_INITIALIZER(bounce_zone_list); +static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist = + STAILQ_HEAD_INITIALIZER(bounce_map_callbacklist); static MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); @@ -128,17 +131,6 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) return (0); } -static void -init_bounce_pages(void *dummy __unused) -{ - - total_bpages = 0; - STAILQ_INIT(&bounce_zone_list); - STAILQ_INIT(&bounce_map_callbacklist); - mtx_init(&bounce_lock, "bounce pages lock", NULL, MTX_DEF); -} -SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_ANY, init_bounce_pages, NULL); - static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) { From nobody Tue Nov 19 14:31:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt6PV2Hm8z5f5Bd; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PV1YJpz439t; Tue, 19 Nov 2024 14:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NM7RXfE4VuwfOUrwjneeSjhRbtvMnzQleR6r3tCFWZQ=; b=i3Q2O9BxFuOO6VavRE3ArkPe1LbFXYs8y8SdwD0u12gBQaLzub+t8FVyOBLj8m8k0FWsNh V75B8WIVXXsWa82ADAuBtZb2aXrnDGS1z9/C6+0s56oQTPTKo3bZv6MSkXoC9jQ1Fyb2oU lURKr8mD4PoolXaAx3y5iiFvRCcvbC4UN4HRyKhx7Gp67BM0yoev1CF4Ii/dW7mOtmAH22 qed308Oc8kep/yTk3U1TZqMKY3rLygN8Nxf3zrhCXIkzTFXM7btaiHdZK3GSie5zxvw4in V+/L+KQSikAd2KW6jieGO5r58JmzeM1TjhW0xoCYOZmgjILSLPFnxbPjvMfyMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NM7RXfE4VuwfOUrwjneeSjhRbtvMnzQleR6r3tCFWZQ=; b=sOZjD36OUGFwh6jrd6NF2xoun5A+ley4x0rTWholRG7YxLgTCVW8cwEaove7Jnlfox95xN 8Srlhny+/faKs+86jZhpM3edzf90TA8c6IrlUXkNbMDGn997NTChFzejfIXWEKgw5Fkeyt ikbpMokfjO+LDUuMbwivBkTeHFe3iL8+wy2yNNQApEb50nPKWCe8EiImMzPZ3F3MRRK/dZ Uc84FyXbyQI06GhnMitCnv54SDAxZETJj61hXXajecNsDlvb4Vc1T2qkBi1OsJjf1NBpnC z6JtGmtfGd3PYfs5AdJOf/+4a5SBRGVN8U21yy7ZHvhNelKd9svkrs7Bq4t6Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026686; a=rsa-sha256; cv=none; b=GuURO6x3lyeRBMeOmQQnJpO31n2ynYjy6PgglT87jfX1umiwndnY9ULQUIcXm4VcvzoWRA hUoa0VCuon0kJCfvbjxgxy5yxvMUQs8VMygDz2Fk9XBcCxMOKQW0j/Qvxd1uQfEuxdY0dV Nw3N8yr7T0kHzXE6O+kHSqaVnMoQQwIaU5ywbVHJ61HT9sZ29g6BTiQC61S9SdFiSndS/q IqfgupTOPU3K+oMulWYiGR6KJIK0dn/r3qQfwVS9YwksUq+6+itEq9ABs20Q3Q7Xbl+QeX e+or6nl630ZQhj1AuJqrqsOCCxg+tgzgPnyZdukQXp3y0xYLMOItfMM7qH1qDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt6PV17nPzDZt; Tue, 19 Nov 2024 14:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJEVQio041155; Tue, 19 Nov 2024 14:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVQ7c041152; Tue, 19 Nov 2024 14:31:26 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:26 GMT Message-Id: <202411191431.4AJEVQ7c041152@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: 5544391d8724 - stable/13 - sleepqueue: Fix the comment for sleepq_switch() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5544391d872495b5517ac16ce9a46027925efc1a Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5544391d872495b5517ac16ce9a46027925efc1a commit 5544391d872495b5517ac16ce9a46027925efc1a Author: Mark Johnston AuthorDate: 2024-11-12 01:57:24 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:15 +0000 sleepqueue: Fix the comment for sleepq_switch() The comment from mi_switch() applies here. PR: 279708 Fixes: 686bcb5c14ab ("schedlock 4/4") MFC after: 1 week (cherry picked from commit 1030ee9128373e7819e5d4a45475ad8cda24fec9) --- sys/kern/subr_sleepqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index d5308b1e929a..727e13891f98 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -539,7 +539,8 @@ sleepq_catch_signals(const void *wchan, int pri) /* * Switches to another thread if we are still asleep on a sleep queue. - * Returns with thread lock. + * + * The thread lock is required on entry and is no longer held on return. */ static void sleepq_switch(const void *wchan, int pri) From nobody Tue Nov 19 15:14:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7Mf3LmYz5f7WF; Tue, 19 Nov 2024 15:14:54 +0000 (UTC) (envelope-from jhb@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7Mf2st1z47kn; Tue, 19 Nov 2024 15:14:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732029294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j/K0sbjJ1U2jQShqgR8B2T21epl16DOPcRZtg2U8rPg=; b=eOKwCIUfGIrf5VFiMMlEZUQAL8hrqfcK4HHDLwqZCWxAMWb8yEfhvmm0DFZKL6FYBCzxcX pvmo4o3jcxWN10T8PlY7gHm/gxJ7sRAz73irYxoX88EZuUq4RTkQwRJwQ+bXamYHHozDVc YgVVxCZTZUbDUU44gYqT/E6ghlFl8lvpc7kUJSKU7mPKt+E/rI30K6DC1Qmjd8u8RU8EZF VZqIWs91mhXvwJNHo1O3gvH4WuPH9NXWVxqrKBacjHPN/HhMAzyWRAsbllAJfz3w5SvogX SQH7WcxsNOGz20xt4K52M5/1qF7GFAvYYD2aZxTgCCIcu18Z+N/sm8ryXv051w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732029294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j/K0sbjJ1U2jQShqgR8B2T21epl16DOPcRZtg2U8rPg=; b=TpnUpxJ7NsBYtfaiWWP6G3XuFmBst3+8MnMpkvuIFT0YJrTvlgaf9fkV2PXDFuza4CBovd nmo51FL68hb+h+FrO2MfVbo8nmr/mDROko4em30FEIMxaZHyEZR3K4tpRwZPvJ6BE6/EAl SUEZaIVR+YGQmwE+1b0yn0o56JWbM/ISF4Wi6t3TCW5iw7l3ZfTpJyVuLsy3svPKIBAQ5H ksh1DEDiEXyn0OA1O8bEXvQd7Lv1jm6T493060NvIxEja6yGNmVC7ogbVagEQjESGh29xM IUn83kHOEbqBmxlK0nJJudlANthLvxhGavMZ7hvLaUSqDx+JqC7JBkV2sySoyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732029294; a=rsa-sha256; cv=none; b=nQdlg3thdsF0OZc3pyS/WNGpFfxdj+ZH+PIrChmWJVr4PtOMX1zNoNgE149vJAHGWijfNt /es678/tkSmw4RievC67HqT5VL7gISReMo+PkyogF0aGy63HwagRN6ljDjYI7m4CW+DxBP Eq8eASA2CVHsYBAAdQ9ZhLQs38J1VzJmbNsWJK8scQI4ro3DnQeYrb/mtq/J95TxyPv63c 0wiaLhswhiQBKK9VnSW9wO74Umn29R+JCTqfgSQscGr/OCIRfayFD1bacl/Akohqs2ZDso aW28uNuClcSUrBxAdgx/CaD5q08jrd5TTqTMnWcKHjKhpIq9bqz2b134XEePbA== Received: from [IPV6:2601:5c0:4200:b830:fd85:22bd:5200:42f2] (unknown [IPv6:2601:5c0:4200:b830:fd85:22bd:5200:42f2]) (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 4Xt7Mf0ZlNzK5g; Tue, 19 Nov 2024 15:14:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 19 Nov 2024 10:14:52 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: e85eaa930862 - main - Have rtld query the page size from the kernel Content-Language: en-US To: Konstantin Belousov Cc: Jessica Clarke , Andrew Turner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> <768D45F9-2F02-4BA1-BFB7-51685486CFCC@freebsd.org> <4d81d34f-4749-4911-b302-eca9166e4be7@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/19/24 22:30, Konstantin Belousov wrote: > On Thu, Nov 14, 2024 at 09:47:30AM -0500, John Baldwin wrote: >> On 11/13/24 12:10, Jessica Clarke wrote: >>> On 13 Nov 2024, at 19:44, John Baldwin wrote: >>>> >>>> On 4/7/22 07:38, Andrew Turner wrote: >>>>> The branch main has been updated by andrew: >>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=e85eaa930862d5b4dc917bc31e8d7254a693635d >>>>> commit e85eaa930862d5b4dc917bc31e8d7254a693635d >>>>> Author: Andrew Turner >>>>> AuthorDate: 2022-04-04 15:05:40 +0000 >>>>> Commit: Andrew Turner >>>>> CommitDate: 2022-04-07 14:37:37 +0000 >>>>> Have rtld query the page size from the kernel >>>>> To allow for a dynamic page size on arm64 have the runtime linker >>>>> query the kernel for the currentl page size. >>>>> Reviewed by: kib >>>>> Sponsored by: The FreeBSD Foundation >>>>> Differential Revision: https://reviews.freebsd.org/D34765 >>>> >>>> This broke relro handling for rtld. The reason is that init_pagesizes() is >>>> called after parsing the program headers for rltd in init_rtld(). As a result, >>>> page_size is 0 when rtld_round_page() is called so the relro_size is 0. The >>>> RTLD_INIT_EARLY_PAGESIZES case was for ia64, and in the early case it's probably >>>> not safe to call sysctl? If it is safe to call sysctl, we could just always >>>> init pagesizes early? >>> >>> It looks like there are a few things going on: >>> >>> 1. relocate_object calls obj_enforce_relro if !obj->mainprog, so will >>> try to enforce RELRO for RTLD itself whilst page_size is 0 >>> >>> 2. init_rtld later calls obj_enforce_relro for obj_rtld, after >>> page_size has been initialised >>> >>> 3. init_rtld is careful to avoid using global variables until it’s >>> called relocate_objects for RTLD itself, but by hiding accesses to >>> page_size away in rtld_*_page that’s no longer true (definitely not >>> true in the case of text relocations, for example, though whether it >>> also occurs for other cases we care more about I don’t know) >>> >>> So I think there are a couple of things to fix: >>> >>> 1. Stop accessing page_size prior to relocate_objects returning for >>> RTLD itself >>> >>> 2. Stop enforcing RELRO twice for RTLD (e.g. add && obj != rtldobj to >>> relocate_object’s case) >>> >>> At least, that’s what I’ve inferred from reading the code. >>> >>> Though, to be honest, things might be rather nicer if we just made >>> .rtld_start responsible for relocating RTLD itself prior to calling >>> init_rtld, that’s what we have to do for CHERI, as do arm, powerpc and >>> powerpc64, and it means you can use globals from the start in init_rtld. >> >> I've done 2) locally which fixed my immediate issue. > Can you provide some more info please? I have a local patch that supports mutiple PT_GNU_RELRO segments, and to do that it removes relro_* from Obj_Entry and just walks the list of phdrs in obj_remap_relro(). However, that defeats the order you mention below of the timing of parse_rtld_phdr(). I hadn't realized until your paragraph below that that local change was part of why this was exposed. It would still be more correct, strictly speaking, to skip obj_enforce_relro for rtldobj, and if we ever supported multiple PT_GNU_RELRO upstream we would want that change. I had also missed the later explicit call to obj_enforce_relro() for obj_rtld when I sent my original e-mail, so nothing is broken in FreeBSD. > obj_enforce_relro() only acts if obj_relro_size is > 0, which requires > the call to parse_rtld_phdr() to fill it. This is indeed called after the > rtld is relocated by relocate_object(s), but so it was before the Andrew' > change. > > I can see a problem if plt is mapped ro and requires relro to remap it > rw before relocation, but I do not believe this is the case for rtld and > any static linker. > > And what is the arch? I was testing on a CHERI arch since that is my use case for multiple PT_GNU_RELRO sections, though the change to obj_remap_relro() is applicable to all architectures. > The RTLD_INIT_PAGESIZES_EARLY symbol indeed should be eliminated, I have > the patch. But let's sort out the page size issue as well. I do think we can probably just axe that code entirely. >> I agree though that having all arches implement rtld_relocate_nonplt_self() >> which is called before rtld() would be nicer. This might still be a nice thing to do. -- John Baldwin From nobody Tue Nov 19 15:15:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7N237G3z5f7YV; Tue, 19 Nov 2024 15:15:14 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7N2116tz47wH; Tue, 19 Nov 2024 15:15:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732029314; h=from:from:reply-to:subject: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=7LzklbFzzByhJ1UNEfdBvjVzUy9/moiajs7RLrs3+zQ=; b=LJz1+sSff+7SCOdgK1ETFoczr1RysnSL3iXS5gtUXac3zF127/LPnQVd/GBQX3eHn5H7eL nA1LDTTyqSLUabEDYT4fg6sGXfQJIyXu67eRtLjBhe6QATN7cm7hvuAUwpU6fXIHU97j+D p6snRRR7hebU0MdDYvXDC1WQLwdTUdXINZ5DPMAC4JRCVP3rgMsc2nJgo2vV1IbSdu24oK 2QRO+1PT7Kcp+FKolqBvF9lyJqcWPMLvn2gOBCDXDvTi4HocJ++pvBgZc1UhXTbGZaY9bN ODrR10sLLWWrmrsb+J0J0vwmG0Ro8Wi92x7RWe0RjBWE1sTZPHVysLL0WHiXMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732029314; h=from:from:reply-to:subject: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=7LzklbFzzByhJ1UNEfdBvjVzUy9/moiajs7RLrs3+zQ=; b=VHkl+DguWOKnesn/zhRFYQmplxfajEYdhZT5rASzlMzRHPQgZr7azN6ZvUBmAkFxC1SP6B xdmc6jz03+ok9fTNpS0iTlT/ttGf4/DSibKde1Q0ijFofScra6BIOumw71wWw6ib1hHp3W M/IPR0//cY9Lz//dyg+inTwcbPnQfOynZNsYYqpTRwaprdg1EbovLFZoA3e5vQOYCx8NKa Ga1ctmTCovk+VT+mfARLWu+Zqjz5WCGwcFaI9TxwcRs/zyePaujVh+6xlGAnAxKL7EqO+F OvjRfgme7Moxxr96ZP3sdlmDe0V+qkv5CX0Vp/oXjN3uXha14mw0cy7iKZ8ISw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732029314; a=rsa-sha256; cv=none; b=lJYBvtSD86BeK7D2Da55MGMyhjwBsw+PLPn7J0ok7FNRhG0MIXfAB8WtZ/ybd80d5XHatt tHin0wTCYk+SuVSQkwqOcgnfMd+fEc8g4/Y9nNqYKVhE1gKTYZe0N2LRsLYRDWf7oXNCzU z3L6aPHchqIZE8zW1aC3OwKI985GSittz/9X2Goaqx6SoEVAFFKy5dAgvGP2HYhNAfV86i saC0QkeRVy6rvnsfiiYzAW2FZ/F/S+h29adM8CAfa0Xz56NJGaLOucSkTz3Ttj+48ljoI4 MYAM6ZXb4vV0n/EJ2neI3w71+U5UuLDPeZk2PJ5fvTvs8jnJhERLBnlzJ3MJjg== Received: from [IPV6:2601:5c0:4200:b830:fd85:22bd:5200:42f2] (unknown [IPv6:2601:5c0:4200:b830:fd85:22bd:5200:42f2]) (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 4Xt7N16ScczLfH; Tue, 19 Nov 2024 15:15:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <0e6393a7-0624-4a24-8537-60917728ae8a@FreeBSD.org> Date: Tue, 19 Nov 2024 10:15:13 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: b882d21558f3 - main - arm: link all .rodata variants into one output section Content-Language: en-US To: Michal Meloun , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202411171136.4AHBaK2D056199@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202411171136.4AHBaK2D056199@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/17/24 03:36, Michal Meloun wrote: > The branch main has been updated by mmel: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b882d21558f37e6a565694ac9b8f2a519e5b86fa > > commit b882d21558f37e6a565694ac9b8f2a519e5b86fa > Author: Michal Meloun > AuthorDate: 2024-11-17 11:28:47 +0000 > Commit: Michal Meloun > CommitDate: 2024-11-17 11:35:55 +0000 > > arm: link all .rodata variants into one output section > > MFC after: 1 week > --- > sys/conf/ldscript.arm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm > index d9edcfac9f78..7cf904ce39ff 100644 > --- a/sys/conf/ldscript.arm > +++ b/sys/conf/ldscript.arm > @@ -17,7 +17,7 @@ SECTIONS > _etext = .; > PROVIDE (etext = .); > .fini : { *(.fini) } =0x9090 > - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } > + .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } > .rodata1 : { *(.rodata1) } Is this line now spurious or do linker scripts prefer more exact matches? > .interp : { *(.interp) } > .hash : { *(.hash) } -- John Baldwin From nobody Tue Nov 19 15:28:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7gY2nmgz5f7qT; Tue, 19 Nov 2024 15:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7gY29tDz4CLx; Tue, 19 Nov 2024 15:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TmCaTIck1gUhtR0dcuICUjZOTLO1xNzAa5MzjO+AjVo=; b=i+Lt9airsir9cO6kkUQdwOtpi8awB0RTy9QjmklLlUZyEuVMz1507HPxqk2cx+fEyWPEY5 3UV0K6WQD/ipvadFHisUFxqAg661v58a8FyAon/hIPxFBxGLtH3YwVXlZomgqKkr+kmFyj qdp0nWGGjtJwGADAolic5WYPRntxrCaKoTiVjfHbpgR846ym6W29jhHT3ZVaWZTlZsSEMR yQjP7w4hoFJbZd0UBJ9jj2Wr97qNx0o+0wPAPBdiSSz3QdQLmL54ZMkHtLuRMphpq22STI bme9bupV+rcNMLbYKvnEqCiL+ZjFpP071VL+r2U9os3n1lx3UT7nBN8hLQOb8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TmCaTIck1gUhtR0dcuICUjZOTLO1xNzAa5MzjO+AjVo=; b=DUh+TtAa6Kzq4/ieXd/8r13zbFw4/U23bLmVRpd7V1ekPgr4e2+rtE3fdK4BxXZt0inUhn tR8035pMqEfqE2+24D7/cdiWHD7cY5u6J67SpV+TFVYlU9U3lV5ARJPj3utrcq0x50MRBG lPZ+9cHP3FsOUuNvvlO5TizpldpN6BYZveLkHh024IDE4sDyKMnxkR7uq2VquL8fTwTJH3 yUSlC/KhXPjnTQ6xFy78RVNJHqKDUhh6XgAq7JGBUFl3jL+Tt/a533ZC/cR9FgnjZh+um7 aMjfG/2hV6IjSAOO5z4BIihFD7yk5Ig1iWe7A/yWNP5gYfzX2fbsgpB8CvKGCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030121; a=rsa-sha256; cv=none; b=HEjH5I9dlITXK36fWGDey49Yfi2GbU+uMyTRHLXvfNKU02y1vxUoWB7ePqCojFJUsoGSah eqE+j3FrH7WdmZ/jj3gvd3dheWW2pxUW7r2mqtt7v9pEItifgGjJrW5+3D5N+SryG5DlIh 0ZzLVTVFqjjBYRjreqx5rvLnZdmkmvIC0poOaGoEh6HxzzWYV4CcMWG+Hnuur3gC+8Blaf eSgyR0wL6KnznbUydJBh33QaJyfNjLnZ34C7S6Ftn8IQJDGilYDrYfpdvm+ro8xy1zCSu+ SRZKDXK2x/KnXLrjrSEW9dm0cG6NmsbcBt8YJnrBI3p6Xv9m4pWQP0OxQLSl1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt7gY1nxZzFVQ; Tue, 19 Nov 2024 15:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFSftD041194; Tue, 19 Nov 2024 15:28:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFSfuM041191; Tue, 19 Nov 2024 15:28:41 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:41 GMT Message-Id: <202411191528.4AJFSfuM041191@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: a474e53d03ca - main - riscv: Add implementations of atomic_testand(set|clear)_(32|64|long) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a474e53d03ca8c78696fc222520de7d6876cc530 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a474e53d03ca8c78696fc222520de7d6876cc530 commit a474e53d03ca8c78696fc222520de7d6876cc530 Author: John Baldwin AuthorDate: 2024-11-19 15:19:54 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:20:32 +0000 riscv: Add implementations of atomic_testand(set|clear)_(32|64|long) These use amoor and amoand rather than a loop. Also define atomic_testandset_acq_(64|long) using amoor.aq. Reviewed by: mhorne, kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47627 --- sys/riscv/include/atomic.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index 03c1327d74da..38261e95cf31 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -266,6 +266,34 @@ atomic_readandclear_32(volatile uint32_t *p) return (ret); } +static __inline int +atomic_testandclear_32(volatile uint32_t *p, u_int val) +{ + uint32_t mask, old; + + mask = 1u << (val & 31); + __asm __volatile("amoand.w %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (~mask) + : "memory"); + + return ((old & mask) != 0); +} + +static __inline int +atomic_testandset_32(volatile uint32_t *p, u_int val) +{ + uint32_t mask, old; + + mask = 1u << (val & 31); + __asm __volatile("amoor.w %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (mask) + : "memory"); + + return ((old & mask) != 0); +} + #define atomic_add_int atomic_add_32 #define atomic_clear_int atomic_clear_32 #define atomic_cmpset_int atomic_cmpset_32 @@ -437,6 +465,48 @@ atomic_readandclear_64(volatile uint64_t *p) return (ret); } +static __inline int +atomic_testandclear_64(volatile uint64_t *p, u_int val) +{ + uint64_t mask, old; + + mask = 1ul << (val & 63); + __asm __volatile("amoand.d %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (~mask) + : "memory"); + + return ((old & mask) != 0); +} + +static __inline int +atomic_testandset_64(volatile uint64_t *p, u_int val) +{ + uint64_t mask, old; + + mask = 1ul << (val & 63); + __asm __volatile("amoor.d %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (mask) + : "memory"); + + return ((old & mask) != 0); +} + +static __inline int +atomic_testandset_acq_64(volatile uint64_t *p, u_int val) +{ + uint64_t mask, old; + + mask = 1ul << (val & 63); + __asm __volatile("amoor.d.aq %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (mask) + : "memory"); + + return ((old & mask) != 0); +} + static __inline uint32_t atomic_swap_32(volatile uint32_t *p, uint32_t val) { @@ -474,6 +544,9 @@ atomic_swap_64(volatile uint64_t *p, uint64_t val) #define atomic_set_long atomic_set_64 #define atomic_subtract_long atomic_subtract_64 #define atomic_swap_long atomic_swap_64 +#define atomic_testandclear_long atomic_testandclear_64 +#define atomic_testandset_long atomic_testandset_64 +#define atomic_testandset_acq_long atomic_testandset_acq_64 #define atomic_add_ptr atomic_add_64 #define atomic_clear_ptr atomic_clear_64 From nobody Tue Nov 19 15:28:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7gZ5GBgz5f83t; Tue, 19 Nov 2024 15:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7gZ3Wy1z4BqD; Tue, 19 Nov 2024 15:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xdyh9Bq3BhzyWEcBnFTlGoTlzuE9g1H8ZSJGP1EwDrw=; b=bs87a2+q3g1Q9Bl6KLZq3Se8UXWuTrgWpTfrHecmfTM3rR3VdUyBdPgGDeEp/gnkaxDfl+ jAyrvYmA24MFkvkqKKjP/Xpab1CgnPzrsxN1LgvM9AIl+BW8HouRGTxHVoSPcGmpsUNDwu 04TrRrSzmEQBiAbwQ7RdEOsj62VlZ2oZL+h7GftTqQFzpB2qkcs+J/MRE8ue9wC0ilVuRB SxMQCanZ4dy9s5uaHOkPTH9d2uV5bq7WcVjlI7DtvYTvMOOsGuXi0hm/KAC0tbMBE/vVqX 5DgwoRSWPD4hl+dnSUTGlKLBuvWE00H5BpTgfZSWFFqzNn/pcbCwsSxOeYs12g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xdyh9Bq3BhzyWEcBnFTlGoTlzuE9g1H8ZSJGP1EwDrw=; b=RdhNDTU9yGt2g91x1UzK6VJMJy6CUYo9q3LgQUngD6YfnsS1GsCqc8hjYHyfj5L4LcQ+Of jK+0VGrPN3SCcfIhGZg6l32M1wh8QZYJ2h2/t9+T4ozRvEhGxwEo6P8znspcWl4b20BDhy k1eFU0PTVKHbZyVQnb/kzA0qNVdGSAVY55zDtjrotGQHomqrpNkP/yWkavwjKPzor6XpVF T9bcwkpn/FpBupwOyXel0UYIQ8JfkP/PGRPd4Unk7NqVAx68ZCsRuwCxosDWVAo4zpeU9h w3GQl02X++9yKWAM2F3L54QqaQ3lb4Oyf/PnFFe5wtEIp4+3QBFZHtXSWEU88A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030122; a=rsa-sha256; cv=none; b=u49zT4QQfSRd9FVsz0qA2ihDj/JbaiMSPPq8ykTAL026QZ0WEQky76dNLrZxnLjmJ+Awbc 7D/5qbbo5C4PyVbCRhjS9naaLbQxMa5yTdgHg8HTPOs0M6vSaawwNqN+OUOxBHkzZ9Jie2 RFTBjTtWvlj1VNoaTiADSrJykIqgn7oXezaT7eB/k7YlcVJ587sSonjbwTTHDWJrHDEo2H d3jHnMBWUjdrVPYJ8uJBW0y05diJRaP+wWMFVO0z4Zjx83ts1qbllNECADqI1DldG9I+LF tniK5+M7GXq29KRNb2xVo5BpuSHE/pnxA0C1LfoDHNODmvlbu573LT8787S+mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt7gZ2mygzFhY; Tue, 19 Nov 2024 15:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFSgr3041257; Tue, 19 Nov 2024 15:28:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFSgHa041254; Tue, 19 Nov 2024 15:28:42 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:42 GMT Message-Id: <202411191528.4AJFSgHa041254@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: 987c5a194418 - main - arm: Implement atomic_testandset_acq_long as a simple wrapper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 987c5a1944183cf82884fdb96b0432bd810aa8b9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=987c5a1944183cf82884fdb96b0432bd810aa8b9 commit 987c5a1944183cf82884fdb96b0432bd810aa8b9 Author: John Baldwin AuthorDate: 2024-11-19 15:22:50 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:22:50 +0000 arm: Implement atomic_testandset_acq_long as a simple wrapper Use a memory barrier after calling the existing atomic_testandset_long rather than using the fcmpset-based fallback version from . Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47628 --- sys/arm/include/atomic.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index cd6f5cf90d8a..c9232a4f97ef 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -954,6 +954,17 @@ atomic_testandset_long(volatile u_long *p, u_int v) } #define atomic_testandset_long atomic_testandset_long +static __inline int +atomic_testandset_acq_long(volatile u_long *p, u_int v) +{ + int ret; + + ret = atomic_testandset_32((volatile uint32_t *)p, v); + dmb(); + return (ret); +} +#define atomic_testandset_acq_long atomic_testandset_acq_long + static __inline int atomic_testandset_64(volatile uint64_t *p, u_int v) { @@ -1098,7 +1109,6 @@ atomic_thread_fence_seq_cst(void) * For: * - atomic_load_acq_8 * - atomic_load_acq_16 - * - atomic_testandset_acq_long */ #include From nobody Tue Nov 19 15:28:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7gc0C15z5f7ky; Tue, 19 Nov 2024 15:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7gb3r2Pz4CQ8; Tue, 19 Nov 2024 15:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bm0Sw+iEb3Ow8+PKRvbYWYdK6NH+ZRxUOPa2rG+Rumg=; b=hvk2RWKbrxU/ch6uTVvrwelaIU1gxBdDQ4iUO2bBmCh1Zim70xbPHD/g0tP7tMryxRWhGq RBzGeSQdUtAVnWJbguipCODChDRVczyWc02y3Uu/Ieji/wbfYp4Rzf+bdpVRJOc4dXtYON MTDbjQy0UEud+dm97/SBO16fuDBc87PS5XeJa8LIaapL+/R7wXkHvL9KEcgJkKIqKfz9fi NioqyWa9hakcl9BDjXf2BwMeIZWhBs9lhSbZmS9mRhJ3+jrajEmU0riIwOQlbfcRtUCZG/ Mmj4YXaJp2piTlu85Gc3NCfON2Bs12Ucplkxj1wsR8bLO4/hcQ4bsSODAy6FEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bm0Sw+iEb3Ow8+PKRvbYWYdK6NH+ZRxUOPa2rG+Rumg=; b=yCvgQhUJAl6lbZHLw0v3ePJ3AofQLBTeVwQ6B3xLOPVmhsX7xfhPHExpW32qK8mahkkL6o WxYEhcfkAJTuhXEZuR45IIzqk0oOTB/BgetFJ6//f26XBMCG79EovnrzP3qAUjTngmTlZZ 0r521zbGVRb57NkKnHY8dMh5uotM39dgeqrtsyoqPJGTrCzOAu8/kMZ7JXyYkzlUDK9et9 Nnu9dQ4FQl5JP6NkOMgZxGgHFIWH+r04ECHp7UGtNEfFSE/UgLAifwsTu8yFaPlcLNJdna vjpVB5AWD7FRBUpErE37EkUbnfQ8oslS1FDBYdFHUkzWlU0HpygZW4p1htPKgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030123; a=rsa-sha256; cv=none; b=ZVvBaUBzngWK/+alBuGEWyvJ+VC71YsMC4ujLXJdFmFJ1krlcE/76WkGKmvSFORlKfdL/C /vOpq8jbVD9mzV0nL30zbYcRrzUKS+gJYZ4rgJXUhkxD9sAv+lB8GO4p9qNEVEivWyshXH m6JqfwvJunejlvNgPlAGBEnI7MkMc4DVs3aADIgs80RAkD3TwHUm+cExQfFZ8VyfehsIvo 4KzIssjGfggXrA6yn0NiTFdYLb2YVN1AS6NRj0KW4x3zC8SQjLWEXl61KYTWWDgR1YW9mG A9P4MfU+29HfwXtBvkBQuUdQPsKkM3D6m09CbPbX0Nojc5fb3te6bhOQYTvLMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt7gb3S8gzFhZ; Tue, 19 Nov 2024 15:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFShPH041305; Tue, 19 Nov 2024 15:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFShhJ041302; Tue, 19 Nov 2024 15:28:43 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:43 GMT Message-Id: <202411191528.4AJFShhJ041302@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: fa2091d7571f - main - atomic(9): Remove fcmpset-based fallback for atomic_testand(clear|set) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: fa2091d7571ffbae82dfc828f554745f283adeb0 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fa2091d7571ffbae82dfc828f554745f283adeb0 commit fa2091d7571ffbae82dfc828f554745f283adeb0 Author: John Baldwin AuthorDate: 2024-11-19 15:23:15 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:23:15 +0000 atomic(9): Remove fcmpset-based fallback for atomic_testand(clear|set) All architectures implement a MD version Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47629 --- sys/arm/include/atomic.h | 4 --- sys/powerpc/include/atomic.h | 6 ----- sys/sys/_atomic_subword.h | 64 -------------------------------------------- 3 files changed, 74 deletions(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index c9232a4f97ef..1fef40aea2e8 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -892,8 +892,6 @@ atomic_testandclear_long(volatile u_long *p, u_int v) return (atomic_testandclear_32((volatile uint32_t *)p, v)); } -#define atomic_testandclear_long atomic_testandclear_long - static __inline int atomic_testandclear_64(volatile uint64_t *p, u_int v) @@ -952,7 +950,6 @@ atomic_testandset_long(volatile u_long *p, u_int v) return (atomic_testandset_32((volatile uint32_t *)p, v)); } -#define atomic_testandset_long atomic_testandset_long static __inline int atomic_testandset_acq_long(volatile u_long *p, u_int v) @@ -963,7 +960,6 @@ atomic_testandset_acq_long(volatile u_long *p, u_int v) dmb(); return (ret); } -#define atomic_testandset_acq_long atomic_testandset_acq_long static __inline int atomic_testandset_64(volatile uint64_t *p, u_int v) diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 77ee5d8c6d46..47fd9ce30fd6 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -1093,12 +1093,6 @@ atomic_testandset_acq_long(volatile u_long *p, u_int v) return (a); } -#define atomic_testandclear_int atomic_testandclear_int -#define atomic_testandset_int atomic_testandset_int -#define atomic_testandclear_long atomic_testandclear_long -#define atomic_testandset_long atomic_testandset_long -#define atomic_testandset_acq_long atomic_testandset_acq_long - static __inline void atomic_thread_fence_acq(void) { diff --git a/sys/sys/_atomic_subword.h b/sys/sys/_atomic_subword.h index dc1b2f23e731..dad23383f642 100644 --- a/sys/sys/_atomic_subword.h +++ b/sys/sys/_atomic_subword.h @@ -205,68 +205,4 @@ atomic_load_acq_16(volatile uint16_t *p) #undef _ATOMIC_BYTE_SHIFT #undef _ATOMIC_HWORD_SHIFT -/* - * Provide generic testandset_long implementation based on fcmpset long - * primitive. It may not be ideal for any given arch, so machine/atomic.h - * should define the macro atomic_testandset_long to override with an - * MD-specific version. - * - * (Organizationally, this isn't really subword atomics. But atomic_common is - * included too early in machine/atomic.h, so it isn't a good place for derived - * primitives like this.) - */ -#ifndef atomic_testandset_acq_long -static __inline int -atomic_testandset_acq_long(volatile u_long *p, u_int v) -{ - u_long bit, old; - bool ret; - - bit = (1ul << (v % (sizeof(*p) * NBBY))); - - old = atomic_load_acq_long(p); - ret = false; - while (!ret && (old & bit) == 0) - ret = atomic_fcmpset_acq_long(p, &old, old | bit); - - return (!ret); -} -#endif - -#ifndef atomic_testandset_long -static __inline int -atomic_testandset_long(volatile u_long *p, u_int v) -{ - u_long bit, old; - bool ret; - - bit = (1ul << (v % (sizeof(*p) * NBBY))); - - old = atomic_load_long(p); - ret = false; - while (!ret && (old & bit) == 0) - ret = atomic_fcmpset_long(p, &old, old | bit); - - return (!ret); -} -#endif - -#ifndef atomic_testandclear_long -static __inline int -atomic_testandclear_long(volatile u_long *p, u_int v) -{ - u_long bit, old; - bool ret; - - bit = (1ul << (v % (sizeof(*p) * NBBY))); - - old = atomic_load_long(p); - ret = false; - while (!ret && (old & bit) != 0) - ret = atomic_fcmpset_long(p, &old, old & ~bit); - - return (ret); -} -#endif - #endif /* _SYS__ATOMIC_SUBWORD_H_ */ From nobody Tue Nov 19 15:28:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7gc6Lhsz5f7mh; Tue, 19 Nov 2024 15:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7gc57Yfz4Bs6; Tue, 19 Nov 2024 15:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GLtilZBRpUILGrE+pfAM6beym5URXzuNU6WHsAEyyVA=; b=BuTJCYZKDkAlYskdCStc/rMv5vJo3n+2RtxnUHmbDDrr8jAtw68STJCmyYFcp/C9sWqhZZ AGEEmItCqfto7IsADtycPKhqOHLBL3eMuSPzbl+xr16qKNlp8GDyfpOC4HeK9Nzgx6JYxH ILXsiJD84p7RDEe3T3wouBICSGI2mEO0eVGgYIFAXtTtdjTF/4mxceBCaSp+RB/cjKcKxg +gO44WJbASQUjCGYLxIo7bAtNgHwrRdR5SX68LC8mvz0rwppNPV5ABBJMNMCa1pu+77TBx MWw1CCIG3YNIQfKh0x/AAxoNli5EBSRTeebD4oEtMmaRVz54T2y+V4uuDX1h7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GLtilZBRpUILGrE+pfAM6beym5URXzuNU6WHsAEyyVA=; b=fa489k95BUg4+xVxsNhpxhEGoLLYMxAnTSmvzYCmiQXtZONQnTSnbhgSoAB4pvUCkI14X7 oWPjcY6MtGjqXb1Z/L+PWXCGbEvF8qWWehr79x7ZaXt6+7mNkHDAYPVc0M/pBjRzT0/1yZ 5iM496XY+iTw06pj5gztGX5+suxv5mq7nQApdCfz13E0iz/6RYBIwE4Z5MDCs1OUfvdKGh hafclWq4b3eECmJNU5wVX72QssUzVv6WbNJaxJmyCwJTIPq2LdAOTIUjGWh1eY+S3bCdof wUqkvV8lS0qPUrBybA2cNbDYPQrV02nT/qBpOo4YY6uzyjkvxsU0JUYqk0UrsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030124; a=rsa-sha256; cv=none; b=Qc6CTG+CWmHo6L5vIWcO2+ypHk2NqGrUuxuFXLfLDD0d5dRtQIHU4nluLTYX6w3ibxHp9L PPRnH4HwETK1r9uHNQciWyn3bfiFs8Utvh9sy1+lDVREpM3aJy3/IIwUTE+m0AgiF7/sMe SLdInEchvTaUcZE2z4qfAdptUUzaMDxH81LcQGiN/IAG773JsW4lHqync8hxluEatgPmJS EMfTH4ziF2eWTUrM1V89Ia9VTy04lB0EHPTGSIjIfOWxQJrr9/kLLzrUzs0UGeDapcO/jq Mai7hDzMjEP19HwJ7xdBEIdsAWL66oUS7YWGnbz5Oc2SbK2MRgYr3VJmaCSV6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt7gc4gF2zFhb; Tue, 19 Nov 2024 15:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFSid8041347; Tue, 19 Nov 2024 15:28:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFSi8c041344; Tue, 19 Nov 2024 15:28:44 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:44 GMT Message-Id: <202411191528.4AJFSi8c041344@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: 3ca22e1e8fc8 - main - atomic.9: Document atomic_testand*_64 and atomic_testandset_acq_long List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3ca22e1e8fc8ce927b3d064b29dfdc5df252e102 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3ca22e1e8fc8ce927b3d064b29dfdc5df252e102 commit 3ca22e1e8fc8ce927b3d064b29dfdc5df252e102 Author: John Baldwin AuthorDate: 2024-11-19 15:24:06 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:24:29 +0000 atomic.9: Document atomic_testand*_64 and atomic_testandset_acq_long Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47630 --- share/man/man9/atomic.9 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 98d392dd6032..436cfb7ee225 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -20,7 +20,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 January 16, 2023 +.Dd November 19, 2024 .Dt ATOMIC 9 .Os .Sh NAME @@ -480,10 +480,13 @@ and .Fn atomic_testandclear functions are only implemented for the types .Dq Li int , -.Dq Li long +.Dq Li long , +.Dq Li 32 , and -.Dq Li 32 -and do not have any variants with memory barriers at this time. +.Dq Li 64 +and generally do not have any variants with memory barriers at this time +except for +.Fn atomic_testandset_acq_long . .Pp The type .Dq Li 64 From nobody Tue Nov 19 15:28:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7gg246Wz5f7l3; Tue, 19 Nov 2024 15:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7gf72FMz4CSP; Tue, 19 Nov 2024 15:28:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BxLiozocYwahAWArXE+wgbJL60QexL5nrILTZ6sARcg=; b=iX13wHU6FeA1pR4sSuvyOX9SP6RkNagT71dS0WMvTKK52l5Kw2jQA/n5vWIHzz6QkQvXuz v50vfnbsbMaU6MUZVcxSo6L+KlFIFPxygBnMR+ar5wwCe0+RaJPiIBIdoychCHA2OZz9jB i3uBsneHgaFH0LJUjAEEXmHnQ3S9Mq6bZ6BKGm0zzIuYpCHOYG9h5G5g5lNSF0WmCSOV/k /+x63Jj4ZY73X78ZiOHqauU+W3z31ykq0Qkr7MrrIPnuXRbvy1gJ3NkH/AAYJeIVcs9i82 iObuWdWjikuMc/4aSnCCkYnzhDLvCQWh+2Foyb9dNEXKI9juYqcsZxHemJpJnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BxLiozocYwahAWArXE+wgbJL60QexL5nrILTZ6sARcg=; b=YWMXIKvOpQhGzWIFovdfo7RTd0XCvoT12ClzfkaTEhCZhQweycRQvGnvz9XKfiQc7+llzS MLGKFVPZlaMPOqfWLczROyZKnaZ+ienvzPVrrPN9LDdLM+Q7G4zd7qU5syf3YH690zxlsD F4Po7GM3W6FI/Ti2BsBfZL/AIHFFgI6WokUgmeqxIl6vEIcU9pMSQQTBViJeF5sVQtCXDo VYj3jfGq8fVw1dl4B2crRthi9OQYPMwoXGvagNLmNkYefcMKfw5ti+7EB642zuxGnGsfQV UIy81wiH5eOznW94nsGvVFNP3GYeZC1P3yoxCYz9OYzTBxE8By1PJrLseY2Pjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030127; a=rsa-sha256; cv=none; b=p3D5AImU2J0rXA5+shvvDfYcUL+tgSczyE2KSvxF8SMyyfW1JIDdsCUSEl0UwY5GieMuC5 L7/PF98zuyLv3oRH3o/8Xv3IZLt3HMnpMk7jLhzFPpEOvLQTvG2d8z6OieLGPMoGxQ+qiU 8yrE0yTvOoC+SHFV1YD3WHo7vTbelXfP+2r8phbF8ZsfDOYCH/lbOOLarkij6WiV7xiiJg fPOUUmwFRuh7aqWsI3e3QM8j5DzLVJWc6/iKEfrYjZ6pPGTiExNvUrUmfG5DvGN8avK8Nx v77I5DhCpNkOvrAGBYZvE9xB2VYq0Rtq4RdgVmqNhcmuyomYQ0f8M4QktUsHpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt7gf6fp3zFVR; Tue, 19 Nov 2024 15:28:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFSki5041419; Tue, 19 Nov 2024 15:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFSkbq041416; Tue, 19 Nov 2024 15:28:46 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:46 GMT Message-Id: <202411191528.4AJFSkbq041416@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: 590e7a0eb5b9 - main - rangelock: Use atomic_testandset_ptr List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 590e7a0eb5b96225a2b856403b731ed9b063c030 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=590e7a0eb5b96225a2b856403b731ed9b063c030 commit 590e7a0eb5b96225a2b856403b731ed9b063c030 Author: John Baldwin AuthorDate: 2024-11-19 15:25:08 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:25:08 +0000 rangelock: Use atomic_testandset_ptr Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47632 --- sys/kern/kern_rangelock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 3437e3da77ba..59112acfb03d 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -364,8 +364,8 @@ rl_e_unmark(const struct rl_q_entry *e) static void rl_e_mark(struct rl_q_entry *e) { -#if defined(INVARIANTS) && defined(__LP64__) - int r = atomic_testandset_long((uintptr_t *)&e->rl_q_next, 0); +#if defined(INVARIANTS) + int r = atomic_testandset_ptr((uintptr_t *)&e->rl_q_next, 0); MPASS(r == 0); #else atomic_set_ptr((uintptr_t *)&e->rl_q_next, 1); From nobody Tue Nov 19 15:28:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7gf1k0tz5f7mj; Tue, 19 Nov 2024 15:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7gd6RDXz4CRn; Tue, 19 Nov 2024 15:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4sIGlC7l0m9BXJnJ1gHqyq7Uc14Nj/hALVDQqCMJHeo=; b=dy8CYg8+LidEhO2R2Q8SUlf0FxNZ5X+7SGyZg/yHhiAC9UuUPJlnqaMbH4bap6B0yAW9CV duQfZnP54sywqyhwDnvoWWtZJImubg8xpQBi4jKoQADrbFO3SBpuqISH9QEAchMk6JRld5 VQsRcET4RbajbuZrjlwbyshD0prPlaJ+T07Gtd+PGIi5NIAMtglfztSh1AMB6NS43MJOiw JIWbo+j/Gl8e/EcNq942Gk3eYmrIi+KhaZ9STe/7YbRzBLBNVP5V1NS9Tnxk0tBWS28HqZ NEc9zepmLLj4v/sypFAGHVAaLZdYU1hWT+hzQmx30Zxq1q+gsG1ECVHrlTikDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4sIGlC7l0m9BXJnJ1gHqyq7Uc14Nj/hALVDQqCMJHeo=; b=iQTGk5Hkb82arw96mdpB53AzPzITjBm4zGdChBdNT255J2yOkzOLrOe4BIZ/3XyxrwHTTi bK4krwcX03XuxwOFHxrGWuTYsF1OwnBVcekeblxCv2KS+gQ4bisU4ApkIjgk8rTT5XpvR1 45TKPn6YoxUMfwEqMZt/3rvJTyruIjbcawWRzPAy29TDiKQ1ywxBIXSk8g82H+sd2mklJ2 W2hKnkC1dvdnNhuN/qbgwwnirV+cJoeJ94ip1faeCMzxH8f2HzworKEQNZEMlD2pHjVy4n QI0NtkjIPkNfD6+1ofGLYIVJS0mApXR/+RdGOW9sz5zSerj7KnssjXyvAkAV+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030125; a=rsa-sha256; cv=none; b=JtF+Z0tuiOylx9cW8dEjAF76WPpgNLDH8FmUVesxLG0/nFYOHSpYqAV4mpmsAwFFFwBfp0 rEE56V9grSnuaC1PP9cO37DOUt2UTExFaDo/5sL9Dr/RqrVOoT+Kg/qTtY7BhCrVGqfhoU OhsgwmAfuuuaj77X88ESI8YH38vpVucMsPUdPnX+k1JxaFQkX1Vgtg0QBSHC+fXdPkrmXG IH3FUjhPKb9X7Z5m2Z/dkYVs76JgdqpFVBK+zXWdeDR6WanU7boMZezOA/6nHbkMIjfFUH 7JUfVIzSbvMyhtTGALwaPtqkQPYSzROHDhxNctpiVJbPcskELxob3tjARZC4fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt7gd5mFMzFRw; Tue, 19 Nov 2024 15:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFSjMb041383; Tue, 19 Nov 2024 15:28:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFSjCD041380; Tue, 19 Nov 2024 15:28:45 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:45 GMT Message-Id: <202411191528.4AJFSjCD041380@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: a80b9ee15aa0 - main - atomic(9): Implement atomic_testand(clear|set)_ptr List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a80b9ee15aa0f2da9f9f0c48e13324e0e5f2e840 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a80b9ee15aa0f2da9f9f0c48e13324e0e5f2e840 commit a80b9ee15aa0f2da9f9f0c48e13324e0e5f2e840 Author: John Baldwin AuthorDate: 2024-11-19 15:24:50 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:24:50 +0000 atomic(9): Implement atomic_testand(clear|set)_ptr For current architectures, these are just aliases for the existing operation on the relevant scalar integer. Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47631 --- share/man/man9/atomic.9 | 1 + sys/amd64/include/atomic.h | 2 ++ sys/arm/include/atomic.h | 2 ++ sys/arm64/include/atomic.h | 2 ++ sys/i386/include/atomic.h | 4 ++++ sys/kern/subr_asan.c | 2 ++ sys/kern/subr_csan.c | 2 -- sys/kern/subr_msan.c | 2 ++ sys/powerpc/include/atomic.h | 10 ++++++++++ sys/riscv/include/atomic.h | 2 ++ 10 files changed, 27 insertions(+), 2 deletions(-) diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 436cfb7ee225..581aac9878c8 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -481,6 +481,7 @@ and functions are only implemented for the types .Dq Li int , .Dq Li long , +.Dq ptr , .Dq Li 32 , and .Dq Li 64 diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h index 75a88e03290e..a8faedd58123 100644 --- a/sys/amd64/include/atomic.h +++ b/sys/amd64/include/atomic.h @@ -589,6 +589,8 @@ atomic_swap_long(volatile u_long *p, u_long v) #define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_long #define atomic_swap_ptr atomic_swap_long #define atomic_readandclear_ptr atomic_readandclear_long +#define atomic_testandset_ptr atomic_testandset_long +#define atomic_testandclear_ptr atomic_testandclear_long #endif /* !WANT_FUNCTIONS */ diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index 1fef40aea2e8..33116d0a6aee 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1076,6 +1076,8 @@ atomic_thread_fence_seq_cst(void) #define atomic_load_acq_ptr atomic_load_acq_32 #define atomic_store_rel_ptr atomic_store_rel_32 #define atomic_swap_ptr atomic_swap_32 +#define atomic_testandset_ptr atomic_testandset_32 +#define atomic_testandclear_ptr atomic_testandclear_32 #define atomic_add_int atomic_add_32 #define atomic_add_acq_int atomic_add_acq_32 diff --git a/sys/arm64/include/atomic.h b/sys/arm64/include/atomic.h index c7aaa76d9de9..f7018f2f9e0b 100644 --- a/sys/arm64/include/atomic.h +++ b/sys/arm64/include/atomic.h @@ -609,6 +609,8 @@ _ATOMIC_STORE_REL_IMPL(64, , ) #define atomic_set_ptr atomic_set_64 #define atomic_swap_ptr atomic_swap_64 #define atomic_subtract_ptr atomic_subtract_64 +#define atomic_testandclear_ptr atomic_testandclear_64 +#define atomic_testandset_ptr atomic_testandset_64 #define atomic_add_acq_long atomic_add_acq_64 #define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index 144b8f1d114c..f48ad55b8029 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -865,6 +865,10 @@ atomic_swap_long(volatile u_long *p, u_long v) atomic_swap_int((volatile u_int *)(p), (u_int)(v)) #define atomic_readandclear_ptr(p) \ atomic_readandclear_int((volatile u_int *)(p)) +#define atomic_testandclear_ptr(p, val) \ + atomic_testandclear_int((volatile u_int *)(p), (val)) +#define atomic_testandset_ptr(p, val) \ + atomic_testandset_int((volatile u_int *)(p), (val)) #endif /* !WANT_FUNCTIONS */ diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index 75d9e75c531a..61466ffbf2ab 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -827,11 +827,13 @@ ASAN_ATOMIC_FUNC_TESTANDCLEAR(32, uint32_t); ASAN_ATOMIC_FUNC_TESTANDCLEAR(64, uint64_t); ASAN_ATOMIC_FUNC_TESTANDCLEAR(int, u_int); ASAN_ATOMIC_FUNC_TESTANDCLEAR(long, u_long); +ASAN_ATOMIC_FUNC_TESTANDCLEAR(ptr, uintptr_t); ASAN_ATOMIC_FUNC_TESTANDSET(32, uint32_t); ASAN_ATOMIC_FUNC_TESTANDSET(64, uint64_t); ASAN_ATOMIC_FUNC_TESTANDSET(int, u_int); ASAN_ATOMIC_FUNC_TESTANDSET(long, u_long); +ASAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t); ASAN_ATOMIC_FUNC_SWAP(32, uint32_t); ASAN_ATOMIC_FUNC_SWAP(64, uint64_t); diff --git a/sys/kern/subr_csan.c b/sys/kern/subr_csan.c index 580e632b05fd..5d0e6607403c 100644 --- a/sys/kern/subr_csan.c +++ b/sys/kern/subr_csan.c @@ -658,10 +658,8 @@ CSAN_ATOMIC_FUNC_SET(ptr, uintptr_t) CSAN_ATOMIC_FUNC_SUBTRACT(ptr, uintptr_t) CSAN_ATOMIC_FUNC_STORE(ptr, uintptr_t) CSAN_ATOMIC_FUNC_SWAP(ptr, uintptr_t) -#if 0 CSAN_ATOMIC_FUNC_TESTANDCLEAR(ptr, uintptr_t) CSAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t) -#endif #define CSAN_ATOMIC_FUNC_THREAD_FENCE(name) \ void kcsan_atomic_thread_fence_##name(void) \ diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index ee60d6baf3fa..52ec5ce13bd1 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -1289,11 +1289,13 @@ MSAN_ATOMIC_FUNC_TESTANDCLEAR(32, uint32_t); MSAN_ATOMIC_FUNC_TESTANDCLEAR(64, uint64_t); MSAN_ATOMIC_FUNC_TESTANDCLEAR(int, u_int); MSAN_ATOMIC_FUNC_TESTANDCLEAR(long, u_long); +MSAN_ATOMIC_FUNC_TESTANDCLEAR(ptr, uintptr_t); MSAN_ATOMIC_FUNC_TESTANDSET(32, uint32_t); MSAN_ATOMIC_FUNC_TESTANDSET(64, uint64_t); MSAN_ATOMIC_FUNC_TESTANDSET(int, u_int); MSAN_ATOMIC_FUNC_TESTANDSET(long, u_long); +MSAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t); MSAN_ATOMIC_FUNC_SWAP(32, uint32_t); MSAN_ATOMIC_FUNC_SWAP(64, uint64_t); diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 47fd9ce30fd6..0c3a57698342 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -1093,6 +1093,16 @@ atomic_testandset_acq_long(volatile u_long *p, u_int v) return (a); } +#ifdef __powerpc64__ +#define atomic_testandclear_ptr atomic_testandclear_long +#define atomic_testandset_ptr atomic_testandset_long +#else +#define atomic_testandclear_ptr(p,v) \ + atomic_testandclear_32((volatile u_int *)(p), v) +#define atomic_testandset_ptr(p,v) \ + atomic_testandset_32((volatile u_int *)(p), v) +#endif + static __inline void atomic_thread_fence_acq(void) { diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index 38261e95cf31..aaa7add6894b 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -557,6 +557,8 @@ atomic_swap_64(volatile uint64_t *p, uint64_t val) #define atomic_set_ptr atomic_set_64 #define atomic_subtract_ptr atomic_subtract_64 #define atomic_swap_ptr atomic_swap_64 +#define atomic_testandclear_ptr atomic_testandclear_64 +#define atomic_testandset_ptr atomic_testandset_64 ATOMIC_ACQ_REL(set, 64) ATOMIC_ACQ_REL(clear, 64) From nobody Tue Nov 19 15:28:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7gh41Wrz5f842; Tue, 19 Nov 2024 15:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7gh18P0z4CgY; Tue, 19 Nov 2024 15:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BGLn4VqPjz2ni325qep+BNSst6kc351CvESg4fxKRwQ=; b=QvED4QixvY1n3pQfkdJQlWxx53Z7qH8TBoF4iVmRNmk9D5ztA8fgtyPLvmzgphKZEnXnOp ahYEwY3tKJpsDQWjtxMXNoyGtACE4kgGFNsyPh0QjHL1XGy2krwSRybrLVM6LA9H7Ua59d a3g9+hg2Zb3yVpJIZVWCa/iYHphw4CxVmtqPyg85Abq8QryTm4wzdlQlsXKix+Xy5g/vTU mzB0l4L6m6QN7HVz/i+KudjZyzpOBzZgZXQ2sHJnqCqFxsuEVlbgPmuoHaanNFs1ba2JUk p1DtuJVozWW1GmCizpAXKTbOqqyBKjxlTDMT7Aa5MYdsi7RL2v4QruQ9SC6czQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BGLn4VqPjz2ni325qep+BNSst6kc351CvESg4fxKRwQ=; b=lHvo5xFtZla/Qt5700WtCyoS407Nzkp+NvUfUFF0E+bhlJMPj5JgzkBMxzlrghQBP6BOL8 Q2kS2nCaemZmnR0NSRDrpFe41QJrCfmavR9w+f7esf8YtUPUnbIYVpWwXNNTZhBYgLtX8G jI57oOX5YXwownmAiBRgbltOeWOO+fa5jSHC91PnzFc/NWD3WGGSSuuqvsX6ORDGELSxsc D+Ic/UhblTtvGgeM0AWlKQkXiIYcbCYYa1AkoXwRqfooZ8Lg197ubniqO+c0+9VrWhnAFK Aq4OdRKCmp3/fniw7IPNJsbg7a3RaaXruwli70VttauljeWDhmmOxp1NebEgKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030128; a=rsa-sha256; cv=none; b=wGtIxdWEUsWWLM31n6D4eHZ98guXIyh2mOoa91VtLzl4o3//1BHiTlFeZAg9eVXoSIIrdT 5vxHsMi1nSmY/gxuQErv1e1o85stcNi8OPIYkfdcKdwJ3uUa2dx0muURdbtmA1c/d2ppVg JUyYGpsDX1ujvkPE/hgCobeU8SF15wJZEoxq+xJJwrBi77soR34E/gbvbuOmjwOM4cJ2lL GIC5KPNcMAFNfTnvAGLHqQfRJmRxdCsf/xw/EvlPbyPGDxd2B2ro0q22PsTmBYx6HLcYMp apgaIfnkxEqsuBkbK+uiW6yXcSXBoojS5FwGsiGM8AECwKae7MDAUCUCncc9lA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt7gh0XnwzG6D; Tue, 19 Nov 2024 15:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFSlJn041476; Tue, 19 Nov 2024 15:28:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFSllC041473; Tue, 19 Nov 2024 15:28:47 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:47 GMT Message-Id: <202411191528.4AJFSllC041473@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: 48a88a4ee95a - main - socket: Move SO_SPLICE next to other socket option constants List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 48a88a4ee95a725a435a817401ea4c0d9c990cd1 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=48a88a4ee95a725a435a817401ea4c0d9c990cd1 commit 48a88a4ee95a725a435a817401ea4c0d9c990cd1 Author: John Baldwin AuthorDate: 2024-11-19 15:25:49 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:25:49 +0000 socket: Move SO_SPLICE next to other socket option constants Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47626 --- sys/sys/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/socket.h b/sys/sys/socket.h index a1b220ce4bae..cc82d97e9dd5 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -171,10 +171,10 @@ typedef __uintptr_t uintptr_t; #define SO_TS_CLOCK 0x1017 /* clock type used for SO_TIMESTAMP */ #define SO_MAX_PACING_RATE 0x1018 /* socket's max TX pacing rate (Linux name) */ #define SO_DOMAIN 0x1019 /* get socket domain */ +#define SO_SPLICE 0x1023 /* splice data to other socket */ #endif #if __BSD_VISIBLE -#define SO_SPLICE 0x1023 /* splice data to other socket */ #define SO_TS_REALTIME_MICRO 0 /* microsecond resolution, realtime */ #define SO_TS_BINTIME 1 /* sub-nanosecond resolution, realtime */ #define SO_TS_REALTIME 2 /* nanosecond resolution, realtime */ From nobody Tue Nov 19 15:28:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt7gj3DGvz5f7hW; Tue, 19 Nov 2024 15:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt7gj1zZVz4CZw; Tue, 19 Nov 2024 15:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqfR0fYzoa83L2Ew864nz7deJL/k/jb0Z6P/MvbHz5c=; b=EsVCBVqjKFDqIvGpyrO/KBZxuLlD+lE6W9WllxykNaliRHvM7baSbjX8IjxKQzK+vh0CPg hS2l2Y4P9WtwDcShHb5vHf+YUZ5mI2eRgm7dUZYZ6isIxTTL7NOCmlefJ07KU03JffLQV6 2mtQ4Glo+i/bfPTKxaqpmc1vzv76Z2icQnckK6L4iZ3MOAfRY7FcWR9o2LpxlY9gW80Av9 XlvxysHPAjzrvSwm2hRuuCeTM554QNY2tKJNo0Co5xURHH+MMT9lCfmFNvFkwZ1Nblpuvn Q+8MUVUHnw09vRQ+mcWRpzO+zHnzrgERk2+FJOowi1KrBnOf7952kYP/dBwBNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqfR0fYzoa83L2Ew864nz7deJL/k/jb0Z6P/MvbHz5c=; b=MP5i7Mm9DrHNs9b+uxC8amCL5TczsfP20j5L5+ySzVdfbv2K3FmYVY2SaCsADcTI9/ErFk c3h6Eyd9VtTnd7AHWfsjQiFB2XqTTY+5XnN+taUiEf72plN2HNRfmZzSgbrv2hbMTPk59p HF1q79C40tGondM/hY837RkKQGyKJUI9zqUdU0DcdbUtCRpQVkhzGQs2rjuTqhBYAKssPP D63imbnij6dqrycr8WV9fhKJlEUL2WEOt2rWx4z8dPUH3+4rnQzZbF/B5UDPuWnQXbbQhx THvdqqJ1ENer4KKBsTLtABmPdRIHYYXY2lJdxEOUOJSzBPqonJoQOoreLj50fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030129; a=rsa-sha256; cv=none; b=cdvstyzxY2S2iuDcfPxyQ/9wNKu7SVP9gv2bHXhnT592rcDFcfVxiaDM4Fz86IefaXdRRp S8q2OZ4lpH1j7EpjWYjrvvIO4LmvBdmF+4EqjquPufg9vMyWmUDqL90GbKotodl5gOiCsw ZI2aVZYhFBgGMpOtgxXA4qKSGjF7wqAzRakhKbQz5j/3f17mkbiRkws2YGU4FMNB9BMGoN oipBXygqAaQmLEJzU6NOgU9Y8uIOAZ1BN/+liA4VmqvHlDh7+koZ5+xwXhFgNzD+ZrXPzN TPycCLHw9y8FzjWHtORDQOcYvzY4+KkikjPicnaqD8/jQpmC/S2H3GzQTQ0abQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt7gj1bQRzG6S; Tue, 19 Nov 2024 15:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFSniF041529; Tue, 19 Nov 2024 15:28:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFSn5F041526; Tue, 19 Nov 2024 15:28:49 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:49 GMT Message-Id: <202411191528.4AJFSn5F041526@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: c7d29adcb3ce - main - vga_pci: Use bus_generic_* directly instead of wrappers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: c7d29adcb3ce6544eb30c6b5489999d8f001cb71 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c7d29adcb3ce6544eb30c6b5489999d8f001cb71 commit c7d29adcb3ce6544eb30c6b5489999d8f001cb71 Author: John Baldwin AuthorDate: 2024-11-19 15:26:32 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:26:32 +0000 vga_pci: Use bus_generic_* directly instead of wrappers Differential Revision: https://reviews.freebsd.org/D47375 --- sys/dev/pci/vga_pci.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 993cdc916d21..5a4749933574 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -378,13 +378,6 @@ vga_pci_attach(device_t dev) return (0); } -static int -vga_pci_suspend(device_t dev) -{ - - return (bus_generic_suspend(dev)); -} - static int vga_pci_detach(device_t dev) { @@ -396,13 +389,6 @@ vga_pci_detach(device_t dev) return (error); } -static int -vga_pci_resume(device_t dev) -{ - - return (bus_generic_resume(dev)); -} - /* Bus interface. */ static int @@ -732,9 +718,9 @@ static device_method_t vga_pci_methods[] = { DEVMETHOD(device_probe, vga_pci_probe), DEVMETHOD(device_attach, vga_pci_attach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, vga_pci_suspend), + DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_detach, vga_pci_detach), - DEVMETHOD(device_resume, vga_pci_resume), + DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ DEVMETHOD(bus_read_ivar, vga_pci_read_ivar), From nobody Tue Nov 19 15:49:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt87r593kz5f90H; Tue, 19 Nov 2024 15:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt87r4kQfz4GQR; Tue, 19 Nov 2024 15:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732031384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vMhFdQnp5jCMnlMdi9IblsyRHiAi1v38W9rqLglTIks=; b=b92ZXtKdmt645H3pQBvSQHzRNQNLOkPU4nE/RcnjVRmqipE3KR+NAgaUQcRYnEESV7G2wz m/6/hAef7MuXFPpbk5+pY8vgnVeGNhhChdSfRDN8SZNQndC+CNEGunZW+y5kk3aTt/lxJy sJ7oqGf8geVF0I64VmWvKCFfod78oKOyQ5MwkCxcr2PGLNg0q0hr97Xdwp+iGnIZFoDFPv ZYb5cMutD5lnceZ67Ao+brbqyx16K/NEgNyuVXyQ4zhtk7xAIbVjCkx8OO4HvGJqq0xee/ BiJ7bEDtgRI9xYbNU20CpB1ptszfGYsNoF7oQzz0bQANCDETiC4PfJLWXy+wxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732031384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vMhFdQnp5jCMnlMdi9IblsyRHiAi1v38W9rqLglTIks=; b=LlunXbzGap9QyCJAWO5QQYRyaaxkXOIO4PW0NH/L7/b6v2dnNAIWOvsawcwrwMkQUg/nY0 NLwVibvABgZ+hDsdYsWOXhfgxzLyGhZGLQalMFT651H4OaofbnN1/qMpvfqrutep5uvE8G ZgVuZ4bN5pXsLLaqGvAT3pNjDhXFuMi61diMM/o3rkv9vvWFOi8KJGCRWn/llb7prwfAc6 4Cd37e/zpJdDMDF117KdrbUN9Ugz2AJgspmQgM4CWo5NJadpcpTMS1Ep6LDRB1faZTwzHU Fu9S3vN620p0eMl+CN1E9CF3MJa6+MyI6uITxQe221vEOxIpEfUDkTjzJGeMwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732031384; a=rsa-sha256; cv=none; b=kVPb+1U6QmDVw3ccVaBPu1nbwQI/mTfGMgAMli0l5bB7+rviJFVoG26KoCdUttoYnWFbWa 2y5cSrFUIQRgNBtlI9JFGOVtzdj6xJAyoZ+SGDRgIgfip1KSF3zn3ytrvQS7VBz0XYn42B euAjngI+V9/UiPaoVKhC2Ytex4vaUG+Z1gYmZt3mZf+dgUYmLx/geJqqWiGAN+YBjVHKFH WyL3Q1cVIb+APz2uKUmdCa3wxw9I66sbE8cyNQR/cYlrLmAdL4aLwCKY30s/Tr2ngYMLfZ nbyrOdrnpHWtp7AZnGcOSphlHdHo5Lss+mOpQt92To4QtOpm7YtWVZAG92YwKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt87r4L3MzGQh; Tue, 19 Nov 2024 15:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJFniwi079226; Tue, 19 Nov 2024 15:49:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFniDv079223; Tue, 19 Nov 2024 15:49:44 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:49:44 GMT Message-Id: <202411191549.4AJFniDv079223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Salychev Subject: git: c2dd2be344fb - main - dpaa2: Fix kernel built with ACPI_DEBUG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dsl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2dd2be344fbf59cf95f6773d4b09cc7dda0f876 Auto-Submitted: auto-generated The branch main has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=c2dd2be344fbf59cf95f6773d4b09cc7dda0f876 commit c2dd2be344fbf59cf95f6773d4b09cc7dda0f876 Author: Dmitry Salychev AuthorDate: 2024-11-18 21:56:11 +0000 Commit: Dmitry Salychev CommitDate: 2024-11-19 15:49:04 +0000 dpaa2: Fix kernel built with ACPI_DEBUG PR: 282800 Reported by: phk Tested by: bz MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47666 --- sys/dev/dpaa2/dpaa2_mc_acpi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/dpaa2/dpaa2_mc_acpi.c b/sys/dev/dpaa2/dpaa2_mc_acpi.c index 2007c18bec67..1042ea56d8cf 100644 --- a/sys/dev/dpaa2/dpaa2_mc_acpi.c +++ b/sys/dev/dpaa2/dpaa2_mc_acpi.c @@ -46,6 +46,7 @@ #include #include +#include #include #include "acpi_bus_if.h" @@ -56,6 +57,9 @@ #include "dpaa2_mc.h" #include "dpaa2_mc_if.h" +#define _COMPONENT ACPI_BUS +ACPI_MODULE_NAME("DPAA2_MC") + struct dpaa2_mac_dev_softc { int uid; uint64_t reg; From nobody Tue Nov 19 16:02:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt8Q85qkGz5f9gP; Tue, 19 Nov 2024 16:02:08 +0000 (UTC) (envelope-from mmel@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt8Q854kgz4JQX; Tue, 19 Nov 2024 16:02:08 +0000 (UTC) (envelope-from mmel@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732032128; h=from:from:reply-to:reply-to:subject: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=YjInUFKgv+TSA9q4YXbvygxq7pPNsQmnYlv1ElI3JYQ=; b=Qus3B35KoWfQH+5qs1k91ZSboR6GVM095Np22aq0ZAnZ9COGx3o3jmsJ7CWU4VtJPW4+H8 aJu/8sanLAT5pSAQ7wYIJl8rqnBtLBkak7h+vOP6dROZc9pGc5SiDAjIQCcCic2sM16G9h lp5Jq16SBnJqBJFTBgo+zcbfGseQNFI5oST0fJOp1PeTnISAtniIbG7rK715nYe83KkHFa zmOyxgx793hVMl1fjQlPJszxOyOE4FxIW3KNLO3jXy4NWWGLUbKejVz8sekhsYOpF7oCQa YU4epOefYQ84X4x2FVR6CPugdhH4nLIQXQwBX3pvCCs2I/C3c+9ub4d0Ni2rpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732032128; h=from:from:reply-to:reply-to:subject: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=YjInUFKgv+TSA9q4YXbvygxq7pPNsQmnYlv1ElI3JYQ=; b=uhTCGqRwCH93Ey+WJLlvFIY6bIjlS+3FWkshlpenOXeXPz38HYC/CwI7uAPYC2WIFEhLCB tdZhZbA++QA3+KvaGkT6JKWwnZMTOGtUcptTfHWWpHOzP5lrJP0yXjQMexfGhwGeFU7PZG EZTTIkFnuyt4UI14TfDCn5fJm5wS6LW5KA2NggnzI59aQwLv/b4tyZjA8Bj4GDuWHDhIcd JP/r9NTdCnIXHIiwBEztSPsLgKTrXUfZ4VoAuSc7XrlbxfPSm8tlZld/4EKHlIfYkzowYf sZuz1Ljm79MqNXRqsLHdJwCWCS2gF8grETcZ9SLSJlvXpCSnsggYukmDwZ5Ayw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732032128; a=rsa-sha256; cv=none; b=ulKK1zSAmkpuq/J4iyrtlwNgUJlNQpF5RX8qs1xCeMxqlTRCjO+25mbhcawC1OGmbZ170W 5GAYivjdUXLCZgSn8DKR3OSdjFGhGHCvT8kKdaVrvbnd2N21M+2xuvmDyJGQlzKrvEIqUv 9vzle/Q5o6ikoUh1RV985hOqRvtUJVQx8yOqWg7gmdw4FG/zKAkWbSN78fbiBjLwh+iaQ/ KmSiIpI0wLLUAORqvxyIjkId2F/uZBkrkr4QV30j0PdYE/hqVD6kJcjH6IqcUIf0cWzUW7 6Jswl5In8n4Wgo21YuHx/45nDhru+PoOS9XfTBuQTNpm7b1BAtrYyv0Wl71iZQ== Received: from [192.168.168.195] (internet-251.radiolinkplus.cz [109.205.241.251]) (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: mmel/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Xt8Q81FdBzKL6; Tue, 19 Nov 2024 16:02:08 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Message-ID: <2ba6363f-3ff9-451d-8843-6bb6abe6a3ac@FreeBSD.org> Date: Tue, 19 Nov 2024 17:02:06 +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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Michal Meloun Reply-To: mmel@FreeBSD.org Subject: Re: git: b882d21558f3 - main - arm: link all .rodata variants into one output section To: John Baldwin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202411171136.4AHBaK2D056199@gitrepo.freebsd.org> <0e6393a7-0624-4a24-8537-60917728ae8a@FreeBSD.org> Content-Language: cs, en-US In-Reply-To: <0e6393a7-0624-4a24-8537-60917728ae8a@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 19.11.2024 16:15, John Baldwin wrote: > On 11/17/24 03:36, Michal Meloun wrote: >> The branch main has been updated by mmel: >> >> URL: https://cgit.FreeBSD.org/src/commit/? >> id=b882d21558f37e6a565694ac9b8f2a519e5b86fa >> >> commit b882d21558f37e6a565694ac9b8f2a519e5b86fa >> Author:     Michal Meloun >> AuthorDate: 2024-11-17 11:28:47 +0000 >> Commit:     Michal Meloun >> CommitDate: 2024-11-17 11:35:55 +0000 >> >>      arm: link all .rodata variants into one output section >>      MFC after:      1 week >> --- >>   sys/conf/ldscript.arm | 2 +- >>   1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm >> index d9edcfac9f78..7cf904ce39ff 100644 >> --- a/sys/conf/ldscript.arm >> +++ b/sys/conf/ldscript.arm >> @@ -17,7 +17,7 @@ SECTIONS >>     _etext = .; >>     PROVIDE (etext = .); >>     .fini      : { *(.fini)    } =0x9090 >> -  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) } >> +  .rodata    : { *(.rodata*) *(.gnu.linkonce.r*) } >>     .rodata1   : { *(.rodata1) } > > Is this line now spurious or do linker scripts prefer more exact matches? > >>      .interp     : { *(.interp)     } >>     .hash          : { *(.hash)        } > Right hit. I want write { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } Warner already tried to tell me the same thing, but I didn't get it :( Btw arm64 has the same problem. This gives me another question. Who generates the .rodata1 section? This section appeared in gnu ld three decades ago, with no real description. Do we still need it? Michal From nobody Tue Nov 19 17:47:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtBl95hf6z5fGBR; Tue, 19 Nov 2024 17:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtBl952N0z4R0L; Tue, 19 Nov 2024 17:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yif/r19ieqKGQVmzQqvm1HtIW44sLIHmh84ehiCYNEY=; b=DM8kDXu4y84bSAm7V+XiOI05/zODkR3QbCwcjyiEYUHahcSWmKvkMAt3Ycl65VfM4XVLh7 THbQ8Hwq/6gXYoQpLLCHfLnuEaE+UhR4Xu9XLoesaJ8iHQA8mzQ4fUSQz4hT5UnudoY7gL Q4CtKJff49BcTyeyxWWDknw5uOzagDHiUvkmN7N+8Q6oHC5PxcQojtMtlQV8IZdExBWM1k MmqOMGgohwj3Yto19wZP6DKx1A4KCrRJSOHx4V2oG/0cogwNE7qxXZMoOWnNPGdI4j/mNK /7GU4Mzd8C9Mh8zgSRWwWRGCLU/FV+hrwKt8jjXL5qrH9DyW49qJHkFbna0EjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yif/r19ieqKGQVmzQqvm1HtIW44sLIHmh84ehiCYNEY=; b=Vbgm2O77vS14v0EQyVpMBFqvRN+BsfjlxZXhu7cWiCe0BUjiU44gTi25FBFl+RE6H204OC BSMVEg3K34mPezQRX5gEbuepp4E6Z2qBcwEEAcg284LX4X+vkCFhKlvaKwZ48JN6ggDGcK 14KaorYKwJD3lBYaDkCNDuAzg3EHYCcLNGUshy+cgrnUOoCGd45H2+EGvf/qyPZkru7OTz +6h32+EeP+aZkU5dAKy4P+/ZD9JEJuUrX/vGUCX6ZQWdVEVJKAPl9YC6ATjOi70kxaamGv YzyMM0WQQVXrPjSEHMt3Y2xpbzxCLZWsXW7BoEf/YUaGWtEEs97Xstet692Jfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732038421; a=rsa-sha256; cv=none; b=l/9BcTunQ3G4HTyBO8inRtSeU4ptkl9/ArUumegQcakcUG/zzQzUGDNXMi08XxfDSeX62w EeL6gABkS+g4JBrIuiD2pyvXcaDgCOKmO8UW+Ecj7f1aFZBwaDTSSiUyESsUEjoKDWTHOI j/40ThbX/AH7MLaBg2ZHxyqAkBq02UXWV2PF8xf3w64wgK8RuFq+B1u0ZNBLPZhDCqtxXP YnIhmbG+atbDaGTpWjceZdHuKMQ1I8ymEDvs4scy8xA2Lm17y9Wu5JYKHsdPJB3qQxDEzp fjds4Gy6E5PNLsgna48RPtZ7MwbymeOQ9kjSBQDQ+8IveuVUWh5RpZramLzsYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtBl94dGtzJlm; Tue, 19 Nov 2024 17:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJHl1nE000829; Tue, 19 Nov 2024 17:47:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJHl1q4000826; Tue, 19 Nov 2024 17:47:01 GMT (envelope-from git) Date: Tue, 19 Nov 2024 17:47:01 GMT Message-Id: <202411191747.4AJHl1q4000826@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: a1330a71d20d - main - acpi: Handle multiple interrupts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a1330a71d20d862eb9d930d87245f23ee4853527 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a1330a71d20d862eb9d930d87245f23ee4853527 commit a1330a71d20d862eb9d930d87245f23ee4853527 Author: Andrew Turner AuthorDate: 2024-11-18 15:29:42 +0000 Commit: Andrew Turner CommitDate: 2024-11-19 17:14:42 +0000 acpi: Handle multiple interrupts When multiple IRQs are specified in a single resource then we only check the first. Change this to check all interrupts for the value we expect to find. Without this we may still enable the interrupt, but it can have the wrong polatiry or trigger. This can cause an interrupt storm if the interrupt was configured with a level trigger when it should have been an edge. PR: 282241 Reported by: trasz Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D47487 --- sys/dev/acpica/acpi_resource.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index 1257ed30cc65..8c5a3ed57f32 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -72,19 +72,33 @@ acpi_lookup_irq_handler(ACPI_RESOURCE *res, void *context) { struct lookup_irq_request *req; size_t len; - u_int irqnum, irq, trig, pol; + u_int irqnum, trig, pol; + bool found; + + found = false; + req = (struct lookup_irq_request *)context; switch (res->Type) { case ACPI_RESOURCE_TYPE_IRQ: irqnum = res->Data.Irq.InterruptCount; - irq = res->Data.Irq.Interrupts[0]; + for (int i = 0; i < irqnum; i++) { + if (res->Data.Irq.Interrupts[i] == req->irq) { + found = true; + break; + } + } len = ACPI_RS_SIZE(ACPI_RESOURCE_IRQ); trig = res->Data.Irq.Triggering; pol = res->Data.Irq.Polarity; break; case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: irqnum = res->Data.ExtendedIrq.InterruptCount; - irq = res->Data.ExtendedIrq.Interrupts[0]; + for (int i = 0; i < irqnum; i++) { + if (res->Data.ExtendedIrq.Interrupts[i] == req->irq) { + found = true; + break; + } + } len = ACPI_RS_SIZE(ACPI_RESOURCE_EXTENDED_IRQ); trig = res->Data.ExtendedIrq.Triggering; pol = res->Data.ExtendedIrq.Polarity; @@ -92,18 +106,13 @@ acpi_lookup_irq_handler(ACPI_RESOURCE *res, void *context) default: return (AE_OK); } - if (irqnum != 1) + if (!found) return (AE_OK); - req = (struct lookup_irq_request *)context; if (req->checkrid) { if (req->counter != req->rid) { req->counter++; return (AE_OK); } - KASSERT(irq == req->irq, ("IRQ resources do not match")); - } else { - if (req->irq != irq) - return (AE_OK); } req->found = 1; req->pol = pol; From nobody Tue Nov 19 17:47:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtBlB6tZVz5fGPm; Tue, 19 Nov 2024 17:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtBlB6Hryz4RDp; Tue, 19 Nov 2024 17:47:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEA7P1xM44wYQSvVLbu/7jLuhje4aa8UHOsfa0b5l+Y=; b=guWejKB6uxaRENjPXLSB7oE1qqkzmim+2QFx1Ht7eW9XkE9csnQOzi6GhC1GzRBJYxY9nM lRc3cBWqzzClcbeqh29i7Hy95g1mzeOkZSlV5L7JOJqB+zfux0i0ygvNiVARGgAGIWKYvr dOe14W/a5CO+88TIgDhhY2Bai6DUJKGO3agKmic5j6tHZb7ML1SL93C1RlKCs4iMigqciW dm0ii8mWHPVQ/d6KI6fyakoTi+OQKyiAos/rCBTCvIHMpJ85OgNlCUTKM5dBFxQhTQ2qb1 b1RM+JIFrnn+cLhGSA5yKOBJQV6HadDLHm6PC06FESZXNJY9PxhBNmnGyNqIbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEA7P1xM44wYQSvVLbu/7jLuhje4aa8UHOsfa0b5l+Y=; b=gutncARlKJo5aVNCdYohAOj9ewG9mm8NzZpI1tQH3QtyulRavlOsD8GnjCflEn1mFfl3Ms z/drh1khM1Dw0bx+tQ01iV9cUGGJeNTuiGf/3hQNqxRgxXi45oYuN3o+lP6HWHFK+1DkGp DCODbkdHZ677/myBJs8N+l1fnDLHpXnmWmmIbJYsmszR9TIRU5CxTjhbn46umVWv3gZrgf smiBF4YCaz67/a+MN3rTbkFaNechY0hZYaqL4rcEjxqsd9DEYoD3SkB4jN5MiyMYd6qCjO R5zTsEsMGKr5HfqUVRVKDqZ7u0XqADsCW620IO8zlONlmd1x4sDm/UYFAVYQ+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732038422; a=rsa-sha256; cv=none; b=PwS2QA88xWzPOKipyisAvx80csj4g/AYJk9HAPKRLthf5z22ulw0fR3CPnFMBKPM+1s473 fKXjqaSXRcpEWKtJp0qI4nTF6lk+DpU4jKDcooDk8QbQJPQCEpsG8Y+SMSiKs5wfHZ6bWd FV8b6o8nG5r4BbSpBsPY79FRYMPKmERgt7FCoogcc//CPiI2wYrwG275SKaK/GtMn1fxb7 OnjNqPR6tHG6dCjXs0jp41b1uTjcUSDmtpBV3LxaOAfX5kHiIeOLYtmqtrLDgzg1WX2lqB 4cn3S6upWMBYd3L4C6zR896ZmYl6N5cFNf89D/2a9zjG0Dho4rUA9z0rgG5SUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtBlB5vKkzK3r; Tue, 19 Nov 2024 17:47:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJHl250000879; Tue, 19 Nov 2024 17:47:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJHl2Qb000875; Tue, 19 Nov 2024 17:47:02 GMT (envelope-from git) Date: Tue, 19 Nov 2024 17:47:02 GMT Message-Id: <202411191747.4AJHl2Qb000875@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: 9ff643a8da47 - main - arm64: Adjust the MPASS in vfp_save_state_savectx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9ff643a8da476c38b29c071d00805d52b851ee03 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9ff643a8da476c38b29c071d00805d52b851ee03 commit 9ff643a8da476c38b29c071d00805d52b851ee03 Author: Andrew Turner AuthorDate: 2024-11-18 15:34:09 +0000 Commit: Andrew Turner CommitDate: 2024-11-19 17:31:00 +0000 arm64: Adjust the MPASS in vfp_save_state_savectx In vfp_save_state_savectx we check if the pcb has a NULL vfp state. When it's called multiple times with the same pcb then we can panic because the vfp state has been set. Weaken the requirement for the state pointer to be NULL by also allowing it to point to the pcb vfp state area we are about to use. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D47237 --- sys/arm64/arm64/vfp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/vfp.c b/sys/arm64/arm64/vfp.c index a3aa77ed6180..bcddebfaf66e 100644 --- a/sys/arm64/arm64/vfp.c +++ b/sys/arm64/arm64/vfp.c @@ -577,10 +577,13 @@ vfp_save_state_savectx(struct pcb *pcb) { /* * savectx() will be called on panic with dumppcb as an argument, - * dumppcb doesn't have pcb_fpusaved set, so set it to save - * the VFP registers. + * dumppcb either has no pcb_fpusaved set or it was previously set + * to its own fpu state. + * + * In both cases we can set it here to the pcb fpu state. */ - MPASS(pcb->pcb_fpusaved == NULL); + MPASS(pcb->pcb_fpusaved == NULL || + pcb->pcb_fpusaved == &pcb->pcb_fpustate); pcb->pcb_fpusaved = &pcb->pcb_fpustate; vfp_save_state_common(curthread, pcb, true); From nobody Tue Nov 19 17:47:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtBlD2cr7z5fGDg; Tue, 19 Nov 2024 17:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtBlD0Rpcz4R0Z; Tue, 19 Nov 2024 17:47:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3lAD7X7t/OhyZsytHMp02Ce3tb3rjzYapGdwWZqmb40=; b=vKWMSCSzUHWib9NRkifBkuiGGAQNzOxEOj32ER/6OslWtRVOi43OHnunDBnOKUuaWkhVAK oaimNsm5PYs1c2s/7QS4T636QhXloOFdhYlhDGeUqTsAaHuNKwwe/nPWCt6LY/29NKqtQs FdOzsSAQzSQgycQQpop80ougFf8acyWaELPo7RcmWddxEitveX7cJKSsIQIaXluWwR5VGp iKj3KnLAwyDSIEm8qaPz0k5T9Ffqh2QtoYm83w6bUnkZiXPXfcZhyKY/iTNzHeX+6RfxIP qRMgs++cZtTI3WWy4IhKfd7D0CzU535Z77l1uzy76ntdTLsdMEiC55G8C04CTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3lAD7X7t/OhyZsytHMp02Ce3tb3rjzYapGdwWZqmb40=; b=t7u8lKOqNWnDiD43LuM/cKlhPrC80qVDAGyU0Pm2lBBJv0SLM3e6FP1OhvZxOouLKssnLe MgwK2V+4mHa/SpejSXOXgAY6ONiMxYcVCvKWmzfEvQ41Uae+hNvl6M3YRLvJsLCuL27ry5 iKZ4JzCYf9guhJxEMsERJYhAlh0KpqSAN1oVKSVkZaKrg2vLY8ewn3ngu6CR/YDw+0pz1j kFi+l1ken9r3Wz6WzUaJG7iHYQVoNFxwmxhhaVilrfGVq8tCHidWt3FMU8KPcMxoWwpM+U WL48V3HUGsmrdehyjNAdFWOWhNQ3QdtWm+eKnEGusbM5bwyNOFBjPk1nnzwQsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732038424; a=rsa-sha256; cv=none; b=xk0fmIJZcsqnGRVSX3c1XV9hZyRcmFcORSfJXiLiNPStvNCxwh4QatEVu3oI8ISh06IpUn odGJNnz5YEVzUDvQ9xJxXqCOyp0cvooJ+BL3AjAYSlGfdKWV/y1ESreaLb0SDq3pfBQGQs +FDQpHXegJXuFIe8ACBBVnPVmfNbBCyL5X/71hojbelCfkkcx+Bzo/UE0EEYMzEgglHJUS pbsOwLA+fz85ozRKBpQI48Hade/a0YKUJS4BNI/K7WgIyRt1l/hoH8lIRc1oM97bGbEq/s GJG2BbeomQFFO+y4xRXkdX83x9iTPenAAAnJTIplKI3y4L1Oa+oZOJMgHgIlKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtBlC6vdnzK3s; Tue, 19 Nov 2024 17:47:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJHl3rZ000934; Tue, 19 Nov 2024 17:47:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJHl3Zt000931; Tue, 19 Nov 2024 17:47:03 GMT (envelope-from git) Date: Tue, 19 Nov 2024 17:47:03 GMT Message-Id: <202411191747.4AJHl3Zt000931@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: ce284dded5d5 - main - arm64: Fix comparing ID register fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: ce284dded5d5db6b1bceda309dccba616f485ade Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ce284dded5d5db6b1bceda309dccba616f485ade commit ce284dded5d5db6b1bceda309dccba616f485ade Author: Andrew Turner AuthorDate: 2024-11-19 10:20:24 +0000 Commit: Andrew Turner CommitDate: 2024-11-19 17:31:00 +0000 arm64: Fix comparing ID register fields The logic in update_special_reg_field was reversed. Fix by swapping the order of the arguments. PR: 282505 Fixes: f1fb1d5c9017 ("arm64: Support more ID register field types") Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D47437 --- sys/arm64/arm64/identcpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index f4d297e7d9bc..95e7669d053e 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -2261,14 +2261,14 @@ update_special_reg_field(uint64_t user_reg, u_int type, uint64_t value, switch (type & MRS_TYPE_MASK) { case MRS_EXACT_IF_DIFFERENT: - if (mrs_field_cmp(cur, new_val, shift, width, sign) != 0) + if (mrs_field_cmp(new_val, cur, shift, width, sign) != 0) break; /* FALLTHROUGH */ case MRS_EXACT: cur = (uint64_t)MRS_SAFE_VAL(type) << shift; break; case MRS_LOWER: - if (mrs_field_cmp(cur, new_val, shift, width, sign) < 0) + if (mrs_field_cmp(new_val, cur, shift, width, sign) < 0) cur = new_val; break; case MRS_HIGHER_OR_ZERO: @@ -2278,7 +2278,7 @@ update_special_reg_field(uint64_t user_reg, u_int type, uint64_t value, } /* FALLTHROUGH */ case MRS_HIGHER: - if (mrs_field_cmp(cur, new_val, shift, width, sign) > 0) + if (mrs_field_cmp(new_val, cur, shift, width, sign) > 0) cur = new_val; break; default: From nobody Tue Nov 19 17:53:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtBty3vLmz5fGTS; Tue, 19 Nov 2024 17:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtBty3PNqz4Syg; Tue, 19 Nov 2024 17:53:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k9Jk6Tlyw1h7O3OWo255yD0kZdtocB+P4qkygCFlEgE=; b=dOprB8YcOcPAZ9S6H3rlJiJJFRBG0Pp3/570l/yxeDHLBG+aPjQbGPJM0c8Mx9f4Bg/P29 HQS34/f+Dl4N6OBnkJthMoZurAaQt6GkTZ8D91u6ILGEjCGF4JLRMX9oWa1ggcYmvoDguX nYnDcXCqnVHSN2VBJAsBbRhjz/Vo+kA1sNaoa03r31Qa9g5Zg4GQ6vVUd+mLf5nUGd9+Jq pBdIxMG9tXskNvWUXe35T2w6GS6rZxN5jV56nvD39doNvSQCyWtVjSNyRs2JLaJxw89vKB 95LkNXYZkTNWhZX3e/lT04rgORf1vDRsEg4sFLywO61sS694uZr78jpMzDQKHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k9Jk6Tlyw1h7O3OWo255yD0kZdtocB+P4qkygCFlEgE=; b=YAdvEQU5RHLeNTSzUXwLfvdlQfbD0pmWRtKKWmLXBB+hR54BEB4hS3N5712vlhf/zIy7r7 Yn3tVhIgwSAHkPiYOmXCDOX0jCcLQXAy/pz/b1Sw1EpfoWM5jZ+KmRel+kRHBNc+Nef3SU NUKUmyT9y/r58B5UmJyTHxcBqgE1L/YHzh3f5082ds9VhCN0feSkNHsnT+p6GsMNZC1eE0 8md/STfTIEceEvHzK78mVa0I5UqwKBxULxb1E/A4FrXVXa0YXGHX5Ciye8i6VoPZmjBP6H IUAsmgES052B9kMNIaToFKP9b07ov+iIBjX+eGs9VCGrhmMrvbM2ZL6zBK6EPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732038826; a=rsa-sha256; cv=none; b=lyALc/fV9uj8FCYXd75uLIOhxl1UR6dh8egctogasoj+ED1JS5ARCEOfWOPUshT6TEGuGT dnWSALNZTcZW+9k0CRYacC+D2cmOhTmoz3kr65r1wdOx0iB9iLzgkAcaUpdnFUyIHDwE3J s0/lMY2L8AuUdjaAf/6013TIVpceA60ayJuWWKXWQOVYfn+dZVilwy19yoPAZHH5+AoBId EFDa4uTkO1tgjq7ygtLBhiTqByuXZqbJq3NAoCh1mzmN7SpCxOzBXw8wwPJCI0cqtZ0Gw0 /GaIOF+p/QnSIukfM/KCbPhHnWJne75aGY3Gp5D87wYBVDR/FiYn/aQom+RvjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtBty2sygzKgB; Tue, 19 Nov 2024 17:53:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJHrkqq019124; Tue, 19 Nov 2024 17:53:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJHrkae019121; Tue, 19 Nov 2024 17:53:46 GMT (envelope-from git) Date: Tue, 19 Nov 2024 17:53:46 GMT Message-Id: <202411191753.4AJHrkae019121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 80b9b4dacd65 - releng/14.2 - gpiospi: Fix module dependencies. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 80b9b4dacd6524ada5919f8af62a18719ebe62ed Auto-Submitted: auto-generated The branch releng/14.2 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=80b9b4dacd6524ada5919f8af62a18719ebe62ed commit 80b9b4dacd6524ada5919f8af62a18719ebe62ed Author: Dag-Erling Smørgrav AuthorDate: 2024-11-15 05:53:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 17:53:16 +0000 gpiospi: Fix module dependencies. Approved by: re (cperciva) MFC after: 3 days Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D47570 (cherry picked from commit 79af8f72b3aff993703778423e83320df0953a37) (cherry picked from commit 3bcbd391dd7e1376ab7ad37e94f5b746abfc0591) --- sys/dev/gpio/gpiospi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpiospi.c b/sys/dev/gpio/gpiospi.c index 15517f74f0b3..682ee5e0c176 100644 --- a/sys/dev/gpio/gpiospi.c +++ b/sys/dev/gpio/gpiospi.c @@ -396,5 +396,5 @@ static driver_t gpio_spi_driver = { DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, 0, 0); DRIVER_MODULE(spibus, gpiospi, spibus_driver, 0, 0); -MODULE_DEPEND(spi, gpiospi, 1, 1, 1); -MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1); +MODULE_DEPEND(gpiospi, spibus, 1, 1, 1); +MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1); From nobody Tue Nov 19 19:51:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtFW12J41z5fNDP; Tue, 19 Nov 2024 19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtFW11phGz4cj2; Tue, 19 Nov 2024 19: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=1732045901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hmwkLnUQvoYt1omZcK80mKSEqF4WkyrJoR6aQ3V0vA=; b=dRBlt8qxzBkRXqkE3LcpV7S9BpNPZ4LKDUR64PAvCctl79FG4UpPUdZH1r7d0ibHQqZcdd bh1nz994QJ5KntE5ZA9s3Qm98bskjfQqblFTu9oWdl6ka+Wtlzflv61C+cQGaKNsUu+cDw u79nnQq31qDejn0D5rBvqrJmCpbrHfzhvvD+ms2vvUOYVn8a5DjRWlI9boeNcN0HJzo6m2 Yd8eCv8YOKsMiWYkRjylp2lHxQeU7QRtQ4wolvKXOR3yO9r01t3eaUxkAKtVLQ7I7AnMd1 THqcbI+NeiNym1JTFcni2B5tJ9IJ5ZzDMCa96L/n8ThNUPL676vafqG0PbLbfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732045901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hmwkLnUQvoYt1omZcK80mKSEqF4WkyrJoR6aQ3V0vA=; b=i7S5Mn3iq6tl4lMMB4ryBJ5x7BQ4ULjCq2T/ZefOytcwn4OnPqy6OqyjxRkHCQ5ATURVWC BDWMraFiOp/JBn8h27gWYg34LuOsaZm14+RSfWv+U6k+lc7ZqrxkCb94QrDotaDV47YKK6 EU8bKlRQvwx6jUA30pXz4hJ4vKDTiTvCu2fTfPlHLnJzFRds7kvuTc9H/G6OFy7CmaOSle ASO+U8aCcVbRh4JayJ1nmqR7m9h3SwV2R3Oy2iBgAaV1ouy8PEofR1zcwApShaY4NZZrtw GeLo/42JSyg91ilzrkp+Qx3EoNGKLf9NdTsd3fzN95JwKU1tBCDJ51DEU56vsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732045901; a=rsa-sha256; cv=none; b=yqwQ8UZwFfFDqDPFSYw2QAivfs+7AsPBz4VgP3XkwhytT7Y15pAuL9YzrSeg/fyPTDPq8a EW1FaOWEZSTwD4n9wagNeP91Rw/dpLBtlN4qlsiuG9BHe3ozvi9381z7xQ4qxkQ5zYELfj hU4EunLr7hfmnMBLmtn5J0Y3bwn1EsyWzQDwl4Eh3aeVNG6XeYatnmNdOYZ5588ZxHsGWS YJ2P49dHsI/DoZdNp0HsX0mnD7c9+UbYufHjYoCTcNKmRE740N/rL59JXqnLrIb7t9i0M+ 1LojkkqkvI6hoscb3c+/IuGx909GgOd6oc1E1enrXPhoLQ4UvARVmhzE6a0qbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtFW11PRlzPBj; Tue, 19 Nov 2024 19:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJJpf0L035529; Tue, 19 Nov 2024 19:51:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJJpfDw035526; Tue, 19 Nov 2024 19:51:41 GMT (envelope-from git) Date: Tue, 19 Nov 2024 19:51:41 GMT Message-Id: <202411191951.4AJJpfDw035526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: aa8722cc18e4 - main - daemon: truncate the pidfile when we're waiting to restart child List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa8722cc18e4620ea5e7b0a4917207ed1508393d Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=aa8722cc18e4620ea5e7b0a4917207ed1508393d commit aa8722cc18e4620ea5e7b0a4917207ed1508393d Author: Kyle Evans AuthorDate: 2024-11-19 19:51:26 +0000 Commit: Kyle Evans CommitDate: 2024-11-19 19:51:26 +0000 daemon: truncate the pidfile when we're waiting to restart child We need to be able to test some more restart behavior that depends on knowing specifically where we're at (inside the event loop or outside of the event loop). Truncate the pidfile until the process is restarted to give the test a clean marker rather than having to add arbitrary delays and hoping for the best. Reviewed by: des, markj Differential Revision: https://reviews.freebsd.org/D47003 --- usr.sbin/daemon/daemon.c | 30 ++++++++++++++++++++++++++++++ usr.sbin/daemon/tests/daemon_test.sh | 7 +++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 7214faf8bde3..a21346086dd1 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -114,6 +114,8 @@ static void daemon_exec(struct daemon_state *); static bool daemon_is_child_dead(struct daemon_state *); static void daemon_set_child_pipe(struct daemon_state *); +static int pidfile_truncate(struct pidfh *); + static const char shortopts[] = "+cfHSp:P:ru:o:s:l:t:m:R:T:C:h"; static const struct option longopts[] = { @@ -526,6 +528,15 @@ daemon_eventloop(struct daemon_state *state) close(kq); close(state->pipe_rd); state->pipe_rd = -1; + + /* + * We don't have to truncate the pidfile, but it's easier to test + * daemon(8) behavior in some respects if we do. We won't bother if + * the child won't be restarted. + */ + if (state->child_pidfh != NULL && state->restart_enabled) { + pidfile_truncate(state->child_pidfh); + } } static void @@ -823,3 +834,22 @@ daemon_set_child_pipe(struct daemon_state *state) /* The child gets dup'd pipes. */ close(state->pipe_rd); } + +static int +pidfile_truncate(struct pidfh *pfh) +{ + int pfd = pidfile_fileno(pfh); + + assert(pfd >= 0); + + if (ftruncate(pfd, 0) == -1) + return (-1); + + /* + * pidfile_write(3) will always pwrite(..., 0) today, but let's assume + * it may not always and do a best-effort reset of the position just to + * set a good example. + */ + (void)lseek(pfd, 0, SEEK_SET); + return (0); +} diff --git a/usr.sbin/daemon/tests/daemon_test.sh b/usr.sbin/daemon/tests/daemon_test.sh index 948a9f6a8a57..2ad0803842b7 100644 --- a/usr.sbin/daemon/tests/daemon_test.sh +++ b/usr.sbin/daemon/tests/daemon_test.sh @@ -139,8 +139,11 @@ restart_child_body() { kill $orig_sleep_pid # Wait up to 10s for the daemon to restart the child. for t in `seq 0 0.1 10`; do - new_sleep_pid=`cat sleep.pid` - [ "$orig_sleep_pid" -ne "$new_sleep_pid" ] && break + if [ -s "sleep.pid" ]; then + new_sleep_pid=`cat sleep.pid` + [ "$orig_sleep_pid" -ne "$new_sleep_pid" ] && break + fi + sleep 0.1 done [ "$orig_sleep_pid" -ne "$new_sleep_pid" ] || \ From nobody Tue Nov 19 19:51:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtFW23kFQz5fNBk; Tue, 19 Nov 2024 19:51: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtFW22Vyhz4ccd; Tue, 19 Nov 2024 19:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732045902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RT0SAu5idvzmOuUHGoAtlJDyAIfmI2JF0kwKeM0o9Bw=; b=rCvc0+q5P0kjbvxQbeY5ioSb5G9xWOihSFFuUTNfORgOz9Fp67RcEAfK37YLb7YHwTbn0q SggmP+GTTya9ZyJ/3x8YrMxVCoy0Wc+sqElhbll/CcLduyaWDzGr/qWAMfTtJR2b9x74kT IbV0NOPk2Be81lC/3coCYOawu9em2dpOLLJilpDwXSUaMnAYT+zh12oB7g7oUmpfMYq7Mq ydtLY7gFHrj1u6FoW80p52Gnyle3Bdx7zyZ7ScxgVL/P51rcpWhqryFm7BElXyba0UItAH 60a9DlwKtem94frKWTUVDSrENLAFPlcU5ebUulV3EviSSqH1iaEAoxf/Dxj+XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732045902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RT0SAu5idvzmOuUHGoAtlJDyAIfmI2JF0kwKeM0o9Bw=; b=OQqoJd1noDhTc4IKWWGFESHnMcOzZMnfYkS2PjaqQa4Qxw3Ot4PqnQBwdyo7JO2MWnOUw3 7hl7ue+tutkS53z4+eAyhFQpyY/nKRWjtudeRXcyYNpCktTYX2UVGAZFY8OLpssnZI+RaX TZ04KvT2JfI5XpghXTElt/jWGDl9vNedAnQPOMp5tSVcc5RjNUjtTvmihtMNlb2GDCyDHx OqoT9XdATZprxYdeLzM1e4IJHY/8Fm5scYj+RpqX+nyQ1vw45htxxq7r/EW+uE3coq0WKD ISxMhKFjpGHbrMlpWhWkrNSch1iQgh1EMc0jJ0yYgmELDabeYXK9Y1tsel8/dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732045902; a=rsa-sha256; cv=none; b=naLl2KNVNQkluT95omRnKi1xBJqmmHeNA7+HUc1DtV061M6WUX4VirugLSc4nLCGTCH4Ix Rf9XT/c2HlgImruhABiKd+tP1hAkjHsSuOHW0d9fyG47s1V52Zknf4RJPJ+PeULjI81k+g AABD1y/q/j4q27BJZpOg9YZRket/V48e9mr6eUkg82rRRsVYpQP+EwFRiyZbx+HxGZzBZf 8Sc7Jpv8K+7Y+whX30VPFpBObVwMRuag6k/peEi/CK9Y2J1nLGOUHC1xY8QK4ZIOyTf7VO NlBBX05a7+/NNuQK5z+cX0KWcLSpgpNZr90NGqvdlnCA9s6B2NlBsnF+S9o92g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtFW226FWzNk8; Tue, 19 Nov 2024 19:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJJpgV6035614; Tue, 19 Nov 2024 19:51:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJJpgmB035611; Tue, 19 Nov 2024 19:51:42 GMT (envelope-from git) Date: Tue, 19 Nov 2024 19:51:42 GMT Message-Id: <202411191951.4AJJpgmB035611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: bc1dfc316a2b - main - daemon: stop rebuilding the kqueue every restart of the child List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc1dfc316a2bba97773a14b96f5e976a52524be4 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=bc1dfc316a2bba97773a14b96f5e976a52524be4 commit bc1dfc316a2bba97773a14b96f5e976a52524be4 Author: Kyle Evans AuthorDate: 2024-11-19 19:51:27 +0000 Commit: Kyle Evans CommitDate: 2024-11-19 19:51:27 +0000 daemon: stop rebuilding the kqueue every restart of the child We populate the kqueue with all of four kevents: three signal handlers and one for read of the child pipe. Every time we start the child, we rebuild this kqueue from scratch for the child and tear it down before we exit and check if we need to restart the child. As a consequence, we effectively drop any of the signals we're interested in between restarts. Push the kqueue out into the daemon state to avoid losing any signal events in the process, and reimplement the restart timer in terms of kqueue timers. The pipe read event will be automatically deleted upon last close, which leaves us with only the signal events that really get retained between restarts of the child. PR: 277959 Reviewed by: des, markj Differential Revision: https://reviews.freebsd.org/D47004 --- usr.sbin/daemon/daemon.c | 121 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 101 insertions(+), 20 deletions(-) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index a21346086dd1..efba87de19d4 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -86,6 +86,7 @@ struct daemon_state { int pipe_rd; int pipe_wr; int keep_cur_workdir; + int kqueue_fd; int restart_delay; int stdmask; int syslog_priority; @@ -113,6 +114,7 @@ static void daemon_terminate(struct daemon_state *); static void daemon_exec(struct daemon_state *); static bool daemon_is_child_dead(struct daemon_state *); static void daemon_set_child_pipe(struct daemon_state *); +static int daemon_setup_kqueue(void); static int pidfile_truncate(struct pidfh *); @@ -344,6 +346,8 @@ main(int argc, char *argv[]) /* Write out parent pidfile if needed. */ pidfile_write(state.parent_pidfh); + state.kqueue_fd = daemon_setup_kqueue(); + do { state.mode = MODE_SUPERVISE; daemon_eventloop(&state); @@ -408,27 +412,13 @@ daemon_eventloop(struct daemon_state *state) state->pipe_rd = pipe_fd[0]; state->pipe_wr = pipe_fd[1]; - kq = kqueuex(KQUEUE_CLOEXEC); + kq = state->kqueue_fd; EV_SET(&event, state->pipe_rd, EVFILT_READ, EV_ADD|EV_CLEAR, 0, 0, NULL); if (kevent(kq, &event, 1, NULL, 0, NULL) == -1) { err(EXIT_FAILURE, "failed to register kevent"); } - EV_SET(&event, SIGHUP, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); - if (kevent(kq, &event, 1, NULL, 0, NULL) == -1) { - err(EXIT_FAILURE, "failed to register kevent"); - } - - EV_SET(&event, SIGTERM, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); - if (kevent(kq, &event, 1, NULL, 0, NULL) == -1) { - err(EXIT_FAILURE, "failed to register kevent"); - } - - EV_SET(&event, SIGCHLD, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); - if (kevent(kq, &event, 1, NULL, 0, NULL) == -1) { - err(EXIT_FAILURE, "failed to register kevent"); - } memset(&event, 0, sizeof(struct kevent)); /* Spawn a child to exec the command. */ @@ -521,11 +511,12 @@ daemon_eventloop(struct daemon_state *state) } continue; default: + assert(0 && "Unexpected kevent filter type"); continue; } } - close(kq); + /* EVFILT_READ kqueue filter goes away here. */ close(state->pipe_rd); state->pipe_rd = -1; @@ -539,19 +530,76 @@ daemon_eventloop(struct daemon_state *state) } } +/* + * Note that daemon_sleep() should not be called with anything but the signal + * events in the kqueue without further consideration. + */ static void daemon_sleep(struct daemon_state *state) { - struct timespec ts = { state->restart_delay, 0 }; + struct kevent event = { 0 }; + int ret; + + assert(state->pipe_rd == -1); + assert(state->pipe_wr == -1); if (!state->restart_enabled) { return; } - while (nanosleep(&ts, &ts) == -1) { - if (errno != EINTR) { - err(1, "nanosleep"); + + EV_SET(&event, 0, EVFILT_TIMER, EV_ADD|EV_ONESHOT, NOTE_SECONDS, + state->restart_delay, NULL); + if (kevent(state->kqueue_fd, &event, 1, NULL, 0, NULL) == -1) { + err(1, "failed to register timer"); + } + + for (;;) { + ret = kevent(state->kqueue_fd, NULL, 0, &event, 1, NULL); + if (ret == -1) { + if (errno != EINTR) { + err(1, "kevent"); + } + + continue; + } + + /* + * Any other events being raised are indicative of a problem + * that we need to investigate. Most likely being that + * something was not cleaned up from the eventloop. + */ + assert(event.filter == EVFILT_TIMER || + event.filter == EVFILT_SIGNAL); + + if (event.filter == EVFILT_TIMER) { + /* Break's over, back to work. */ + break; + } + + /* Process any pending signals. */ + switch (event.ident) { + case SIGTERM: + /* + * We could disarm the timer, but we'll be terminating + * promptly anyways. + */ + state->restart_enabled = false; + return; + case SIGHUP: + if (state->log_reopen && state->output_fd >= 0) { + reopen_log(state); + } + + break; + case SIGCHLD: + default: + /* Discard */ + break; } } + + /* SIGTERM should've returned immediately. */ + assert(state->restart_enabled); } static void @@ -745,6 +793,7 @@ daemon_state_init(struct daemon_state *state) .pipe_rd = -1, .pipe_wr = -1, .keep_cur_workdir = 1, + .kqueue_fd = -1, .restart_delay = 1, .stdmask = STDOUT_FILENO | STDERR_FILENO, .syslog_enabled = false, @@ -765,6 +814,9 @@ daemon_terminate(struct daemon_state *state) { assert(state != NULL); + if (state->kqueue_fd >= 0) { + close(state->kqueue_fd); + } if (state->output_fd >= 0) { close(state->output_fd); } @@ -835,6 +887,35 @@ daemon_set_child_pipe(struct daemon_state *state) close(state->pipe_rd); } +static int +daemon_setup_kqueue(void) +{ + int kq; + struct kevent event = { 0 }; + + kq = kqueuex(KQUEUE_CLOEXEC); + if (kq == -1) { + err(EXIT_FAILURE, "kqueue"); + } + + EV_SET(&event, SIGHUP, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); + if (kevent(kq, &event, 1, NULL, 0, NULL) == -1) { + err(EXIT_FAILURE, "failed to register kevent"); + } + + EV_SET(&event, SIGTERM, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); + if (kevent(kq, &event, 1, NULL, 0, NULL) == -1) { + err(EXIT_FAILURE, "failed to register kevent"); + } + + EV_SET(&event, SIGCHLD, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); + if (kevent(kq, &event, 1, NULL, 0, NULL) == -1) { + err(EXIT_FAILURE, "failed to register kevent"); + } + + return (kq); +} + static int pidfile_truncate(struct pidfh *pfh) { From nobody Tue Nov 19 19:51:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtFW357XVz5fNY5; Tue, 19 Nov 2024 19:51: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtFW33WJSz4clR; Tue, 19 Nov 2024 19:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732045903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yf3C6XPMiXjbj/jzG2LCKfjbBxeLoMM4HbcXxpDoBow=; b=Ks6Usjb8VqDoLtGr6cUHzzDGIgY5X5NZkHZ4lnYDX+0jmdIoPCmQKU8AFvrbYTVZS6yjCF kxpci3AuZYN1cyrHpVOpikDahOEXFcH8iv+Q1vcoFChhkAZvsawx0A9Tx3vKC51RNcNqJ2 W66MI+xONN3o/fncip6CWvUmC/+Cz/rv3OGaY3MPdS8q/6oJxYX9tNFNF18oNiX+HbUlpL nyxweIVJ/pOolLJNk1aoBEON2abIS1tda4dyEUDBYOlACsIDN/SAYHq8211APtxMFbRWr2 xgVPRy5VZxdICTeNWU2NPwF0EYrJdvQRxlKSlnbDoJoMjbsEGeHBujmRwf2OFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732045903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yf3C6XPMiXjbj/jzG2LCKfjbBxeLoMM4HbcXxpDoBow=; b=frx7pLjROTSQe9i5w7Jl4jZrirV9ONqX6PQduM78M7MRc/vZRH+FZZGLwcygYoJ0ZOhZ9w nAvLXfwaNz5oqQcsd3NHlJpAHC0fjNXl6FXIwEKYTyGXrUxveJQDgGYEoTTtO6vMHqdklm 3L+ltwW4Y/MUBZOCb+TUAly6gtrye4mZFNbALOjJ93D2bGvut+HK+ncTI2iWfG5iaOhsNi BJ1xyJuFma3QeEIFS1mLl+aBziKUafGUjlMSfMPnV4ijHDKzx/6KqzVgVKh0S293N5qMAc Cx7wdTDfBJVC65/usdRnePmSq1s8zYhEvvWmZapt/eJXN9JrZ0WuOLK883cWfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732045903; a=rsa-sha256; cv=none; b=PQHqtpRo/qHanY7Mg6eEwhT5jLRa9p4U0f5crQ5c2XoDZ7A3gV344MPC3wpJyrP/PREdti 95Fza2zSCewqHdUJj2YmwCyk6127/SgnXCSAMNI4vmoIfCrchRA4zfjyJit6av1PhmAERV /62jjHsffEODp6kuB55XdaDzt+t9JOULUJENt5zvlOiK7TLnWd3ku0OIoA30VNAFfng0La RiMaf6Oz7zwAyQ06xhKjY2hjtC0mu62F+k5N4rkbq3ZqbU1MI2EhWcVaogUIUWHUZ4PBYE EneibEBvgRVvx1lAZwbiVPqd/Ggth45ycS8DTZmAFl3xvUoD76bgSnmPm9bwQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtFW337P1zNLr; Tue, 19 Nov 2024 19:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJJphXF035665; Tue, 19 Nov 2024 19:51:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJJphm4035662; Tue, 19 Nov 2024 19:51:43 GMT (envelope-from git) Date: Tue, 19 Nov 2024 19:51:43 GMT Message-Id: <202411191951.4AJJphm4035662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 9ab59e900c1d - main - daemon: tests: add a test for missed SIGTERM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ab59e900c1dd693b4d14285389a035e81341789 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9ab59e900c1dd693b4d14285389a035e81341789 commit 9ab59e900c1dd693b4d14285389a035e81341789 Author: Kyle Evans AuthorDate: 2024-11-19 19:51:27 +0000 Commit: Kyle Evans CommitDate: 2024-11-19 19:51:27 +0000 daemon: tests: add a test for missed SIGTERM This is somewhaht hard to test reliably, but we'll give it a shot. Startup a sleep(1) daemon with a hefty restart delay. In refactoring of daemon(8), we inadvertently started dropping SIGTERMs that came in while we were waiting to restart the child, so we employ the strategy: - Pop the child sleep(1) first - Wait for sleep(1) to exit (pid file truncated) - Pop the daemon(8) with a SIGTERM - Wait for daemon(8) to exit The pidfile is specifically truncated outside of the event loop so that we don't have a kqueue to catch it in the current model. PR: 277959 Reviewed by: des, markj Differential Revision: https://reviews.freebsd.org/D47005 --- usr.sbin/daemon/tests/daemon_test.sh | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/usr.sbin/daemon/tests/daemon_test.sh b/usr.sbin/daemon/tests/daemon_test.sh index 2ad0803842b7..ec94d30bc1c3 100644 --- a/usr.sbin/daemon/tests/daemon_test.sh +++ b/usr.sbin/daemon/tests/daemon_test.sh @@ -154,6 +154,43 @@ restart_child_cleanup() { [ -f daemon.pid ] && kill `cat daemon.pid` } +atf_test_case restart_hang cleanup +restart_hang_head() { + atf_set "descr" "daemon should terminate with SIGTERM even pending child restart" +} +restart_hang_body() { + daemon -rP daemon.pid -R 10 -p sleep.pid sleep 300 + atf_check -s exit:0 test -f daemon.pid + atf_check -s exit:0 test -f sleep.pid + read sleep_pid < sleep.pid + 1>&2 echo "$sleep_pid" + kill "$sleep_pid" + + # Wait up to 5s for the child to exit + for t in `seq 0 0.1 5`; do + [ ! -s "sleep.pid" ] && break + sleep 0.1 + done + + atf_check test ! -s "sleep.pid" + + read daemon_pid < daemon.pid + kill -TERM "$daemon_pid" + + # Wait up to 10s for the daemon to terminate + for t in `seq 0 0.1 10`; do + [ ! -f "daemon.pid" ] && break + sleep 0.1 + done + + atf_check test ! -f "daemon.pid" + atf_check test ! -f "sleep.pid" +} +restart_hang_cleanup() { + [ -s daemon.pid ] && kill -9 `cat daemon.pid` + true +} + atf_test_case supervisor_pidfile cleanup supervisor_pidfile_head() { atf_set "descr" "daemon should write its own pid to a pidfile" @@ -218,6 +255,7 @@ atf_init_test_cases() { atf_add_test_case newsyslog atf_add_test_case output_file atf_add_test_case restart_child + atf_add_test_case restart_hang atf_add_test_case supervisor_pidfile atf_add_test_case supervisor_pidfile_lock atf_add_test_case title From nobody Tue Nov 19 21:17:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtHPV2MDCz5fS5S; Tue, 19 Nov 2024 21:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHPV1pdGz4lMx; Tue, 19 Nov 2024 21:17:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQ63KrFnvAdniICqLd1Yxok8nkTofd9GEp46m0k4lds=; b=IEuJp8M31YSWLXuXJyel71p0ZIku7rHX5aLGrzcicpMo0wN/0QAD1DLSXhYJgeC0nJJwv/ dXJBnC4bIV3sy2VzgRYijAjYeLPv5mWrUcQzkOR7Ee6JWHEz6wQ6AXjH3TMyiETeS4y/FU Nh3G/FKHqulSlAKrSeId1t5nV5SHAcRqg55WihxBhUotYMOJPwaFkmN7GuZloLwVUvJnVK FtYqHCMCHvxRnxpIyTnzjI403aIvXMICXiGcNNJPJ/m+HTqtQrKVn7RSN5hIrz4InjVv3j uYPIjfMS0hNJOQV6typRWVbrCcB/koPN6O1IoLTBaB7sQWhavPwpg3OW0sn/7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQ63KrFnvAdniICqLd1Yxok8nkTofd9GEp46m0k4lds=; b=U8i2WY1VH871GKFoo7bLsZSSxB9jVQ1+/Agb0QoifwKJHCS9qWU66l3uMhxelzNCbshB5u W2P16ewR+Yz7lx5nEmJTAd/X7kzKZytZNYFeYlxnXK50Iv2A8uBHP1uu4pV+7ZpdTouo9K GVDvVZRX3A2/9A0BCxIrNL7saOjc4w8OAlVH3yIK4SJomFpYpozruTVUN699q5ut7LurgK TTwBNu7ZizNnUYui/+rcc5gtiyXnCiXCMeMtJqgsVUqQTizgCclBo0uJt1/qLSOAGO2+VA yNoIyn5qWOfB5J5la19jPt01Wc/ZFp+Uh04azC1ZZGRuxUBWiiqO3ikLJmtsyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051022; a=rsa-sha256; cv=none; b=K6htUnjuEt3qRbJGvE1RbX1MfidUepAUw+qNZtQac0YvcRIN9qQOwle6fBzc52/Iq5uNEs UCpl3+yJCKSzG+RW4uv7i8LAgNzau199JMIyMOXbyBJfoYC4oja1euOr1XNDAUFl4Irx7w xAYzl3UL2cCqY5yz7VndE0xwHxgEEiBBYXpYT/DIvqgA7lLx9h8WT5IOu/wR/UT3D3tFGx KGaULpG+brt0VcNM2XUK6XEBYC+AOA3DquApyqBpJq4X819DVrRr323Sb537w4hc3LdY27 l2Hzg/b2owZ+L5kPLBcoC+k1tXg1OLPLo475IUzn63KMzdnkKkLiNFqLQX+u4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtHPV1GlxzR9F; Tue, 19 Nov 2024 21:17:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLH2AN092303; Tue, 19 Nov 2024 21:17:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLH2xu092300; Tue, 19 Nov 2024 21:17:02 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:17:02 GMT Message-Id: <202411192117.4AJLH2xu092300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 114ba4f2cdc7 - stable/13 - bhyve: Initialize stack buffer in pci_ahci List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 114ba4f2cdc7e9da255ddf9d08726006dbfd7e28 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=114ba4f2cdc7e9da255ddf9d08726006dbfd7e28 commit 114ba4f2cdc7e9da255ddf9d08726006dbfd7e28 Author: Pierre Pronchery AuthorDate: 2024-07-23 14:34:03 +0000 Commit: Ed Maste CommitDate: 2024-11-19 17:38:10 +0000 bhyve: Initialize stack buffer in pci_ahci In the function ahci_handle_dsm_trim, if the call to read_prdt fails, the variable buf[512] is used while it contains uninitialized data. It is easy to make the call to read_prdt fail, for instance if hdr->prdtl == NULL, the function will return without writing anything in buf. In addition, this code could be hardened by checking the value of done before accessing &buf[done]. Reported by: Synacktiv Reviewed by: markj Security: HYP-15 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46090 (cherry picked from commit 71fa171c6480d60f4d9c01dea1c71a7249e7b8ab) (cherry picked from commit babfd2e46762cb835fec66945aa60404f247c521) --- usr.sbin/bhyve/pci_ahci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 8a48eb00e9b0..33ca389944f8 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -781,7 +781,7 @@ ahci_handle_flush(struct ahci_port *p, int slot, uint8_t *cfis) assert(err == 0); } -static inline void +static inline unsigned int read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, unsigned int size) { @@ -808,6 +808,7 @@ read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, to += sublen; prdt++; } + return (size - len); } static void @@ -820,6 +821,7 @@ ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done uint32_t len, elen; int err, first, ncq; uint8_t buf[512]; + unsigned int written; first = (done == 0); if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { @@ -831,9 +833,12 @@ ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done len *= 512; ncq = 1; } - read_prdt(p, slot, cfis, buf, sizeof(buf)); + written = read_prdt(p, slot, cfis, buf, sizeof(buf)); + memset(buf + written, 0, sizeof(buf) - written); next: + if (done >= sizeof(buf) - 8) + return; entry = &buf[done]; elba = ((uint64_t)entry[5] << 40) | ((uint64_t)entry[4] << 32) | From nobody Tue Nov 19 21:17:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtHPW3tHcz5fSNn; Tue, 19 Nov 2024 21:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHPW2PGnz4lY7; Tue, 19 Nov 2024 21:17:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71cYY0Tv9JHtq00uslSTJZZRi2Oe3Zi78Gjau+nONCA=; b=AfDtsBgieJ6hO/5vdAPpXqAYr1mLeVzAzlNjLIQIP7Yszvx6P0qO07vzbCy+pAxssWemPy zJJBKg0GwUnNjRn+/Y8W/yrJjJhYkNmbR021y2sIC633NZMDASJcs+yeQigHPRAXE2TFgp V6j/FttDxKfwQ505tGPgTiyBUG5e0UaAYArNML564qRb/Iri+DBwy3NjM2Zraj86pZG0TO AWKc7ZZPAAEiwkPe84JfroGT+r2wrtespBk1W2K6tc99yS/CgcmKADwVsebNXspE5la6Dk oQpNlv5EarTj4NyJB9lZgTcmYXAJgtjCh+2vVIbK18jazmPxcL+gK8jzjnuOew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71cYY0Tv9JHtq00uslSTJZZRi2Oe3Zi78Gjau+nONCA=; b=nAYi5HnjM71eKQYPaIjjBa0mmRNWdKf+Hj61W2jjF1cZsQlOYALs2Jzeb9jMsRaRVEIPQX tfxEMqdg/gCErqYXNh08zumtZYVe021Q+fLF09il5sh6ONfY/+EHCsxODF36w3uBH8RcsL fJ42nB7jlklpO12KSOsyrAaozA/hWBawU34qsqaACmcHawPx5fAAFoYGGjfx1SvR4fWp/p coWoivktX8Jn5TA6Y0mHILoqTlYEqPn6xT4nn0cby0KepsZx1Pa3YXqVII+4uLn1z+HqmU P4PR/U6X0Z6CL3mo6byu0sGiL5KTeIIQQLprXKjH/8fJLNxapk8wbFMzk5JCBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051023; a=rsa-sha256; cv=none; b=elhFZaxUIdsS0t2tZpVjm24qM9lCkAwQwGNTGv9cnx5iU3VmBXkRuYr4XpPfXR6lyoX6ik 5JHZkI3jUleQ/Dl34OD5lmNY7dS1lLx2/as5p6iFwaleFgMci10hnpIqsT3R1dSIv/nTOD qb5I8J5cwryBPLyITx7hM8hAhkwRviFbLWppXeFQpfNZ2rNhu/C6jfmr733fPYOMG3C6Cf nh1+Ypw5cfMh9t/Sts55R550eBC+D0y+ycnynbMho8PEF48Lt9b7nM+C5oDhyZVFXhcGGN Pa9njHik5PzM6RKgT7TF5flJobsD6GA+rzBiTOackrt3WFNWZH3IdmCDsURMVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtHPW20ckzR9G; Tue, 19 Nov 2024 21:17:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLH3IP092351; Tue, 19 Nov 2024 21:17:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLH39w092348; Tue, 19 Nov 2024 21:17:03 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:17:03 GMT Message-Id: <202411192117.4AJLH39w092348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2be68ecff81b - stable/13 - bhyve ahci: Improve robustness of TRIM handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2be68ecff81b1cd7268b0d6436f4d6fa206fc2fa Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2be68ecff81b1cd7268b0d6436f4d6fa206fc2fa commit 2be68ecff81b1cd7268b0d6436f4d6fa206fc2fa Author: John Baldwin AuthorDate: 2024-10-24 14:18:09 +0000 Commit: Ed Maste CommitDate: 2024-11-19 17:38:10 +0000 bhyve ahci: Improve robustness of TRIM handling The previous fix for a stack buffer leak in the ahci device model actually broke the handling of TRIM as one of the checks it added caused TRIM commands to never be completed. This resulted in command timeouts if a guest OS did a 'newfs -E' of an AHCI disk, for example. Also, for the invalid case the previous check was handling, the device model should be failing with an error rather than claiming success. To resolve this, validate the length of a TRIM request and fail with an error if it exceeds the maximum number of supported blocks advertised via IDENTIFY. In addition, if the PRDT does not provide enough data, fail the command with an error rather than performing a partial completion. This is somewhat complicated by the implementation of TRIM in the ahci device model. A single TRIM request can specify multiple LBA ranges. The device model handles this by dispatching blockif_delete() requests one at a time. When a blockif_delete() request completes, the device model locates the TRIM buffer and searches for the next LBA range to handle. Previously, the device model would re-read the trim buffer from guest memory each time. However, this was subject to some unpleasant races if the guest changed the PRDT entries or CFIS while a command was in flight. Instead, read the buffer of trim ranges once and cache it across multipe internal blockif requests. Reviewed by: mav Fixes: 71fa171c6480 bhyve: Initialize stack buffer in pci_ahci Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47224 (cherry picked from commit 8c8ebbb045185396083cd3e4d333fe1851930ee7) (cherry picked from commit 3981cf108773d6b29c8e100bc3b4a105eae681ec) --- usr.sbin/bhyve/pci_ahci.c | 145 ++++++++++++++++++++++++++++++---------------- 1 file changed, 95 insertions(+), 50 deletions(-) diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 33ca389944f8..67c13a043e02 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -126,6 +126,7 @@ struct ahci_ioreq { STAILQ_ENTRY(ahci_ioreq) io_flist; TAILQ_ENTRY(ahci_ioreq) io_blist; uint8_t *cfis; + uint8_t *dsm; uint32_t len; uint32_t done; int slot; @@ -213,6 +214,8 @@ struct pci_ahci_softc { }; #define ahci_ctx(sc) ((sc)->asc_pi->pi_vmctx) +static void ahci_handle_next_trim(struct ahci_port *p, int slot, uint8_t *cfis, + uint8_t *buf, uint32_t len, uint32_t done); static void ahci_handle_port(struct ahci_port *p); static inline void lba_to_msf(uint8_t *buf, int lba) @@ -812,18 +815,14 @@ read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, } static void -ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done) +ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis) { - struct ahci_ioreq *aior; - struct blockif_req *breq; - uint8_t *entry; - uint64_t elba; - uint32_t len, elen; - int err, first, ncq; - uint8_t buf[512]; - unsigned int written; + uint32_t len; + int ncq; + uint8_t *buf; + unsigned int nread; - first = (done == 0); + buf = NULL; if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { len = (uint16_t)cfis[13] << 8 | cfis[12]; len *= 512; @@ -833,39 +832,84 @@ ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done len *= 512; ncq = 1; } - written = read_prdt(p, slot, cfis, buf, sizeof(buf)); - memset(buf + written, 0, sizeof(buf) - written); -next: - if (done >= sizeof(buf) - 8) - return; - entry = &buf[done]; - elba = ((uint64_t)entry[5] << 40) | - ((uint64_t)entry[4] << 32) | - ((uint64_t)entry[3] << 24) | - ((uint64_t)entry[2] << 16) | - ((uint64_t)entry[1] << 8) | - entry[0]; - elen = (uint16_t)entry[7] << 8 | entry[6]; - done += 8; - if (elen == 0) { - if (done >= len) { - if (ncq) { - if (first) - ahci_write_fis_d2h_ncq(p, slot); - ahci_write_fis_sdb(p, slot, cfis, - ATA_S_READY | ATA_S_DSC); - } else { - ahci_write_fis_d2h(p, slot, cfis, - ATA_S_READY | ATA_S_DSC); - } + /* Support for only a single block is advertised via IDENTIFY. */ + if (len > 512) { + goto invalid_command; + } + + buf = malloc(len); + nread = read_prdt(p, slot, cfis, buf, len); + if (nread != len) { + goto invalid_command; + } + ahci_handle_next_trim(p, slot, cfis, buf, len, 0); + return; + +invalid_command: + free(buf); + if (ncq) { + ahci_write_fis_d2h_ncq(p, slot); + ahci_write_fis_sdb(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); + } else { + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); + } +} + +static void +ahci_handle_next_trim(struct ahci_port *p, int slot, uint8_t *cfis, + uint8_t *buf, uint32_t len, uint32_t done) +{ + struct ahci_ioreq *aior; + struct blockif_req *breq; + uint8_t *entry; + uint64_t elba; + uint32_t elen; + int err; + bool first, ncq; + + first = (done == 0); + if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { + ncq = false; + } else { /* ATA_SEND_FPDMA_QUEUED */ + ncq = true; + } + + /* Find the next range to TRIM. */ + while (done < len) { + entry = &buf[done]; + elba = ((uint64_t)entry[5] << 40) | + ((uint64_t)entry[4] << 32) | + ((uint64_t)entry[3] << 24) | + ((uint64_t)entry[2] << 16) | + ((uint64_t)entry[1] << 8) | + entry[0]; + elen = (uint16_t)entry[7] << 8 | entry[6]; + done += 8; + if (elen != 0) + break; + } + + /* All remaining ranges were empty. */ + if (done == len) { + free(buf); + if (ncq) { + if (first) + ahci_write_fis_d2h_ncq(p, slot); + ahci_write_fis_sdb(p, slot, cfis, + ATA_S_READY | ATA_S_DSC); + } else { + ahci_write_fis_d2h(p, slot, cfis, + ATA_S_READY | ATA_S_DSC); + } + if (!first) { p->pending &= ~(1 << slot); ahci_check_stopped(p); - if (!first) - ahci_handle_port(p); - return; + ahci_handle_port(p); } - goto next; + return; } /* @@ -878,6 +922,7 @@ next: aior->slot = slot; aior->len = len; aior->done = done; + aior->dsm = buf; aior->more = (len != done); breq = &aior->io_req; @@ -1755,7 +1800,7 @@ ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis) case ATA_DATA_SET_MANAGEMENT: if (cfis[11] == 0 && cfis[3] == ATA_DSM_TRIM && cfis[13] == 0 && cfis[12] == 1) { - ahci_handle_dsm_trim(p, slot, cfis, 0); + ahci_handle_dsm_trim(p, slot, cfis); break; } ahci_write_fis_d2h(p, slot, cfis, @@ -1765,7 +1810,7 @@ ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis) if ((cfis[13] & 0x1f) == ATA_SFPDMA_DSM && cfis[17] == 0 && cfis[16] == ATA_DSM_TRIM && cfis[11] == 0 && cfis[3] == 1) { - ahci_handle_dsm_trim(p, slot, cfis, 0); + ahci_handle_dsm_trim(p, slot, cfis); break; } ahci_write_fis_d2h(p, slot, cfis, @@ -1903,12 +1948,12 @@ ata_ioreq_cb(struct blockif_req *br, int err) struct ahci_port *p; struct pci_ahci_softc *sc; uint32_t tfd; - uint8_t *cfis; - int slot, ncq, dsm; + uint8_t *cfis, *dsm; + int slot, ncq; DPRINTF("%s %d", __func__, err); - ncq = dsm = 0; + ncq = 0; aior = br->br_param; p = aior->io_pr; cfis = aior->cfis; @@ -1920,10 +1965,8 @@ ata_ioreq_cb(struct blockif_req *br, int err) cfis[2] == ATA_READ_FPDMA_QUEUED || cfis[2] == ATA_SEND_FPDMA_QUEUED) ncq = 1; - if (cfis[2] == ATA_DATA_SET_MANAGEMENT || - (cfis[2] == ATA_SEND_FPDMA_QUEUED && - (cfis[13] & 0x1f) == ATA_SFPDMA_DSM)) - dsm = 1; + dsm = aior->dsm; + aior->dsm = NULL; pthread_mutex_lock(&sc->mtx); @@ -1941,8 +1984,9 @@ ata_ioreq_cb(struct blockif_req *br, int err) hdr->prdbc = aior->done; if (!err && aior->more) { - if (dsm) - ahci_handle_dsm_trim(p, slot, cfis, aior->done); + if (dsm != NULL) + ahci_handle_next_trim(p, slot, cfis, dsm, + aior->len, aior->done); else ahci_handle_rw(p, slot, cfis, aior->done); goto out; @@ -1964,6 +2008,7 @@ ata_ioreq_cb(struct blockif_req *br, int err) ahci_check_stopped(p); ahci_handle_port(p); + free(dsm); out: pthread_mutex_unlock(&sc->mtx); DPRINTF("%s exit", __func__); From nobody Tue Nov 19 21:18:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtHRW0zvyz5fSRP; Tue, 19 Nov 2024 21:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHRW0MhDz4mC4; Tue, 19 Nov 2024 21:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jD4lY2bKmzq3OH7a1n0+27PZa1UdG5sFHjEgYHsA+Eg=; b=I61XSbhHPSbcym726ugnZKdfU2O42XGye19ESItJSfBjFOGIvreeqJp9CTD8HLZwc/ML1A 2chFP6doaHh8CYibRtbqyJ4d413UG6qimlkplJa+JiS3jn1eeVSeXQvn0SZEON2IWa678V zDQa5Vg9Xt+mOFRPpu/cxjlikPLrpZWHQKxup5jEMRQ0TQ3CBYKccM47qoZfMYM6HbNUHA VLLuXRUgaoMW1yD+OyK3r1uc6QVHQbHiy2TI1YLVJRCgm50UoOrtyIAGTU6jt9i5p4TACk 21zYRHiy7NMBL+Rd4PhWAyxXh8TnVUhIEodRdh15EFHXIKkhseMCgwtcj3cpFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jD4lY2bKmzq3OH7a1n0+27PZa1UdG5sFHjEgYHsA+Eg=; b=ljLl91y0SpksP5XYLWO4at8/omNZ/7jEFhcptNCZ8Uf7ZVMz5/VZxbks45k8+0RQtTntju T8FeJ0/W8a9hdSEoMb95YcR5PRR1vICjloGaYucxpnb8RVoa0Br3bUMFUiu7EwgHQgUfc7 A1n/MSHM+hN92c3BeQdDFMocQSHUMeyfM6u/Ya4PThNjxQ15/D4udG92J0jS8IsU3tGGo2 HrpkH6IqSQ6Lj9A6qg2BZGYcQUSoUi8qG26W1uecXb67ztFUaQ9vKj4R420iIaa1xL4ytK SQvKSXSr4s9DzZXIB9xr5WCnvrUT5uFXXR7gCNrlyUBNDJ7FS+XZkA/cXalqUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051127; a=rsa-sha256; cv=none; b=VdIEQs+kGcSlS64/qZSqPx5RxoD0uwQEjPhtIxN4Lkj4gy3djTQTmTzqC9B4zohhwR+5Zz xkNVOJAHG8v9srNrHnnITf/rbqzbtVzsRu3ZZVsw/yojvYHGkSxqHMubxla3L2sIqd3rAI 5XPOF/zlXg0a0ArbVv6wKVKsB/1z3qSs1R9DiGmDmmdkQIIiI9s6mKKSqXsCBy9Rdfcg+U nxio4JIJEgaKCtOzWnbIIHKCaPdc1ZIVKgAuZxmiTTXdOqSgQvU/4f6w+4c5SYU4zCFTBU 6RlQ+AJYsG7SlxByyczWA9eyWBRShrGr/mko3uh9d7lPv6aYOvZF7XDnrSZQ3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtHRV74yLzR9H; Tue, 19 Nov 2024 21:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLIkh7092960; Tue, 19 Nov 2024 21:18:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLIkgo092957; Tue, 19 Nov 2024 21:18:46 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:18:46 GMT Message-Id: <202411192118.4AJLIkgo092957@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: 4ff291ebe80a - main - vfs: Fix vop_stdis_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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4ff291ebe80a226295351936d99fc6e3e7fce48a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4ff291ebe80a226295351936d99fc6e3e7fce48a commit 4ff291ebe80a226295351936d99fc6e3e7fce48a Author: Mark Johnston AuthorDate: 2024-11-19 21:03:14 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 21:03:14 +0000 vfs: Fix vop_stdis_text() atomic(9) primitives are documented as operating on unsigned types. Here, we need a cast to avoid a tautological comparison. Add a regression test for access(2), which was affected by the bug. Reported by: NetApp Reviewed by: kib Fixes: e511bd1406fa ("vfs: fully lockless v_writecount adjustment") MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47672 --- contrib/netbsd-tests/lib/libc/sys/t_access.c | 35 ++++++++++++++++++++++++++++ sys/kern/vfs_default.c | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_access.c b/contrib/netbsd-tests/lib/libc/sys/t_access.c index b37643c57d7d..f973aba3fb4a 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_access.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_access.c @@ -38,11 +38,13 @@ __RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include #include +#include #include #include #include #include +#include #include #include @@ -176,6 +178,38 @@ ATF_TC_BODY(access_notexist, tc) } } +ATF_TC(access_text); +ATF_TC_HEAD(access_text, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test access(2) for ETXTBSY"); +} + +ATF_TC_BODY(access_text, tc) +{ + char path[PATH_MAX]; + size_t sz; + int fd, name[4]; + + name[0] = CTL_KERN; + name[1] = KERN_PROC; + name[2] = KERN_PROC_PATHNAME; + name[3] = -1; + + sz = sizeof(path); + ATF_REQUIRE(sysctl(name, 4, path, &sz, NULL, 0) == 0); + + fd = open(path, O_RDONLY); + ATF_REQUIRE(fd >= 0); + + ATF_REQUIRE(access(path, W_OK) != 0); + ATF_REQUIRE(errno == ETXTBSY); + + ATF_REQUIRE(faccessat(AT_FDCWD, path, W_OK, 0) != 0); + ATF_REQUIRE(errno == ETXTBSY); + + ATF_REQUIRE(close(fd) == 0); +} + ATF_TC(access_toolong); ATF_TC_HEAD(access_toolong, tc) { @@ -214,6 +248,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, access_inval); ATF_TP_ADD_TC(tp, access_notdir); ATF_TP_ADD_TC(tp, access_notexist); + ATF_TP_ADD_TC(tp, access_text); ATF_TP_ADD_TC(tp, access_toolong); return atf_no_error(); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index f5722851d729..4067ab4ba446 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1158,7 +1158,7 @@ static int vop_stdis_text(struct vop_is_text_args *ap) { - return (atomic_load_int(&ap->a_vp->v_writecount) < 0); + return ((int)atomic_load_int(&ap->a_vp->v_writecount) < 0); } int From nobody Tue Nov 19 21:18:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtHRX3Ml1z5fS9W; Tue, 19 Nov 2024 21:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHRX1MKJz4mGg; Tue, 19 Nov 2024 21:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2uPvKIB7qOGHE7j8fBcQY+duMQKh+8eN3F2LFHxTmHM=; b=hAymFwg0IeZWfaXTuAAlq5OSqwU1hB4dtDOfOdg2Nfm3lL0iMdz0uiZrS4XNSIoR27yhu3 YXooyxfZzpNwlzsgOSxcVkd3aMfChbFs6/a49Eho6hpWPg12lHpV8uXqNgW8yLOEMYcLdr ok9UY3mtCsxrXF+krVb2UJu4sPA/ysIKwW8a0FfDvz9WfqNG6RiTIEYfxfa+pTBSrlbAWN 0q/ImvXcB+vUICsr+V6FL2zDeHO16RZn89Sw+gKxUNWA3ZnisFrvSc6/feLgYiyg9/dj8h 9NA1mZMrXZIpnkt1n9NEZH+5n1P2xs6NgvlsZP+1vFYi8L4Y1prFG7RwPvwbRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2uPvKIB7qOGHE7j8fBcQY+duMQKh+8eN3F2LFHxTmHM=; b=Dfd5KGRZn3UHf+wL5mzc4dOtYumOcDnrSUP6eM3chbBLOuzwDmv23cgpd0aCc9ULiAAA4n Bi/DP+esUrtZzu1t5YTXKQ4qB5LdhoTJHwHZqI6f65/bf3f/1v5ibnoe/xcNTo7ANVRWVB KYnqqMkCd8lSF9W3wLK6YxudLkdjkX+C99CtNHkZ2Oo7pNXdnT9ighV9ZuM3M1p79kPVu+ vjQ4VHQkpj8zzAua0nWsIzKj8DtS5qH78HbYFMHkyduG4ZtQWdV6SRgXk+1wZjQQsm2Rao OOydb9otcKbAbfHH/AnXxohh1Zv3S6n13t4UPX0h9tVL0ALYKzty0vVzCVq7CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051128; a=rsa-sha256; cv=none; b=it4uNeFRv6rXbWG/SFnXFtRpSWTApN9FLCorEz3zjfoWU/9Xik1A6BUnpw7E7fEW4PWyDo u9KcVtMiEgkl8tuDIITM4E2GtsDw7+3L+psFjf8Uydpjg/qlK4t0Yxj9gElYGBZ/Syyvoi AjC2t8xrb5/VLNqw0BkenHxXqHXsRfTPgI6dYsuWMGiX5bWNwQgssr6uBD7TDx4rilmh/Z n31tUv6dMitn/pbtNTR53IkwUsXPQokgEBNh3ybMeloDOE36iUQwa8m2Gp21FRQb7eLyvd j4iv+3T5BtUQ2AY8/WOc1XKm0Y0+Kb77RmsaB7stY06c8C5/rlMatRDpkErTXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtHRX0yQxzR9J; Tue, 19 Nov 2024 21:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLIm7A093027; Tue, 19 Nov 2024 21:18:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLImPA093024; Tue, 19 Nov 2024 21:18:48 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:18:48 GMT Message-Id: <202411192118.4AJLImPA093024@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: d6b692835e52 - main - mii_fdt: Search for the "ethernet-ports" subnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: d6b692835e52d85441dfdd20a01c12e17cb50914 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d6b692835e52d85441dfdd20a01c12e17cb50914 commit d6b692835e52d85441dfdd20a01c12e17cb50914 Author: Mark Johnston AuthorDate: 2024-11-19 21:05:19 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 21:05:19 +0000 mii_fdt: Search for the "ethernet-ports" subnode This is a more common name for the parent of the port nodes. PR: 280770 MFC after: 2 weeks Reported by: Mike Belanger --- sys/dev/mii/mii_fdt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mii/mii_fdt.c b/sys/dev/mii/mii_fdt.c index 240312114cf2..2254af162a34 100644 --- a/sys/dev/mii/mii_fdt.c +++ b/sys/dev/mii/mii_fdt.c @@ -115,6 +115,8 @@ mii_fdt_lookup_phy(phandle_t node, int addr) * Since we have multiple candidates select one based on PHY address. */ ports = ofw_bus_find_child(node, "ports"); + if (ports <= 0) + ports = ofw_bus_find_child(node, "ethernet-ports"); if (ports <= 0) return (-1); From nobody Tue Nov 19 21:18:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtHRY4v2yz5fSRV; Tue, 19 Nov 2024 21:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHRY244Cz4m8N; Tue, 19 Nov 2024 21:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=loE8prmi8e+1oaSVE6eCR9WQ+pABnVojEVTCWuvzKmw=; b=amfRN8Kda28f48HnFTt58i0OcCz4vh9tmjy8bgeJC2PKXNOewgWrm0yHL0fHvFuy2Hdnik l9hVFspgQfS3tcOVsDbZSdwXEm9Ki5EUvhbWxFvJ+Ckidp8cy6bpK/NnxhLEonX53Ui9v0 GVRkwldwRhQ4YXuiaTmjHAfVYuFx4/EYRgURQKSvdiZ1wetXO/6t2VXmoApJ/i99Mrtb3Z cqE7C9EvAHV1pZF02Fj5WZiVQD7PT3MEBD4EyfphEvn0WsaGsxYdGw21RRMIgDUMRUoTfv OLzUvOiwh/W7t6x5XkCjxKe5gvPQ8EKFAhEUDEynPYSYDQe24gft9MSa8+FFKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=loE8prmi8e+1oaSVE6eCR9WQ+pABnVojEVTCWuvzKmw=; b=jS9++AB58H/3+StOF5FlEOJtXgtJc5sPu7+kkokrrq/59G1qwb1EQ7dKjELJX/3Ztzhjj+ yYFEJHrBwTOaZ2FYPgIrC459RS3lVsz/awCa0wjd0i24hZNIpxL5AxtDGI42CdZXsih1Ue aQbk8oPq7NMchG1qNhl8aqgxRxph931M2fb3xtmY0qcvVj11EaB1dEXeXMwh+w81+D4rEv dxJjGIc71iTgLIEm24Sf59zncv4p1uLh/4ju/kT5Mo7rDtWU+Ko4fxPHtat34KNMSzRbBT y8iA1PkdHLpJAjs3szNAjb5stwehO55AQ29cIw5SWePs8edw4mApY2cIV75Viw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051129; a=rsa-sha256; cv=none; b=EPPwSeixjdpoxU0jbmG3zniyTkDaBHNcOOodr7wS2rarwPKoPQAXcVALp7rNQuMHoH78/C +rEsbxo1oQ0iWZdtlx1qxepSVqwxnEI0nINuNyF2ApIK5Rmhnef1W2Fvw8a0GYDoq7KSB9 ji/3p+qdvA06atXBWerjp5hpJfCKqwHrA/o/wGPFdIAFmsYOzCjZEYZuE1rNW6dAcNqnq3 /QT15BCPgmU0nxYuIucAK5Sdfz8GX7yKBYy+dOlu5ZyP/F4XwbQzNGBrFyzw9dcWW/XZUU WA9cfIwws9yinSCxFhMVkkROuDkcnJSVCDnUoWJH49cPnKYssTxsZf9VhuYmDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtHRY1g1qzR8H; Tue, 19 Nov 2024 21:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLInUw093087; Tue, 19 Nov 2024 21:18:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLInLm093084; Tue, 19 Nov 2024 21:18:49 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:18:49 GMT Message-Id: <202411192118.4AJLInLm093084@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: 48c738b038ac - main - jail: Let a couple of parameter types be specified as lists List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 48c738b038ac84f3334b20b9a0f56fa3d9b7f6d1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=48c738b038ac84f3334b20b9a0f56fa3d9b7f6d1 commit 48c738b038ac84f3334b20b9a0f56fa3d9b7f6d1 Author: Mark Johnston AuthorDate: 2024-11-19 21:05:24 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 21:05:24 +0000 jail: Let a couple of parameter types be specified as lists vnet.interface and zfs.dataset can be used to specify multiple interfaces/datasets in jail.conf, but not on the command-line, which is a bit surprising. Extend the handling of ip(4|6).addr to those parameters, update the description of vnet.interface in jail.8, and add a rudimentary regression test. Reviewed by: zlei, jamie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47651 --- usr.sbin/jail/jail.8 | 12 ++++++-- usr.sbin/jail/jail.c | 52 ++++++++++++++++++++++------------ usr.sbin/jail/tests/jail_basic_test.sh | 35 +++++++++++++++++++++-- 3 files changed, 75 insertions(+), 24 deletions(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 67f325d15a93..aa540a50a725 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -285,11 +285,17 @@ They can also be given the values and .Dq false . Other parameters may have more than one value, specified as a -comma-separated list or with +comma-separated list, or with .Dq += in the configuration file (see .Xr jail.conf 5 for details). +List-based parameters may also be specified multiple times on the command +line, i.e., +.Dq name=value1,value2 +and +.Dq name=value1 name=value2 +are equivalent for such parameters. .Pp The .Nm @@ -944,8 +950,8 @@ an interface, prefix and additional parameters (as supported by may also be specified, in the form .Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar prefix param ... . .It Va vnet.interface -A network interface to give to a vnet-enabled jail after is it created. -The interface will automatically be released when the jail is removed. +A list of network interfaces to give to a vnet-enabled jail after is it created. +The interfaces will automatically be released when the jail is removed. .It Va zfs.dataset A list of ZFS datasets to be attached to the jail. This requires diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c index 53e05870ff26..27769cc14958 100644 --- a/usr.sbin/jail/jail.c +++ b/usr.sbin/jail/jail.c @@ -146,6 +146,20 @@ static const enum intparam cleancommands[] = { IP__NULL }; +static const struct { + const char *name; + enum intparam param; +} listparams[] = { +#ifdef INET + { "ip4.addr", KP_IP4_ADDR }, +#endif +#ifdef INET6 + { "ip6.addr", KP_IP6_ADDR }, +#endif + { "vnet.interface", IP_VNET_INTERFACE }, + { "zfs.dataset", IP_ZFS_DATASET }, +}; + int main(int argc, char **argv) { @@ -330,6 +344,8 @@ main(int argc, char **argv) usage(); docf = 0; for (i = 0; i < argc; i++) { + size_t l; + if (!strncmp(argv[i], "command", 7) && (argv[i][7] == '\0' || argv[i][7] == '=')) { if (argv[i][7] == '=') @@ -338,32 +354,32 @@ main(int argc, char **argv) for (i++; i < argc; i++) add_param(NULL, NULL, IP_COMMAND, argv[i]); + continue; } -#ifdef INET - else if (!strncmp(argv[i], "ip4.addr=", 9)) { - for (cs = argv[i] + 9;; cs = ncs + 1) { - ncs = strchr(cs, ','); - if (ncs) - *ncs = '\0'; - add_param(NULL, NULL, KP_IP4_ADDR, cs); - if (!ncs) - break; - } - } -#endif -#ifdef INET6 - else if (!strncmp(argv[i], "ip6.addr=", 9)) { - for (cs = argv[i] + 9;; cs = ncs + 1) { + + /* + * Is this parameter a list? + */ + for (l = 0; l < nitems(listparams); l++) { + size_t len; + + len = strlen(listparams[l].name); + if (strncmp(argv[i], listparams[l].name, len) || + argv[i][len] != '=') + continue; + + for (cs = argv[i] + len + 1;; cs = ncs + 1) { ncs = strchr(cs, ','); if (ncs) *ncs = '\0'; - add_param(NULL, NULL, KP_IP6_ADDR, cs); + add_param(NULL, NULL, + listparams[l].param, cs); if (!ncs) break; } + break; } -#endif - else + if (l == nitems(listparams)) add_param(NULL, NULL, 0, argv[i]); } } else { diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index a907e713ab9a..5d67f42c2d56 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -25,9 +25,6 @@ # SUCH DAMAGE. atf_test_case "basic" "cleanup" -atf_test_case "nested" "cleanup" -atf_test_case "commands" "cleanup" - basic_head() { atf_set descr 'Basic jail test' @@ -58,6 +55,36 @@ basic_cleanup() jail -r basejail } +atf_test_case "list" "cleanup" +list_head() +{ + atf_set descr 'Specify some jail parameters as lists' + atf_set require.user root +} + +list_body() +{ + if [ "$(sysctl -qn kern.features.vimage)" -ne 1 ]; then + atf_skip "cannot create VNET jails" + fi + atf_check -o save:epair ifconfig epair create + + epair=$(cat epair) + atf_check jail -c name=basejail vnet persist vnet.interface=${epair},${epair%a}b + + atf_check -o ignore jexec basejail ifconfig ${epair} + atf_check -o ignore jexec basejail ifconfig ${epair%a}b +} + +list_cleanup() +{ + jail -r basejail + if [ -f epair ]; then + ifconfig $(cat epair) destroy + fi +} + +atf_test_case "nested" "cleanup" nested_head() { atf_set descr 'Hierarchical jails test' @@ -97,6 +124,7 @@ nested_cleanup() jail -r basejail_nochild } +atf_test_case "commands" "cleanup" commands_head() { atf_set descr 'Commands jail test' @@ -129,6 +157,7 @@ commands_cleanup() atf_init_test_cases() { atf_add_test_case "basic" + atf_add_test_case "list" atf_add_test_case "nested" atf_add_test_case "commands" } From nobody Tue Nov 19 21:18:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtHRZ5YHwz5fS6T; Tue, 19 Nov 2024 21:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHRZ3R50z4mKN; Tue, 19 Nov 2024 21:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IWUPcsGGN5hrBi3EEV2cm2hEx6JEj3JPnMUHOzb2BEw=; b=V21QhWSk+ekDYaNGecDBYb6BOe3wIAeRZamMDEmxOjM1GQx2tmApsDQa7xxpAbAGEfEELL Fi8Aa8khiiS36Uv/scBh5807hdMYfYheNI1jU/PMfxzAPA0caexqvhaGvEgMKbdeo0mrBr bS8jO/8yCvp6nhwQ8D15J0EmQjjkdYBC9rnQhiJju9XJ14cvJPVh43rHjOJl6YIHaN/O0C a0boLP6l+GjQruUZrg5xZhUhq7h3LZUGSGV42HIjzhevd6wqP/bmzgBwIpzINPwob2oh8Q FZ7GUysO54ljb2XdRU/PQyCO9DaLxnY32LlH0QOxlEoWZHU63Bbu2otOj49jDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IWUPcsGGN5hrBi3EEV2cm2hEx6JEj3JPnMUHOzb2BEw=; b=BAD8LNje3sXnjCdLvfUKgY3Qd9Xx8H9iwCj7vCEeTSHMka5LBeCoHkmwMd1LRkH5jA0+ms mgdrwG5VLuCE1bEQdxYbX1wBSztBvpzJV1E17f2n/YWrCofhKYd7FqrYFJk4asEIXa0LqE HkVx8aaVQLV0Q7Hem48vvb+kolqiNxdfRXopO89FOKlBtyzNXpxyht6AXSikLFdhxdA58I uVQwrTn9ZU/t5UDU+AoOZY5WC2+Q7e55gIfphORLjEffVPPUNKqdeLbY/NlGZY/Op71d3m 7CYeu42G9SsgXVY0PIXqiaJKTOk9AITVAw2/xgqeZMaaiLjX635PzId7o8CPnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051130; a=rsa-sha256; cv=none; b=xYLhY/zyoYWUf6tNs1m6ky3+4igOdRpT1pui8mYJt5YlFsk93tHH/S06a+xNI8Qlu3Q9tK R4Ove08u6cGxnFPn9Vb67LbFt+ORP4WnWZRBYVbrQmiyjAfE/bUT6wIvPVF6ZT+4X4eESH pPRAmtdGmr8mu0PyU2XxuUdewpoJt6kQa94nVWv2XARapgiu2eWLRqsqhMdkuRoLQ0oQXw 3y3QgCUcppNskLVPNYHoOl0iojUwxy0nu+t1FwdfNmJCDG1vWdQIb24lfoDFwzqNBenkNr o6owC74V3V4ZC09+nsWPWWCNDXT2kKEHGepSKNicNmGAObEfa916hEcy3zj0+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 4XtHRZ30Q9zR8J; Tue, 19 Nov 2024 21:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLIoIB093141; Tue, 19 Nov 2024 21:18:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLIo0u093138; Tue, 19 Nov 2024 21:18:50 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:18:50 GMT Message-Id: <202411192118.4AJLIo0u093138@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: e3f6ef5ade6a - main - sdt: Stop defining probe and provider structures as arrays List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e3f6ef5ade6a1865165bae55bbabd7cd8ec5da76 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e3f6ef5ade6a1865165bae55bbabd7cd8ec5da76 commit e3f6ef5ade6a1865165bae55bbabd7cd8ec5da76 Author: Mark Johnston AuthorDate: 2024-11-19 21:06:46 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 21:18:34 +0000 sdt: Stop defining probe and provider structures as arrays There was no reason I can find for defining them this way. No functional change intended. Sponsored by: Innovate UK --- sys/sys/sdt.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index 0987f1cc19c3..5fa612fcf632 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -161,28 +161,26 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); sdt_provider_##prov #define SDT_PROVIDER_DEFINE(_prov) \ - struct sdt_provider _SDT_PROVIDER_NAME(_prov)[1] = { \ - [0] = { .name = #_prov }, \ + struct sdt_provider _SDT_PROVIDER_NAME(_prov) = { \ + .name = #_prov, \ }; \ DATA_SET(sdt_providers_set, _SDT_PROVIDER_NAME(_prov)) #define SDT_PROVIDER_DECLARE(prov) \ - extern struct sdt_provider _SDT_PROVIDER_NAME(prov)[1] + extern struct sdt_provider _SDT_PROVIDER_NAME(prov) #define SDT_PROBE_DEFINE(_prov, _mod, _func, _name) \ - struct sdt_probe _SDT_PROBE_NAME(_prov, _mod, _func, _name)[1] = { \ - [0] = { \ - .version = sizeof(struct sdt_probe), \ - .prov = _SDT_PROVIDER_NAME(_prov), \ - .mod = #_mod, \ - .func = #_func, \ - .name = #_name, \ - }, \ + struct sdt_probe _SDT_PROBE_NAME(_prov, _mod, _func, _name) = { \ + .version = sizeof(struct sdt_probe), \ + .prov = &_SDT_PROVIDER_NAME(_prov), \ + .mod = #_mod, \ + .func = #_func, \ + .name = #_name, \ }; \ DATA_SET(sdt_probes_set, _SDT_PROBE_NAME(_prov, _mod, _func, _name)) #define SDT_PROBE_DECLARE(prov, mod, func, name) \ - extern struct sdt_probe _SDT_PROBE_NAME(prov, mod, func, name)[1] + extern struct sdt_probe _SDT_PROBE_NAME(prov, mod, func, name) #define SDT_PROBES_ENABLED() __predict_false(sdt_probes_enabled) @@ -223,13 +221,13 @@ struct sdt_tracepoint { _SDT_ASM_WORD " 0\n" \ ".popsection\n" \ : \ - : _SDT_ASM_PROBE_CONSTRAINT (_SDT_PROBE_NAME(prov, mod, \ + : _SDT_ASM_PROBE_CONSTRAINT (&_SDT_PROBE_NAME(prov, mod, \ func, name)) \ : \ : __sdt_probe##uniq); \ if (0) { \ __sdt_probe##uniq:; \ - f(_SDT_PROBE_NAME(prov, mod, func, name)->id, __VA_ARGS__); \ + f(_SDT_PROBE_NAME(prov, mod, func, name).id, __VA_ARGS__); \ } \ } while (0) #define _SDT_PROBE(prov, mod, func, name, uniq, f, ...) \ @@ -246,7 +244,7 @@ __sdt_probe##uniq:; \ .ndx = _num, \ .type = _type, \ .xtype = _xtype, \ - .probe = _SDT_PROBE_NAME(_prov, _mod, _func, _name), \ + .probe = &_SDT_PROBE_NAME(_prov, _mod, _func, _name), \ }, \ }; \ DATA_SET(sdt_argtypes_set, \ From nobody Tue Nov 19 21:18:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtHRd0Bc3z5fS1h; Tue, 19 Nov 2024 21:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHRc5WSCz4mNT; Tue, 19 Nov 2024 21:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ukyBRKsUxuSACNhMVvFoOuf4zBG5eBLxAuFCZqPorE=; b=pWpxS48tBd5qhSGqubzMG/hJjzGWe7pW26IW0d6+IDUhonfbwp+7fXGWTetzbAdNrhugV1 dwulyo5GOWNFqDciJwcbdfpElOFG/TyPUXJjbUVD1jMMJeQk5zkJZPNGqykighyfsrHftB 6W6auouquZy/yNDm4sXc4d3P+jjwRe13tP4hiW5FbVG+03/oFxEtk6evpikEj1edU3A1bv +Vg7Lc62fU1oQ9Sev6Hy+yUdc+yjNMTM18vVf3ZPdH/5xWqzdYHKqL79xtwV28Fa897Aj0 +atjFwBpB9tuit95kP8blzODzGxZ2Sh94G9X/xInMj1Bz7u1FU6QrHI3H6CNEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ukyBRKsUxuSACNhMVvFoOuf4zBG5eBLxAuFCZqPorE=; b=XgSXQBIJnZhdJIKOoxWdKmwWUjfUWX2Cs36VGur0/4g8p73Dx3dEYSlbGtVfyMUPiTMn6Q m3YuCIyc4T//ogi39eWAjvMYsqfuS8ijDFHb/23xGB2t1xogc7XT/8ityZJqB00HPYcE7b F/5gRRboJazcziHCXuF6lJQt8EhiHelKoBmLvNasOOdEB+eK25vaz94rdDIIB7OXVMof/R H6v7vCGPyYtxQd4Ft4AI3/ELo6yyR9E3Ee1tSwUPxplhLtFKUnq/PI2SyImw38XDsVDWbX F56P0MQkqoFCICbHb+iLfTTdKnpYyf3v6lq6+ia/SlGIDfTcNrjKm0Ig7dao6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051132; a=rsa-sha256; cv=none; b=J/IFhRT4KFN84SbuP2yQ3ZZmcRqYtxgERbMssFowtr00skXvhYvNE0jfeTU6mXkxiZqqQ4 zYKOuMqKd6OK3zvQw+8kBpxwbevJsNo/1UcAYEYG24Za1JSu16Gz9ZA2gXjR8XWl4v3eXy /XL0Hio9KZ37HMSqIWtb4EOkDpqcInUs/3Ao7tDDOLpsHOJOdA/QhrHnCWDHl0cmXe1Nut hNOF62soI3kQpz+Si69QuSu0qO60YyNoYKxXa9aOP+ssIO4HzdgDV24Ku6Rto90vyzGNjm oXYjJlPgf6otTo7A18420bcOfbbi6KTSGPiEWIsAO2v53D37uiLtQAUjgkIUVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtHRc56MtzR8K; Tue, 19 Nov 2024 21:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLIqcR093256; Tue, 19 Nov 2024 21:18:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLIqR9093253; Tue, 19 Nov 2024 21:18:52 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:18:52 GMT Message-Id: <202411192118.4AJLIqR9093253@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: a20249443be1 - main - makefs.8: Clarify that makefs-generated zpools always have the same GUID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a20249443be111e8a3cb3b7bbe4a0d0e460a6058 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a20249443be111e8a3cb3b7bbe4a0d0e460a6058 commit a20249443be111e8a3cb3b7bbe4a0d0e460a6058 Author: Mark Johnston AuthorDate: 2024-11-19 21:07:56 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 21:18:38 +0000 makefs.8: Clarify that makefs-generated zpools always have the same GUID PR: 282832 MFC after: 1 week --- usr.sbin/makefs/makefs.8 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index 897c647fc52b..ae11309953e4 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -507,6 +507,21 @@ The root dataset is always created implicitly and contains the entire input directory tree unless additional datasets are specified using the options described below. .Pp +To keep images reproducible, the pool GUID and other random identifiers will +always be the same across runs of +.Nm . +This means that when a pool is first imported, its GUID should be reset +using +.Xr zpool-reguid 8 +to avoid conflicting with other pools also generated by +.Nm ; +otherwise, it will not be possible to import other pools. +This can be configured from +.Pa /etc/rc.conf +using the +.Va zpool_reguid +variable. +.Pp The arguments consist of a keyword, an equal sign .Pq Ql = , and a value. @@ -584,11 +599,13 @@ The following properties may be set for a dataset: .El .Sh SEE ALSO .Xr mtree 5 , +.Xr rc.conf 5 , .Xr zfsconcepts 7 , .Xr zfsprops 7 , .Xr zpoolprops 7 , .Xr mtree 8 , -.Xr newfs 8 +.Xr newfs 8 , +.Xr zpool-reguid 8 .Sh HISTORY The .Nm From nobody Tue Nov 19 21:18:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtHRc0QmSz5fS9Z; Tue, 19 Nov 2024 21:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHRb4VFWz4mCl; Tue, 19 Nov 2024 21:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2kSFOSg4W02tHaYMnKefxFcIcRGvqBMb5LvyPyGWJNU=; b=pNzzvX6eV11FzB5pMlIk4Im3KONQr525thk7iv03hLhKavfsLFJg5IzdZlw/CekYG5nH2+ znvhq1Ak8sLyOnHIalzxXQ73dH8snnpYoSTp2tHYTF+YGiP4W1SbuMx39DRru5ixMGlwIx hseGX0OIKXVZqj49uUwB2V19hKfuwSgPW95/wN7Hk8CxYF7VPlHMwqsexj/d9x4oKGQ6Jj kx5abNreaursP3XnDCSl7LAPtEJy+ZlFYltcaGEunQTYKz6Ilwq/wR4KNW6q25TSL9I2mH +Cmu1Tg20dQhg/I0JxkCkIXzSjNWVa3TX3W0gTS9xOlQ3nt7gp7/4Ozg/7wLhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2kSFOSg4W02tHaYMnKefxFcIcRGvqBMb5LvyPyGWJNU=; b=xcPJ6GjlVc+CZvwC+PrI8ARRplK71rYv+EFWblvjuMpsmWnpGGnmLAt7ylZb14BiRXggZa aFk8F/7wdPBeIUHybYEKVlBe704oEsnqio0HGc3gzFI/sF+zbcHZFzi84vvB6ujaX0xD1D wvkPS6BGxhJMKyEMw8GftOmKx2cw9HtCVbRz/y8qwhigQ/sSSeuKH92sv+IrqLwPJ0LqVt TnVwhvkhhLlpGJaHC9jNzK6tzHhkV7xC58xlK1UwcqxZme6I82m6wGQttj9WyukxzheNJB GwDhPmHCQrtbvHJwdHlki80lA2ygBvDEzayYrBTJKvXJNWVdE2bJfqrbN0HHOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051131; a=rsa-sha256; cv=none; b=Ilx8CbnKgSPKM17trTR3Bx4x9M2DnAc34xyCJUSBMQmBZqCoLQmG0F5BMuDBg0hd+H3NKZ nqNBkPyYXwt61BSzMFZJkeawIJLQhmUmGR+ghJ5THrNNMqa+cdyiTNs2jYnxRGdLPJc49+ WaeBlhDE/C82tVqVbD5RHcuDF8GcavHAEApVU/VWhkez3bJ8tNPheJw75iO2HCCEm7Icqz SRmqGqCKU5FczTJL8zV5tI7J2mCZJRUNCHrIHr9O7RAVPGy3Hk42LZcCq07lAAA8Ql/Gjb nGWj+q6tZfhEUzEPoi7efNbgFhd6XZYr7/0uvA9KRwXuGKMDb82xrZi9VTkiJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtHRb44cfzQyj; Tue, 19 Nov 2024 21:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLIpqm093198; Tue, 19 Nov 2024 21:18:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLIpY8093195; Tue, 19 Nov 2024 21:18:51 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:18:51 GMT Message-Id: <202411192118.4AJLIpY8093195@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: e19c607ff9b2 - main - makefs.8: Remove a warning about makefs -t zfs being experimental List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e19c607ff9b2b5d55664fd13e5fd9814e3279ffd Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e19c607ff9b2b5d55664fd13e5fd9814e3279ffd commit e19c607ff9b2b5d55664fd13e5fd9814e3279ffd Author: Mark Johnston AuthorDate: 2024-11-19 21:07:39 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 21:18:38 +0000 makefs.8: Remove a warning about makefs -t zfs being experimental This should have been done with commit d9fe71828797 but was missed. Fixes: d9fe71828797 ("makefs: Remove the warning printed when makefs -t zfs is used") MFC after: 3 days --- usr.sbin/makefs/makefs.8 | 3 --- 1 file changed, 3 deletions(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index 823334d1b3dc..897c647fc52b 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -499,9 +499,6 @@ Volume ID. Volume Label. .El .Ss zfs-specific options -Note: ZFS support is currently considered experimental. -Do not use it for anything critical. -.Pp The image created by .Nm contains a ZFS pool with a single vdev of type From nobody Tue Nov 19 22:21:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtJqL13jlz5cnLm; Tue, 19 Nov 2024 22:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtJqL0V00z4w3F; Tue, 19 Nov 2024 22:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732054862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/pOXde++wEA1o8rpjoAUgiK0IVMixYBxPHa5aVd/+6U=; b=ChMtdOmMHiMy15aBl4idhcRdn6O00auIVyGchU5UzWzuo0SS+soshbbgtbK+MCqFfGbbS7 zmx/CDhLXAscJ9enyKbc/4swvCRwHiCSzN9am9AGxmtpw+zVBAuWlD89rQT25681sH7e3D SltL8pcn0brvv6BGJw06DGLg6Ly5TN14haK8BlyDw9ugn6rWer3CIV4lZjI7Nz69w84kWt AlHgPOLnHPYlQxEyXX8kVSqramxS2ilKdXZcqHESFVBsdTkltHGxkuLk4pY43aezD7dNot Z+Br6XU52MBx+G+MydY411bE3CAt1Jg65HwL1scUpnb8J+/jlhXZ4J2Hs5klNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732054862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/pOXde++wEA1o8rpjoAUgiK0IVMixYBxPHa5aVd/+6U=; b=BD9YqcnUp83fMva6xk1WJZYEt19++X+hRxqamn2UAJDbRZaifZgUcV6M1uk0seox0l0TQI Z8N6lCE4IZefcHBfmBUIahb8+X8So++H9vwv9W0GoInnnZPh0vcqZn+EieY+Dq3nj5UWFy JT74u5hjCZBGO3mAMNjUsNxWDAnFdApWc6p50JMOfkBGrEISvnfzdH6ZLl8Cn8l4125rbs ez6IN/7blHDdHk317WsM+y8G0DI+xMgkY/YRh9aumJKrW6SZ7QVi7NKE5fKRB6o+eVeYnC ZggX/IgMQkhQleW6krp5R2pf5EbRdbezOOTjlkTQp51k92vIrAeiMawwNjFnCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732054862; a=rsa-sha256; cv=none; b=itAA/KrNnmNMd2C2UdMsA0Aq/GjIqEJm3wcRkpzhMLYP5LVVgmRdjwQyvw5WA4ATlmLDwx p/DjWmmBtShex72UimtKO2q4qcTv5CnmdMvmyTWEyIdvyaDAS2LKPUYpwhqmTpT8NzsYq1 YyDmN+RHKo74FkthPYYFCkNxRR24FEvuf6sMHygbjZ07u7Oic9RpHVcsTjEXzKLkN/vT2M 7T3FRREHKM6vDUwNDR6ZTfySQ2NHJ2d/dvA2bFFmyEb98/NqybUzW5A3oUwRs/b+Yu5J/8 bsR+FPMfTBHxf3rykHIWPhjoNd38dVU5CN3uMHf0JjqpRDXJJfAqRKfk3Ly8Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtJqL03MpzSGM; Tue, 19 Nov 2024 22:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJML1To014758; Tue, 19 Nov 2024 22:21:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJML1qc014755; Tue, 19 Nov 2024 22:21:01 GMT (envelope-from git) Date: Tue, 19 Nov 2024 22:21:01 GMT Message-Id: <202411192221.4AJML1qc014755@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: 7678dac43714 - main - ktrace: support AF_NETLINK in ktrstruct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 7678dac437149a8af7cbbc2c8b067c9096143320 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=7678dac437149a8af7cbbc2c8b067c9096143320 commit 7678dac437149a8af7cbbc2c8b067c9096143320 Author: Artem Hevorhian AuthorDate: 2024-11-19 22:19:15 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-19 22:19:50 +0000 ktrace: support AF_NETLINK in ktrstruct Right now, sockaddr_nl parameters are not displayed in kdump output, however they are present in the structure in ktrace.out file when ktrace is run. Reviewed by: melifaro, markj, glebius Differential Revision: https://reviews.freebsd.org/D47411 --- usr.bin/kdump/kdump.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index f104c20f3842..48f645c339b9 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -59,6 +59,7 @@ #endif #include #include +#include #include #include #include @@ -1944,6 +1945,15 @@ ktrsockaddr(struct sockaddr *sa) printf("%.*s", (int)sizeof(sa_un.sun_path), sa_un.sun_path); break; } + case AF_NETLINK: { + struct sockaddr_nl sa_nl; + + memset(&sa_nl, 0, sizeof(sa_nl)); + memcpy(&sa_nl, sa, sa->sa_len); + printf("netlink[pid=%u, groups=0x%x]", + sa_nl.nl_pid, sa_nl.nl_groups); + break; + } default: printf("unknown address family"); } From nobody Tue Nov 19 23:51:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtLqP6MWPz5cts1; Tue, 19 Nov 2024 23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtLqP5ykCz525s; Tue, 19 Nov 2024 23: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=1732060273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y2GAUmgTmYBJJTIjtema2a9tW0fgqdRkfBSfvslTwRc=; b=AF4O4uom38T0TnJre4vsCpWgC0L68hfxyjUkiVitZ+gxE2tY+sEsmq7APNU/Sc7mAtyoed jpOKxLqKzYpd/cqh6CJ/zn1bGQTqrxVTAWp32itwO2IFWGNOOW7b2r2r2gu1J2ByPQiX5I 5NRCKhYHMLhebuRErUFefCyrz8dHB4YZS6LJbmYzQJyb6yBeyONDI/JLvJEBdZartNx1o9 5/3qz8qz5YacS7apkg1j7hFhhMBIEk0EGUlAnyz9gL3FoK+sYBoekAjfZycvG7DxrCRwOM IKTXwr38hTaumdUupPtZhtfhSYb1pgafbzI+U1Z+/wez29lEampTCT+QDMQx8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732060273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y2GAUmgTmYBJJTIjtema2a9tW0fgqdRkfBSfvslTwRc=; b=wu7S7ff0EHu4mp+v5IQfZUekKELDXMxRBvDESegEVgLUY3Xxpc1aihk1fzIRlOzToz6910 sh25DGlpDSv5xM1XTmKn2y2R9NqgAhd2La5vFbhRIL2GC1ABQ10d5ZIISmh7dCpsm0GeQk lkjddPW22BBaIPyP50ZOizONw1WF35aVU/Jfcd1E6OXV2riRyYC9r/vlGUApVvRv4YZT/P yHelSK9cioCDPbkH+vlYokwk3qzte5Rilm+vIHMdLjX2yLx3rEJcg/Yo1oEDi1KhD4oDV0 H/tNntb56UALDZ5nSErmqy/X+Ms69ySZAl2S4iMH8C6eLNORQVcqVC4t59UB2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732060273; a=rsa-sha256; cv=none; b=E+eTXqkv+SHerJCvMVahmxW/QcNDOC9f2sMEDZDmUCbJGUHympcUX9ZWdvFSw7vpne84xv UxJZq4NKFyUMoyaUm5Tj012PcGU+YYrLesjZkMOB/efj/ZHlG5GJNGfrvOUbAkq7ErOdW3 R2KWDhbUGjxbYAsz6hFOc38mSh+xUcHj0E0yWsZ1ukdFQx4vmEZQL1GgCmTj+Uy9OONkQb HGrvjTXpsDqilaeepyOF8t1DSEJEGqNuB86GzHigt7jLH/niwMglnPFwDMnABjiPE+ZkBs iYAJDUFHaruwgVpS/BlafRy2j7UNGlCghSS1egO02vZmwj7EHwAMIm/ma9V4DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtLqP5Yw9zWkJ; Tue, 19 Nov 2024 23:51:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJNpDOY083874; Tue, 19 Nov 2024 23:51:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJNpDGR083871; Tue, 19 Nov 2024 23:51:13 GMT (envelope-from git) Date: Tue, 19 Nov 2024 23:51:13 GMT Message-Id: <202411192351.4AJNpDGR083871@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: e03a056de0ba - main - vfs: Fix runningspace tuning after maxphys was bumped List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e03a056de0baa06f7b38033e56a33a19526b542c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e03a056de0baa06f7b38033e56a33a19526b542c commit e03a056de0baa06f7b38033e56a33a19526b542c Author: Mark Johnston AuthorDate: 2024-11-19 23:46:24 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 23:46:50 +0000 vfs: Fix runningspace tuning after maxphys was bumped The previous maximum value for the upper watermark was based on the old value of MAXPHYS. Raise it to allow more parallel I/O on large systems. This is still a rather flawed mechanism since it's applied without regard to the number of filesystems or block devices between which this mechanism sits, but we might as well bump the limits at this point, as they haven't been revised in quite a long time. Reviewed by: imp, kib MFC after: 2 weeks Fixes: cd8537910406 ("Make MAXPHYS tunable. Bump MAXPHYS to 1M.") Differential Revision: https://reviews.freebsd.org/D47398 --- sys/kern/vfs_bio.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 62b0567f269a..10ee88328875 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1253,15 +1253,16 @@ bufinit(void) bufspacethresh = lobufspace + (hibufspace - lobufspace) / 2; /* - * Note: The 16 MiB upper limit for hirunningspace was chosen - * arbitrarily and may need further tuning. It corresponds to - * 128 outstanding write IO requests (if IO size is 128 KiB), - * which fits with many RAID controllers' tagged queuing limits. + * Note: The upper limit for hirunningspace was chosen arbitrarily and + * may need further tuning. It corresponds to 128 outstanding write IO + * requests, which fits with many RAID controllers' tagged queuing + * limits. + * * The lower 1 MiB limit is the historical upper limit for * hirunningspace. */ hirunningspace = lmax(lmin(roundup(hibufspace / 64, maxbcachebuf), - 16 * 1024 * 1024), 1024 * 1024); + 128 * maxphys), 1024 * 1024); lorunningspace = roundup((hirunningspace * 2) / 3, maxbcachebuf); /* From nobody Tue Nov 19 23:51:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtLqR0n9Lz5ctrK; Tue, 19 Nov 2024 23:51: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtLqR08f7z52QJ; Tue, 19 Nov 2024 23:51:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732060275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r3RRFyDRADXcjFS/XAFaiYr1MK9LtJAhXQB2ZEg/C1A=; b=oCYCGEsvTNUdZqLUT3U0+ME87e8z1q+kJ+WkasOFdJVMpy6wxk//akcSNh1SoVlkOSNY/c gP/NvvFhyeBrlCIelXg67nioa/fChCE+auCTrEF/W2MZvyX5Jl4JArYk7Jt6l1S4s3S5zW MiaAHynzcJkI25hIrkZHuocVJjrVinLrdUyIi9+mI2fkyVxP/dCpRkU5bsl4STTIhAVNSr vjesNQksgO8kuk5vBwnfLrZ+EGjh3zoTt7fX8jsr7A8lYOjrldiKgTwg/VH+IhAkNNeDYg IhxuSRcPPT0U6gn8CLP89WpMyO6vkpdip7KZsWPAmqMteL/hsZAe8WXCXkrZpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732060275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r3RRFyDRADXcjFS/XAFaiYr1MK9LtJAhXQB2ZEg/C1A=; b=ffMD+tIfo9bYK8N8Lj4yHhE8RpjGNi8QrsBL4r03S1ORwHhY8Nqa/MLsMVaPCWoauS6/k+ 8ar5HHyBlflJF9yhWr927HfxTcuAUqVWr8xOwjVr+1nsBbHlTzG/0OeWveqTE6jyO2YlkF lgEvboCoB3yEerTWWmHGtNEDt0jI/tzY2xFLjz/8mvv78nCL1b/SZn8ndbav16GHJpZo6k WxuA+kcdvMOnpCXkNAmx3FQag/VApFleQHN3kEQU6mfCllRH//DkOpnz/dIYE0NcumWmqj DMJ3Gbn/bsI0XScj2QdeqZBqCW7B3aR8OJdRRcRHMMBB1a+Ldob/gZEFal0Kpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732060275; a=rsa-sha256; cv=none; b=HQUZqkxF4xylolBsUMzGqYAkUF8VoeNPs8LUMX+T547moaQtEfPeLNNyGrjcgPz3PzH1Dr PVzygz4QkxgxTJ0rVChy9jC3wnux7zJLPee6sIsTuMlhvb+FUeE0v470mgkgQq8IJL1JYy 32r8F69O3gbC+shQVK5g1Gdm5oFWWM3DBghoROztI+1UmGW902K+L/kSJgbXHoVhbADUx9 NHRbZ1gwklLLv8V1mBsk+ynTBcZ2RTWAYllcwN1pNZqu/DSPh+guqG+4OaQmg5op/8qfcO xi36jMJM0PQpkh4CMh9Q5N3/yNHimH9YN33TqeWESBQM8O4zQODu9EfX6kXzlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtLqQ6sL0zWl8; Tue, 19 Nov 2024 23:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJNpEXr083926; Tue, 19 Nov 2024 23:51:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJNpEnG083923; Tue, 19 Nov 2024 23:51:14 GMT (envelope-from git) Date: Tue, 19 Nov 2024 23:51:14 GMT Message-Id: <202411192351.4AJNpEnG083923@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: 3c29734502c3 - main - hwpmc: Fix whitespace in logging 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3c29734502c330fc8f8e345213791722aeaf55c1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3c29734502c330fc8f8e345213791722aeaf55c1 commit 3c29734502c330fc8f8e345213791722aeaf55c1 Author: Mark Johnston AuthorDate: 2024-11-19 23:48:53 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 23:48:53 +0000 hwpmc: Fix whitespace in logging macros MFC after: 1 week Sponsored by: Klara, Inc. --- sys/dev/hwpmc/hwpmc_logging.c | 136 ++++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 66 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c index 6394d7a9cdad..b472bf856b92 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -93,88 +93,92 @@ SYSCTL_INT(_kern_hwpmc, OID_AUTO, nbuffers_pcpu, CTLFLAG_RDTUN, static struct mtx pmc_kthread_mtx; /* sleep lock */ -#define PMCLOG_INIT_BUFFER_DESCRIPTOR(D, buf, domain) do { \ - (D)->plb_fence = ((char *) (buf)) + 1024*pmclog_buffer_size; \ - (D)->plb_base = (D)->plb_ptr = ((char *) (buf)); \ - (D)->plb_domain = domain; \ - } while (0) +#define PMCLOG_INIT_BUFFER_DESCRIPTOR(D, buf, domain) do { \ + (D)->plb_fence = ((char *)(buf)) + 1024 * pmclog_buffer_size; \ + (D)->plb_base = (D)->plb_ptr = ((char *)(buf)); \ + (D)->plb_domain = domain; \ +} while (0) -#define PMCLOG_RESET_BUFFER_DESCRIPTOR(D) do { \ - (D)->plb_ptr = (D)->plb_base; \ - } while (0) +#define PMCLOG_RESET_BUFFER_DESCRIPTOR(D) do { \ + (D)->plb_ptr = (D)->plb_base; \ +} while (0) /* * Log file record constructors. */ -#define _PMCLOG_TO_HEADER(T,L) \ +#define _PMCLOG_TO_HEADER(T, L) \ ((PMCLOG_HEADER_MAGIC << 24) | (T << 16) | ((L) & 0xFFFF)) /* reserve LEN bytes of space and initialize the entry header */ -#define _PMCLOG_RESERVE_SAFE(PO,TYPE,LEN,ACTION, TSC) do { \ - uint32_t *_le; \ - int _len = roundup((LEN), sizeof(uint32_t)); \ - struct pmclog_header *ph; \ - if ((_le = pmclog_reserve((PO), _len)) == NULL) { \ - ACTION; \ - } \ - ph = (struct pmclog_header *)_le; \ - ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ - ph->pl_tsc = (TSC); \ - _le += sizeof(*ph)/4 /* skip over timestamp */ +#define _PMCLOG_RESERVE_SAFE(PO, TYPE, LEN, ACTION, TSC) do { \ + uint32_t *_le; \ + int _len = roundup((LEN), sizeof(uint32_t)); \ + struct pmclog_header *ph; \ + \ + if ((_le = pmclog_reserve((PO), _len)) == NULL) { \ + ACTION; \ + } \ + ph = (struct pmclog_header *)_le; \ + ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ + ph->pl_tsc = (TSC); \ + _le += sizeof(*ph) / 4 /* skip over timestamp */ /* reserve LEN bytes of space and initialize the entry header */ -#define _PMCLOG_RESERVE(PO,TYPE,LEN,ACTION) do { \ - uint32_t *_le; \ - int _len = roundup((LEN), sizeof(uint32_t)); \ - uint64_t tsc; \ - struct pmclog_header *ph; \ - tsc = pmc_rdtsc(); \ - spinlock_enter(); \ - if ((_le = pmclog_reserve((PO), _len)) == NULL) { \ - spinlock_exit(); \ - ACTION; \ - } \ - ph = (struct pmclog_header *)_le; \ - ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ - ph->pl_tsc = tsc; \ - _le += sizeof(*ph)/4 /* skip over timestamp */ - - - -#define PMCLOG_RESERVE_SAFE(P,T,L,TSC) _PMCLOG_RESERVE_SAFE(P,T,L,return,TSC) -#define PMCLOG_RESERVE(P,T,L) _PMCLOG_RESERVE(P,T,L,return) -#define PMCLOG_RESERVE_WITH_ERROR(P,T,L) _PMCLOG_RESERVE(P,T,L, \ - error=ENOMEM;goto error) +#define _PMCLOG_RESERVE(PO, TYPE, LEN, ACTION) do { \ + uint32_t *_le; \ + int _len = roundup((LEN), sizeof(uint32_t)); \ + uint64_t tsc; \ + struct pmclog_header *ph; \ + \ + tsc = pmc_rdtsc(); \ + spinlock_enter(); \ + if ((_le = pmclog_reserve((PO), _len)) == NULL) { \ + spinlock_exit(); \ + ACTION; \ + } \ + ph = (struct pmclog_header *)_le; \ + ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ + ph->pl_tsc = tsc; \ + +#define PMCLOG_RESERVE_SAFE(P, T, L, TSC) \ + _PMCLOG_RESERVE_SAFE(P, T, L, return, TSC) +#define PMCLOG_RESERVE(P,T,L) \ + _PMCLOG_RESERVE(P, T, L, return) +#define PMCLOG_RESERVE_WITH_ERROR(P, T, L) \ + _PMCLOG_RESERVE(P, T, L, error = ENOMEM; goto error) #define PMCLOG_EMIT32(V) do { *_le++ = (V); } while (0) #define PMCLOG_EMIT64(V) do { \ - *_le++ = (uint32_t) ((V) & 0xFFFFFFFF); \ - *_le++ = (uint32_t) (((V) >> 32) & 0xFFFFFFFF); \ - } while (0) + *_le++ = (uint32_t) ((V) & 0xFFFFFFFF); \ + *_le++ = (uint32_t) (((V) >> 32) & 0xFFFFFFFF); \ +} while (0) /* Emit a string. Caution: does NOT update _le, so needs to be last */ -#define PMCLOG_EMITSTRING(S,L) do { bcopy((S), _le, (L)); } while (0) -#define PMCLOG_EMITNULLSTRING(L) do { bzero(_le, (L)); } while (0) - -#define PMCLOG_DESPATCH_SAFE(PO) \ - pmclog_release((PO)); \ - } while (0) - -#define PMCLOG_DESPATCH_SCHED_LOCK(PO) \ - pmclog_release_flags((PO), 0); \ - } while (0) - -#define PMCLOG_DESPATCH(PO) \ - pmclog_release((PO)); \ - spinlock_exit(); \ - } while (0) - -#define PMCLOG_DESPATCH_SYNC(PO) \ - pmclog_schedule_io((PO), 1); \ - spinlock_exit(); \ - } while (0) - +#define PMCLOG_EMITSTRING(S,L) do { \ + bcopy((S), _le, (L)); \ +} while (0) +#define PMCLOG_EMITNULLSTRING(L) do { \ + bzero(_le, (L)); \ +} while (0) + +#define PMCLOG_DESPATCH_SAFE(PO) \ + pmclog_release((PO)); \ +} while (0) + +#define PMCLOG_DESPATCH_SCHED_LOCK(PO) \ + pmclog_release_flags((PO), 0); \ +} while (0) + +#define PMCLOG_DESPATCH(PO) \ + pmclog_release((PO)); \ + spinlock_exit(); \ +} while (0) + +#define PMCLOG_DESPATCH_SYNC(PO) \ + pmclog_schedule_io((PO), 1); \ + spinlock_exit(); \ +} while (0) #define TSDELTA 4 /* From nobody Wed Nov 20 02:31:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtQNr4w9Sz5d4sM; Wed, 20 Nov 2024 02:31:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtQNr4Tq3z40qk; Wed, 20 Nov 2024 02:31:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732069916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Z2yZX92ndNiqVgEqgLr/FDjyxu+SWFMIzoYvupZ/F4=; b=vTiL/+ADZfSmjMO6btiglQ9xApiav8vULBzAvYIk2kVzmlL5i/jPKg44wJ/GSaf6unjMee 0aowhkCcOC23hwSDqkoz3RL6QIv0xLywR4l8cxTym90JKYXifXLmfBgoovz/zXeIDbjv7+ LgLPQVEID548YWpyJPJrgwynjqjLHgZOybgMMEvvkodawPw2+gRwX7pvZi4wVPdtZxptLs TOhs+wgOSZSeKdnc63xmGV+INnkjjXcGNjwfw2yYj/6x/JfA9xk0ZGr9dPZehNzfG47ACK AdtqmmMr+OU9JJPloNp+1GEBKm6vBSvspPkHaF0aipz0LsA+tL5wXvzg41W9qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732069916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Z2yZX92ndNiqVgEqgLr/FDjyxu+SWFMIzoYvupZ/F4=; b=n0zJeVYq31qUR3lroo36OlkCkD+Vcuwdw9Z76obOZfvdSnLGzNKLfv+RlTqyifpsfjNi42 Z6paVuyyRDKcYRIxqLZL8loFnF+4pr8oFD3ZKcGxYFZKN3aaZv7JFBYhrXVechPyOsjyVh C9zTGF36Yj9v6y+Oi97JiBhL/heC5getOVHCm4yRU2jVsW/aHUHNRVE8Mm8I0tPCSPAKZ7 /vBdQ4FYba2Ev5Bfgcdyv5HN0+p8Nh7Kf9T5SvtHD7njyw2Esp7L4RQ5ZvL0gFnhFUbMdO k+IPaY+mPYkkR/rKaysuvBYkBg2AT9tPVfGuBgqIM5QCgKz1W4tZXy328rG1Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732069916; a=rsa-sha256; cv=none; b=dF8s4+CM7wvJZAMpR+cFmzbyrI91YMjHIs0s4vZvAU/LtFsLZXQuplDLQAR5CH+jCZhHZh Ibo5lBAz4+KQGkgU/ns1taYIJxY4ZDyuDykWpyAMt9tZJM7cUnV+491QMf709EJRT/KDoj GKfkHD6jS+o+P+SZ+HcX1JFdG9ZsP9pJzGGTMhs4Vd4LUI1gVKLRDjKPk8SQerfKm6Tvwi q6kC8eFPVw3RfuziupLpujqXkVZKAJBNYeQuf7kb5wP6CwrzPQp+KOvc5YOSJPkHjGAaLy vu6HMWvDIWZz4wpEgPvol86GxcKVGBmPT3Fh9TXgvvQdOE/VVHUl7YMm8uuJ/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 4XtQNr45gczcCX; Wed, 20 Nov 2024 02:31:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK2Vu0h081149; Wed, 20 Nov 2024 02:31:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK2VulK081145; Wed, 20 Nov 2024 02:31:56 GMT (envelope-from git) Date: Wed, 20 Nov 2024 02:31:56 GMT Message-Id: <202411200231.4AK2VulK081145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 62dab3d016ab - main - getentropy: Remove fallback code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62dab3d016abca717e396119ff33fdf22ed604f3 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=62dab3d016abca717e396119ff33fdf22ed604f3 commit 62dab3d016abca717e396119ff33fdf22ed604f3 Author: Ed Maste AuthorDate: 2024-11-16 15:25:44 +0000 Commit: Ed Maste CommitDate: 2024-11-20 02:29:46 +0000 getentropy: Remove fallback code We don't in general support running newer libc on an older kernel, but have occasionally added support for specific functionality on a case-by- case basis. When we do this it is usually done as an aid for developers to get across a change that introduced new functionality, as for 64-bit inodes and the introduction of the getrandom syscall. The getrandom syscall was added in commit e9ac27430c0c ("Implement getrandom(2) and getentropy(3)") in 2018, and exists in all supported FreeBSD versions. The ECAPMODE special case applied to a few months worth of kernel versions also in 2018 -- fixed as of commit ed1fa01ac45a ("Regen after r337998."). The backwards-compatibility support is no longer needed, so remove it. Relnotes: Yes Reviewed by: brooks, cem, delphij Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47636 --- lib/libc/gen/getentropy.c | 99 +++++------------------------------------------ 1 file changed, 9 insertions(+), 90 deletions(-) diff --git a/lib/libc/gen/getentropy.c b/lib/libc/gen/getentropy.c index 40debe4ab662..e87796ace58c 100644 --- a/lib/libc/gen/getentropy.c +++ b/lib/libc/gen/getentropy.c @@ -28,121 +28,40 @@ #include #include -#include #include #include -#include -#include -#include #include #include "libc_private.h" -/* First __FreeBSD_version bump after introduction of getrandom(2) (r331279) */ -#define GETRANDOM_FIRST 1200061 - -extern int __sysctl(int *, u_int, void *, size_t *, void *, size_t); - static inline void _getentropy_fail(void) { raise(SIGKILL); } -static size_t -arnd_sysctl(u_char *buf, size_t size) -{ - int mib[2]; - size_t len, done; - - mib[0] = CTL_KERN; - mib[1] = KERN_ARND; - done = 0; - - do { - len = size; - if (__sysctl(mib, 2, buf, &len, NULL, 0) == -1) - return (done); - done += len; - buf += len; - size -= len; - } while (size > 0); - - return (done); -} - -/* - * If a newer libc is accidentally installed on an older kernel, provide high - * quality random data anyway. The sysctl interface is not as fast and does - * not block by itself, but is provided by even very old kernels. - */ -static int -getentropy_fallback(void *buf, size_t buflen) -{ - /* - * oldp (buf) == NULL has a special meaning for sysctl that results in - * no EFAULT. For compatibility with the kernel getrandom(2), detect - * this case and return the appropriate error. - */ - if (buf == NULL && buflen > 0) { - errno = EFAULT; - return (-1); - } - if (arnd_sysctl(buf, buflen) != buflen) { - if (errno == EFAULT) - return (-1); - /* - * This cannot happen. arnd_sysctl() spins until the random - * device is seeded and then repeatedly reads until the full - * request is satisfied. The only way for this to return a zero - * byte or short read is if sysctl(2) on the kern.arandom MIB - * fails. In this case, excepting the user-provided-a-bogus- - * buffer EFAULT, give up (like for arc4random(3)'s arc4_stir). - */ - _getentropy_fail(); - } - return (0); -} - int __ssp_real(getentropy)(void *buf, size_t buflen) { ssize_t rd; - bool have_getrandom; if (buflen > 256) { errno = EIO; return (-1); } - have_getrandom = (__getosreldate() >= GETRANDOM_FIRST); - while (buflen > 0) { - if (have_getrandom) { - rd = getrandom(buf, buflen, 0); - if (rd == -1) { - switch (errno) { - case ECAPMODE: - /* - * Kernel >= r331280 (4948f7bf1153) - * and < r337999 (ed1fa01ac45a) will - * return ECAPMODE when the caller is - * already in capability mode; fallback - * to traditional method in this case. - */ - have_getrandom = false; - continue; - case EINTR: - continue; - case EFAULT: - return (-1); - default: - _getentropy_fail(); - } + rd = getrandom(buf, buflen, 0); + if (rd == -1) { + switch (errno) { + case EINTR: + continue; + case EFAULT: + return (-1); + default: + _getentropy_fail(); } - } else { - return (getentropy_fallback(buf, buflen)); } /* This cannot happen. */ From nobody Wed Nov 20 03:35:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtRpW3Cq5z5d85f; Wed, 20 Nov 2024 03:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtRpW2XMHz447H; Wed, 20 Nov 2024 03:35:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0MZdW9rbCEWYl998fUrwkVlTMRF0XnpgHHBPV97fU0=; b=qhuP3Wb62YMFEceKt6rFLaGzCx5BZ1L1IEWf2VVsavJqg3a6aKYJ2mhFwFVhfqb76v/I9X D9Qjo6iUVPc0XMK+clDwb4QRraLCynk+DLKHAIU4mjSO2cBmIESPhxqBLlAfu/aqodmWRa XQTWtA9TQOFQQbJPm4SRh4fXCx2iMji86OnwehPzYPSEWmIpKTtmA26CUz3vbqMNZCMm7D E4WP6sVbGDCYW1X9LwGN6W+KLGClM9D9AgPpzK+De/cHuLwC/YV0E/pBIyqEuMneXP+/Y8 VwNFuEHA0X6Ky7LMof7Uj87/HlV2kuCrI+Yw/BRDfgQ+uPeaV/GMqTFhEqP4Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0MZdW9rbCEWYl998fUrwkVlTMRF0XnpgHHBPV97fU0=; b=jeCvTn1obuQmUixXmi12rQkSDiucaF3MkgvN6WXVCTmGLE+N51OqGgfdvb4CXHgyqaimYt woO7/vgS8tcO1BKuhCwNTEKTXDc+0Xwq6xx45mvb4BKDQjbQRU5NE6WWz4ZHqBaWkb5l94 1PHY6PV8D0LDtBqEUo1I97VuAckmtqq0+PCbFf7mgD1//9AXs/iskud1L/3GEn4urONowt jYtciNOEyBLBjv7q0GjrP4jwUlJexNiffLuKqQF+z4om8GgboDsjIwNpz8i2zc3vvpfBVy AP22rP1ATLLdm8EejvJ8CKV870ebHlHPdPjR+Va6tTJyG2Ej5dVtmHjZF3otAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732073747; a=rsa-sha256; cv=none; b=pKgVT5k/K3bND8BjxkkOKV3IWI32uJRfnPoUsmscrMJPCX3cqyMBe41MDNmVcZdI01tgXf pvWs9b0psDDr2HJzZMxsYYNLg+db/UDVurF44vTDl62mhueSPmt479Ed4djfAK72CON5iI Qz4ISLtk2RVQ0n9IYDmWYjIp5BvmTZ036irooobEONcTeCvcFwYkDXz7fA3JXa6mxWx3SA 6hpvMHONyfVZP+KrHKOHv8CgscT1SLYLO0LBSKHbHchrZAdN4LJbzhj2mpccnALbCN5i6J xIzfDAUE+f11GwCd2GwHS9Fr5DPejmVzAmlE8/67ShPChfkRXTdAmDyfnD3PKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtRpW27Kczdl2; Wed, 20 Nov 2024 03:35:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK3ZlC8099393; Wed, 20 Nov 2024 03:35:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK3ZlCn099388; Wed, 20 Nov 2024 03:35:47 GMT (envelope-from git) Date: Wed, 20 Nov 2024 03:35:47 GMT Message-Id: <202411200335.4AK3ZlCn099388@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: c82ed437c67c - main - sys/conf.h: Make more self-contained List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: c82ed437c67c7f5e092954d9f7194e6be9c28150 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c82ed437c67c7f5e092954d9f7194e6be9c28150 commit c82ed437c67c7f5e092954d9f7194e6be9c28150 Author: Warner Losh AuthorDate: 2024-11-20 02:52:40 +0000 Commit: Warner Losh CommitDate: 2024-11-20 02:52:40 +0000 sys/conf.h: Make more self-contained struct cdev has members of type struct timespec. Include sys/_timespec.h to so we don't need to rely on namespace pollution to define it. Sponsored by: Netflix --- sys/sys/conf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 8470f53e0408..8970006c7089 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -44,6 +44,7 @@ #else #include #endif +#include struct snapdata; struct devfs_dirent; From nobody Wed Nov 20 03:35:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtRpX4MvFz5d7NJ; Wed, 20 Nov 2024 03:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtRpX3hZFz44GN; Wed, 20 Nov 2024 03:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0lq/DgjkrT8EXQFTx1ssWbIjesOr2dmsYaARoIkguU=; b=gy2A+54KlYecAfGMq7TgUxfYpp2YLy5ycLrYW9SVXUQg52yQbwacYlQx5Lc6iiM0EEXDAY DsFe8aEEqIkTgrg9cmexzKhWwCCp3CZMR6gbg+UpnnHUggRi17a+KkB758KPCL9o2I6uMZ 8eZXX30K2N8pK+MTMUSVpThPj5oOA50Uu+O2FGoJac/NDDXuupvtDTfnnnNjfProJ9Eglj xNegdlsZdZ8V79DVsRJ6PIyVL26NZmNEin7Iut3iqM/6zvTX4dT7Pnhwnm1hb/+r2DoS6q gS4H+pzAlDfD2xP6W0t6CBXNyufvsD7z3TMHauFjmEveB9nu3P5zbsCHVh3EUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0lq/DgjkrT8EXQFTx1ssWbIjesOr2dmsYaARoIkguU=; b=MiHYTfaNX5fL4ocU8TKHFgNrZRrUpJBwe/2JpkleL6cMTZyA/cGHA6NXxjU3Ms9t16LjLw bM4HHsakwtt01H9dxSkQAQiEsTNe4HeJz0/zry+yRkX4V2R94UowPZ4Cds26IIgD+syanC 8ozVQRj6GQ/qohzKvdVtKwD4HBANUorYZNojZKMFQon1O6wDDqhBpCnGDtHbABRHQtQtD6 VUIa2Qz9T9KmaKp/ISXhvx4hRYJkBmyPSYCc94XRlA7byCE/QZaEqkxKeDBsjXWhLz5Hfn 824sn1M+1Eyh61+fI6iAjeCuoiRckY40DXwa6XlejkAWKfQKYACmPK8ZcYa2eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732073748; a=rsa-sha256; cv=none; b=jJ9AKexMNOSYqPZvfIj8qvoeW8e4TRn6iKIeR6JrxoyB1Nmb5mIP66XdoCPmrNGufqIKWv TX/iwW/pToH/CkCQi1noZeovlxd/t72Gotll02s+nib2EFV+U5/aPYLJxzCI1xFkY5t3rG DjLvqc8p8KAj/du684KTwRpFMk3Krsm8t9hRp7/308U+P/Lac7nQlfSDetTU7RGruCyg9U bh2nxY71Mcney/hcWbLP6DYF3gcnTXmooeRl0T1KLsmEw03WVGyED0ebnLX9upxEHucrQo Xpl57mxGckSlrr7zxQ8Okntl5GxD87nwSFDGxPFc/KTJrzcsdhKxuaU9gir0Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtRpX3FZHzdbr; Wed, 20 Nov 2024 03:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK3Zm3d099453; Wed, 20 Nov 2024 03:35:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK3ZmGo099450; Wed, 20 Nov 2024 03:35:48 GMT (envelope-from git) Date: Wed, 20 Nov 2024 03:35:48 GMT Message-Id: <202411200335.4AK3ZmGo099450@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: 6a88766ecdd3 - main - stand: We don't want signal definitions in the boot loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 6a88766ecdd3a89439c7d21ee8e1ff5706bfde71 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6a88766ecdd3a89439c7d21ee8e1ff5706bfde71 commit 6a88766ecdd3a89439c7d21ee8e1ff5706bfde71 Author: Warner Losh AuthorDate: 2024-11-20 02:57:46 +0000 Commit: Warner Losh CommitDate: 2024-11-20 02:57:46 +0000 stand: We don't want signal definitions in the boot loader We don't support signals in the boot loader, so we don't need to include sys/signal.h there. It pollutes the namespace. Sponsored by: Netflix --- sys/sys/param.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 388b3a05f718..79ecd58569a3 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -150,12 +150,10 @@ #endif #endif -#ifndef _KERNEL -#ifndef LOCORE +#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(LOCORE) /* Signals. */ #include #endif -#endif /* Machine type dependent parameters. */ #include From nobody Wed Nov 20 03:35:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtRpY6Sxkz5d8PX; Wed, 20 Nov 2024 03:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtRpY4Z2kz44Jp; Wed, 20 Nov 2024 03:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ld/c6/zxFtcNqOxVzTnSF266ZoSJFejETR3LZ8gUB2k=; b=bF+v6/RbJigdQDRGhwkeTVlJ7uAVyHpNEz7n6TlksJcPAHP/fRrmLz8rGS4n7dmmTqhSk1 yGPCtz9yogIUlOeI67uelG4BDBTec6ttR2TZtt8Kra8Lm4zvJ0hsRZTOqfriYaxZo/nADm l1wn8G15cyhZ4IFjlBK5Zma6jqRNe1AeHu3UVAM9Le2zx1qaFw0hCSt7d6NZwquOsM5b3W ij4L/n6/N4fmApRVgYlHf2Esc6hCr1hvJ0jfR0oHMhNKg6NgerVp9Dih1WQ8XazFn9N1b4 kZUwM3F1qEjc8O88fDvOvEA6jdGTidY2pPLq9L06FSMkSgzHHs2F3w3qNmt1rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ld/c6/zxFtcNqOxVzTnSF266ZoSJFejETR3LZ8gUB2k=; b=ZGxDuR0KffB/1f56dFwwbo9TNukUGeOFrQnIOKzYImKGbXR0+lC6g4CJq17MDKXZZJgotJ jEFdCYRGsCC+UpW16ncoCkm70Dtnzahi9Xfmww3qWaNKm9Q8szULJoOFV7k8eTRWytewsw p+GY111TN6rzQoRbfNCQ/6ZYXYi9lFD82WxyuoDXNzZbXxzoifYcxFKLbnNlLK7rhcNJBU k5zJSSL/tHK1JzJOvRJ+P7ZpCoMjvBpbmkyaERqS4UVlOSQSUyhdJbTW/7RN7tb9ETPlx4 a0lLP/ZJXcvkePzz5zdYkWPS/u90P1N6eoWduy8RSCj+8f24Q+BBLlJ+a3/OYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732073749; a=rsa-sha256; cv=none; b=ILFi5DtOmOAQzYFvU6ZO6GbZIdT669oDrllmqPrkfd0TV8em0c2ap4FF4Ra7yaq1YL5+Ib +hxd+JPwlAeBUkqKTOLfkEYYtKe3ulsJtd8vRthByiIIaF/Ae04+CgYlLkM2rh4uQSh2cI kM1aAjW3VrsX+DGhvZEvgwRh5kr/GbCP6PVqWkixxaXSQBy8v19T6DUmrS3qbAUvGWbAXQ 70a5RhI5AER6QZCdSuSR4QcoqVTRx9P3ea48WdTAT9oDrUilEPvNErcC6hHZv0Pe94dfxr +/E1A347k48afBkcP+rjZTp+9wBqxuO/uePKjKgsFMh5TvzRbVUJSbUn3cHUgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtRpY3s45zdDt; Wed, 20 Nov 2024 03:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK3Zn9c099507; Wed, 20 Nov 2024 03:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK3ZnVU099504; Wed, 20 Nov 2024 03:35:49 GMT (envelope-from git) Date: Wed, 20 Nov 2024 03:35:49 GMT Message-Id: <202411200335.4AK3ZnVU099504@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: c29cba408d19 - main - stand: Narrow the 'signal emulation' we provide List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: c29cba408d197ed2c267d0605e4225bb54153e01 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c29cba408d197ed2c267d0605e4225bb54153e01 commit c29cba408d197ed2c267d0605e4225bb54153e01 Author: Warner Losh AuthorDate: 2024-11-20 03:05:11 +0000 Commit: Warner Losh CommitDate: 2024-11-20 03:24:41 +0000 stand: Narrow the 'signal emulation' we provide We only need to provide sig_atomic_t in emulation. However, including machine/signal.h brings in too much namespace pollution related to signals. Instead, define sig_atomic_t as long. Setting long is async atomic on all platforms (though powerpc64 defines it to an int), though that doesn't matter since the boot loader doesn't use signals. Sponsored by: Netflix --- stand/libsa/stand.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index 260defa3a33d..e1188fb73a26 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -82,8 +82,13 @@ #define EOFFSET (ELAST+8) /* relative seek not supported */ #define ESALAST (ELAST+8) /* */ -/* Partial signal emulation for sig_atomic_t */ -#include +/* + * LUA needs sig_atomic_t. This is defined to be long or int on all our + * platforms. On all but powerpc, these are all the same thing as long. 64-bit + * powerpc defines this as int, but long can also be accessed atomically. It's + * also OK because we don't have signal handlers in the boot loader. + */ +typedef long sig_atomic_t; __BEGIN_DECLS From nobody Wed Nov 20 03:35:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtRpZ6S87z5d8Bd; Wed, 20 Nov 2024 03:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtRpZ4sLHz44Bt; Wed, 20 Nov 2024 03:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KJ1UtxsNL/bPwWTcYeAvdDTC0wWPd72L3Y4G58reo6s=; b=U9uv+A/+0XYjrbmos6WQhlSLCQ0srCCEBugQf/DHC/np07KeBXC07JIm2xw7zwQYVZSS5P bSkaOGeCRSTSGineNFZ+Y7cdNAXDgP9I4WQ+JCj99FOjYHFlHGIx6l97k2QOlfc0ZPNvEL Xt8GXDieW9Z23Tr57S05nFPSfxZDPdAkH3SrnTqITrqOM3GvgihKhXdZdb0Fsmmx2LkvXP rDSwfwZeezRzEyTAq0SCcnGYuMu18Ctxl/6/yg/NaYSC2Bve/lfRwj6p2/Tt7ZTP1rxUNh YxtgvoXPB70HfbmZ4JW3O+Ut8QAAgFatKTnNGjc1AmfP5VN9gugxvcniAlGeoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KJ1UtxsNL/bPwWTcYeAvdDTC0wWPd72L3Y4G58reo6s=; b=PCocfRaLKSUqyqWLSpyZSw/xNSExAiwzuusVRBY9xR093JCdlFJvMqva2jmnDKAtanHuOY 2ZPIJ4URYxZcQYDYzLEFuK0GAo1v2gG8ktXXc1CvuL4jCvuLa2GGJw2MQ9DRmFN/j2lxGU /lbWiljHBzkC7od5e4vr+YvZlatnoezruNrLw0d0/DqKz9JFWXk5SHlO4HGfeJX8Y3Xjb9 jrHJxaJCLNgKKG5RMlSbvmB670YzdTNs7v1e87UPMkE2MyJgY2mbS3q2Kzhh0ju6AcB+0W VxC1D6diFSttflhtw46kjQm0H1Sgv4n81f8RSMawvJckAn9H5WH0arbMlRpfeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732073750; a=rsa-sha256; cv=none; b=I62uN4g8+ciHkKxUtEK6YERBzt7s+YoZeE1cRgoP+EbMBno8wSb7rmhY7+is/T6/BQDbHM 5quQonPXI2sa5+jifXf37NH5IU/HwCBoeAQF/ahWgH1GZ7j+29MmC6pmGYOkcM9BiWPLmG hwvAHNisg0CGmw8loY7m66dz0VgMMyORoN4PWUBAUpsN9pZtslL5SMNiVJiO3bcmNvLqV/ 0h9D8kwuJ2rGoxzQsmykmKlzsYx2ft8T2lOCRS3XdI7MCEFrmG3QdSLqNb8lee/k0Tb2Vb Kbd7QEPrmCOsY3E3/yCcA/ZYG2oqQWOsnptUBs17xYKib6lOpNe/Btg9ma6Xaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtRpZ4TbnzdfM; Wed, 20 Nov 2024 03:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK3ZoE2099553; Wed, 20 Nov 2024 03:35:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK3Zobd099550; Wed, 20 Nov 2024 03:35:50 GMT (envelope-from git) Date: Wed, 20 Nov 2024 03:35:50 GMT Message-Id: <202411200335.4AK3Zobd099550@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: 7255a2969ff9 - main - stand: Don't need sys/select.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 7255a2969ff9ed2763391c854d7c2bed71a1a1c8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7255a2969ff9ed2763391c854d7c2bed71a1a1c8 commit 7255a2969ff9ed2763391c854d7c2bed71a1a1c8 Author: Warner Losh AuthorDate: 2024-11-20 03:17:31 +0000 Commit: Warner Losh CommitDate: 2024-11-20 03:35:04 +0000 stand: Don't need sys/select.h The boot loader doesn't need the types and prototypes defined in sys/select.h, so don't indirectly include it. Sponsored by: Netflix --- sys/sys/time.h | 2 ++ sys/sys/types.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/sys/time.h b/sys/sys/time.h index f5c8d1d46471..d3a19ebfc811 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -611,7 +611,9 @@ int tvtohz(struct timeval *tv); #include #include +#ifndef _STANDALONE #include +#endif __BEGIN_DECLS int setitimer(int, const struct itimerval *, struct itimerval *); diff --git a/sys/sys/types.h b/sys/sys/types.h index 129ca0f2f4c4..fd375139a092 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -311,7 +311,9 @@ typedef _Bool bool; #if __BSD_VISIBLE +#ifndef _STANDALONE #include +#endif /* * The major and minor numbers are encoded in dev_t as MMMmmmMm (where From nobody Wed Nov 20 03:35:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtRpc1mhmz5d7NN; Wed, 20 Nov 2024 03:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtRpb6zS3z44by; Wed, 20 Nov 2024 03:35:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xtb9mJ8/86el/arG2a+SiytkadQ9LgPRrDX/CWXiQ2k=; b=plzCkqFled3Ri7EYDZTNF0TujtoIum5XpI1DSBVkoJxJRlXfut4iw8RkMjGwqouHGU39RT CyZPQHjACGd37hsIQOeawj3nyOAiQ472gqwI5aqbS5y2skspZMM2ovhd2mmMUbhfkWsGiH 6Q8RyQ9kmH1LQa4Q8N3M7mMbMuJVRaZYJprpsSIdgwPDqMdL6gfBq7AcphxKF/GUW8/qXP E6DItYrVJQOW/tF28lRMZH7qBJhLggQMvV6GeJriDWG81RVdYjEh2ZgOprFGTszk1m0eBF hu9wVQcJkZ+s/9HfqALfz5n7lEMf5VqSaOHSvbPNtrYvOYLHth27StzmIyWGZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732073752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xtb9mJ8/86el/arG2a+SiytkadQ9LgPRrDX/CWXiQ2k=; b=hGhpkIAmotpcZBjdDalZ9TKkecxYBe9jUtptEvbpmj2yrWEBLr9JjN/9PnPWsPJGC7VhJz 0BKmpyR22KBds9ku+cm/dFJrUiWPSE+xTdczKzmmWgFRA8+CQJhlmVUA6IdnYj4dm0s45t CsRoxCGKq5SDbDivnNNa10AnJ7zjTvkGbW8yUNoUSCWlyrIVXFTjCrrc47lUPe0G60qZhz NZNoQOokI3lO2OJYPifTLMr4zeT1aYFVJ4hoQcexKuqGRhewHhJyj3Bo5ctm710ZPaILjO CHYXtSIFTWsMqebg5lubkDSIC+96QVY5EezBZskGdHmUvqG27VHhIQl/EjWg8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732073752; a=rsa-sha256; cv=none; b=p6eZTVwt7C01si2Md9450aU7Q7wQ0TJ4/cwtbuVmE1tijZw5FUUb7nSWUZMr2lnoF3jrPO cRLUkKUiPD7QbkkhKh/V5laGfsVMnKtHCwtgiUHdW269IMeNtLllDTxne1+W0Ul11pWJuH 738x3ygMy+MAAesanR/grObeMrDHHKVvp6Yltyj0GlNybkcJfxiPXkjyxouD123+o2s5Jw KI44RS+xIai/OCr6YS0LHc6K7XXFMzf0/CatcphvfhS+WzBimm0xQOW8fzQ2tv3C9WgA3v Kt83WyQhT1clO0mzYc52K/Crd6nlA7PZIXCxwCNNCkZMeN9SSxAJiwKhp7xEKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtRpb5pfszdBV; Wed, 20 Nov 2024 03:35:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK3Zpv1099598; Wed, 20 Nov 2024 03:35:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK3ZpYW099595; Wed, 20 Nov 2024 03:35:51 GMT (envelope-from git) Date: Wed, 20 Nov 2024 03:35:51 GMT Message-Id: <202411200335.4AK3ZpYW099595@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: 17be774ee710 - main - stand: unistd.h is no longer safe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 17be774ee710d0727a7a45f823356fa33c207058 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=17be774ee710d0727a7a45f823356fa33c207058 commit 17be774ee710d0727a7a45f823356fa33c207058 Author: Warner Losh AuthorDate: 2024-11-20 03:19:13 +0000 Commit: Warner Losh CommitDate: 2024-11-20 03:35:04 +0000 stand: unistd.h is no longer safe unistd.h includes too much extra stuff for the boot loader. This creates a fair amount of namespace pollution and it's best to just make it an alias for stand.h like the other include files already are. Sponsored by: Netflix --- stand/libsa/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 3d46b9c7ffa1..603fee71e84a 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -200,8 +200,8 @@ MAN=libsa.3 # Create a subset of includes that are safe, as well as adjusting those that aren't # The lists may drive people nuts, but they are explicitly opt-in FAKE_DIRS=xlocale arpa ssp -SAFE_INCS=a.out.h assert.h elf.h inttypes.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h unistd.h uuid.h -STAND_H_INC=ctype.h fcntl.h signal.h stdio.h stdlib.h +SAFE_INCS=a.out.h assert.h elf.h inttypes.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h uuid.h +STAND_H_INC=ctype.h fcntl.h signal.h stdio.h stdlib.h unistd.h OTHER_INC=stdarg.h errno.h stdint.h beforedepend: From nobody Wed Nov 20 03:55:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtSG42PWjz5d9YL for ; Wed, 20 Nov 2024 03:56:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtSG40f7pz46Pk for ; Wed, 20 Nov 2024 03:56:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-431481433bdso45094945e9.3 for ; Tue, 19 Nov 2024 19:56:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732074970; x=1732679770; 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=XOY4qZ87+HtmQaHMhrRG1Ulotrkt56GVxAs0okONcxQ=; b=WhffTCB2rc8zThq+XgiuhA4ZnJehNF9DpKw7zac4iUi4HvHx/Ic1nxD6vC3teEUtF9 aXyfRwWt/54vnYVubqPYwvExl9mPjpHmEmTmknrhggDOJG2qAv1bm3UoJ31Dsv/IWLub BBL3R+dumIGdFTG84Ljnha+xmTAj5ZRN/Dh0LoFUOAicRQYQzZzPKOhJObqPJEhFU+Sr VQFbd1z5c2/b9WOXnAi9VdfTHIQ+hF6VF5n4S5KvzCWX0xuM1OCfVU0urb7IR5ooaCT+ hAd6pHPN4ISkEMl4ez4L8sVrq4I4Nv5qPNU7J0TOAqvqhMVYLzlS2/GAOQ9+Vkcl9jIA b9bQ== X-Forwarded-Encrypted: i=1; AJvYcCUP5dXZj5gG0/kCVRZmsMK6e3OuJH7NoSnhPR+WSpnBzc+/o+Pw+ekYqSYPrKzPgFrXt2bLp9jZV8gY2O3Qr342dZ7Z@freebsd.org X-Gm-Message-State: AOJu0YxjSJqwgxvTT4ujWKHgpik/qnoQBkHLsjHfA7/BEPPidN2FkwdL EikZ3S6/xvdyZEroZIifAEhzcpI5n1j7of/bM86lQuFP1lWgv5V6iDuz8N3nXYVQ1TIsR+nGRMK J X-Google-Smtp-Source: AGHT+IGns7GySRDf/Ck4TTh7lwaT4ZyyDVbt2JPMrofUpkZ5iD0NEmrKk9ouZGYa3SR0NrkiflbvMA== X-Received: by 2002:a05:600c:3d18:b0:431:58bc:ad5e with SMTP id 5b1f17b1804b1-4334f025ee8mr8369275e9.28.1732074970463; Tue, 19 Nov 2024 19:56:10 -0800 (PST) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm4092705e9.24.2024.11.19.19.56.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2024 19:56:09 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.200.121\)) Subject: Re: git: c29cba408d19 - main - stand: Narrow the 'signal emulation' we provide From: Jessica Clarke In-Reply-To: <202411200335.4AK3ZnVU099504@gitrepo.freebsd.org> Date: Wed, 20 Nov 2024 03:55: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: <202411200335.4AK3ZnVU099504@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3826.200.121) 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: 4XtSG40f7pz46Pk X-Spamd-Bar: ---- On 20 Nov 2024, at 03:35, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc29cba408d197ed2c267d0605e4225bb= 54153e01 >=20 > commit c29cba408d197ed2c267d0605e4225bb54153e01 > Author: Warner Losh > AuthorDate: 2024-11-20 03:05:11 +0000 > Commit: Warner Losh > CommitDate: 2024-11-20 03:24:41 +0000 >=20 > stand: Narrow the 'signal emulation' we provide >=20 > We only need to provide sig_atomic_t in emulation. However, = including > machine/signal.h brings in too much namespace pollution related to > signals. Instead, define sig_atomic_t as long. Setting long is = async > atomic on all platforms (though powerpc64 defines it to an int), = though > that doesn't matter since the boot loader doesn't use signals. >=20 > Sponsored by: Netflix > --- > stand/libsa/stand.h | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h > index 260defa3a33d..e1188fb73a26 100644 > --- a/stand/libsa/stand.h > +++ b/stand/libsa/stand.h > @@ -82,8 +82,13 @@ > #define EOFFSET (ELAST+8) /* relative seek not supported */ > #define ESALAST (ELAST+8) /* */ >=20 > -/* Partial signal emulation for sig_atomic_t */ > -#include > +/* > + * LUA needs sig_atomic_t. This is defined to be long or int on all = our > + * platforms. On all but powerpc, these are all the same thing as = long. 64-bit > + * powerpc defines this as int, but long can also be accessed = atomically. It's > + * also OK because we don't have signal handlers in the boot loader. > + */ Presumably an oversight when adding the powerpc64* ports :( Probably we should fix this by taking advantage of being able to break ABI for tier 2 architectures between major versions. Shame it wasn=E2=80=99t done the = same time as ELFv1 -> ELFv2. We fixed riscv and arm64=E2=80=99s = SIG_ATOMIC_MIN/MAX recently, but the underlying types were still long in that case, thankfully. Jess > +typedef long sig_atomic_t; >=20 > __BEGIN_DECLS >=20 From nobody Wed Nov 20 04:38:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtTC01mF9z5dCg0; Wed, 20 Nov 2024 04:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtTC01D2Sz4C2h; Wed, 20 Nov 2024 04:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732077516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+WKFkQFxQRNJfEdb2OQdZbMM4ZDjbbq61119muDYZzU=; b=s5+XE/sBDZvcDLuDjM3wQcaErodqDscb0UlHKdyyOB1agmBfOB1lcnxvvFIqmeH9Nj6Kt5 gEyV6OfOU8sYbOZIr62uEngepKFN/Ta2CbBqECBrco5SgxzFmRS2RswI9x/fc/9BLf+/GR ZEe9CFi5Ym7ZqP7+Dj4k0AdNFlKxruxe8+QMfZUY00ZsqoL9a8uvecYYBskJcoV+9ClMzO Ejf8GSWVaxsWkwx3CdlkLQnJfxLW+sVjNoRhS+sLeTRYTXnPzkIHygguTtPXhWXrBeyFFr 0Uu4VZmXJ2Gdghn7q4td+/R9HIzY5Kob1ZAjhd6UbyhBONmahvvtQht9FspYmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732077516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+WKFkQFxQRNJfEdb2OQdZbMM4ZDjbbq61119muDYZzU=; b=uFaad1eKywd5BiRicgrRiYLx3pYK4O5tyV3UBm9cUu0hyuLB2v/0j84zd6oAaXmBH2Ycpd PvQMg9ZxpD9Aqt9SWAkWHTrS76Cc0y/8tuF/rBiOEh0xafOfkF+oeNYhlC5B12hYUepQa0 mYtmL5Zk7Tl2UhcDO45tPDmb9yW8HoPYhyUkFkXJr5Ek+iVfVvqFdiby7Jip9wA9OQcxtY 48i5SrCj8xUO4Xa5tzk14lYto098q8SksTgoOKzxJ6XZR+1AoLYJcejvzNGmlHXtHmgwjq iGmI9AofR19X75I5pho5NBPvqHq4Evgei4VVTvdiv7gXPqU+KrgpaqWHNWlOTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732077516; a=rsa-sha256; cv=none; b=Ozx9SqpPKy6WAJjei0X2JHCqTi5yGx/X2LtZC20z+SLE5Scd3GUnNV8Cdxs0/9aVGZTnuB ZHgLOgv18bXwRtEWF7Bb8cuyL7xK41r/9PqGR1QJWKInanmWpicE2Sct+gE6HDo8VVBMmP zqp0JUwmmZUbcj+UFVWRZ3Q4NboGeaCS6IkBWE7BJ0Le70IaTHIKydZbfKmv6SEIRWMtFB tUhbuMDy2QUIRQT7RsHahdKjukA1RbBi1BpMxjEFA4KjEIg5gCMaPyGzQmJRwk0kyc1tiY /+c0q+1P7tKYfirDWnSeu5UIbfxR7w0ASbVwooijJD2emBchWX96yxPLRa4Xfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtTC00qNNzfff; Wed, 20 Nov 2024 04:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK4caMV011299; Wed, 20 Nov 2024 04:38:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK4cabQ011296; Wed, 20 Nov 2024 04:38:36 GMT (envelope-from git) Date: Wed, 20 Nov 2024 04:38:36 GMT Message-Id: <202411200438.4AK4cabQ011296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: e38f9257c3fa - main - ixgbe: Add support for 1Gbit Active DAC links List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e38f9257c3fac5cb5a62f62c424a976446ae1220 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e38f9257c3fac5cb5a62f62c424a976446ae1220 commit e38f9257c3fac5cb5a62f62c424a976446ae1220 Author: Kevin Bowling AuthorDate: 2024-11-20 00:24:55 +0000 Commit: Kevin Bowling CommitDate: 2024-11-20 04:38:08 +0000 ixgbe: Add support for 1Gbit Active DAC links 1Gbit also emperically works on Active DACs. MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index 218a9dac3b78..ea815c6c88e5 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1437,7 +1437,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || - (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) || + (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Wed Nov 20 05:01:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtTjk0rqjz5dFBk for ; Wed, 20 Nov 2024 05:01:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtTjj5p08z4Fbx for ; Wed, 20 Nov 2024 05:01:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2ea4e9e6ef2so2606470a91.1 for ; Tue, 19 Nov 2024 21:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1732078904; x=1732683704; 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=cx7c7hiOxtRP6eRGW0hauLp4yNhqP39z5c3kL6tOTC4=; b=16YmMF0fzAV4duqfzE5kPZZLdJ2/pULa4TekGOURUeMGQsaJBvQWHe/5GbYwDMu139 nQ7b1BtApHRvk5uQW8j+pVOj9cRM44Rau5+gyWWGNZ59lpP3gliNB6izRP+kSew2TwkO IyYbJDYIqU2etWisxDqsgxO9rAy6uQRyhjXFXnLozBqiZ7qpZ1gJLjZRoSUbOyPKLJ/P 7Oq7bGwr3MpdSEyHwupUoRgyPMKkzdBAXskhFqHWpqARoJPyI1/eP5vFyGZB2j+uLQEf pe7ML5KHDKsg0e+RFyAyIVmi40hxCXRwBFUdjsHAnvHYijrXWYlSYlI/pZgj4qTbZhoa 6/ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732078904; x=1732683704; 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=cx7c7hiOxtRP6eRGW0hauLp4yNhqP39z5c3kL6tOTC4=; b=tSWC3eo9rehFrOFSod5EDPfKtQC/jZQ97KLMV4VTM/rVm1mNKFMHaR8ioVSb3yS9VT glo643/EXAXU19nPQKQ6AqJh61kGIWyEnCDSLRqNuO3zp/zjZHb9PuGZCcjLVRr35lFA 2eiQMYuiXBhws1sppmmp8X9OClq57VPyIxQcTwl64OKUxqr9YkeUsHskRhOCq7xb+sqx sQkCuJUbw6bFUA38HGwWg+c2BStBJyTK3kUEcFbJPCtZWUQtcWEhSdwNoKeoAIjD3MWC kXOXh3ylv/xzbwyGtkKXhcJxRs+A1XhjoWtuTrmeXuROj0Suklf97IqKc3W0vDiej6Kf usIw== X-Forwarded-Encrypted: i=1; AJvYcCUrXP/3f9EJ9oCveCkRyESarqRo75h0ljlyp5eld67TY7rp0HFOOzOKEjHHelgcJ1fSUqa6KMQ5UIuZ7KaRtmZ9RM9o@freebsd.org X-Gm-Message-State: AOJu0YxTyzXIGAXV5+QNM+RZWNUtuy9qc6rChvKbkBO+yAcbBdo1uGBd DhARk74qpMQ31ZUVawJ2kGrTbN98G/Y1lbs0rS2FuUTx2+YKH1tCZE1o0v1O6EENDOyYXPllnio TvTEUvHQ8dNaAivFV4Ywxld6B5KHjdSt1dcucHQ== X-Google-Smtp-Source: AGHT+IFaL/2MuBpPROVWehefqUSLlY+VEzi2x4GITfZ7l1/IdMz+oV8FF74M1RUvMu7zJyUAf1q3PJQfGuJ40ynrPls= X-Received: by 2002:a17:90b:4c41:b0:2ea:94a1:f63f with SMTP id 98e67ed59e1d1-2eaca7de059mr1815102a91.33.1732078904129; Tue, 19 Nov 2024 21:01:44 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411200335.4AK3ZnVU099504@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 19 Nov 2024 22:01:33 -0700 Message-ID: Subject: Re: git: c29cba408d19 - main - stand: Narrow the 'signal emulation' we provide To: Jessica Clarke Cc: Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000cddbee0627510b8a" 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: 4XtTjj5p08z4Fbx X-Spamd-Bar: ---- --000000000000cddbee0627510b8a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Nov 19, 2024, 8:56=E2=80=AFPM Jessica Clarke w= rote: > On 20 Nov 2024, at 03:35, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dc29cba408d197ed2c267d0605e4225b= b54153e01 > > > > commit c29cba408d197ed2c267d0605e4225bb54153e01 > > Author: Warner Losh > > AuthorDate: 2024-11-20 03:05:11 +0000 > > Commit: Warner Losh > > CommitDate: 2024-11-20 03:24:41 +0000 > > > > stand: Narrow the 'signal emulation' we provide > > > > We only need to provide sig_atomic_t in emulation. However, includin= g > > machine/signal.h brings in too much namespace pollution related to > > signals. Instead, define sig_atomic_t as long. Setting long is async > > atomic on all platforms (though powerpc64 defines it to an int), > though > > that doesn't matter since the boot loader doesn't use signals. > > > > Sponsored by: Netflix > > --- > > stand/libsa/stand.h | 9 +++++++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h > > index 260defa3a33d..e1188fb73a26 100644 > > --- a/stand/libsa/stand.h > > +++ b/stand/libsa/stand.h > > @@ -82,8 +82,13 @@ > > #define EOFFSET (ELAST+8) /* relative seek not supported */ > > #define ESALAST (ELAST+8) /* */ > > > > -/* Partial signal emulation for sig_atomic_t */ > > -#include > > +/* > > + * LUA needs sig_atomic_t. This is defined to be long or int on all ou= r > > + * platforms. On all but powerpc, these are all the same thing as long= . > 64-bit > > + * powerpc defines this as int, but long can also be accessed > atomically. It's > > + * also OK because we don't have signal handlers in the boot loader. > > + */ > > Presumably an oversight when adding the powerpc64* ports :( Probably we > should fix this by taking advantage of being able to break ABI for tier > 2 architectures between major versions. Shame it wasn=E2=80=99t done the = same > time as ELFv1 -> ELFv2. We fixed riscv and arm64=E2=80=99s SIG_ATOMIC_MIN= /MAX > recently, but the underlying types were still long in that case, > thankfully. > Likely. But i already have too much on my plate. Just a weird thing i noticed. Warner Jess > > > +typedef long sig_atomic_t; > > > > __BEGIN_DECLS > > > > --000000000000cddbee0627510b8a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On 20 Nov 2024, at 03:35, Warner Lo= sh <imp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc29cba408d197ed2c267d0605e4225= bb54153e01
>
> commit c29cba408d197ed2c267d0605e4225bb54153e01
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-11-20 03:05:11 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-11-20 03:24:41 +0000
>
>=C2=A0 =C2=A0 stand: Narrow the 'signal emulation' we provide >
>=C2=A0 =C2=A0 We only need to provide sig_atomic_t in emulation. Howeve= r, including
>=C2=A0 =C2=A0 machine/signal.h brings in too much namespace pollution r= elated to
>=C2=A0 =C2=A0 signals. Instead, define sig_atomic_t as long. Setting lo= ng is async
>=C2=A0 =C2=A0 atomic on all platforms (though powerpc64 defines it to a= n int), though
>=C2=A0 =C2=A0 that doesn't matter since the boot loader doesn't= use signals.
>
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix
> ---
> stand/libsa/stand.h | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h
> index 260defa3a33d..e1188fb73a26 100644
> --- a/stand/libsa/stand.h
> +++ b/stand/libsa/stand.h
> @@ -82,8 +82,13 @@
> #define EOFFSET (ELAST+8) /* relative seek not supported */
> #define ESALAST (ELAST+8) /* */
>
> -/* Partial signal emulation for sig_atomic_t */
> -#include <machine/signal.h>
> +/*
> + * LUA needs sig_atomic_t. This is defined to be long or int on all o= ur
> + * platforms. On all but powerpc, these are all the same thing as lon= g. 64-bit
> + * powerpc defines this as int, but long can also be accessed atomica= lly. It's
> + * also OK because we don't have signal handlers in the boot load= er.
> + */

Presumably an oversight when adding the powerpc64* ports :( Probably we
should fix this by taking advantage of being able to break ABI for tier
2 architectures between major versions. Shame it wasn=E2=80=99t done the sa= me
time as ELFv1 -> ELFv2. We fixed riscv and arm64=E2=80=99s SIG_ATOMIC_MI= N/MAX
recently, but the underlying types were still long in that case,
thankfully.

Likely. But i already have too much on my plate. Just a weird th= ing i noticed.

Warner

Jess

> +typedef long sig_atomic_t;
>
> __BEGIN_DECLS
>

--000000000000cddbee0627510b8a-- From nobody Wed Nov 20 06:08:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtWBZ6h0Bz5dJkT; Wed, 20 Nov 2024 06:08:22 +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 4XtWBZ39Gdz4KWR; Wed, 20 Nov 2024 06:08:22 +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.18.1/8.18.1) with ESMTP id 4AK689Zt009849; Wed, 20 Nov 2024 08:08:12 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 4AK689Zt009849 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 4AK689KK009848; Wed, 20 Nov 2024 08:08:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 20 Nov 2024 08:08:09 +0200 From: Konstantin Belousov To: John Baldwin Cc: Jessica Clarke , Andrew Turner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: e85eaa930862 - main - Have rtld query the page size from the kernel Message-ID: References: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> <768D45F9-2F02-4BA1-BFB7-51685486CFCC@freebsd.org> <4d81d34f-4749-4911-b302-eca9166e4be7@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-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.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home 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: 4XtWBZ39Gdz4KWR X-Spamd-Bar: ---- On Tue, Nov 19, 2024 at 10:14:52AM -0500, John Baldwin wrote: > On 11/19/24 22:30, Konstantin Belousov wrote: > > On Thu, Nov 14, 2024 at 09:47:30AM -0500, John Baldwin wrote: > > > On 11/13/24 12:10, Jessica Clarke wrote: > > > > On 13 Nov 2024, at 19:44, John Baldwin wrote: > > > > > > > > > > On 4/7/22 07:38, Andrew Turner wrote: > > > > > > The branch main has been updated by andrew: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e85eaa930862d5b4dc917bc31e8d7254a693635d > > > > > > commit e85eaa930862d5b4dc917bc31e8d7254a693635d > > > > > > Author: Andrew Turner > > > > > > AuthorDate: 2022-04-04 15:05:40 +0000 > > > > > > Commit: Andrew Turner > > > > > > CommitDate: 2022-04-07 14:37:37 +0000 > > > > > > Have rtld query the page size from the kernel > > > > > > To allow for a dynamic page size on arm64 have the runtime linker > > > > > > query the kernel for the currentl page size. > > > > > > Reviewed by: kib > > > > > > Sponsored by: The FreeBSD Foundation > > > > > > Differential Revision: https://reviews.freebsd.org/D34765 > > > > > > > > > > This broke relro handling for rtld. The reason is that init_pagesizes() is > > > > > called after parsing the program headers for rltd in init_rtld(). As a result, > > > > > page_size is 0 when rtld_round_page() is called so the relro_size is 0. The > > > > > RTLD_INIT_EARLY_PAGESIZES case was for ia64, and in the early case it's probably > > > > > not safe to call sysctl? If it is safe to call sysctl, we could just always > > > > > init pagesizes early? > > > > > > > > It looks like there are a few things going on: > > > > > > > > 1. relocate_object calls obj_enforce_relro if !obj->mainprog, so will > > > > try to enforce RELRO for RTLD itself whilst page_size is 0 > > > > > > > > 2. init_rtld later calls obj_enforce_relro for obj_rtld, after > > > > page_size has been initialised > > > > > > > > 3. init_rtld is careful to avoid using global variables until it’s > > > > called relocate_objects for RTLD itself, but by hiding accesses to > > > > page_size away in rtld_*_page that’s no longer true (definitely not > > > > true in the case of text relocations, for example, though whether it > > > > also occurs for other cases we care more about I don’t know) > > > > > > > > So I think there are a couple of things to fix: > > > > > > > > 1. Stop accessing page_size prior to relocate_objects returning for > > > > RTLD itself > > > > > > > > 2. Stop enforcing RELRO twice for RTLD (e.g. add && obj != rtldobj to > > > > relocate_object’s case) > > > > > > > > At least, that’s what I’ve inferred from reading the code. > > > > > > > > Though, to be honest, things might be rather nicer if we just made > > > > .rtld_start responsible for relocating RTLD itself prior to calling > > > > init_rtld, that’s what we have to do for CHERI, as do arm, powerpc and > > > > powerpc64, and it means you can use globals from the start in init_rtld. > > > > > > I've done 2) locally which fixed my immediate issue. > > Can you provide some more info please? > > I have a local patch that supports mutiple PT_GNU_RELRO segments, and to > do that it removes relro_* from Obj_Entry and just walks the list of > phdrs in obj_remap_relro(). However, that defeats the order you mention > below of the timing of parse_rtld_phdr(). I hadn't realized until your > paragraph below that that local change was part of why this was exposed. > It would still be more correct, strictly speaking, to skip obj_enforce_relro > for rtldobj, and if we ever supported multiple PT_GNU_RELRO upstream we > would want that change. Ok, please commit this change. > > I had also missed the later explicit call to obj_enforce_relro() for obj_rtld > when I sent my original e-mail, so nothing is broken in FreeBSD. > > > obj_enforce_relro() only acts if obj_relro_size is > 0, which requires > > the call to parse_rtld_phdr() to fill it. This is indeed called after the > > rtld is relocated by relocate_object(s), but so it was before the Andrew' > > change. > > > > I can see a problem if plt is mapped ro and requires relro to remap it > > rw before relocation, but I do not believe this is the case for rtld and > > any static linker. > > > > And what is the arch? > > I was testing on a CHERI arch since that is my use case for multiple > PT_GNU_RELRO sections, though the change to obj_remap_relro() is applicable > to all architectures. > > > The RTLD_INIT_PAGESIZES_EARLY symbol indeed should be eliminated, I have > > the patch. But let's sort out the page size issue as well. > > I do think we can probably just axe that code entirely. Well, just the #ifdefs. Yes, I will commit it. From nobody Wed Nov 20 08:16:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtZ2g2MTdz5dR6n; Wed, 20 Nov 2024 08:16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtZ2g1VhSz4VmK; Wed, 20 Nov 2024 08:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732090603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F5Uwl0tmf6U/tIp6X523RYPYz2u85vY/sT65hjW6UV0=; b=KCmvxAGpd4uLmtjWnyeOODaZ5sBlNKIAF6ykQopOiZbS2eKHSYmiFv9P9DOrFQuHEpGpim qv89MpWbaPN38Of8jXlATyIkHvyNoF1pqZJKIRo83DiKT8ctH6njgpGyCc4vaBzi0j5WxZ HQhReFPzNN6LBtR0FK3WY3yWgWYJyYuaWbrH0CrUwKnMhqlAaYYpgBA/F/DBZo14kw6wLz FZ+D4m5/lKGtW8q3Z8ZDRECQl5xnwT1Gg98NSjHp1XIZV3sEkM+MK775M9b6qEkjy/LlKo uktSvHlr79nfE8Wdw+ZHKU5t1x33VIPlyUKT0AKaM39tqdD9xgGnPhppo+z7dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732090603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F5Uwl0tmf6U/tIp6X523RYPYz2u85vY/sT65hjW6UV0=; b=D0aiKlRM80TQWmjHKLrDQDEhyXWHU/vGlQjufkrG7NgHTF8JpYIM0g4fTfnq8vxfxGrrh6 f84eBVhMVHpyygacNIN2vy/9hTzrPpT4cIw+XWf9UEvehXW0cU1iA+1Unv4akxWuo6ahB8 U4VjmfG+O9r1j4vfg3zhjj6yLD/6TT/W4FKDp4InmvUaH6QU3+FqTbHJnv9sQhYOqow5WM bdkYMEzScB4o17t9sOBvibgFPL9tiZUr0E/7zwtbb98JMJ5/rnJnwrru5pRMJEjqSwtimv UgxN2qzQdmjt4iWt6IXyqs/lESS2aFdevFWzC5C7aVx6CCkYow8PyrKLTsRrww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732090603; a=rsa-sha256; cv=none; b=Io4fEkf4Pr/VCN6D3/GgHcFB2G7utZeZ77TYNzPi/L4uUJFyDmFqBjM5vy03qnKRLxE8lo x4J/LfOsq+/XtyRbJa0I1CH59tcvb35ABV5SLlCpcAiuJIepGyatFyWCoNtOXZX5KM6a6x 00AjbZkGC2QGoXgH4GuEdHtw2sLQwzXr/zFh4HSulRezvM/EFcAIH1KojBTDqEh5pfLMoo 5EOUNAbuTxNujZ97+rZSppbSolnKxCD9YKqba0i9iTTeRUZfAIz25qhDwX1bzKhhfecbEw h8zblpgCJHAUUVI4R7P5JX2urHpQTwJKfxMRY68QaNO0rMnWM1NveqOVFKyi5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtZ2g0rCpzmfW; Wed, 20 Nov 2024 08:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK8GhZQ018283; Wed, 20 Nov 2024 08:16:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK8Gh7a018280; Wed, 20 Nov 2024 08:16:43 GMT (envelope-from git) Date: Wed, 20 Nov 2024 08:16:43 GMT Message-Id: <202411200816.4AK8Gh7a018280@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: 5bc24fd7a21f - main - rtld: drop RTLD_INIT_PAGESIZES_EARLY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5bc24fd7a21ffd98fe978b4eb09a383c09edbe37 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5bc24fd7a21ffd98fe978b4eb09a383c09edbe37 commit 5bc24fd7a21ffd98fe978b4eb09a383c09edbe37 Author: Konstantin Belousov AuthorDate: 2024-11-19 06:11:11 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-20 06:59:32 +0000 rtld: drop RTLD_INIT_PAGESIZES_EARLY No arch defines it after ia64 decomissioning. Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/rtld.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 9e5876e26453..c585c47ce4da 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2397,11 +2397,6 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) const Elf_Dyn *dyn_soname; const Elf_Dyn *dyn_runpath; -#ifdef RTLD_INIT_PAGESIZES_EARLY - /* The page size is required by the dynamic memory allocator. */ - init_pagesizes(aux_info); -#endif - /* * Conjure up an Obj_Entry structure for the dynamic linker. * @@ -2436,10 +2431,8 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) /* Now that non-local variables can be accesses, copy out obj_rtld. */ memcpy(&obj_rtld, &objtmp, sizeof(obj_rtld)); -#ifndef RTLD_INIT_PAGESIZES_EARLY /* The page size is required by the dynamic memory allocator. */ init_pagesizes(aux_info); -#endif if (aux_info[AT_OSRELDATE] != NULL) osreldate = aux_info[AT_OSRELDATE]->a_un.a_val; From nobody Wed Nov 20 08:49:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtZm06cSWz5dSRg; Wed, 20 Nov 2024 08:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtZm063YCz4Xtg; Wed, 20 Nov 2024 08:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732092544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJ3Iwj4I3r3RNP3mQFLJeisn3kDbkWs+NY3g/tyPj/M=; b=Ryf2Y3M+ZqV9ysWlVEFUYHFtdcIG8+ZBfYbje4F0MPD9RYmaXJ/pOBkfZmxAwwP2qgfvMa O0PzmwDH+KGtl1SySrbYv23Jihb8Q9OgMllBtLLtvy/sKadGhu8W6ex2mCPadOXnUn/f6V nb2mlZ+FLAQICz016FiWfY/pDjc7Bxqg6fp55j/BY1V1R6UnjC8wnQ1imLOdr4laruQqgE FBIZeZt8vOm8iWKbDh/6YeEl177fdlguNonzG/8nYXlEQPFzysLJyIVy+m4ee7++nvGXa0 wxw0V/QS0zrwu12Vb6bqmTOBgA2J4r9CXGVddo/T0A1ENfkqJEUXoQjiV7cxMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732092544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJ3Iwj4I3r3RNP3mQFLJeisn3kDbkWs+NY3g/tyPj/M=; b=OqMWP/BVbQ/pmZ7nusxGPuJbwzs61OhveFCzThdn/avKj1wCrFg7kupqVjJe6opQcMatg/ duqj/5Zolaz6yL9H5GcNZnwTenDeox8Uciz74I0riGRACvwG70ZtfKRwsPloXpZmaqvmIK c5pKUhGc54QP6xZ0OaTpb6KgkbXzFeqqOcbUUHKuNqS9GZZ/2RJ33zs6u4oISRr1xRJNS0 8IraWNHxuTPEv4kZROE2bRSRmVUK5N5E7GYxdCJc11WeRltrwYcazEKNRQRzYY8qC5zVQS ION5wBT6a18XG7HDc5TYrtU6+Po8+Mu98TUy7X6XVvdBjyt2ySrISVhj6pfy5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732092544; a=rsa-sha256; cv=none; b=vtykLJ2Cs+SF4lTs5gBAkfxQRGPdO94sjTdEhPrzfXJUJER5Ypw8tiI08/P5N7dg0F8zB0 wOtbaj82GBp2ZAcNddfmPkDl5z7XZISPG7mF6s+CwkkxA2c1YVJh+b7rogqtxjmU5jAkNB LSfFeb+3kECcYy92KiQ+i4f02BasLHoL1ENMC/McVwknQY4VPj/jF2xeQmVgvU0y4koJWP WGTk1hIIlT74kKgS+57fI8YAPxJb3ilO1kRR2BDDg5PiIrZsB0Mds4hEJmRbuC/Ugfsws7 6OsTEXFypS2Nb+w6izKxQiK0mzg3xD4ZkbaxjMhl2iON9pqLE6bOh4v4Zztetw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtZm05ZH6zmsY; Wed, 20 Nov 2024 08:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK8n4jg074422; Wed, 20 Nov 2024 08:49:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK8n43q074419; Wed, 20 Nov 2024 08:49:04 GMT (envelope-from git) Date: Wed, 20 Nov 2024 08:49:04 GMT Message-Id: <202411200849.4AK8n43q074419@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: 9229236fb9e0 - main - basic-cloudinit: remove duplicated rc.conf 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9229236fb9e03ed5bfea154f7ac3f3d35a4a9377 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=9229236fb9e03ed5bfea154f7ac3f3d35a4a9377 commit 9229236fb9e03ed5bfea154f7ac3f3d35a4a9377 Author: Baptiste Daroussin AuthorDate: 2024-11-20 08:48:28 +0000 Commit: Baptiste Daroussin CommitDate: 2024-11-20 08:48:57 +0000 basic-cloudinit: remove duplicated rc.conf entry --- release/tools/basic-cloudinit.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/release/tools/basic-cloudinit.conf b/release/tools/basic-cloudinit.conf index 2879f706a8de..7088c0a5f72a 100644 --- a/release/tools/basic-cloudinit.conf +++ b/release/tools/basic-cloudinit.conf @@ -18,7 +18,6 @@ vm_extra_pre_umount() { cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" ifconfig_DEFAULT="SYNCDHCP accept_rtadv" -sshd_enable="YES" # RSA host keys are obsolete and also very slow to generate sshd_rsa_enable="NO" EOF From nobody Wed Nov 20 09:09:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtbD716qZz5dTvJ; Wed, 20 Nov 2024 09:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtbD70SGzz4ZSS; Wed, 20 Nov 2024 09:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732093799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+BhRNno5fN8d32vK5gpFxwEqe+POm3gnxjqchrrJbg=; b=WnLdTVR0ipPFNQveDC+37518mtBg1WT1GunCdgWWwdc+wQAYuYCUnQV3q5DbaXJrpwJVZd AVy6thkhBQ+cdhgUQhmP15NXgvi5QXccHSZ8Awc1cT/pLV7/HqYcTST6GeEP7BGY8U82vv CD8B7RdM+HCiLX62iT+WBhWoEEyS0BSQJjdu0c0FzEPxWVDH6Ei+YfNHtgs+1zemrL95iT h+VmjLu66QLfStLSoTo7uY3zFKv4aPHdIWMxi5R5P5eZ5nE+//2e9kkgW+NtqbW0Paptwc aJIt0+SxgQOjtV1eLw1OEU9YTlfn/u8z31xvyXTzVkwgU7pQynD1qB4ckDd2BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732093799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+BhRNno5fN8d32vK5gpFxwEqe+POm3gnxjqchrrJbg=; b=ShRRi/8Oh5x254cLFwENsvpudlcxBKVaOJPApycEkqR77X6unASE3o6Qhg7j4GULemJkII VtGA6TNvCC6j7/cLIs4qo20AXimqldKv99naRtSZadyWPRlh32VkpdEcYlDsfq8pI24flu BKlH2rHZTqMCjobcXnHyLF3mybiGPcYt5eYrPC5ET28kr7qMgHad9xGuhg3SzdkYpzxWRC gpmt81Knx/68+234E1P22XEB6E9p3JVyWj7N/H/hyCc1QeLCeRyNfcBY8AttMA6HENtu9V NJhMel/9O41SnAjwo1oaKfxVpo+014LiLtnKDb+oyaO2FapyfTwIvz5PHHt9Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732093799; a=rsa-sha256; cv=none; b=vqL0uF54Z/BAICcPQMjiIVDmLc/QswvcjcI7HkVo/HoWvEjp0V3FWb2TL4K9JB+XOal9AH 816O6c35fZBnYPrYsigyrYA5s9Wpb7IStwd78yGOAkaxgmwP9WevhM76zOCR6JK9GhgXXD I2KQDwPR+n26XKvAY+3JeDIHJZxioqAbo5gvXnKb4JZN+LtsdfR1D7YWFL6i+rb30Vpyts 6Zb2CLq2lKmGhjS/CZg+k2zn8x/jkXh3Vnfv9p/QNjWFN8nj1Z8rLmGRV5UgSIdcWLqZDi KkF37CPaHTwX9spyS+wWzQSj23r2KvrqmJrImMZHTXyJYAJUrbC2kz7YsHPo1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtbD703wqznsk; Wed, 20 Nov 2024 09:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK99wgW012708; Wed, 20 Nov 2024 09:09:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK99wIi012705; Wed, 20 Nov 2024 09:09:58 GMT (envelope-from git) Date: Wed, 20 Nov 2024 09:09:58 GMT Message-Id: <202411200909.4AK99wIi012705@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: 438ca68cef3c - main - netinet: default mib counter probe points off List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 438ca68cef3c678de1c01630266831a59818e208 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=438ca68cef3c678de1c01630266831a59818e208 commit 438ca68cef3c678de1c01630266831a59818e208 Author: Kristof Provost AuthorDate: 2024-11-18 09:43:46 +0000 Commit: Kristof Provost CommitDate: 2024-11-20 08:52:48 +0000 netinet: default mib counter probe points off Disable the IP/IP6/ICMP/... counter probe points by default. They are kept enabled in debug builds, and can be enabled with 'options KDTRACE_MIB_SDT'. Requested by: glebius Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47657 --- sys/conf/options | 2 +- sys/conf/std.debug | 1 + sys/conf/std.nodebug | 1 + sys/netinet/in_kdtrace.c | 2 +- sys/netinet/in_kdtrace.h | 2 +- sys/sys/sdt.h | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/conf/options b/sys/conf/options index 0e959c3b9828..61d29a2b74fa 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -143,7 +143,7 @@ GEOM_ZERO opt_geom.h IFLIB opt_iflib.h KDTRACE_HOOKS opt_global.h KDTRACE_FRAME opt_kdtrace.h -KDTRACE_NO_MIB_SDT opt_global.h +KDTRACE_MIB_SDT opt_global.h KN_HASHSIZE opt_kqueue.h KSTACK_MAX_PAGES KSTACK_PAGES diff --git a/sys/conf/std.debug b/sys/conf/std.debug index 53789f269b80..f5ed5582c78d 100644 --- a/sys/conf/std.debug +++ b/sys/conf/std.debug @@ -15,3 +15,4 @@ options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence +options KDTRACE_MIB_SDT # Add SDT probes to network counters diff --git a/sys/conf/std.nodebug b/sys/conf/std.nodebug index 38eb77c8d3a7..4035e28d2a62 100644 --- a/sys/conf/std.nodebug +++ b/sys/conf/std.nodebug @@ -15,6 +15,7 @@ nooptions COVERAGE nooptions KCOV nooptions MALLOC_DEBUG_MAXZONES nooptions QUEUE_MACRO_DEBUG_TRASH +nooptions KDTRACE_MIB_SDT # Net80211 debugging nooptions IEEE80211_DEBUG diff --git a/sys/netinet/in_kdtrace.c b/sys/netinet/in_kdtrace.c index bfa57bd8bf1e..7e0b9a6a9373 100644 --- a/sys/netinet/in_kdtrace.c +++ b/sys/netinet/in_kdtrace.c @@ -36,7 +36,7 @@ SDT_PROVIDER_DEFINE(tcp); SDT_PROVIDER_DEFINE(udp); SDT_PROVIDER_DEFINE(udplite); -#ifndef KDTRACE_NO_MIB_SDT +#ifdef KDTRACE_MIB_SDT #define MIB_PROBE_IP(name) \ SDT_PROBE_DEFINE1(mib, ip, count, name, \ "int") diff --git a/sys/netinet/in_kdtrace.h b/sys/netinet/in_kdtrace.h index 3fb82ad961dd..7b0d433c60d8 100644 --- a/sys/netinet/in_kdtrace.h +++ b/sys/netinet/in_kdtrace.h @@ -54,7 +54,7 @@ SDT_PROVIDER_DECLARE(tcp); SDT_PROVIDER_DECLARE(udp); SDT_PROVIDER_DECLARE(udplite); -#ifndef KDTRACE_NO_MIB_SDT +#ifdef KDTRACE_MIB_SDT SDT_PROVIDER_DECLARE(mib); SDT_PROBE_DECLARE(mib, ip, count, ips_total); diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index 5fa612fcf632..cd45bc1a1ffd 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -357,7 +357,7 @@ __sdt_probe##uniq:; \ (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5) -#ifndef KDTRACE_NO_MIB_SDT +#ifdef KDTRACE_MIB_SDT #define MIB_SDT_PROBE1(...) SDT_PROBE1(mib, __VA_ARGS__) #define MIB_SDT_PROBE2(...) SDT_PROBE2(mib, __VA_ARGS__) #else From nobody Wed Nov 20 09:42:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtbxS6dX2z5dWY2; Wed, 20 Nov 2024 09:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtbxS4bxLz4cQc; Wed, 20 Nov 2024 09:42:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732095740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ErHziiX/SEwhfBJ4yYVIHHYJCpBwE8Cm+ZyEAgQzCpI=; b=t1Og6gYo7LcF9d+oC6Oy4OxuNsGjMI2nA2lQkoZ9CWH+wbgpW2Cm01wwi6f21U9eZMdpO4 Ef1NXEuQz5m/R9jwTqtmC/58HX9SWsco6Q6hMx+4MrUaiH90VtyJcy96z9c0FBeg176UvL oZquZ9VQgoObmcAc4hatvMCzhVG92xeZbzcsbtjfM2nOsT5qXCLqrUoBU6ZS75mzSPMMwy SO5X8Rb3BTuO7lCm5XGNQyFA7yXHrTY8uEskicJfbZGe7zu8c7ZsJwjhNJ3nCLQPqCCDp4 NabowzNII76bj5NbHLRVR2pclgrTcsTGOydbriNKAW596jkTQPyr5SqU/78fgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732095740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ErHziiX/SEwhfBJ4yYVIHHYJCpBwE8Cm+ZyEAgQzCpI=; b=bpO9snmyDrK3s1Zsu07VyTuAEneHXViSyHLzeonopJmhkjz6ZSITP2zvt3+NcmXzl4N/hd ZGtZze5JYagTQLEApVlDew1F9FmlsR/AOf1wPOXdGxQiM+6+c++tY+YebJJCOCnljeZsFL 91xZ6p41U9QFDdjHe/rck4aZ+t9GJPGa2GJvGbhr4+iOOTQX28rYv36gV69MDlvkjRy/lV mmG65AuhDyo2YpKyiq8gc9lgEWppeba5qvGtqy0eL/9hKnW3DVn1JyOmojDOlWMzTYSdsd eiE7dRIJQ7t7f1++DHrvU4X4T8kP0lKHsJXlF3zCQ+H8hzzyW2lmH5eKIihIBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732095740; a=rsa-sha256; cv=none; b=hso6RJQSBWstriSKp+k6FG61DK0//onV98iga/nUPl8qYcECPMV1gTNBWhsVs8GQiOnXWR mk8ESt/7L1SmVJX2mtVILgfBng+ajiFWO/EGv0XUq7NVjpHjiEwLA5m+iDYSn9E6p0nLhO 7VualCNxDAThYYAzNvZy7wN3zKwGJzIFjgeNjZflyOYIBcTGIfBztzbN4dTWiZnt1Dgg+a 1yOarDTmzWJxNszJreoT31wnqrkIfikhUa7wbIFlq76YQoJIAx7qjv2zhhvOoMs5s9Dy5e HLPBw2sWV3daMHT2VoWoAnIAAMcSMhcABs6Eo1knRMo1Y7T/ZmIQ36ttGfpgVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtbxS4C4vzpWx; Wed, 20 Nov 2024 09:42:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK9gKiX083978; Wed, 20 Nov 2024 09:42:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK9gK7s083975; Wed, 20 Nov 2024 09:42:20 GMT (envelope-from git) Date: Wed, 20 Nov 2024 09:42:20 GMT Message-Id: <202411200942.4AK9gK7s083975@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: fc34a2463c16 - main - nuageinit: add test for the password List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: fc34a2463c16fd47acbc8e5c3bbbb6b2ce1b1469 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=fc34a2463c16fd47acbc8e5c3bbbb6b2ce1b1469 commit fc34a2463c16fd47acbc8e5c3bbbb6b2ce1b1469 Author: Baptiste Daroussin AuthorDate: 2024-11-20 09:32:16 +0000 Commit: Baptiste Daroussin CommitDate: 2024-11-20 09:41:46 +0000 nuageinit: add test for the password --- libexec/nuageinit/tests/Makefile | 7 +++++++ libexec/nuageinit/tests/nuage.sh | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/libexec/nuageinit/tests/Makefile b/libexec/nuageinit/tests/Makefile index ccb81c090445..bb2f0d7c747e 100644 --- a/libexec/nuageinit/tests/Makefile +++ b/libexec/nuageinit/tests/Makefile @@ -1,10 +1,17 @@ PACKAGE= tests +.PATH: ${SRCTOP}/usr.sbin/pw/tests + +BINDIR= ${TESTSDIR} + +PROGS= crypt +LIBADD= crypt ATF_TESTS_SH= nuage utils nuageinit ${PACKAGE}FILES+= addgroup.lua ${PACKAGE}FILES+= addsshkey.lua ${PACKAGE}FILES+= adduser.lua +${PACKAGE}FILES+= adduser_passwd.lua ${PACKAGE}FILES+= dirname.lua ${PACKAGE}FILES+= err.lua ${PACKAGE}FILES+= sethostname.lua diff --git a/libexec/nuageinit/tests/nuage.sh b/libexec/nuageinit/tests/nuage.sh index 293a0a4a9a83..a5451561202f 100644 --- a/libexec/nuageinit/tests/nuage.sh +++ b/libexec/nuageinit/tests/nuage.sh @@ -9,6 +9,7 @@ export NUAGE_FAKE_ROOTDIR="$PWD" atf_test_case sethostname atf_test_case addsshkey atf_test_case adduser +atf_test_case adduser_passwd atf_test_case addgroup sethostname_body() @@ -48,6 +49,19 @@ adduser_body() atf_check -o inline:"impossible_username::1001:1001::0:0:impossible_username User:/home/impossible_username:/bin/sh\n" grep impossible_username etc/master.passwd } +adduser_passwd_body() +{ + mkdir etc + printf "root:*:0:0::0:0:Charlie &:/root:/bin/sh\n" > etc/master.passwd + pwd_mkdb -d etc etc/master.passwd + printf "wheel:*:0:root\n" > etc/group + atf_check /usr/libexec/flua $(atf_get_srcdir)/adduser_passwd.lua + test -d home/foo || atf_fail "home not created" + passhash=`awk -F ':' '/^foo:/ {print $2}' etc/master.passwd` + atf_check -s exit:0 -o inline:$passhash \ + $(atf_get_srcdir)/crypt $passhash "bar" +} + addgroup_body() { mkdir etc @@ -61,5 +75,6 @@ atf_init_test_cases() atf_add_test_case sethostname atf_add_test_case addsshkey atf_add_test_case adduser + atf_add_test_case adduser_passwd atf_add_test_case addgroup } From nobody Wed Nov 20 09:42:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtbxV0G0vz5dWgV; Wed, 20 Nov 2024 09:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtbxT5Hw9z4cbl; Wed, 20 Nov 2024 09:42:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732095741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AXY7aKZ1uq7QFg+tImNMKD3sr/qO9r0ZK3H8HjdgsC8=; b=o6jXxdcv1e/uSYjPUJhERE6EDl3b1IRclMEE4unn9cdNDIvUvmqiTUtKTaAyikWBgO/n7h H9ApH7LxNuLV4gSiXoOIg9YIIysY816nt9mhNdhS4xOj6B6uCwTm+LLPxWenn1Zf3VYK8O ycfVpGXiuRelJddMEtN/6/+5Pq4DhgEoWo35vmLH2FF1fWYGrgzaRb3g8gQgQj/GDyfk/O zHY4dOYVTnZXOE66i1mPoqRAGV8LA/KCKSFYqBtzV7J7LT82E3vj61INQ4ZC15zL7Vj2CB ljDeKAjaR8d1SHyr5PR4lu6+/Q9qsFQR1LBDr+HnJuSPblYGftrf0awncko5Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732095741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AXY7aKZ1uq7QFg+tImNMKD3sr/qO9r0ZK3H8HjdgsC8=; b=gFPoyV0M00YcMlPw1Bpe66FYkFE0+kvUyyAPhILcRWXFi+uX9RrBciC5QgUQ+bOBN1t24N w+soERWVy3xuaMybhzeDFkNfR8Fbsetw4c4hRfkn/AoUF6RtbVT1yBeXX0yvW8/yooub+1 w1CI8hBpQX9Fs0N7t+lw6nLgOELeBEgON1nhkwOp36eEA0jiJXnCpMv3iQZKE5q9r8/mQz eLwIZC6U31FDy9XGqBUXxt3szzTq2bYFkkPMOdNq2IRUIJPJrkqRstCI6ZzHEkEzAYl0Mx cNGjUSVjNpHyDfMrfnt+FuYcTwHKs/K8rXIOdb5flLxu2ppTG2dCce/8oVK+jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732095741; a=rsa-sha256; cv=none; b=CySpFTuBmGARQDrYnAqnrAunimGtYHArTNQffpTsxkazMe9enn2Vl/t1/kKIbXtH6B5soL dbWwD3u8YKumU0Gq3OJ9ZLMyd1ow1pXLFTra+sEopwSmXuGr4WIwkgjULvrRg40NyPYWaN VjliX5BuwXQBg2x8tu3w+KRuFHu4oU80HGZAhzM02X/wArBPU4ul/CH3l7Dr55ML+hc1/c 7KzYvat01GfT34cwIXfSv+xur97AdTX51zWT5lwGdY6AKKFq4OQ7RvbDolZ3LLUytKQdiN FGhMm/Ca6FQl96vOvlZ2xrYk8r9VPbLjCPymugjhT36FjJ4wsMaCd+bwh4LUWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtbxT4vjszqBk; Wed, 20 Nov 2024 09:42:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AK9gLeB084050; Wed, 20 Nov 2024 09:42:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AK9gLLP084047; Wed, 20 Nov 2024 09:42:21 GMT (envelope-from git) Date: Wed, 20 Nov 2024 09:42:21 GMT Message-Id: <202411200942.4AK9gLLP084047@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: 3e502866073f - main - nuageinit: use io.popen instead of pipes in shell for password List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3e502866073f8d922eecb9016920a56b90c35e38 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=3e502866073f8d922eecb9016920a56b90c35e38 commit 3e502866073f8d922eecb9016920a56b90c35e38 Author: Baptiste Daroussin AuthorDate: 2024-11-20 09:39:50 +0000 Commit: Baptiste Daroussin CommitDate: 2024-11-20 09:41:46 +0000 nuageinit: use io.popen instead of pipes in shell for password using echo in a sh(1) command line, requires many escaping to be done right, using io.popen we don't need to do this escaping anymore. --- libexec/nuageinit/nuage.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index 4e21405a443b..978de02a63fc 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -119,11 +119,12 @@ local function adduser(pwd) end local precmd = "" local postcmd = "" + local input = nil if pwd.passwd then - precmd = "echo '" .. pwd.passwd .. "' | " + input = pwd.passwd postcmd = " -H 0" elseif pwd.plain_text_passwd then - precmd = "echo '" .. pwd.plain_text_passwd .. "' | " + input = pwd.plain_text_passwd postcmd = " -h 0" end cmd = precmd .. "pw " @@ -134,7 +135,11 @@ local function adduser(pwd) cmd = cmd .. extraargs .. " -c '" .. pwd.gecos cmd = cmd .. "' -d '" .. pwd.homedir .. "' -s " .. pwd.shell .. postcmd - local r = os.execute(cmd) + local f = io.popen(cmd, "w") + if input then + f:write(input) + end + local r = f:close(cmd) if not r then warnmsg("fail to add user " .. pwd.name) warnmsg(cmd) From nobody Wed Nov 20 10:04:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtcQc4Z41z5dXrl; Wed, 20 Nov 2024 10:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtcQc45FGz4f38; Wed, 20 Nov 2024 10:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732097048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ASVuRViwQuk+wdM0XALj4jurUjBowScpZBQ+xM79raA=; b=mq6S9M1szDCrFVujgwIynJ98DW4iGi1URkgru5wDSh1OzprEXG8mxww4s5vIzMYNhbN5I5 cF0bVnHIfU0YaCRlx9VRy/3v9HpbOen86Br6pskupLCK98wjNtT/8v87YmuNUaBLXvbEiD euesogBH63RrhzhKpJtFZkn2E7SEDl/ACQHJYgCFL1aSx3nKPJn7TlTTGXfsi/EnVb+z1W D0MJ6q+P5/M9lHLKu91cX8LlYNeHGz4iqzge3LNqeACzZSCmS8yIbpdRntkIBmmLnleSiA SKRDl26u8KGXILwBEheejskKFrsDNF93jgC8lLQwG5RsPW+U+W7qA9Wh+uPmmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732097048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ASVuRViwQuk+wdM0XALj4jurUjBowScpZBQ+xM79raA=; b=hkcPzGxOT+pGY4XEdDCYjRc209pz+5URHfkL3TnMOQ2LK2b4UVWxdM6b77JMF4gsEW86Wk d4vg+2YCDK0OmBzYOuZldDCF6hcUCTTwoI0Hfb6V1w+wWTcV5HQeJnQ2Lf21H3J1JGh+Ka vMZinLUWq/QFyNBwfCqgW8MLua+QbL4B2pxMiQUXAeFlTd078Vf+K08bgJLYAdL9Fe3bvI 3UmAVTJJM4R2dIoV6+dSbCr4qY3ZKmyIBclGZKoyH4cC1NGhrC2i67UKT8NwLjsuTB0aZ+ Lr7UeRcX4bjBA+gUialJXMMF4ZTbtBKpFtIMFGsxo9Wyna90va9MlLmdNs92+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732097048; a=rsa-sha256; cv=none; b=xe8dLAa099lwi42L7anOwfpxxG6QqJ5Zk1MqtF2JZvtg60bHPGC2ekXnBOXt2Tw33xOy/x JfUq2fYVx4LiuprTA5skLlL5yaysezOAseCQbjF6f6bYq9QjKNI5QmtkhoakuqifE7Dsh4 kDTFMsOmEFra2cqFxPcEUeRblCxjQFLJFIH9Lk+2NWMOVnFnzEKs8FAOxGz0WAbYwI0730 XyrZQTeU75+jBzKSBH9ixEkoY9Uby4/4J2bbwg+ds848Ve8lffb4JMxrg0LHEUhMBgU6KK To5BlYGnFljRZHyfICHAZFcdK5lDphbqy21iwMhHPC+ewAHNZv8zeQZm/DfWqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtcQc3hV5zqh8; Wed, 20 Nov 2024 10:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKA485W022668; Wed, 20 Nov 2024 10:04:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKA48tI022665; Wed, 20 Nov 2024 10:04:08 GMT (envelope-from git) Date: Wed, 20 Nov 2024 10:04:08 GMT Message-Id: <202411201004.4AKA48tI022665@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: 3e2a7a2cbeb2 - main - nuageinit: add test about encrypted passwords List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3e2a7a2cbeb272b891c6931f2ae54ee6e5ec2c7d Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=3e2a7a2cbeb272b891c6931f2ae54ee6e5ec2c7d commit 3e2a7a2cbeb272b891c6931f2ae54ee6e5ec2c7d Author: Baptiste Daroussin AuthorDate: 2024-11-20 10:02:55 +0000 Commit: Baptiste Daroussin CommitDate: 2024-11-20 10:02:55 +0000 nuageinit: add test about encrypted passwords While here fix fc34a2463c16fd47acbc8e5c3bbbb6b2ce1b1469 where the adduser_passwd.lua file was not added --- libexec/nuageinit/tests/adduser_passwd.lua | 20 ++++++++++++++++++++ libexec/nuageinit/tests/nuage.sh | 3 +++ 2 files changed, 23 insertions(+) diff --git a/libexec/nuageinit/tests/adduser_passwd.lua b/libexec/nuageinit/tests/adduser_passwd.lua new file mode 100644 index 000000000000..e2d9395d679d --- /dev/null +++ b/libexec/nuageinit/tests/adduser_passwd.lua @@ -0,0 +1,20 @@ +#!/usr/libexec/flua + +local n = require("nuage") + +local pw = {} +pw.name = "foo" +pw.plain_text_passwd = "bar" +local res = n.adduser(pw) +if not res then + n.err("valid user should return a path") +end + +local pw2 = {} +pw2.name = "foocrypted" +-- barcrypted +pw2.passwd = "$6$ZY8faYcEfyoEZnNX$FuAZA2SKhIfYLebhEtbmjptQNrenr6mJhji35Ru.zqdaa6G/gkKiHoQuh0vYZTKrjaykyohR8W4Q5ZF56yt8u1" +res = n.adduser(pw2) +if not res then + n.err("valid user should return a path") +end diff --git a/libexec/nuageinit/tests/nuage.sh b/libexec/nuageinit/tests/nuage.sh index a5451561202f..f2753d6d91e6 100644 --- a/libexec/nuageinit/tests/nuage.sh +++ b/libexec/nuageinit/tests/nuage.sh @@ -60,6 +60,9 @@ adduser_passwd_body() passhash=`awk -F ':' '/^foo:/ {print $2}' etc/master.passwd` atf_check -s exit:0 -o inline:$passhash \ $(atf_get_srcdir)/crypt $passhash "bar" + passhash=`awk -F ':' '/^foocrypted:/ {print $2}' etc/master.passwd` + atf_check -s exit:0 -o inline:$passhash \ + $(atf_get_srcdir)/crypt $passhash "barcrypted" } addgroup_body() From nobody Wed Nov 20 12:36:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtgpG1RW4z5dhxf; Wed, 20 Nov 2024 12:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtgpG0k8Sz4rxH; Wed, 20 Nov 2024 12:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732106182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IK+1gjqi0yUkCyV4jHYSjqjOTiF4ltERYA4i+mk7lU0=; b=kRaImamUhIL8ZPsgwVcfRo96Rdk5dhCXjgezv3QrPDbJQnh39tg3afWbVAUFU+TVzixU8s CvVWv+dcI8cvyVL74dAdjocOQBM++C8QzLT2329VBU2zKHAXQBlGRQLfyX3qhd2HdJu6JG ZigICGDeVGuZSQhgn6XEqdtxoo9pxmBpzufJn+PjLaDqbFxbZ2ygEUyUc1MnXfaTRjdNzh 0oNORuytq4ZN8CIz3zfaDU/N51d3H+blU7cqfNuMc0kj8qNiyB9FYgN4Nh0biYyrNCZzow afyln2UjQRpoPYC9xfFtdIW6a97MPiN0xAPODrzi6F8VpC7pzOPzDqH2cya7Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732106182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IK+1gjqi0yUkCyV4jHYSjqjOTiF4ltERYA4i+mk7lU0=; b=MfUpm3v+vSvVV8uFsjqMUFgPajUS+ScIL3JypbZJBagKSwVLJ2OljEAUIxR/RW9B19RcoV 0KAXX50eBODzSm50D3Y3DO6t5axSe/zr5hB9L3EXteHfaSibqjS9m+rwLcavhLN86iFt5r n8p37GzwqclXn6Uk38rkGHJoSL6tckt2scQqs+eZclNojvYXxuIwIXQrLWGX5fVoECn1+j 1VG7XpZEez6rW8qZ0isFBn2XrtzLUSnOLwg8EvYuPM5IcN4Zk4xfnkyIercPxbKrI8mzhi keuHBYiIqLyMZLNsxP9iq7FfTFnaLbakisQzONbAWKSbjuaCeKt0TCABpdzL8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732106182; a=rsa-sha256; cv=none; b=X4LJMYXdyqrlHjK99+4UUcRjO3r7TlSrRbrq2dh+GjVQ42cL5cCw2QN4cBEhBSBoF+DP36 JwGL7tykk2L2SInGj98qIexz+yc1cNZF5GjiUKFNuoBB7RXW7o5y9sdYM+uRztdH4YiDap qN+TKFsoYBgDGXw1hK6sVeO4Kx7XzYHQuGwJwtZHdlLixPQQklLRF/SwN+S53y2vI4PP7E OQXx4FX75N0RPSBsgllpybDiuqwEfRuhTqfZ3sqeTfaTkmM5nAM8oy4yyCklbG5r95oK9U D4Kd+Ws8LxWpYRQ/nzjzF3AZmWsjlccN2Kcyj1kIJQMYz2PxhSeRIy1o8z/gXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtgpG0JKdztTk; Wed, 20 Nov 2024 12:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKCaLOI004346; Wed, 20 Nov 2024 12:36:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKCaLcm004343; Wed, 20 Nov 2024 12:36:21 GMT (envelope-from git) Date: Wed, 20 Nov 2024 12:36:21 GMT Message-Id: <202411201236.4AKCaLcm004343@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: 81f7ad324dd0 - main - pf: add missing unlock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 81f7ad324dd0cc4f2c090c1504230f4e2d58fb54 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=81f7ad324dd0cc4f2c090c1504230f4e2d58fb54 commit 81f7ad324dd0cc4f2c090c1504230f4e2d58fb54 Author: Kristof Provost AuthorDate: 2024-11-20 10:45:39 +0000 Commit: Kristof Provost CommitDate: 2024-11-20 12:35:53 +0000 pf: add missing unlock If we fail to unshare the mbuf we forgot to unlock the rules. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index daf3fcf567ad..39913014334d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9043,8 +9043,10 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 if (__predict_false(! M_WRITABLE(*m0))) { *m0 = m_unshare(*m0, M_NOWAIT); - if (*m0 == NULL) + if (*m0 == NULL) { + PF_RULES_RUNLOCK(); return (PF_DROP); + } } pf_init_pdesc(&pd, *m0); From nobody Wed Nov 20 12:57:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XthH26BDMz5djZj; Wed, 20 Nov 2024 12:57: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XthH25lf1z4tGW; Wed, 20 Nov 2024 12:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732107470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJ6DK/qeiyjR9BBX0uaTsvZ9tm6ZJUaHZhJjlZdeIsA=; b=bYyDgNXFW8n6rjLx0vFcg6Ghe6fpXjxyBrKd49XLgz7MGECZ/uVVw7TleZ5fmr/M83RM9/ sPB6xcmwqdoYKPHa9UDwrVElC5BsTfPIO1eC7SIZ9+xCraphTGc2wDEhZoAowVBfNqBFkR kGn3BTek9EzXFWUysyA3Aw1tW0V7gwVLvsFZRtSu4GtclRr3yoXR0AMrkZznTWioBeCqwZ y5Q0WU0kPf+9DVL/Owz93xqYfrBflU+Tn/mgCt85jDkiNb6eHNzC85QLIHoURpYXyVSYmF 7YYbezB6tllxIpFnlefezjb3FCSj71kc+Rul563sQNy7CKQtZ5uq4St286gaEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732107470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJ6DK/qeiyjR9BBX0uaTsvZ9tm6ZJUaHZhJjlZdeIsA=; b=rMBVAIF6OGN6NYoCzqqat1fsLFOto2qBO6VDmc+G+Xe+x7YmWtC+4wCxdPT9V2OfarIORO aWewGaSDQHGLZfE/xZXXQTD+vYLrBI7vLLM39XFWTPrI8EVrZCS9Bkdf24W9ZBd9GbC1+U CnN/GFE5zZ3CIMvxJ7+we9w/CsNXUcs1qcJJlCNCUeqJorCAsaHU9O9p9n+k3qE5/1g8QA TTcS+GPoYMlv1yahFAy1A1GdQMhf3NXVFolMsVutrspxAivmjHq4iq46stDAUzEOR3w4sM Xsm3LFSrfqTq4Eh7pv3xwsVcxv+M8fP3j3/xfre+jhR18CBuvNgd3cc+FvbXxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732107470; a=rsa-sha256; cv=none; b=QNgd5zQeB4cEUJQo07nQRK3fndn+pgIVSVUsH+rdDAPpSYwOEs4202LopbxOa86PiteKBy C6Op5h2/j0j3J+dDwEnfDP++QUmIsHak7YM2SQdg4Vrxv2g46tpb/LU6YeTwAPdkhNlE1K A7BphGLRBhgg/CW/GCKbsf3BPmsefWKkmby3ym3/n1blEHPCkIakd4tVz6t1F5Ip1oe+VF kXOA5/AZyA6McndxvEUpZu5V+IdIO3d8OGXg8XUU6n8/31vztsRGrHZuKr9Trmmg7m3mRj wakLvbUhjHmO87UOFtKA8i8z7WfbFO3qXCqjTrFKomdVUvQJ9eQtFsPhW+NTQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XthH25DMdzvJK; Wed, 20 Nov 2024 12:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKCvoFd043036; Wed, 20 Nov 2024 12:57:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKCvoro043033; Wed, 20 Nov 2024 12:57:50 GMT (envelope-from git) Date: Wed, 20 Nov 2024 12:57:50 GMT Message-Id: <202411201257.4AKCvoro043033@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: 65f5dd42f11c - main - sh(1): add -l 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 65f5dd42f11cdcb7716e6cdd09fac2314c144c1f Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=65f5dd42f11cdcb7716e6cdd09fac2314c144c1f commit 65f5dd42f11cdcb7716e6cdd09fac2314c144c1f Author: Baptiste Daroussin AuthorDate: 2024-11-20 10:48:39 +0000 Commit: Baptiste Daroussin CommitDate: 2024-11-20 12:57:18 +0000 sh(1): add -l option -l is required by LSB for login shell, all other shells: bash, zsh, oksh, mksh, ... implements it. with -l sh will act as a login shell and read the profile. MFC After: 1 week Obtained From: dash (3b7c8442bfe7c2fd0a6b0415df6ddf66a399fd55) Reviewed by: kib, lme Differential Revision: https://reviews.freebsd.org/D47681 --- bin/sh/main.c | 5 +++-- bin/sh/options.c | 24 ++++++++++++++++-------- bin/sh/options.h | 2 +- bin/sh/sh.1 | 10 ++++++---- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/bin/sh/main.c b/bin/sh/main.c index 23147c1db0be..94e8da6b4921 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -95,6 +95,7 @@ main(int argc, char *argv[]) static struct stackmark smark, smark2; volatile int state; char *shinit; + int login; (void) setlocale(LC_ALL, ""); initcharset(); @@ -128,13 +129,13 @@ main(int argc, char *argv[]) initvar(); setstackmark(&smark); setstackmark(&smark2); - procargs(argc, argv); + login = procargs(argc, argv); trap_init(); pwd_init(iflag); INTON; if (iflag) chkmail(1); - if (argv[0] && argv[0][0] == '-') { + if (login) { state = 1; read_profile("/etc/profile"); state1: diff --git a/bin/sh/options.c b/bin/sh/options.c index 2dab8f4ea998..54a9cb4c1c49 100644 --- a/bin/sh/options.c +++ b/bin/sh/options.c @@ -64,7 +64,7 @@ char *nextopt_optptr; /* used by nextopt */ char *minusc; /* argument to -c option */ -static void options(int); +static int options(int); static void minus_o(char *, int); static void setoption(int, int); static void setoptionbyindex(int, int); @@ -76,19 +76,20 @@ static int getopts(char *, char *, char **, char ***, char **); * Process the shell command line arguments. */ -void +int procargs(int argc, char **argv) { - int i; + int i, login; char *scriptname; argptr = argv; + login = argptr[0] != NULL && argptr[0][0] == '-'; if (argc > 0) argptr++; for (i = 0; i < NOPTS; i++) optval[i] = 2; privileged = (getuid() != geteuid() || getgid() != getegid()); - options(1); + login |= options(1); if (*argptr == NULL && minusc == NULL) sflag = 1; if (iflag != 0 && sflag == 1 && isatty(0) && isatty(1)) { @@ -119,6 +120,8 @@ procargs(int argc, char **argv) argptr++; } optschanged(); + + return (login); } @@ -139,12 +142,13 @@ optschanged(void) * to the set special builtin. */ -static void +static int options(int cmdline) { char *kp, *p; int val; int c; + int login = 0; if (cmdline) minusc = NULL; @@ -190,6 +194,8 @@ options(int cmdline) if (q == NULL || minusc != NULL) error("Bad -c option"); minusc = q; + } else if (c == 'l') { + login = 1; } else if (c == 'o') { minus_o(*argptr, val); if (*argptr) @@ -198,13 +204,13 @@ options(int cmdline) setoption(c, val); } } - return; + return (login); /* When processing `set', a single "-" means turn off -x and -v */ end_options1: if (!cmdline) { xflag = vflag = 0; - return; + return (login); } /* @@ -217,7 +223,7 @@ end_options2: if (!cmdline) { if (*argptr == NULL) setparam(0, argptr); - return; + return (login); } /* @@ -236,6 +242,8 @@ end_options2: /* We need to keep the final argument */ argptr--; } + + return (login); } static void diff --git a/bin/sh/options.h b/bin/sh/options.h index 206d32c8a706..a059e19707b1 100644 --- a/bin/sh/options.h +++ b/bin/sh/options.h @@ -109,7 +109,7 @@ extern char **argptr; /* argument list for builtin commands */ extern char *shoptarg; /* set by nextopt */ extern char *nextopt_optptr; /* used by nextopt */ -void procargs(int, char **); +int procargs(int, char **); void optschanged(void); void freeparam(struct shparam *); int nextopt(const char *); diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 1ce26ecba328..9903508d6381 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 14, 2022 +.Dd November 20, 2024 .Dt SH 1 .Os .Sh NAME @@ -37,14 +37,14 @@ .Nd command interpreter (shell) .Sh SYNOPSIS .Nm -.Op Fl /+abCEefhIimnPpTuVvx +.Op Fl /+abCEefhIilmnPpTuVvx .Op Fl /+o Ar longname .Oo .Ar script .Op Ar arg ... .Oc .Nm -.Op Fl /+abCEefhIimnPpTuVvx +.Op Fl /+abCEefhIilmnPpTuVvx .Op Fl /+o Ar longname .Fl c Ar string .Oo @@ -52,7 +52,7 @@ .Op Ar arg ... .Oc .Nm -.Op Fl /+abCEefhIimnPpTuVvx +.Op Fl /+abCEefhIilmnPpTuVvx .Op Fl /+o Ar longname .Fl s .Op Ar arg ... @@ -251,6 +251,8 @@ Ignore from input when in interactive mode. .It Fl i Li interactive Force the shell to behave interactively. +.It Fl l +Force the shell to act as if it has been invoked as a login shell. .It Fl m Li monitor Turn on job control (set automatically when interactive). A new process group is created for each pipeline (called a job). From nobody Wed Nov 20 13:06:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XthSk74cbz5dkTn; Wed, 20 Nov 2024 13:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XthSk6fC9z4vF7; Wed, 20 Nov 2024 13:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732107974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p24XzQQJ8W2VYLaCyRZG+3b7vw0HaEhiUb1Xz3Ki9Rw=; b=ORiRoyBAqFEz3cHgjDsfuhI0zRwdVFtLx9RpWtf6lDtJStTA7RGW4VT21M0toL8Dwbi5Gd KFkP/hWsyvzdYd+0jL4XHHBddBbyVb79Duk7MnRjT871BMlJRrMseZUQMWlEw9+lgtVCLv 0XDz7YveMfEBl+htKfwW/GWGZ1Mic5uigKIXnsFeV0cLq0GnFvIjCGWK1U84LeDzUibBs/ BJK9lphV4mkbz/JUrilq2oVqajjVMv+yxDvcFj5VBLcQz9baF2eFlMcku7TcTFrrcFZZGT SzMLTSNpey+I9fn/SkzqtkWUZdJEPhxxfnZRQX/I25UGuFvx0iWvNtH+4yIhbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732107974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p24XzQQJ8W2VYLaCyRZG+3b7vw0HaEhiUb1Xz3Ki9Rw=; b=CtqEjsvCXkCp2mdRTkESoUUWFoqb3nqloFQczAWgguc+4hOqsQcDsKnH2u3nd5TVbrrepW KGgamtzngaokF6xVB/lhXWgD59tzwCW+npd44PIlXY1jNi3HZ9nfLTUABFgIEtQvgcjE+M PwaY6jSR0U9Z9JWcDAX/EeCU6HVt4SBqBkcwZgJFrNPEVM3gHu+P1tva4mSBJ7utxj6f2W +Yg+ix2a5SlA170IOcnwq7BfxlpfrtRxhzy64Jlj6amAg0GADkXeoSIwM3DnWW5ZVO+l9B 5ENWq/Q5lQnujQZYZvi4BgE6Tws8ULF++2niYpJERSRcf/tzhXrq8NEta+NdqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732107974; a=rsa-sha256; cv=none; b=NHMLJOhVtuvv0BFJEVfWet6IyEZ9KTrx6DyHuUjhgDTVx4M+ePwD1ryZkkUsLfyJv+7wJy ta/w8IiNKsquqdRLymJuLv8fO3nSZjOO+cVuOZwbzQBWl3mioWffvpJM8aVLH/z2pAFYAB rntBoOB75CKXtnrasgftJqURyCJYCdT7Bslq+rV/yKOyXMpX5CEDbgnbiBjihYYuVI49Oq riDAlLccainVVsz0qPU4Mg8wFFaibeXfMb/0YLDgwJzroNv/+nnukdSyS8zWXphktBkABS 8tU53LnxK25hRbwwABxM2ZJvYyzQea/pk7m0zwE7BPFGALGx7/z5t990DnTVaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XthSk6GS6zvrG; Wed, 20 Nov 2024 13:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKD6E3C061691; Wed, 20 Nov 2024 13:06:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKD6Edo061688; Wed, 20 Nov 2024 13:06:14 GMT (envelope-from git) Date: Wed, 20 Nov 2024 13:06:14 GMT Message-Id: <202411201306.4AKD6Edo061688@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: 7e2996c1f5b4 - main - release: install wireless firmware onto disc1 and dvd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 7e2996c1f5b4e684cae40c2418b68061df9997d9 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7e2996c1f5b4e684cae40c2418b68061df9997d9 commit 7e2996c1f5b4e684cae40c2418b68061df9997d9 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 23:51:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-20 13:05:04 +0000 release: install wireless firmware onto disc1 and dvd Wireless driver firmware is no longer added to the src tree. In order to have wireless support in the installer for the new drivers we install the firmware packages onto disc1 (and memstick) and dvd if built on FreeBSD and NOPKG is not defined (to not break cross-builds from Linux or OSX and to allow people to opt-out). Sponsored by: The FreeBSD Foundation Submitted by: cperciva (the orig. commands and where to place them) Reviewed by: jrtc27 MFC after: 6 hours Differential Revision: https://reviews.freebsd.org/D47407 --- release/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/release/Makefile b/release/Makefile index 9617df7ffd48..9d5b64dae271 100644 --- a/release/Makefile +++ b/release/Makefile @@ -70,6 +70,17 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} .endfor .endif +.if ${.MAKE.OS} == "FreeBSD" +# For installing packages into the release media. +.if defined(NO_ROOT) +PKG_ENV+= INSTALL_AS_USER=yes +PKG_ARGS+= -o METALOG=METALOG +.endif +PKG_ENV+= ASSUME_ALWAYS_YES=yes +PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos +PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install +.endif + .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) VOLUME_LABEL= FreeBSD_Install .endif @@ -180,6 +191,10 @@ disc1: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf @@ -252,6 +267,10 @@ dvd: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf From nobody Wed Nov 20 13:10:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XthYy5Njhz5dkGX; Wed, 20 Nov 2024 13:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XthYy4bdzz4vXB; Wed, 20 Nov 2024 13:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732108246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3EwY2khzif6m2CDKEfRcqnYYg2l8mzigEuuTRucxEZc=; b=KXLjnkFju1FDFPdGYuz25HJuuWqK23AfooZs+j1MaT01SHH9OE8//VqWrsCTnxD24Y1CKr Na/s5xpfhBF0EGSLRSq6GSxpKdqVoQOz5cYCGP86HrfmEiJ677DxRY5fphCwLuyRtkvZc4 KWShQ11TISW40EG8mkfpMPYXO3RIqHtWHHyYrOBHOfOnZmSuU2RkEvxY/5pgUh9nNS6o4t JAgOd1ZH5tVIFIELn/0iqISb/2PrVjUb/2Fa39cJnE1jMlmmQ2peEd0aSwj1rg6QQitBoZ Z14M52c2EIklx4nHVt02lckPC4d2FWUEfa2j0VpcngwA1bgIHh1QepgE6zrhFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732108246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3EwY2khzif6m2CDKEfRcqnYYg2l8mzigEuuTRucxEZc=; b=K7OW8HS921qOWRvS3dccBAc4wXlXvnCf26JwsNCPp/8P8GbUJNZzxTglk3ctCPHN28CYNP NjH9OepkAoVil9EE2ldF51iZ0RLbhK0UvWFl9yzKCNf2EurVxW1duitBRTUmVIfOB5QkQ1 SuF6+YdwqAmlYIAN9fr0KMJT0FgWrTYJMbnIfT4+2+IAeGJfM+LTmOZnmsYDq65aEvpuvm 6lEy8iJZiRRFiEEat+grpDOAPJZvJjcS063Htyu1LP/q8yw1F9nIxkRAUUcr7n/zpI5GPn IkaXkc/vA2030m5+oYTYw4IIMHcL4H1R+tERwTm36vJkYmbnHuCu+XJgGVuTMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732108246; a=rsa-sha256; cv=none; b=WtFbgVznOpWLLVlYUx+K80SL/mna0ke/SSxJdctQAtHzGF6HYGI5sQ6I0BxQM8CmcXIXQv nLc+4detV8E1BuDd38f/DZBYQCd5YoESxxrQPXwzqzIxMEEHGsBzB4f/Ybja/iFRxBhiyw /gSFLeOSDKyTJZH4OWiCAIxdh2BoSo7HuMpJv4rWjhCGWiQ0VLoG0MiqKX222/g4OWqnhJ dAK4G8a8aDz+2ERFpWw04XyL1q2dflefO1bMj+QsTc540SMV9//0rWxAfjJuVLwJXPmWir GEBnJPbh8mMT6JuEZXohH2cUNIxQGMjM0Aji9d6IxCtU3PICE/44VPBwU+fulQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XthYy4C7vzvrR; Wed, 20 Nov 2024 13:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKDAkEG071840; Wed, 20 Nov 2024 13:10:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKDAkjB071837; Wed, 20 Nov 2024 13:10:46 GMT (envelope-from git) Date: Wed, 20 Nov 2024 13:10:46 GMT Message-Id: <202411201310.4AKDAkjB071837@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: bbe2a1da2df6 - main - bsdinstall: add menu to install firmware List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: bbe2a1da2df639c616869aa838244c8094779bd4 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bbe2a1da2df639c616869aa838244c8094779bd4 commit bbe2a1da2df639c616869aa838244c8094779bd4 Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-20 13:06:06 +0000 bsdinstall: add menu to install firmware Add a menu to the installer to run fwget(8) inside the newly installed system to install firmware known to be needed. This requires working netowrking. This is needed at least for wireless currently for when we entirely stop shipping new firmware in src.git to have working networking on the installed system (we already do need this for at least rtw89). Sponsored by: The FreeBSD Foundation Tested with: 4 different iwlwifi chipsets in a system (earlier version) Suggested improvments by: jrtc27 MFC after: 8 hours Differential Revision: https://reviews.freebsd.org/D47491 --- usr.sbin/bsdinstall/bsdinstall.8 | 19 ++++- usr.sbin/bsdinstall/scripts/Makefile | 1 + usr.sbin/bsdinstall/scripts/auto | 1 + usr.sbin/bsdinstall/scripts/finalconfig | 4 + usr.sbin/bsdinstall/scripts/firmware | 125 ++++++++++++++++++++++++++++++++ 5 files changed, 149 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index c8bf143322ae..50c8948a7989 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -1,6 +1,10 @@ .\"- .\" Copyright (c) 2011-2013 Nathan Whitehorn All rights reserved. .\" Copyright (c) 2018 Roberto Fernandez Cueto +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Björn Zeeb +.\" 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 @@ -23,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 18, 2023 +.Dd November 4, 2024 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -240,6 +244,12 @@ Extracts the distributions listed in .Ev DISTRIBUTIONS into .Ev BSDINSTALL_CHROOT . +.It Cm firmware +executes +.Xr fwget 8 +inside the +.Ev BSDINSTALL_CHROOT +to install any needed and available firmware for the new system. .It Cm rootpass Interactively invokes .Xr passwd 1 @@ -323,6 +333,13 @@ Default: Path to a log file for the installation. Default: .Dq Pa $TMPDIR/bsdinstall_log +.It Ev BSDINSTALL_SKIP_FIRMWARE +If not empty, the +.Cm auto +target +will not invoke the +.Cm firmware +target. .It Ev BSDINSTALL_SKIP_HARDENING If not empty, the .Cm auto diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index 0ac511120103..f3b9f07ed376 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -7,6 +7,7 @@ SCRIPTS=auto \ entropy \ fetchmissingdists \ finalconfig \ + firmware \ hardening \ hostname \ jail \ diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 9f4b5b52fe5d..7d041be015e7 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -364,6 +364,7 @@ fi [ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time [ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services [ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening +[ -z "$BSDINSTALL_SKIP_FIRMWARE" ] && bsdinstall firmware [ -z "$BSDINSTALL_SKIP_USERS" ] && bsddialog --backtitle "$OSNAME Installer" \ --title "Add User Accounts" --yesno \ diff --git a/usr.sbin/bsdinstall/scripts/finalconfig b/usr.sbin/bsdinstall/scripts/finalconfig index d7c4a1569d39..68ee16a5330d 100755 --- a/usr.sbin/bsdinstall/scripts/finalconfig +++ b/usr.sbin/bsdinstall/scripts/finalconfig @@ -45,6 +45,7 @@ while true; do "Services" "Set daemons to run on startup" \ "System Hardening" "Set security options" \ "Time Zone" "Set system timezone" \ + "Firmware" "Install Firmware (requires network)" \ "Handbook" "Install $OSNAME Handbook (requires network)" 2>&1 1>&5) retval=$? exec 5>&- @@ -75,6 +76,9 @@ while true; do "Time Zone") bsdinstall time ;; + "Firmware") + bsdinstall firmware + ;; "Handbook") bsdinstall docsinstall ;; diff --git a/usr.sbin/bsdinstall/scripts/firmware b/usr.sbin/bsdinstall/scripts/firmware new file mode 100644 index 000000000000..a563f0e578e4 --- /dev/null +++ b/usr.sbin/bsdinstall/scripts/firmware @@ -0,0 +1,125 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr + +msg_freebsd_firmware_installation="$OSNAME Firmware Installation" +msg_freebsd_installer="$OSNAME Installer" +msg_firmware_menu_text="This menu allows you to install firmware packages for your system" +hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" +hline_ok="Press OK to continue" + +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_firmware_menu_text" + local hline + local check_list= # Empty; filled below + local fwlist _fw + + fwlist=`chroot $BSDINSTALL_CHROOT fwget -q -n` + case "${fwlist}" in + "") # No firmware to install + # Print a dialog with OK and a 3 line timeout bar. + local height width rows msg + + msg="No firmware to install, continuing..." + hline="$hline_ok" + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$msg\" \ + \"-\" \ + \"n\" \ + \"-\" \ + \"\$hline\" + + ${DIALOG} --title "${title}" --backtitle "${btitle}" \ + --hline "${hline}" \ + --nocancel --pause "${msg}" $height $width 5 + f_dialog_menutag_store -s "" + return $DIALOG_OK + ;; + *) + local desc status height width rows selected retval + hline="$hline_arrows_space_tab_enter" + + for _fw in ${fwlist}; do + desc="${_fw}" + f_shell_escape "$desc" desc + # install each firmware package by default. + check_list="$check_list + '$_fw' '$desc' 'on' + " + done + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\$hline\" \ + $check_list + + selected=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --separate-output \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + retval=$? + f_dialog_menutag_store -s "$selected" + return $retval + ;; + esac +} + +# Initialize +f_dialog_title "$msg_freebsd_firmware_installation" +f_dialog_backtitle "$msg_freebsd_installer" + +# Gather the firmware files and present them to the user +dialog_menu_main || f_die +f_dialog_menutag_fetch selected + +# Nothing to install? +if [ "${selected}" == "" ]; then + exit 0 +fi + +f_mustberoot_init + +# pkg(8) needs name servers (unless we could use a local repo in the future). +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ + +${DIALOG} --title "$DIALOG_TITLE" --backtitle "$DIALOG_BACKTITLE" \ + --infobox "Installing firmware. This may take a moment." 0 0 + +# Install each of the selected firmware packages +for fw in ${selected}; do + # We install one at a time in case one is not avail. + # pkg-install.8 needs an option to skip unavail. + ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install -qy ${fw} +done + +# end From nobody Wed Nov 20 13:15:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xthgr1kv9z5dkfD; Wed, 20 Nov 2024 13:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xthgr1D3Sz3x3R; Wed, 20 Nov 2024 13:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732108552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uEV8tg53aypHtRvnaDsC3A8rLPFxB1Z+baiXIJy3X0s=; b=p+EIivo/+Qa9J39JZZyfZxmJK9scU/NO4atvgdAEdDMN+kYiiebU6ib+cXCdPTMy3XI/Yy 08cup48p2BJr1azUDbG6vU8Tcl5Rr+2VUCaASehqSFqjB9jKI/x2pKnBkHcyOCALklUaYS ldIyozedaxEAooxu1IRkDlVxzMRB7jWaoLhhNnmLTbQFj2SeHQbfqzd5UBrBUh2z72KngA C/TVX8fkJhshIXc/vkrxpZUZp7OjBMeaz7Xo2a/9mbQ8AYbe+QrB8aNhqkFf8/tEZZgTR4 zIDW8yqxBkfSRgxVAMhmnDxlBfIgbFQj/ITA3HThhl9fy9yQ0Lo13O+P5CAlFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732108552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uEV8tg53aypHtRvnaDsC3A8rLPFxB1Z+baiXIJy3X0s=; b=HhBhjeAo8HHCz4tUZXpKUYK1FpbDeYbCt8WvpDbqWCLYywwnPvwcIgDWzVXZl/Nv0QsNxY m59GF+vBzFQNH35YaxtxYfVtizmfCET+R8ZoG5aSjzlJSAUXo7s3lnh2A6PasK9uEVNBGk xXKg23nI30bcoarJR2N6USyuY8Y3c7jeqya1FO3N1O7twXT3sSXW6YNXSo5a7BZerylXVP 4nDo6eigO1V3TVgnG+a/zXjuVIAqUbdlF4VGDcBhFh9mFnMAtyDsiMcXvpqH9Wi+zzvot8 ahb4zLovJUOJvMjKDjF5voMdFWZTTRLLbwaB0/CnDQPvZVQLy9QC9qIH+4hb/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732108552; a=rsa-sha256; cv=none; b=TvANjmF0VB9jM4HKQbdte9i9iYTPenrzxGUCqH+jbbWTPqARR9cqcT0mKzUrhq74/1vL3F XptwJExhlCMeM3HdemBHjdo0rmqxKt2XlPyhuMQLdyfy6bDnAqzD3r7TFRBj+VfiG6XbdD IerzB50Q+RwvbH65KV0LHk/SgsuL68yHuQ8T+sKEtGWRn+1qUGxc4v0sMjDiY55RVR0AeF wMJ3XufaYo3zcEEDBrO2VPWIsCCjoWcwGFnv2wiIRglttwapyQJq6ihHe4X/kL2YXrWoBO ug11i7lcfAXdK0v1sLULILuKurOawAUipRD768ylCET1Vj6zLnEy6CQd9wD1bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xthgr0jhSzwBS; Wed, 20 Nov 2024 13:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKDFp0G080552; Wed, 20 Nov 2024 13:15:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKDFpZu080549; Wed, 20 Nov 2024 13:15:51 GMT (envelope-from git) Date: Wed, 20 Nov 2024 13:15:51 GMT Message-Id: <202411201315.4AKDFpZu080549@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: 0df81552d74d - main - sh(1): -l is only valid in cli option not as set -l List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0df81552d74d2c188a9323ffe18f6ebe799b86f9 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=0df81552d74d2c188a9323ffe18f6ebe799b86f9 commit 0df81552d74d2c188a9323ffe18f6ebe799b86f9 Author: Baptiste Daroussin AuthorDate: 2024-11-20 13:14:43 +0000 Commit: Baptiste Daroussin CommitDate: 2024-11-20 13:15:41 +0000 sh(1): -l is only valid in cli option not as set -l --- bin/sh/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/options.c b/bin/sh/options.c index 54a9cb4c1c49..92857027843a 100644 --- a/bin/sh/options.c +++ b/bin/sh/options.c @@ -194,7 +194,7 @@ options(int cmdline) if (q == NULL || minusc != NULL) error("Bad -c option"); minusc = q; - } else if (c == 'l') { + } else if (c == 'l' && cmdline) { login = 1; } else if (c == 'o') { minus_o(*argptr, val); From nobody Wed Nov 20 13:23:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XthrW0HX9z5dl1K; Wed, 20 Nov 2024 13:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XthrV6bySz3xbM; Wed, 20 Nov 2024 13:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732109002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tFj50RCldk/3ag/gJRf84G24NiUxh4HgFVcBzBFC1qk=; b=nuTY+3CISmQmr/KbGtIql4aiuiyg0o25qP4piLJltFRJQvIQaeFIYFGCuSxS6gjcaEood9 oZETU/kjZtRTKLoLyVuYPBJiKffhjihYn6dIUFdEtq91SQFl8N7PagbK1dJf4UQihehq3R PWUj6hP7UuxxXXD7T+obIdB9TOPQl4fTb2bnYhLMIe0sMqaRDKJbpd62jWrY/AEpPMkf6c M4JhhSIIKipA1cXb5CDxO4yxbqHFlkKVZE+nG/R6FpoX7H5I9/Rlt2xwK6HG6jksdZOzLd d5OY4lD3KoKH1odcpz9W7pi/dWA0tqFPeZLsg1zzNEL5M9RkZDqUau4G9EAEKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732109002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tFj50RCldk/3ag/gJRf84G24NiUxh4HgFVcBzBFC1qk=; b=ExQIXfBZbWqbIJy3S5Al5NijJysMZ5XNfljwqyT47Wo3b/KRNUt1alRVaZDTHOlX+dnfKZ xje1MCZEgumVLh+YKInuM86E9qBVdEUEmMthrQ1qd7doxpUGprxiNze6P32hkZeEwZIt// gHPz3FUdB1j/ZFD3EcY2S3CjE0684b+sXP2pIE3Zrw800F6rAW8KKbLlLSVB3V+Hdwr2vS dOCxxmT4cVAx2huV82Pji76a/iO+LsTM7wgj1szcE2alk9MpCB+8tR6YWLHCLFf1pRxA1k GEqtneWLs0uf5RRHrOOLc2b+7WhrgYBngGBKbkMcaEfvksYleEK1z2RddaVJ4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732109002; a=rsa-sha256; cv=none; b=fZmWAmb7/dIYS0xkrAQ5Of0IlDzsp2UJeHkHDpW0stba0VtSJ3GEDioo9qqjuxgtaxozgz OO4dhxPLwcWF721ykqLeGjwJWkxp9TwyeVC4lWUAIVoXR7j10nsPHg1d+1HpTL1SI+7E/z GOCwbYmVDozKcyeho0qGpGDVJC8rPFDX8Dhkmya1cvz38nJoIstqyEZrU4uBATUklQKAiE 0qQ+mZHQhLkde4Ccrwuyq1InpU6rhVNnFJeCeWC7w4rMe2psu//a1W5AmQc8u0fUrrDAxI kTKxDH0Hubr7G9s3qM7BtEO3RbMCkaqmiCMkRcfz0mQyLbUkZy5mDPrQ0m/bPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XthrV6CLXzwQn; Wed, 20 Nov 2024 13:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKDNM0d098032; Wed, 20 Nov 2024 13:23:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKDNMYg098029; Wed, 20 Nov 2024 13:23:22 GMT (envelope-from git) Date: Wed, 20 Nov 2024 13:23:22 GMT Message-Id: <202411201323.4AKDNMYg098029@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: 4b65481ac68a - main - pf: fix build without 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4b65481ac68a99122991fd73583d071c5e27c65a Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4b65481ac68a99122991fd73583d071c5e27c65a commit 4b65481ac68a99122991fd73583d071c5e27c65a Author: Kristof Provost AuthorDate: 2024-11-20 13:18:31 +0000 Commit: Kristof Provost CommitDate: 2024-11-20 13:23:07 +0000 pf: fix build without DTrace Reported by: kib Fixes: 438ca68cef3c678de1c01630266831a59818e208 Sponsored by: Rubicon Communications, LLC ("Netgate") --- 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 39913014334d..99d30c1acf72 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8091,7 +8091,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, md = m0; pf_dummynet_route(pd, s, r, ifp, sintosa(&dst), &md); if (md != NULL) { - int ret; + int ret __sdt_used; ret = nd6_output_ifp(ifp, ifp, md, &dst, NULL); SDT_PROBE2(pf, ip6, route_to, output, ifp, ret); } From nobody Wed Nov 20 14:50:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtknC0JPVz5dMTQ; Wed, 20 Nov 2024 14:50:39 +0000 (UTC) (envelope-from jhb@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtknB6yd3z45Wx; Wed, 20 Nov 2024 14:50:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732114239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cC87lXW49STIS10//uB/hhgetMlDmUPW5Vt3ebT5KiU=; b=gtnjSXtXYW/azWOgCfCjSwDTZUrSU9CkieWl87qKmmeb3xYVFt+0EQ32M6A+gv6SzAX4vf JYVSvfKeLo+OJHlO0QoiVWkHLvWodsHt6vDRvR2bsAmGnlNJp1d2Si83Vo+/uT0L0mQubj Nx84AgxwGQGnz/SjtQdDTPrJmbGWcemJj7OjDYh8siMNm1j+QJLA4xpj4viR/VOGz7TGcn Sv3/fXtNxCX6HAurNY46hEIAzsMjzNMvXGd7Zb59jvyoBYyXjt7gdh51mBEA3wXaLL8ubk W2vZEYOvuemTl3VKPHT/U38ZZTQD4rBkOGk6dq6Ti2YvgyyH2JF3OgHJUtb4nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732114239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cC87lXW49STIS10//uB/hhgetMlDmUPW5Vt3ebT5KiU=; b=wlOpklKDax3N8qJN6bnpBpDvzGYnHmXAkdL7QLB2OWBiMYMO/JoxFYjj+kifqgM2fM2wYP FdD5Ff5Sy0N2GE+bpjDC7iIs8ZTHZEmnn/MCUI6l+4Hb+R+Up73VFZAnpZqZmD9+ws4ryX ZhqBcwCL//jnPJk4gPpQcJKvzQAlE2+1JpzagYnOjWna0htrj8X594fX6vycBHe4JsKvg6 vdzVjBrHyWYdLbwNzICsVKxZO9Lhjz/3N1faFhjeuXjBaLGaA8sSLWjpPVHvf6w11V7K4I DYlBpLiumSFwknul0xvNMTIV58S942ZabVkIyM7/meGKc/WDg0lF4db1UnWhRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732114239; a=rsa-sha256; cv=none; b=gr/2kSFQORE2aInTirk382/3VNlImm3ZXu7CZWczLdBgfiGC8RNiHoWf9iA3Dtci8xQ76j Qd2YyJczfBwIfnwE5yP4qaFbHMW3tDfYmYpjJuJOcXqOQGoUG3gSRVDwRem6r8++DPxtTW OH1QvpX/ndzdF3pIx0VRpez1JKDLJdCyils8dmIWFRmwPZPXWSwJ1BE1eXhjHosu11sFJ6 n1NjInD1mpFpFMevs0gbuOuI7mC2mn9uPvsxuV6bPDhtwERxpsEyH5doDWgjKSJLYZ3zfe UnTHhNZjER8TX+TQeLPXegi94w5+VmHLEwuFE5HASTz37yaeIdifNDqwrmYTLw== Received: from [IPV6:2601:5c0:4200:b830:2dc9:c321:2d58:e1d6] (unknown [IPv6:2601:5c0:4200:b830:2dc9:c321:2d58:e1d6]) (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 4XtknB4h1Zz163g; Wed, 20 Nov 2024 14:50:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <9b7cdee1-dde4-46bf-aedd-be833fd3494d@FreeBSD.org> Date: Wed, 20 Nov 2024 09:50:37 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: e85eaa930862 - main - Have rtld query the page size from the kernel Content-Language: en-US To: Konstantin Belousov Cc: Jessica Clarke , Andrew Turner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202204071438.237Ecn2A012737@gitrepo.freebsd.org> <92a05dfe-683c-43d9-bd29-3110e89be275@FreeBSD.org> <768D45F9-2F02-4BA1-BFB7-51685486CFCC@freebsd.org> <4d81d34f-4749-4911-b302-eca9166e4be7@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/20/24 22:08, Konstantin Belousov wrote: > On Tue, Nov 19, 2024 at 10:14:52AM -0500, John Baldwin wrote: >> On 11/19/24 22:30, Konstantin Belousov wrote: >>> On Thu, Nov 14, 2024 at 09:47:30AM -0500, John Baldwin wrote: >>>> On 11/13/24 12:10, Jessica Clarke wrote: >>>>> On 13 Nov 2024, at 19:44, John Baldwin wrote: >>>>>> >>>>>> On 4/7/22 07:38, Andrew Turner wrote: >>>>>>> The branch main has been updated by andrew: >>>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=e85eaa930862d5b4dc917bc31e8d7254a693635d >>>>>>> commit e85eaa930862d5b4dc917bc31e8d7254a693635d >>>>>>> Author: Andrew Turner >>>>>>> AuthorDate: 2022-04-04 15:05:40 +0000 >>>>>>> Commit: Andrew Turner >>>>>>> CommitDate: 2022-04-07 14:37:37 +0000 >>>>>>> Have rtld query the page size from the kernel >>>>>>> To allow for a dynamic page size on arm64 have the runtime linker >>>>>>> query the kernel for the currentl page size. >>>>>>> Reviewed by: kib >>>>>>> Sponsored by: The FreeBSD Foundation >>>>>>> Differential Revision: https://reviews.freebsd.org/D34765 >>>>>> >>>>>> This broke relro handling for rtld. The reason is that init_pagesizes() is >>>>>> called after parsing the program headers for rltd in init_rtld(). As a result, >>>>>> page_size is 0 when rtld_round_page() is called so the relro_size is 0. The >>>>>> RTLD_INIT_EARLY_PAGESIZES case was for ia64, and in the early case it's probably >>>>>> not safe to call sysctl? If it is safe to call sysctl, we could just always >>>>>> init pagesizes early? >>>>> >>>>> It looks like there are a few things going on: >>>>> >>>>> 1. relocate_object calls obj_enforce_relro if !obj->mainprog, so will >>>>> try to enforce RELRO for RTLD itself whilst page_size is 0 >>>>> >>>>> 2. init_rtld later calls obj_enforce_relro for obj_rtld, after >>>>> page_size has been initialised >>>>> >>>>> 3. init_rtld is careful to avoid using global variables until it’s >>>>> called relocate_objects for RTLD itself, but by hiding accesses to >>>>> page_size away in rtld_*_page that’s no longer true (definitely not >>>>> true in the case of text relocations, for example, though whether it >>>>> also occurs for other cases we care more about I don’t know) >>>>> >>>>> So I think there are a couple of things to fix: >>>>> >>>>> 1. Stop accessing page_size prior to relocate_objects returning for >>>>> RTLD itself >>>>> >>>>> 2. Stop enforcing RELRO twice for RTLD (e.g. add && obj != rtldobj to >>>>> relocate_object’s case) >>>>> >>>>> At least, that’s what I’ve inferred from reading the code. >>>>> >>>>> Though, to be honest, things might be rather nicer if we just made >>>>> .rtld_start responsible for relocating RTLD itself prior to calling >>>>> init_rtld, that’s what we have to do for CHERI, as do arm, powerpc and >>>>> powerpc64, and it means you can use globals from the start in init_rtld. >>>> >>>> I've done 2) locally which fixed my immediate issue. >>> Can you provide some more info please? >> >> I have a local patch that supports mutiple PT_GNU_RELRO segments, and to >> do that it removes relro_* from Obj_Entry and just walks the list of >> phdrs in obj_remap_relro(). However, that defeats the order you mention >> below of the timing of parse_rtld_phdr(). I hadn't realized until your >> paragraph below that that local change was part of why this was exposed. >> It would still be more correct, strictly speaking, to skip obj_enforce_relro >> for rtldobj, and if we ever supported multiple PT_GNU_RELRO upstream we >> would want that change. > Ok, please commit this change. Ok, I will put that up for review. I wasn't sure if we would want this change upstream, but it is pretty simple. -- John Baldwin From nobody Wed Nov 20 14:52:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtkpv0w0tz5dMwF; Wed, 20 Nov 2024 14:52:07 +0000 (UTC) (envelope-from jhb@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtkpv0S3yz45rS; Wed, 20 Nov 2024 14:52:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732114327; h=from:from:reply-to:subject: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=Z7OTbtuRdLsueUOu9YiGj593FsGPx+Se4Ju3wlSbiDg=; b=LWHxfKCc2wCkyJAQtxMshW8yzsb6bCyi+8LgQR2bc+xFIxq1Sy7LoHUAQxgRDO3Mg2xXUE CobSqiwDc/1l9Ja5D2rrnD+AXBptHikjjNQ1SjvGfIJpWAv0MsGNlDJwznMJHhUUABzHam 3jbZ3wcjAkX5uTG+Op7lhy+jMGPVl2js81E7r623N9ayoxsByvi1nWd8rAYETiCl/VcQMm zPfkh1yuAtTxABMIxTTQxPFl9E1c9pDj8oa+0obp6h2BkIRmnc1qMx9vKYqksy5V79JsoA 1cKQYeLLR9yCFfGUsqBzaQ/53COrEHvlw3d5J4wPt3WWAWYCEMEk+iioSgKluw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732114327; h=from:from:reply-to:subject: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=Z7OTbtuRdLsueUOu9YiGj593FsGPx+Se4Ju3wlSbiDg=; b=llqGgwQHxTgFtFc/nbBJQi2u5YnZMM3MR6eQoBowpj1ukMKnXgX9rTzslWSH2dZFM59Z9h mEtk4wBsk//vWk58r1+kFYB5O3+4/YlAjx15Sm74s8bGOIKrCxbNwnBRyyNAKXcKzGk7mB CSbIJtnB3iUpOWKXNPCC6TY/KPY1TSz1VU4p9OWzoIzFurn3GFqF6y8TKd1N+gSkm05Pc3 K8yY94faVvwGLLIA5/IAzdioV8O5EYddu6H8edx+4YUfpwjbwz0SX+0D19MwvLW8YnAZHl VHuUGhzcf8fthY29GDiZuwa34TeHC9c+/UjFk1It7/sNmkKot7kcHotFksZA5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732114327; a=rsa-sha256; cv=none; b=P7RXfdn4/rEesMmSbAFALP2tiPwfwa5ObxmWTD7BmJOCmQdBShSHeNCgKDZhKXkNd7fVoX 0sqTraNh22BWrHjAgiLycLoyzn/pzwNAkkCIBXBCISRp3DftE29npZvsL9P+FRGq6ZZYtz y3RVvCzyi0oLVyfKRScUrGnTwD5w040UQzwPBFdPBgpeUdgdZ0fMuw5Bn5tB+6xuad+K+S GBNF9eqtFIZ19UXexRRFZ0DGmVuvyO/A9lTqWN+2M1jzbwyLuAJ1UwL3gGSKdgjgWohkBm ZI/yy8oXZlsuTdsfi0PX4BAnqcf5d1EZQQNYma60Qgya7OiZH4k+xuNYmkrQUA== Received: from [IPV6:2601:5c0:4200:b830:2dc9:c321:2d58:e1d6] (unknown [IPv6:2601:5c0:4200:b830:2dc9:c321:2d58:e1d6]) (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 4Xtkpt5xLCz16C7; Wed, 20 Nov 2024 14:52:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 20 Nov 2024 09:52:06 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: b882d21558f3 - main - arm: link all .rodata variants into one output section Content-Language: en-US To: mmel@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202411171136.4AHBaK2D056199@gitrepo.freebsd.org> <0e6393a7-0624-4a24-8537-60917728ae8a@FreeBSD.org> <2ba6363f-3ff9-451d-8843-6bb6abe6a3ac@FreeBSD.org> From: John Baldwin In-Reply-To: <2ba6363f-3ff9-451d-8843-6bb6abe6a3ac@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/19/24 08:02, Michal Meloun wrote: > > > On 19.11.2024 16:15, John Baldwin wrote: >> On 11/17/24 03:36, Michal Meloun wrote: >>> The branch main has been updated by mmel: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/? >>> id=b882d21558f37e6a565694ac9b8f2a519e5b86fa >>> >>> commit b882d21558f37e6a565694ac9b8f2a519e5b86fa >>> Author:     Michal Meloun >>> AuthorDate: 2024-11-17 11:28:47 +0000 >>> Commit:     Michal Meloun >>> CommitDate: 2024-11-17 11:35:55 +0000 >>> >>>      arm: link all .rodata variants into one output section >>>      MFC after:      1 week >>> --- >>>   sys/conf/ldscript.arm | 2 +- >>>   1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm >>> index d9edcfac9f78..7cf904ce39ff 100644 >>> --- a/sys/conf/ldscript.arm >>> +++ b/sys/conf/ldscript.arm >>> @@ -17,7 +17,7 @@ SECTIONS >>>     _etext = .; >>>     PROVIDE (etext = .); >>>     .fini      : { *(.fini)    } =0x9090 >>> -  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) } >>> +  .rodata    : { *(.rodata*) *(.gnu.linkonce.r*) } >>>     .rodata1   : { *(.rodata1) } >> >> Is this line now spurious or do linker scripts prefer more exact matches? >> >>>      .interp     : { *(.interp)     } >>>     .hash          : { *(.hash)        } >> > Right hit. I want write { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } > > Warner already tried to tell me the same thing, but I didn't get it :( > Btw arm64 has the same problem. > > This gives me another question. Who generates the .rodata1 section? This > section appeared in gnu ld three decades ago, with no real description. > Do we still need it? I have no idea if we still need .rodata1 (or why it exists), I was just reading the diff of the linker script. -- John Baldwin From nobody Wed Nov 20 15:00:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtl1N4Yyyz5dN3L for ; Wed, 20 Nov 2024 15:01:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtl1N2k6Wz46PQ for ; Wed, 20 Nov 2024 15:01:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2ea4e9e6ef2so3007772a91.1 for ; Wed, 20 Nov 2024 07:01:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1732114870; x=1732719670; 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=bVuUwjcQohvT4tMsT3ORE64eixRJ+MqDTOu4Sfxj+BA=; b=yDIIJb+sRDaYGq2JnufAuXJ0QUuU7wldHGdEh/dc+ONjHVuHCcaS1GsLxOVDoTYTQc 7rOMHucfw7qFPPkAGg0WwjZNhOPV0zCi9h6NtozwmD0zyRObs2U8OtDPcZBQPnfNhcvL Bn85oRs2xHZV4CNRP+8IBKaiBMhhlZNncCZ/NCg4qPPLxfgHUnAQ8HJTGAPY4DV8uox8 F002EWQ/dw43l0MZMPcToIa64u05EVGINDYdUhrtqRjK8OUEQrjl9W9vc+S0QrmTfwoe mVmvQHAVsNDfgqzRptg4L9lDVzGnwVm36N6uWLTecw3RaqiFEu8WMN8TdZh95VGsqOQS ut6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732114870; x=1732719670; 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=bVuUwjcQohvT4tMsT3ORE64eixRJ+MqDTOu4Sfxj+BA=; b=cBrtsFJxCL8m32fA2OmscACs4tUqNkaxBMr0V6QUg2/+oKowkuW4eQ1KoppCBAjMu9 aGiIKu40sqJzpinFvoDRhFjp0yIxtGRDuMATFsIve05ckauOyu113a+rYalLlEfymsRS pUuTLmqMqxfYaDansn/uibOdtJCf1gHbgXBEV/QdeeU3x6gBFkyDC/WrPULKtgfMDdZ7 qYs2lLajkugOBWpDKs8Wt+IIDehQ9vmhgro2nSikgM9e5GhBqsoY4QPL/1tbxE3gVQEl 1DttztCGQQYAzO+/23oD56seVFrDIa6kc+usPsqnG+URTw03w7R7QqDCakYytAPLvMBp iiQw== X-Forwarded-Encrypted: i=1; AJvYcCXvNruQW2g8rXxCJZ+ct+vVgbTnDpYu52bya/1RNMe9wKqTcMLa9k3TXomdWv3DJpsbnj+QRe6GTPIiCNvQZu4EV0vK@freebsd.org X-Gm-Message-State: AOJu0Ywy5qMUl7xWi/MrvcdIGaB7jcwCDVidFLMY6PR9cg/iQgyTfUfb nunGn9AOK3Csw7/IWZpr2VvNWQZxQh4PgJ+euM3/s/bscrFnYDiu3AdPvNjXmpreHJzwm3jlMiG aELkcNRJACSl/yEBD3AD3GaHRZNSRUTA7Coq6/w== X-Google-Smtp-Source: AGHT+IEt+91hVCzTq0qUoMdvoPSD0ZuDYqvgmlxcNE3tiRClsIDFckn8HlbHAqSSr8/IAZ1nGiCuU9s4cZByrJlxwtw= X-Received: by 2002:a17:90a:d40e:b0:2ea:4578:46d8 with SMTP id 98e67ed59e1d1-2eaca6fdc48mr3781906a91.9.1732114868060; Wed, 20 Nov 2024 07:01:08 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411171136.4AHBaK2D056199@gitrepo.freebsd.org> <0e6393a7-0624-4a24-8537-60917728ae8a@FreeBSD.org> <2ba6363f-3ff9-451d-8843-6bb6abe6a3ac@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Wed, 20 Nov 2024 08:00:56 -0700 Message-ID: Subject: Re: git: b882d21558f3 - main - arm: link all .rodata variants into one output section To: John Baldwin Cc: Michal Meloun , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000006bdcd60627596bbc" 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: 4Xtl1N2k6Wz46PQ X-Spamd-Bar: ---- --0000000000006bdcd60627596bbc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 20, 2024, 7:52=E2=80=AFAM John Baldwin wrote: > On 11/19/24 08:02, Michal Meloun wrote: > > > > > > On 19.11.2024 16:15, John Baldwin wrote: > >> On 11/17/24 03:36, Michal Meloun wrote: > >>> The branch main has been updated by mmel: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/? > >>> id=3Db882d21558f37e6a565694ac9b8f2a519e5b86fa > >>> > >>> commit b882d21558f37e6a565694ac9b8f2a519e5b86fa > >>> Author: Michal Meloun > >>> AuthorDate: 2024-11-17 11:28:47 +0000 > >>> Commit: Michal Meloun > >>> CommitDate: 2024-11-17 11:35:55 +0000 > >>> > >>> arm: link all .rodata variants into one output section > >>> MFC after: 1 week > >>> --- > >>> sys/conf/ldscript.arm | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm > >>> index d9edcfac9f78..7cf904ce39ff 100644 > >>> --- a/sys/conf/ldscript.arm > >>> +++ b/sys/conf/ldscript.arm > >>> @@ -17,7 +17,7 @@ SECTIONS > >>> _etext =3D .; > >>> PROVIDE (etext =3D .); > >>> .fini : { *(.fini) } =3D0x9090 > >>> - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } > >>> + .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } > >>> .rodata1 : { *(.rodata1) } > >> > >> Is this line now spurious or do linker scripts prefer more exact > matches? > >> > >>> .interp : { *(.interp) } > >>> .hash : { *(.hash) } > >> > > Right hit. I want write { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } > > > > Warner already tried to tell me the same thing, but I didn't get it :( > > Btw arm64 has the same problem. > > > > This gives me another question. Who generates the .rodata1 section? Thi= s > > section appeared in gnu ld three decades ago, with no real description. > > Do we still need it? > > I have no idea if we still need .rodata1 (or why it exists), I was just > reading the diff of the linker script. > It's primarily for embedded systems that need checksums, at least accordingto Google. I've not seen it generated in any unix... I don't even know why we have it. Warner John Baldwin > > --0000000000006bdcd60627596bbc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Nov 20, 2024, 7:52=E2=80=AFAM John Baldwin <= ;jhb@freebsd.org> wrote:
On 11/19/24 08:02, Michal Meloun wrote:
>
>
> On 19.11.2024 16:15, John Baldwin wrote:
>> On 11/17/24 03:36, Michal Meloun wrote:
>>> The branch main has been updated by mmel:
>>>
>>> URL: https://cgit.FreeBSD.org/src/commit= /?
>>> id=3Db882d21558f37e6a565694ac9b8f2a519e5b86fa
>>>
>>> commit b882d21558f37e6a565694ac9b8f2a519e5b86fa
>>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Michal Meloun <mmel@FreeBSD= .org>
>>> AuthorDate: 2024-11-17 11:28:47 +0000
>>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Michal Meloun <mmel@FreeBSD= .org>
>>> CommitDate: 2024-11-17 11:35:55 +0000
>>>
>>>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 arm: link all .rodata variants = into one output section
>>>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 MFC after:=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 1 week
>>> ---
>>>=C2=A0 =C2=A0 sys/conf/ldscript.arm | 2 +-
>>>=C2=A0 =C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm
>>> index d9edcfac9f78..7cf904ce39ff 100644
>>> --- a/sys/conf/ldscript.arm
>>> +++ b/sys/conf/ldscript.arm
>>> @@ -17,7 +17,7 @@ SECTIONS
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 _etext =3D .;
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 PROVIDE (etext =3D .);
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 .fini=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 := { *(.fini)=C2=A0=C2=A0=C2=A0 } =3D0x9090
>>> -=C2=A0 .rodata=C2=A0=C2=A0=C2=A0 : { *(.rodata) *(.gnu.linkon= ce.r*) }
>>> +=C2=A0 .rodata=C2=A0=C2=A0=C2=A0 : { *(.rodata*) *(.gnu.linko= nce.r*) }
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 .rodata1=C2=A0=C2=A0 : { *(.rodata1) = }
>>
>> Is this line now spurious or do linker scripts prefer more exact m= atches?
>>
>>>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 .interp=C2=A0=C2=A0=C2=A0=C2=A0= : { *(.interp)=C2=A0=C2=A0=C2=A0=C2=A0 }
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 .hash=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 : { *(.hash)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 }
>>
> Right hit. I want write { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) = }
>
> Warner already tried to tell me the same thing, but I didn't get i= t :(
> Btw arm64 has the same problem.
>
> This gives me another question. Who generates the .rodata1 section? Th= is
> section appeared in gnu ld three decades ago, with no real description= .
> Do we still need it?

I have no idea if we still need .rodata1 (or why it exists), I was just
reading the diff of the linker script.

It's primarily for embedded syste= ms that need checksums, at least accordingto Google. I've not seen it g= enerated in any unix... I don't even know why we have it.

Warner


John Baldwin

--0000000000006bdcd60627596bbc-- From nobody Wed Nov 20 17:00:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtngK0lBSz5dVNH; Wed, 20 Nov 2024 17:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtngK0F0kz4MFb; Wed, 20 Nov 2024 17:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732122045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oLMBkpmrC4SX250VAPymrwkl23HDwB56pqaxS0DNr1g=; b=AtoZtxizIsh0fC+6bnF8kK0K29I0alfpIcD88whKUsptELHTflyRd9hCK/b890y6q3ncmp qPzSq+txEgmUdStqO/9vhWFufEgaOLoOIdFKKMDJkkEdJX7oNBYiWsJpfFinr9Xci2QupB lAWM+95D8bxKfiWsGV6W7XURe9EgWcRagk0fhAe7JG4L3CAw62rrtFM7KXwCgkdZ/1G7ib 03HFBQdh/rI6YOzkenbT7cpkf8n31NdoUpPhkekLcTlTIP9uUCBf8osIyluqY51dxdVVL6 JL7ucnCH+85fXKbaUzQg8Z9BNBeJbw0G1BqbyzCeCdp3Wl2yTmu7OVgj9JlaGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732122045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oLMBkpmrC4SX250VAPymrwkl23HDwB56pqaxS0DNr1g=; b=yhREA4N1K50fWAXuxnRfvw/8JC8amM9oAcmuHqkcRKghlyE3GXOpzt0CFEj5YEhXYl8gwS uFRF5fgQrw+t6jjFp97no4ESsBTCBhgoPSEleL5dQCIuDNFnzA3phKYLKLHrn6FYvoa+ua ZWbEX2pCqjzgPhTJ6P9RyY3mMeus+gE+C4BCOFaKTlnr5KGhzZVQHaZV4+dEbpnWjlGn1A ojGQ+q0NnGQe8tLGD6AzKUhK6e2ku7XqZu3uUuO4jpIpHMegZsYvSgQfs1BOqfUJQfY7uu ju+JfsdDFZo8qSKS4dmGTvIvrjGpElA1PEIpHr41oD/An9z6duC36qsoSgmOMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732122045; a=rsa-sha256; cv=none; b=DLDcsQCEmnDlufIVNckclw0xyI3S4/uwENiRVGWavWflsmyYUhraUFW9lc1vS3dSpHwuuj zIZgfaRZlhGT/ZSwD9xZGp292pM3FsfYsPTL7mJ8AGecJwvrPuXd9t0WqXgieJeUzHs6oe rvLFv/5swyhhnS69ZRjFRyO4/cwgQcslWk5SwJ1wvw+bd6aKz7fQNlvFl8YBByqbJ0iGTa L0siXU70DG4uFadY992KR4XlQe+sMzPf3Pit+RMHai+1lPzVIV8WteA4RkcgFeAyk/FlOS dVkokkFrX5G2GKU/rjd1DGXzAVAHpYMy2D9AR5rZAvVf9b1NkpJ6RE9mMUXEIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtngJ6qC2z12bx; Wed, 20 Nov 2024 17:00:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKH0itS001215; Wed, 20 Nov 2024 17:00:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKH0i4T001212; Wed, 20 Nov 2024 17:00:44 GMT (envelope-from git) Date: Wed, 20 Nov 2024 17:00:44 GMT Message-Id: <202411201700.4AKH0i4T001212@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: e27970ae8fff - main - netinet: handle blackhole routes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e27970ae8fffd7d14cd106efc150e60ae307607a Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e27970ae8fffd7d14cd106efc150e60ae307607a commit e27970ae8fffd7d14cd106efc150e60ae307607a Author: Kristof Provost AuthorDate: 2024-11-12 15:55:50 +0000 Commit: Kristof Provost CommitDate: 2024-11-20 15:52:41 +0000 netinet: handle blackhole routes If during ip_forward() we find a blackhole (or reject) route we should stop processing and count this in the 'cantforward' counter, just like we already do for IPv6. Blackhole routes are set to use the loopback interface, so we don't actually incorrectly forward traffic, but we do fail to count it as unroutable. Test this, both for IPv4 and IPv6. Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47529 --- sys/netinet/ip_input.c | 12 ++++++++++ tests/sys/netinet/forward.sh | 53 +++++++++++++++++++++++++++++++++++++++++ tests/sys/netinet6/forward6.sh | 54 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 82d7acdd0710..e00f3b77c74c 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -942,6 +942,18 @@ ip_forward(struct mbuf *m, int srcrt) flowid = m->m_pkthdr.flowid; ro.ro_nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_REF, flowid); if (ro.ro_nh != NULL) { + if (ro.ro_nh->nh_flags & (NHF_BLACKHOLE | NHF_BROADCAST)) { + IPSTAT_INC(ips_cantforward); + m_freem(m); + NH_FREE(ro.ro_nh); + return; + } + if (ro.ro_nh->nh_flags & NHF_REJECT) { + IPSTAT_INC(ips_cantforward); + NH_FREE(ro.ro_nh); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); + return; + } ia = ifatoia(ro.ro_nh->nh_ifa); } else ia = NULL; diff --git a/tests/sys/netinet/forward.sh b/tests/sys/netinet/forward.sh index e16927a27d07..3ae83eb3edc5 100755 --- a/tests/sys/netinet/forward.sh +++ b/tests/sys/netinet/forward.sh @@ -259,6 +259,58 @@ fwd_ip_icmp_gw_slow_success_cleanup() { vnet_cleanup } +atf_test_case "fwd_ip_blackhole" "cleanup" +fwd_ip_blackhole_head() { + + atf_set descr 'Test blackhole routes' + atf_set require.user root +} + +fwd_ip_blackhole_body() { + jname="v4t-fwd_ip_blackhole" + + vnet_init + + epair=$(vnet_mkepair) + epair_out=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.2/24 up + + vnet_mkjail ${jname} ${epair}b ${epair_out}b + jexec ${jname} ifconfig lo0 127.0.0.1/8 up + jexec ${jname} ifconfig ${epair}b 192.0.2.1/24 up + jexec ${jname} ifconfig ${epair_out}b 198.51.100.1/24 up + jexec ${jname} sysctl net.inet.ip.forwarding=1 + + route add default 192.0.2.1 + + atf_check -s exit:2 -o ignore \ + ping -c 1 -t 1 198.51.100.2 + atf_check -s exit:0 -o match:"0 packets not forwardable" \ + jexec ${jname} netstat -s -p ip + + # Create blackhole route + jexec ${jname} /sbin/route add 198.51.100.2 -blackhole -fib 0 + jexec ${jname} netstat -rn + + # Include an IP option to ensure slow path + atf_check -s exit:2 -o ignore \ + ping -c 1 -t 1 -R 198.51.100.2 + atf_check -s exit:0 -o match:"1 packet not forwardable" \ + jexec ${jname} netstat -s -p ip + + # Now try via the fast path + atf_check -s exit:2 -o ignore \ + ping -c 1 -t 1 198.51.100.2 + atf_check -s exit:0 -o match:"2 packets not forwardable" \ + jexec ${jname} netstat -s -p ip +} + +fwd_ip_blackhole_cleanup() { + + vnet_cleanup +} + atf_init_test_cases() { @@ -266,6 +318,7 @@ atf_init_test_cases() atf_add_test_case "fwd_ip_icmp_gw_fast_success" atf_add_test_case "fwd_ip_icmp_iface_slow_success" atf_add_test_case "fwd_ip_icmp_gw_slow_success" + atf_add_test_case "fwd_ip_blackhole" } # end diff --git a/tests/sys/netinet6/forward6.sh b/tests/sys/netinet6/forward6.sh index b3ccd30aea62..40d17837d6f2 100755 --- a/tests/sys/netinet6/forward6.sh +++ b/tests/sys/netinet6/forward6.sh @@ -466,6 +466,59 @@ fwd_ip6_gu_icmp_gw_ll_slow_success_cleanup() { vnet_cleanup } +atf_test_case "fwd_ip6_blackhole" "cleanup" +fwd_ip6_blackhole_head() { + + atf_set descr 'Test blackhole routing' + atf_set require.user root +} + +fwd_ip6_blackhole_body() { + jname="v6t-fwd_ip6_blackhole" + + vnet_init + + epair=$(vnet_mkepair) + epair_out=$(vnet_mkepair) + + ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad + + vnet_mkjail ${jname} ${epair}b ${epair_out}b + jexec ${jname} ifconfig lo0 inet6 ::1/128 up no_dad + jexec ${jname} ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad + jexec ${jname} ifconfig ${epair_out}b inet6 2001:db8:1::1/64 up no_dad + jexec ${jname} sysctl net.inet6.ip6.forwarding=1 + + route -6 add default 2001:db8::1 + + atf_check -s exit:2 -o ignore \ + ping6 -c 1 -t 1 2001:db8:1::2 + atf_check -s exit:0 -o match:"0 packets not forwardable" \ + jexec ${jname} netstat -s -p ip6 + + # Create blackhole route + jexec ${jname} route -6 add 2001:db8:1::2 -blackhole + + # Force slow path + jexec ${jname} sysctl net.inet6.ip6.redirect=1 + atf_check -s exit:2 -o ignore \ + ping6 -c 1 -t 1 2001:db8:1::2 + atf_check -s exit:0 -o match:"1 packet not forwardable" \ + jexec ${jname} netstat -s -p ip6 + + # Now try the fast path + jexec ${jname} sysctl net.inet6.ip6.redirect=0 + atf_check -s exit:2 -o ignore \ + ping6 -c 1 -t 1 2001:db8:1::2 + atf_check -s exit:0 -o match:"2 packets not forwardable" \ + jexec ${jname} netstat -s -p ip6 +} + +fwd_ip6_blackhole_cleanup() { + + vnet_cleanup +} + atf_init_test_cases() { @@ -475,6 +528,7 @@ atf_init_test_cases() atf_add_test_case "fwd_ip6_gu_icmp_iface_slow_success" atf_add_test_case "fwd_ip6_gu_icmp_gw_gu_slow_success" atf_add_test_case "fwd_ip6_gu_icmp_gw_ll_slow_success" + atf_add_test_case "fwd_ip6_blackhole" } # end From nobody Wed Nov 20 17:15:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtp0S04psz5dWVg; Wed, 20 Nov 2024 17:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtp0R6N0lz4PW7; Wed, 20 Nov 2024 17:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732122935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eDMTv2QUsp2e+3kFXR4hbKlacH+yZd/zKpJg5U6fJqo=; b=WrOD0ON+8SGIafwqteE0uFxRJLEm23q5gbvTavk9KecAmWYkzxdaywVKAZ3m6FmzBwglCf Z/J9qteTrcmvH9cxp72ORMLhnVZNSna00OpYIO2ztMA6FzSqjew0xK3GIhPHJGnzJiVrDw bL5RqvoKwXSGGc6kDyZ2AwQU0PSPHCFdNfxyE3j7VtBYKW3e0c5TaLQTNioMdavKON3WfV otnn+ZDgCmNWm3k93Zrfv+4AYCfi723RuzkSsXdEBZxJm7MyYXzWFXr+Ujvnvc/u+1GL+C sWD+AaDbR1GNqB5mxQYdBEITFB6+tIWbhVj/0728WEZ07Lopqgq0Ly5Ye+3LjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732122935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eDMTv2QUsp2e+3kFXR4hbKlacH+yZd/zKpJg5U6fJqo=; b=MAQ05rXgab8nOaF2eLAexsPzBq7SsNy6EzGC+CEaB++pqWwj2inenTxGRrvilb49MO7iyW qlsIUhvI2wIbLlgtmoN8Vniw9hwt1sjFeWZ2GNsLFXhpBq80X3Y4w2pyfhh3O7CysWyaeE 1qWv8nuh6eeKBS7FHXmg4WeyXBtBfyP1ugH9f8goJZHcexyX9r+GV+/7+b7JOt+p9rTKIE GV6Lu9euq7XrOqzohdy/fL15H/R1FzRDJQxRjXta4Hn00BilkaUldcpv1UQnmKoz+iX/ja zWVbp9KEmFHKy3HfqceL6xasUr8v7VzVrDMOeOP0cBCqSrPUSysZrrGFbCRLHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732122935; a=rsa-sha256; cv=none; b=f9B3vLSZ/xlT6K1HCtMplzSeWJ7XjCyq4smH35nHRXRZhiSuO0o6/i7FmkDLla/nXABtFK 1XVTUmxnA7Oft3SkXdOrf9hKXpdDTgWL9gLRisnL9t/HJDX/dlDpSVYdYufKLZkhkpGjmV 4tQCjZpGXiB+zuvwKue8SWrFIyCWMLX0paEyirl1ZQP6cvMHjbQcAwxXDH4WhfmNzcEIqB 75j2TuCutkvtEzdBp7zjxefxZsdITiRZ6T/jMUM2MHlQyWPYt6Xyg0Wtlf2LKH82viSefG FbqpaPGS2B/4kutRlHxomH5L1wiW5klWrWedKZgNzDZUEPzw0itwuPTfN5nTjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtp0R5P8dz13lQ; Wed, 20 Nov 2024 17:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKHFZr9026592; Wed, 20 Nov 2024 17:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKHFZsH026589; Wed, 20 Nov 2024 17:15:35 GMT (envelope-from git) Date: Wed, 20 Nov 2024 17:15:35 GMT Message-Id: <202411201715.4AKHFZsH026589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 5cc53d79655b - main - memcmp.3: Clarify return value List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5cc53d79655bf7f67b1a794c088d896aa6475c2e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5cc53d79655bf7f67b1a794c088d896aa6475c2e commit 5cc53d79655bf7f67b1a794c088d896aa6475c2e Author: Ed Maste AuthorDate: 2024-06-05 20:03:13 +0000 Commit: Ed Maste CommitDate: 2024-11-20 17:15:11 +0000 memcmp.3: Clarify return value The return value is not required to be the difference between the differing bytes, only less than zero, zero, or greater than zero. Reviewed by: fuz Event: Kitchener-Waterloo Hackathon 202406 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47683 --- lib/libc/string/memcmp.3 | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/lib/libc/string/memcmp.3 b/lib/libc/string/memcmp.3 index e7666fe6d605..8f4980d61c05 100644 --- a/lib/libc/string/memcmp.3 +++ b/lib/libc/string/memcmp.3 @@ -29,12 +29,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 15, 2016 +.Dd November 20, 2024 .Dt MEMCMP 3 .Os .Sh NAME .Nm memcmp -.Nd compare byte string +.Nd compare bytes in memory .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -45,27 +45,25 @@ The .Fn memcmp function -compares byte string +compares byte object .Fa b1 -against byte string +against byte object .Fa b2 . -Both strings are assumed to be +Both objects are assumed to be .Fa len bytes long. .Sh RETURN VALUES The .Fn memcmp -function -returns zero if the two strings are identical, -otherwise returns the difference between the first two differing bytes -(treated as -.Vt "unsigned char" -values, so that -.Sq Li \e200 -is greater than -.Sq Li \&\e0 , -for example). -Zero-length strings are always identical. +function returns zero if the two objects are identical. +Zero-length objects are considered identical. +The +.Fn memcmp +function returns a negative value if the first differing byte has a lower +value in +.Fa b1 +and a positive value if the first differing byte has a higher value in +.Fa b1 . .Sh SEE ALSO .Xr bcmp 3 , .Xr strcasecmp 3 , @@ -80,3 +78,14 @@ The function conforms to .St -isoC . +.Sh CAVEATS +If the objects differ, the C library +.Fn memcmp +implementation returns the difference between the first two differing bytes +.Po treated as +.Vt "unsigned char" +values +.Pc . +This behavior is not specified by +.St -isoC , +is not portable, and may not occur in light of compiler optimizations. From nobody Wed Nov 20 17:17:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtp2X3qqbz5dWND; Wed, 20 Nov 2024 17:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtp2X38mkz4Q5L; Wed, 20 Nov 2024 17:17:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732123044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8dTprC6kDfeORg1XyThLw7rOOhCFOhKly3P+gqq1EDo=; b=xOqGpMUZBp7EYGYK4TcyPpc9j4VI03lAkbRrG0kjvolSIVcRQKd6zj1M5uOHxBiqfQjxv8 D9MCda1yT9TTlDPfYJQskapvVLlirku0ZZfgi+WQB5v24fs+u7bJFTp88ib3C5xBTLckGo C2VX9ZUBBK8QpcK5Pp97Dq0CvLywvikMKnwoenKO6ttuOuyoxLFP+Blb7sGC1nJMg+dzUO w+on0Vo0aMl6upItB4C1li7RGUjZIF3ELERJGoLzavXVpibfRTmMhdttsxy5wNzxWA5nTt mXlsNPThw3I+ujCktdsOMg3bcrfGz1SUb3+22495nCA9cf/rCh+CgvmiAB1kVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732123044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8dTprC6kDfeORg1XyThLw7rOOhCFOhKly3P+gqq1EDo=; b=PJ/e4p4TSju7IXhlgAt2qWHLbc8Z2qLAjuEWyrZnf+c0SKLmoYSxy7u7ytCDwL5+sJ5YUL yWs/RdaS1PTL7iKfSw9jjY58ui7rl9/clYBUi/ujDuq4Z4Xsv5Mae8vgvHc/WNg5SiXX1b QcD0c0PHzpPzTTbJVJ/m6HdeqkgyoC3442d0J18G2zROfNxWxmgm21yhYa2xHOLCBCn5MQ foOmFekBnB2tj10X6jqoXFhNR4RvuJUi+e5Rt4Rxl+kxF7P5/msovJ78XYWWGnsZnaHiAo vpE7yZvIl8oLQTDwNxirysQkmEoccMJT35S+QqXZGzQ2gTRl88HZ4HgrbEHaBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732123044; a=rsa-sha256; cv=none; b=qAbUcwCmL4k1WlUH/pKOPdZAzP02gPqhlfwb1cT6Z9qaJvdju3pTlX9/AKCYtHHfXQ1QLs 9/gh+IMPD7Ki55fqdis8VXlhs7agNZtt8+caSCPg8re84J+VZd72ol4FHLdXt08HYkDL/k PwNVxPlGrWz/E0IMqRPIrsyAGTLowXQGu5Mg/ecFyqf3IfdEus94a1FuIWqHuEul6pLHIH eRjdMzs4NkPCuXmNlETUTBwHtaaYLH/cOy109GdCCAegIq+8JPIPATLdnEndT1Wm+zQTX8 jtLU3QBPMezkciDHpaVbuUvQs9a6jiXw/sBAuDJN+mZQHvM/D6qS+KQsm3u7Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtp2X2XcKz13fZ; Wed, 20 Nov 2024 17:17:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKHHOSA027264; Wed, 20 Nov 2024 17:17:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKHHOnT027261; Wed, 20 Nov 2024 17:17:24 GMT (envelope-from git) Date: Wed, 20 Nov 2024 17:17:24 GMT Message-Id: <202411201717.4AKHHOnT027261@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: 4a768794b836 - stable/14 - release: Add missing dependencies in the minimal OCI image List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4a768794b836f781ecf798949b60e5c5d305f136 Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=4a768794b836f781ecf798949b60e5c5d305f136 commit 4a768794b836f781ecf798949b60e5c5d305f136 Author: Doug Rabson AuthorDate: 2024-11-18 10:05:29 +0000 Commit: Doug Rabson CommitDate: 2024-11-20 17:16:42 +0000 release: Add missing dependencies in the minimal OCI image The pkg-bootstrap binary depends on fetch. Approved by: re Reviewed by: cperciva, emaste, bapt Differential Revision: https://reviews.freebsd.org/D47661 MFC after: 1 day (cherry picked from commit ca1f1d2c9419a5d66929ca6880b69901254645a6) --- release/tools/oci-image-minimal.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/tools/oci-image-minimal.conf b/release/tools/oci-image-minimal.conf index 122da1905436..82e2ce6a1bd3 100644 --- a/release/tools/oci-image-minimal.conf +++ b/release/tools/oci-image-minimal.conf @@ -12,7 +12,10 @@ oci_image_build() { FreeBSD-runtime \ FreeBSD-certctl \ FreeBSD-kerberos-lib \ + FreeBSD-libarchive \ FreeBSD-libexecinfo \ + FreeBSD-libucl \ + FreeBSD-fetch \ FreeBSD-rc \ FreeBSD-pkg-bootstrap \ FreeBSD-mtree From nobody Wed Nov 20 17:56:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtpvY6XJkz5dYCs; Wed, 20 Nov 2024 17:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtpvY68V4z4VTj; Wed, 20 Nov 2024 17:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732125385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=27qrpy1J5IFdfTE5p3QnCY8yGAyxxX7G2fNrUlWArj4=; b=bcHP+Ju8Nbd7LadMk3EIwnfIcLLIj1frXzXKjQMykLXGSMaRa/2hCIjwimD2XTdPfGTtbJ vEPKksd2/W3e1Qxq0tfUy54NRsPctA5YxiMjNzP0brsS7SQi+8ZMHV50gYi709hBWPtZPr i1IV+uDsQHr1Ja6RruybXaNEyYbc6++hv7zp+bLMoLuqrhMAdQiP12qqpOo4rnG7DEy1z5 7aDSk35LyWjftKbgysdAshCtD1SZAfSikIStYl+n6+COmbPJiDAZVuX2s4aqXbheVHUG4p V9iTGBnx5BVuc4xKw7/RVDSM97ZWhergID7NsgsmY3+A+sfydb4c69Bh9CyGxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732125385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=27qrpy1J5IFdfTE5p3QnCY8yGAyxxX7G2fNrUlWArj4=; b=l0lNRblf9Z6s5JUlgn84zai1Maad0xUH91PAfgzQNXumwNBjUh1nC6LT7Bnfoa60qpVyh9 NxmyyhK+J10GL4aVAGWyaBFUrUekNMHQSXNvydW1qcBGtEBZKj5P9KozuKjsvKhsT42WB1 ALdZvEy+JwN/9kNpSAhWSBCV6bQ6KVwgOd02M1wvr+CrkIjl9JM7/0ANfUMsl5+HzgSbxf djVRf5IyOdq7YRFyNAFz6996CjW6afpvGKcUS02+/Gq6LOUzjfLEQLLzf/Q2s/2LlXim5H c+rISKLwlt6t/mJHKPzwbEyxzAZXY+AQq0E/Ezkk8GJda7Yj1K44K0d8oIs1aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732125385; a=rsa-sha256; cv=none; b=Ng6mC4DU/UBJCYzjQ7Txo5yjaB99H2tvwBq0gh11qQCcEDK4mu1YaYqczAFJjp0TtI4DuU qo0ADyNyiaOH0Y56EtUWv+eA3JfWzWix5/6lQn9emHOnkAYOnuQ5lN7x7zdHhlJBbVPlrB xFfJCIRGg1uBRN4SeUMMy8aL5mZHDhigXdqk+5HGFU4jAZgf9JTDZgy7oLFRZw1TN1SNZx KN+uz2dcUkibTSRPIv42OqBcFB0YSbq5AfgPD9q/vCZAfjB+StBCLY0JOVdLa09SHR7Q+L AFJCubSXy4XyB3HIn0zzD8NtKwCm0WHoHWoDHw4FO4sxufJTNeKrg6dt7Na/cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtpvY5f68z14B1; Wed, 20 Nov 2024 17:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKHuP9G000442; Wed, 20 Nov 2024 17:56:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKHuPxL000439; Wed, 20 Nov 2024 17:56:25 GMT (envelope-from git) Date: Wed, 20 Nov 2024 17:56:25 GMT Message-Id: <202411201756.4AKHuPxL000439@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: 5b78ff830791 - main - vm_page: remove pages with iterators List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5b78ff830791633c02a3d906b2c8f5c9b3bb1a91 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=5b78ff830791633c02a3d906b2c8f5c9b3bb1a91 commit 5b78ff830791633c02a3d906b2c8f5c9b3bb1a91 Author: Doug Moore AuthorDate: 2024-11-20 17:54:20 +0000 Commit: Doug Moore CommitDate: 2024-11-20 17:54:20 +0000 vm_page: remove pages with iterators Use pctrie iterators for removing some page sequences from radix trees, to avoid repeated searches from the tree root. Rename vm_page_object_remove to vm_page_remove_radixdone, and remove from it the responsibility for removing a page from its radix tree, and pass that responsibility on to its callers. For one of those callers, vm_page_rename, pass a pages pctrie_iter, rather than a page, and use the iterator to remove the page from its radix tree. Define functions vm_page_iter_remove() and vm_page_iter_free() that are like vm_page_remove() and vm_page_free(), respectively, except that they take an iterator as parameter rather than a page, and use the iterator to remove the page from the radix tree instead of searching the radix tree. Function vm_page_iter_free() assumes that the page is associated with an object, and calls vm_page_free_object_prep to do the part of vm_page_free_prep that is object-related. In functions vm_object_split and vm_object_collapse_scan, use a pctrie_iter to walk over the pages of the object, and use vm_page_rename and vm_radix_iter_remove modify the radix tree without searching for pages. In vm_object_page_remove and _kmem_unback, use a pctrie_iter and vm_page_iter_free to remove the page from the radix tree. Reviewed by: markj (prevoius version) Tested by: pho Differential Revision: https://reviews.freebsd.org/D46724 --- sys/vm/vm_kern.c | 12 +++--- sys/vm/vm_object.c | 72 +++++++++++++++---------------- sys/vm/vm_page.c | 124 ++++++++++++++++++++++++++++++++++++++++------------- sys/vm/vm_page.h | 4 +- 4 files changed, 141 insertions(+), 71 deletions(-) diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 22776e2196b0..6343fb66cfa3 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -634,8 +634,9 @@ kmem_back(vm_object_t object, vm_offset_t addr, vm_size_t size, int flags) static struct vmem * _kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size) { + struct pctrie_iter pages; struct vmem *arena; - vm_page_t m, next; + vm_page_t m; vm_offset_t end, offset; int domain; @@ -648,17 +649,18 @@ _kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size) offset = addr - VM_MIN_KERNEL_ADDRESS; end = offset + size; VM_OBJECT_WLOCK(object); - m = vm_page_lookup(object, atop(offset)); + vm_page_iter_init(&pages, object); + m = vm_page_iter_lookup(&pages, atop(offset)); domain = vm_page_domain(m); if (__predict_true((m->oflags & VPO_KMEM_EXEC) == 0)) arena = vm_dom[domain].vmd_kernel_arena; else arena = vm_dom[domain].vmd_kernel_rwx_arena; - for (; offset < end; offset += PAGE_SIZE, m = next) { - next = vm_page_next(m); + for (; offset < end; offset += PAGE_SIZE, + m = vm_page_iter_lookup(&pages, atop(offset))) { vm_page_xbusy_claim(m); vm_page_unwire_noq(m); - vm_page_free(m); + vm_page_iter_free(&pages); } VM_OBJECT_WUNLOCK(object); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index e6324647e29e..21773318cea0 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1520,9 +1520,10 @@ vm_object_shadow(vm_object_t *object, vm_ooffset_t *offset, vm_size_t length, void vm_object_split(vm_map_entry_t entry) { - vm_page_t m, m_next; + struct pctrie_iter pages; + vm_page_t m; vm_object_t orig_object, new_object, backing_object; - vm_pindex_t idx, offidxstart; + vm_pindex_t offidxstart; vm_size_t size; orig_object = entry->object.vm_object; @@ -1573,17 +1574,11 @@ vm_object_split(vm_map_entry_t entry) * that the object is in transition. */ vm_object_set_flag(orig_object, OBJ_SPLIT); -#ifdef INVARIANTS - idx = 0; -#endif + vm_page_iter_limit_init(&pages, orig_object, offidxstart + size); retry: - m = vm_page_find_least(orig_object, offidxstart); - KASSERT(m == NULL || idx <= m->pindex - offidxstart, - ("%s: object %p was repopulated", __func__, orig_object)); - for (; m != NULL && (idx = m->pindex - offidxstart) < size; - m = m_next) { - m_next = TAILQ_NEXT(m, listq); - + pctrie_iter_reset(&pages); + for (m = vm_page_iter_lookup_ge(&pages, offidxstart); m != NULL; + m = vm_radix_iter_step(&pages)) { /* * We must wait for pending I/O to complete before we can * rename the page. @@ -1604,13 +1599,13 @@ retry: * an incomplete fault. Just remove and ignore. */ if (vm_page_none_valid(m)) { - if (vm_page_remove(m)) + if (vm_page_iter_remove(&pages)) vm_page_free(m); continue; } /* vm_page_rename() will dirty the page. */ - if (vm_page_rename(m, new_object, idx)) { + if (vm_page_rename(&pages, new_object, m->pindex - offidxstart)) { vm_page_xunbusy(m); VM_OBJECT_WUNLOCK(new_object); VM_OBJECT_WUNLOCK(orig_object); @@ -1656,7 +1651,8 @@ retry: } static vm_page_t -vm_object_collapse_scan_wait(vm_object_t object, vm_page_t p) +vm_object_collapse_scan_wait(struct pctrie_iter *pages, vm_object_t object, + vm_page_t p) { vm_object_t backing_object; @@ -1683,12 +1679,14 @@ vm_object_collapse_scan_wait(vm_object_t object, vm_page_t p) VM_OBJECT_WLOCK(object); } VM_OBJECT_WLOCK(backing_object); - return (TAILQ_FIRST(&backing_object->memq)); + vm_page_iter_init(pages, backing_object); + return (vm_page_iter_lookup_ge(pages, 0)); } static void vm_object_collapse_scan(vm_object_t object) { + struct pctrie_iter pages; vm_object_t backing_object; vm_page_t next, p, pp; vm_pindex_t backing_offset_index, new_pindex; @@ -1702,7 +1700,8 @@ vm_object_collapse_scan(vm_object_t object) /* * Our scan */ - for (p = TAILQ_FIRST(&backing_object->memq); p != NULL; p = next) { + vm_page_iter_init(&pages, backing_object); + for (p = vm_page_iter_lookup_ge(&pages, 0); p != NULL; p = next) { next = TAILQ_NEXT(p, listq); new_pindex = p->pindex - backing_offset_index; @@ -1710,7 +1709,7 @@ vm_object_collapse_scan(vm_object_t object) * Check for busy page */ if (vm_page_tryxbusy(p) == 0) { - next = vm_object_collapse_scan_wait(object, p); + next = vm_object_collapse_scan_wait(&pages, object, p); continue; } @@ -1727,16 +1726,18 @@ vm_object_collapse_scan(vm_object_t object) KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); - if (vm_page_remove(p)) + if (vm_page_iter_remove(&pages)) vm_page_free(p); + next = vm_radix_iter_step(&pages); continue; } if (!vm_page_all_valid(p)) { KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); - if (vm_page_remove(p)) + if (vm_page_iter_remove(&pages)) vm_page_free(p); + next = vm_radix_iter_step(&pages); continue; } @@ -1749,7 +1750,7 @@ vm_object_collapse_scan(vm_object_t object) * busy bit owner, we can't tell whether it shadows the * original page. */ - next = vm_object_collapse_scan_wait(object, pp); + next = vm_object_collapse_scan_wait(&pages, object, pp); continue; } @@ -1775,10 +1776,11 @@ vm_object_collapse_scan(vm_object_t object) vm_pager_freespace(backing_object, p->pindex, 1); KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); - if (vm_page_remove(p)) - vm_page_free(p); if (pp != NULL) vm_page_xunbusy(pp); + if (vm_page_iter_remove(&pages)) + vm_page_free(p); + next = vm_radix_iter_step(&pages); continue; } @@ -1789,9 +1791,10 @@ vm_object_collapse_scan(vm_object_t object) * If the page was mapped to a process, it can remain mapped * through the rename. vm_page_rename() will dirty the page. */ - if (vm_page_rename(p, object, new_pindex)) { + if (vm_page_rename(&pages, object, new_pindex)) { vm_page_xunbusy(p); - next = vm_object_collapse_scan_wait(object, NULL); + next = vm_object_collapse_scan_wait(&pages, object, + NULL); continue; } @@ -1807,6 +1810,7 @@ vm_object_collapse_scan(vm_object_t object) backing_offset_index); #endif vm_page_xunbusy(p); + next = vm_radix_iter_step(&pages); } return; } @@ -1981,7 +1985,8 @@ void vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int options) { - vm_page_t p, next; + struct pctrie_iter pages; + vm_page_t p; VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((object->flags & OBJ_UNMANAGED) == 0 || @@ -1990,16 +1995,11 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end, if (object->resident_page_count == 0) return; vm_object_pip_add(object, 1); + vm_page_iter_limit_init(&pages, object, end); again: - p = vm_page_find_least(object, start); - - /* - * Here, the variable "p" is either (1) the page with the least pindex - * greater than or equal to the parameter "start" or (2) NULL. - */ - for (; p != NULL && (p->pindex < end || end == 0); p = next) { - next = TAILQ_NEXT(p, listq); - + pctrie_iter_reset(&pages); + for (p = vm_page_iter_lookup_ge(&pages, start); p != NULL; + p = vm_radix_iter_step(&pages)) { /* * Skip invalid pages if asked to do so. Try to avoid acquiring * the busy lock, as some consumers rely on this to avoid @@ -2060,7 +2060,7 @@ wired: if ((options & OBJPR_NOTMAPPED) == 0 && object->ref_count != 0 && !vm_page_try_remove_all(p)) goto wired; - vm_page_free(p); + vm_page_iter_free(&pages); } vm_object_pip_wakeup(object); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 0b9b55337b52..7d093579e35d 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -170,8 +170,9 @@ static bool _vm_page_busy_sleep(vm_object_t obj, vm_page_t m, vm_pindex_t pindex, const char *wmesg, int allocflags, bool locked); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(vm_page_t m, uint8_t queue); -static bool vm_page_free_prep(vm_page_t m); +static bool vm_page_free_prep(vm_page_t m, bool do_remove); static void vm_page_free_toq(vm_page_t m); +static void vm_page_free_toq_impl(vm_page_t m, bool do_remove); static void vm_page_init(void *dummy); static int vm_page_insert_after(vm_page_t m, vm_object_t object, vm_pindex_t pindex, vm_page_t mpred); @@ -1386,6 +1387,22 @@ vm_page_free(vm_page_t m) vm_page_free_toq(m); } +/* + * vm_page_iter_free: + * + * Free the current page, as identified by iterator. + */ +void +vm_page_iter_free(struct pctrie_iter *pages) +{ + vm_page_t m; + + m = vm_radix_iter_page(pages); + vm_radix_iter_remove(pages); + m->flags &= ~PG_ZERO; + vm_page_free_toq_impl(m, false); +} + /* * vm_page_free_zero: * @@ -1639,14 +1656,18 @@ vm_page_insert_radixdone(vm_page_t m, vm_object_t object, vm_page_t mpred) } /* - * Do the work to remove a page from its object. The caller is responsible for - * updating the page's fields to reflect this removal. + * vm_page_remove_radixdone + * + * Complete page "m" removal from the specified object after the radix trie + * unhooking. + * + * The caller is responsible for updating the page's fields to reflect this + * removal. */ static void -vm_page_object_remove(vm_page_t m) +vm_page_remove_radixdone(vm_page_t m) { vm_object_t object; - vm_page_t mrem __diagused; vm_page_assert_xbusied(m); object = m->object; @@ -1659,10 +1680,7 @@ vm_page_object_remove(vm_page_t m) vm_pager_page_unswapped(m); vm_pager_page_removed(object, m); - m->object = NULL; - mrem = vm_radix_remove(&object->rtree, m->pindex); - KASSERT(mrem == m, ("removed page %p, expected page %p", mrem, m)); /* * Now remove from the object's list of backed pages. @@ -1704,6 +1722,42 @@ vm_page_remove(vm_page_t m) return (dropped); } +/* + * vm_page_iter_remove: + * + * Remove the current page, as identified by iterator, and remove it from the + * radix tree. + */ +bool +vm_page_iter_remove(struct pctrie_iter *pages) +{ + vm_page_t m; + bool dropped; + + m = vm_radix_iter_page(pages); + vm_radix_iter_remove(pages); + vm_page_remove_radixdone(m); + dropped = (vm_page_drop(m, VPRC_OBJREF) == VPRC_OBJREF); + vm_page_xunbusy(m); + + return (dropped); +} + +/* + * vm_page_radix_remove + * + * Removes the specified page from the radix tree. + */ +static void +vm_page_radix_remove(vm_page_t m) +{ + vm_page_t mrem __diagused; + + mrem = vm_radix_remove(&m->object->rtree, m->pindex); + KASSERT(mrem == m, + ("removed page %p, expected page %p", mrem, m)); +} + /* * vm_page_remove_xbusy * @@ -1714,7 +1768,8 @@ bool vm_page_remove_xbusy(vm_page_t m) { - vm_page_object_remove(m); + vm_page_radix_remove(m); + vm_page_remove_radixdone(m); return (vm_page_drop(m, VPRC_OBJREF) == VPRC_OBJREF); } @@ -1985,8 +2040,8 @@ vm_page_replace(vm_page_t mnew, vm_object_t object, vm_pindex_t pindex, /* * vm_page_rename: * - * Move the given memory entry from its - * current object to the specified target object/offset. + * Move the current page, as identified by iterator, from its current + * object to the specified target object/offset. * * Note: swap associated with the page must be invalidated by the move. We * have to do this for several reasons: (1) we aren't freeing the @@ -2001,13 +2056,15 @@ vm_page_replace(vm_page_t mnew, vm_object_t object, vm_pindex_t pindex, * The objects must be locked. */ int -vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) +vm_page_rename(struct pctrie_iter *pages, + vm_object_t new_object, vm_pindex_t new_pindex) { - vm_page_t mpred; + vm_page_t m, mpred; vm_pindex_t opidx; VM_OBJECT_ASSERT_WLOCKED(new_object); + m = vm_radix_iter_page(pages); KASSERT(m->ref_count != 0, ("vm_page_rename: page %p has no refs", m)); /* @@ -2027,7 +2084,8 @@ vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) * the listq iterator is tainted. */ m->pindex = opidx; - vm_page_object_remove(m); + vm_radix_iter_remove(pages); + vm_page_remove_radixdone(m); /* Return back to the new pindex to complete vm_page_insert(). */ m->pindex = new_pindex; @@ -3122,7 +3180,7 @@ vm_page_reclaim_run(int req_class, int domain, u_long npages, vm_page_t m_run, vm_page_dequeue(m); if (vm_page_replace_hold(m_new, object, m->pindex, m) && - vm_page_free_prep(m)) + vm_page_free_prep(m, true)) SLIST_INSERT_HEAD(&free, m, plinks.s.ss); @@ -3134,7 +3192,7 @@ vm_page_reclaim_run(int req_class, int domain, u_long npages, vm_page_t m_run, } else { m->flags &= ~PG_ZERO; vm_page_dequeue(m); - if (vm_page_free_prep(m)) + if (vm_page_free_prep(m, true)) SLIST_INSERT_HEAD(&free, m, plinks.s.ss); KASSERT(m->dirty == 0, @@ -4073,7 +4131,7 @@ vm_page_enqueue(vm_page_t m, uint8_t queue) * page must be unmapped. */ static bool -vm_page_free_prep(vm_page_t m) +vm_page_free_prep(vm_page_t m, bool do_remove) { /* @@ -4120,7 +4178,9 @@ vm_page_free_prep(vm_page_t m) m->ref_count == VPRC_OBJREF, ("vm_page_free_prep: page %p has unexpected ref_count %u", m, m->ref_count)); - vm_page_object_remove(m); + if (do_remove) + vm_page_radix_remove(m); + vm_page_remove_radixdone(m); m->ref_count -= VPRC_OBJREF; } else vm_page_assert_unbusied(m); @@ -4172,22 +4232,13 @@ vm_page_free_prep(vm_page_t m) return (true); } -/* - * vm_page_free_toq: - * - * Returns the given page to the free list, disassociating it - * from any VM object. - * - * The object must be locked. The page must be exclusively busied if it - * belongs to an object. - */ static void -vm_page_free_toq(vm_page_t m) +vm_page_free_toq_impl(vm_page_t m, bool do_remove) { struct vm_domain *vmd; uma_zone_t zone; - if (!vm_page_free_prep(m)) + if (!vm_page_free_prep(m, do_remove)) return; vmd = vm_pagequeue_domain(m); @@ -4202,6 +4253,21 @@ vm_page_free_toq(vm_page_t m) vm_domain_freecnt_inc(vmd, 1); } +/* + * vm_page_free_toq: + * + * Returns the given page to the free list, disassociating it + * from any VM object. + * + * The object must be locked. The page must be exclusively busied if it + * belongs to an object. + */ +static void +vm_page_free_toq(vm_page_t m) +{ + vm_page_free_toq_impl(m, true); +} + /* * vm_page_free_pages_toq: * diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 893608bcacf1..613896e77dd9 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -602,6 +602,7 @@ bool vm_page_busy_sleep(vm_page_t m, const char *msg, int allocflags); void vm_page_busy_sleep_unlocked(vm_object_t obj, vm_page_t m, vm_pindex_t pindex, const char *wmesg, int allocflags); void vm_page_free(vm_page_t m); +void vm_page_iter_free(struct pctrie_iter *); void vm_page_free_zero(vm_page_t m); void vm_page_activate (vm_page_t); @@ -679,8 +680,9 @@ void vm_page_release(vm_page_t m, int flags); void vm_page_release_locked(vm_page_t m, int flags); vm_page_t vm_page_relookup(vm_object_t, vm_pindex_t); bool vm_page_remove(vm_page_t); +bool vm_page_iter_remove(struct pctrie_iter *); bool vm_page_remove_xbusy(vm_page_t); -int vm_page_rename(vm_page_t, vm_object_t, vm_pindex_t); +int vm_page_rename(struct pctrie_iter *, vm_object_t, vm_pindex_t); void vm_page_replace(vm_page_t mnew, vm_object_t object, vm_pindex_t pindex, vm_page_t mold); int vm_page_sbusied(vm_page_t m); From nobody Wed Nov 20 18:04:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtq4T6LhBz5dYh3; Wed, 20 Nov 2024 18:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtq4T4Qr2z4WZn; Wed, 20 Nov 2024 18:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732125849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yc151jo85SJzrTDcXyKKonBPnpKPtZ6MUeCgDKbW8a0=; b=IX4tYUpjQP1j2nG/hSV8tTg6H8niwyC5zvDBvQXyUUWgYeVXBs8sfsD1yirf/daP9Y+LQ3 L/tipK7khKG9yLdj5BB0wiCDoIODIdHjwjZ4doEzTtgkXfZenSn3HIelA7utdYpJTxzIFR PkyikvFXwn2TsXvHlp1n834bLXaIVLiAIo3p0DqH2hZbqrGCSm8X7g1JE2GyhyHQxSX4e6 1Fnd+t6bf/jU5PpbfarkhEiJke53Qns9g2Em4ip/wgbP7ZppxLAOHmzutcdhwQi1FAstci g37F4TXMphbmtlG+/VCzLHKbz2bRaUwpuGneGqAf5s3FZB0YejW2p8eCxJcVvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732125849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yc151jo85SJzrTDcXyKKonBPnpKPtZ6MUeCgDKbW8a0=; b=J69KE0VQlyw/VQ6oBxSw+EhToUKH76cqYp3cF5fJb/kY/5+d1uITlx71tVGJdrl0N9TcrM kTeNs56fSKQFTJQPDBCL43IBLveB1Y1kek2XLTYTHSY4QviPPbi6O0IlyUtEts+/Tgm3w1 DfBj0wzCn71++H+ls1e/kjSyO2I1GTMxUbIM4H+3YVf7PxjDLmg1tdTVqzgy6Ej7fxAD2d UpAo4doKI4PBwk49OYBnkj8Ki3yUkTtsgRbAvQLa1qpV/h4GSD0NdzQQNQjAb/+VNzk91a AF5e/aTaqTSRZCtjUng7Zh/Rv32HHdIo+viWuDOVJVI1cWc8lj1yiEJVH24Emg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732125849; a=rsa-sha256; cv=none; b=YWLpgGDmTr0R5NdKqUaYskmDbXyJK+5/EXrNaoGIVXzY9TG8PGTgkKWvSm0g9k8vV6WYld 4peYvad31CqmrKqKXPKvliTDcplGbn6DBnFSAE78LDASfHXCYH594FbKVsnQ0DFkYHpE8k 7Z2PA5UGGxjZ/aiW/T744LnhKLwYiF3tKM+k6VMwiBWUnrMrtVYfdWJQl9ujtrUGt0Gzfa o8mjBD7aSbBAMomzxxu1arRy0VfMis6ON5xMjVlFZG8ANGu/cZGYUQsDmfHcXIcpG8E6Me THzHorRbWEKsldKcFpkdgzLlSfsMjzI9eBbvoXzCkxId26SvDZGm9/TFlH4ZZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtq4T42TWz14tF; Wed, 20 Nov 2024 18:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKI49nu019189; Wed, 20 Nov 2024 18:04:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKI497E019186; Wed, 20 Nov 2024 18:04:09 GMT (envelope-from git) Date: Wed, 20 Nov 2024 18:04:09 GMT Message-Id: <202411201804.4AKI497E019186@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: 18a8f4e586b1 - main - vm_page: correct page iterator patch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 18a8f4e586b1a5f4e01da7e5f76099a69a3dd1f8 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=18a8f4e586b1a5f4e01da7e5f76099a69a3dd1f8 commit 18a8f4e586b1a5f4e01da7e5f76099a69a3dd1f8 Author: Doug Moore AuthorDate: 2024-11-20 18:00:57 +0000 Commit: Doug Moore CommitDate: 2024-11-20 18:00:57 +0000 vm_page: correct page iterator patch The previous change committed a preliminary version of the change to use iterators to free page sequences. This updates to what was intended to be the final version. Reviewed by: markj (previous version) Tested by: pho Differential Revision: https://reviews.freebsd.org/D46724 --- sys/vm/vm_page.c | 118 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 63 insertions(+), 55 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 7d093579e35d..296d803ca0f0 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -170,7 +170,7 @@ static bool _vm_page_busy_sleep(vm_object_t obj, vm_page_t m, vm_pindex_t pindex, const char *wmesg, int allocflags, bool locked); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(vm_page_t m, uint8_t queue); -static bool vm_page_free_prep(vm_page_t m, bool do_remove); +static bool vm_page_free_prep(vm_page_t m); static void vm_page_free_toq(vm_page_t m); static void vm_page_free_toq_impl(vm_page_t m, bool do_remove); static void vm_page_init(void *dummy); @@ -1387,22 +1387,6 @@ vm_page_free(vm_page_t m) vm_page_free_toq(m); } -/* - * vm_page_iter_free: - * - * Free the current page, as identified by iterator. - */ -void -vm_page_iter_free(struct pctrie_iter *pages) -{ - vm_page_t m; - - m = vm_radix_iter_page(pages); - vm_radix_iter_remove(pages); - m->flags &= ~PG_ZERO; - vm_page_free_toq_impl(m, false); -} - /* * vm_page_free_zero: * @@ -1699,6 +1683,52 @@ vm_page_remove_radixdone(vm_page_t m) vdrop(object->handle); } +/* + * vm_page_free_object_prep: + * + * Disassociates the given page from its VM object. + * + * The object must be locked, and the page must be xbusy. + */ +static void +vm_page_free_object_prep(vm_page_t m) +{ + KASSERT(((m->oflags & VPO_UNMANAGED) != 0) == + ((m->object->flags & OBJ_UNMANAGED) != 0), + ("%s: managed flag mismatch for page %p", + __func__, m)); + vm_page_assert_xbusied(m); + + /* + * The object reference can be released without an atomic + * operation. + */ + KASSERT((m->flags & PG_FICTITIOUS) != 0 || + m->ref_count == VPRC_OBJREF, + ("%s: page %p has unexpected ref_count %u", + __func__, m, m->ref_count)); + vm_page_remove_radixdone(m); + m->ref_count -= VPRC_OBJREF; +} + +/* + * vm_page_iter_free: + * + * Free the current page, as identified by iterator. + */ +void +vm_page_iter_free(struct pctrie_iter *pages) +{ + vm_page_t m; + + m = vm_radix_iter_page(pages); + vm_radix_iter_remove(pages); + vm_page_free_object_prep(m); + vm_page_xunbusy(m); + m->flags &= ~PG_ZERO; + vm_page_free_toq(m); +} + /* * vm_page_remove: * @@ -3180,7 +3210,7 @@ vm_page_reclaim_run(int req_class, int domain, u_long npages, vm_page_t m_run, vm_page_dequeue(m); if (vm_page_replace_hold(m_new, object, m->pindex, m) && - vm_page_free_prep(m, true)) + vm_page_free_prep(m)) SLIST_INSERT_HEAD(&free, m, plinks.s.ss); @@ -3192,7 +3222,7 @@ vm_page_reclaim_run(int req_class, int domain, u_long npages, vm_page_t m_run, } else { m->flags &= ~PG_ZERO; vm_page_dequeue(m); - if (vm_page_free_prep(m, true)) + if (vm_page_free_prep(m)) SLIST_INSERT_HEAD(&free, m, plinks.s.ss); KASSERT(m->dirty == 0, @@ -4131,7 +4161,7 @@ vm_page_enqueue(vm_page_t m, uint8_t queue) * page must be unmapped. */ static bool -vm_page_free_prep(vm_page_t m, bool do_remove) +vm_page_free_prep(vm_page_t m) { /* @@ -4164,24 +4194,8 @@ vm_page_free_prep(vm_page_t m, bool do_remove) VM_CNT_INC(v_tfree); if (m->object != NULL) { - KASSERT(((m->oflags & VPO_UNMANAGED) != 0) == - ((m->object->flags & OBJ_UNMANAGED) != 0), - ("vm_page_free_prep: managed flag mismatch for page %p", - m)); - vm_page_assert_xbusied(m); - - /* - * The object reference can be released without an atomic - * operation. - */ - KASSERT((m->flags & PG_FICTITIOUS) != 0 || - m->ref_count == VPRC_OBJREF, - ("vm_page_free_prep: page %p has unexpected ref_count %u", - m, m->ref_count)); - if (do_remove) - vm_page_radix_remove(m); - vm_page_remove_radixdone(m); - m->ref_count -= VPRC_OBJREF; + vm_page_radix_remove(m); + vm_page_free_object_prep(m); } else vm_page_assert_unbusied(m); @@ -4232,13 +4246,22 @@ vm_page_free_prep(vm_page_t m, bool do_remove) return (true); } +/* + * vm_page_free_toq: + * + * Returns the given page to the free list, disassociating it + * from any VM object. + * + * The object must be locked. The page must be exclusively busied if it + * belongs to an object. + */ static void -vm_page_free_toq_impl(vm_page_t m, bool do_remove) +vm_page_free_toq(vm_page_t m) { struct vm_domain *vmd; uma_zone_t zone; - if (!vm_page_free_prep(m, do_remove)) + if (!vm_page_free_prep(m)) return; vmd = vm_pagequeue_domain(m); @@ -4253,21 +4276,6 @@ vm_page_free_toq_impl(vm_page_t m, bool do_remove) vm_domain_freecnt_inc(vmd, 1); } -/* - * vm_page_free_toq: - * - * Returns the given page to the free list, disassociating it - * from any VM object. - * - * The object must be locked. The page must be exclusively busied if it - * belongs to an object. - */ -static void -vm_page_free_toq(vm_page_t m) -{ - vm_page_free_toq_impl(m, true); -} - /* * vm_page_free_pages_toq: * From nobody Wed Nov 20 19:31:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xts0n54mkz5dfLL; Wed, 20 Nov 2024 19:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xts0n4dshz4glJ; Wed, 20 Nov 2024 19:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732131065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hHAuxQ+t8lNyyaSmAb4wgHpCwpWuoplTB8FiROOAg44=; b=U+DeV5tbX++qvBOBjU7unrzPsS3HMMEALC86bvEd7d+CGgxIciku0fc0s+fnxh5IpICZ+b k1EtYAAF+UaJNEhqwdHcJbZ4580huvunEFgUy+ESknyWU9fUjg2u7X8S/Xg8SZo+CGL2PP COQGEht75g5eK4/RaJmSlbe6Qh6D8F6hFQEbV7OFChclECtmZ15IZARBRzWkkzUtkoSjZH 79aSUnMExbExgJDLRxmrGCTOBdBDQWknBPSwptTsegqt1pitSvXvHHjBvC0YMQLI2ZL4HV R5biPuZB3dQ3vdMo/8fN6B/1VZX+FrK67z3IvO0Lp9RZb1f5/1F+TqmwrG1ADw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732131065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hHAuxQ+t8lNyyaSmAb4wgHpCwpWuoplTB8FiROOAg44=; b=oMMP5auGc5OvkM9R0ipXoT8qgdqOwW44/PcX2pz5djUEtH4G4g4iZTW6NUwSekOpe+MbVV mlnykSX1MNdZLNxbppd4t3kfJTn6culj8Lt4GaP4ayRSJrNTo/XRSqGhRuIbxrBxMfZVjn DWn7FcJybe71nfUCD0ocJi9uilNlOqCQl8koRg0uOPK+PIqrkT9qL4knO8FOp6i8+QrBOS qCVUK+mZ4UHQGu+HVMTMV+hwZILX3tpfsrYOnKACviI1lyhjEnzkRFs6g05a/X1UX7M5c+ pQaV5MnuLsMamzG2sdNIeF/OSVM4YJukjzUHJ9W7R8+1BWFQN2TCLrT3To7VzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732131065; a=rsa-sha256; cv=none; b=MeaOPNInTFbmdTFx4iDZGA8I0KzFppNhzyiBYknMyvBu5SvyTWSUCWf03JQPgwQz7yfN/d R97w5kmdsr3dMFekmF9hAeQk8xlINVXA3KmqSEGSQ6aAqn6grB0NHbSmGRAiKoJh2ywTNa I3wiBnREe8d1hFw+w/QriRkynypQqq+pkkcZ4MJgg+JNPdXbOFgJdMuQRS/RY9ebKSCgDG XfpvlkY/pRHy9JRXCQVqhU1OcNeBPtbEUlEslQJj3pu+ugoLmHLFlkMZY5Kv21hbB+lHOy um8dfmmOEfE1qLRe1kqWoNzWdTvfRvV+3+ALyvyy8be6HrMjhDc4DB05xZkjnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xts0n4Dvlz1718; Wed, 20 Nov 2024 19:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKJV5Mr078350; Wed, 20 Nov 2024 19:31:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKJV5Bp078347; Wed, 20 Nov 2024 19:31:05 GMT (envelope-from git) Date: Wed, 20 Nov 2024 19:31:05 GMT Message-Id: <202411201931.4AKJV5Bp078347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 95b71a659a9b - main - libc: Note that getentropy is nearly POSIX 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95b71a659a9bdc6e9071d80c7369a935c2bc16f4 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=95b71a659a9bdc6e9071d80c7369a935c2bc16f4 commit 95b71a659a9bdc6e9071d80c7369a935c2bc16f4 Author: Ed Maste AuthorDate: 2024-11-15 02:29:49 +0000 Commit: Ed Maste CommitDate: 2024-11-20 19:30:34 +0000 libc: Note that getentropy is nearly POSIX 2024 Our implementation currently diverges from POSIX 2024 in a couple of ways, as now noted in the BUGS section. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47589 --- lib/libc/gen/getentropy.3 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/getentropy.3 b/lib/libc/gen/getentropy.3 index 0a3ba3e25610..5bbbc80e2414 100644 --- a/lib/libc/gen/getentropy.3 +++ b/lib/libc/gen/getentropy.3 @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 24, 2018 +.Dd November 20, 2024 .Dt GETENTROPY 3 .Os .Sh NAME @@ -69,10 +69,8 @@ Too many bytes requested, or some other fatal error occurred. .Xr random 4 .Sh STANDARDS .Fn getentropy -is non-standard. -It is present on -.Ox -and Linux. +nearly conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn getentropy @@ -82,3 +80,9 @@ The .Fx libc compatibility shim first appeared in .Fx 12.0 . +.Sh BUGS +.In limits.h +does not define +.Dv GETENTROPY_MAX . +Some error values do not match +.St -p1003.1-2024 . From nobody Wed Nov 20 19:49:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtsQZ28d5z5dgpl; Wed, 20 Nov 2024 19:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtsQZ1jbGz4j9b; Wed, 20 Nov 2024 19:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732132198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xm61rbJgEywjLjrvfhJFjs39ZysYr1tC+hoG3qffw/0=; b=wx/ENt5xTWn2UyZDiGGGqrPqB8zSmfGzO6mJ4kPLsZfWAsqQvaG1oEcAJq0YFRIuIfLBV4 MiyolwwiG5KzM1L9Zz61TCI/E5hq/usZLM2Ugzvo6WVFom16JowhcUXW4phOqFlXEqBKPZ hR968cJo/iBASED/DA613+tT7kdMi1f2qow62FqynBedFDP9FIdoJ3TyRvuD1cH1WQK/LO Efm4xHD3x1jAhpDwcjlKwLKHewWI5835ncNbZZnTcXoYnpXxDev15x3MgiJpiZqrGHe8AC dXjhk7l8anYBt2uXYf2xj1D0oZByf2U/iCAqmjCoAy4jTCeV0LUMP79tr8jqoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732132198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xm61rbJgEywjLjrvfhJFjs39ZysYr1tC+hoG3qffw/0=; b=Pa8FVjjdPuTo6dQOVCR1X8pyjmsGYaiw70uUGJxXCBk6qAPbpiJ4Asa74i/otn9hxsnOJ2 SwWwjAA9UL6/vkS5Tw0+rJ0KQV0+F7dYzAjLd6JL2T23sTLTeoKUmhXKLoh86gAJUH0ci1 QUKWsgJ/Ovyd/aPhJHLLJwDqu3Zcv5fgaockVllrOJXc0dd3JXFqoKe/rDcYwkQloDCEn3 D/uTSOw4q+RrJexsDbX17wGhoCHtDmaID1fuDwcRc9erFu0dvCdwYBVRwapICdQIRyT6rY vnLIxn3udJavii6KYMd9eUaaT6QYP1HClmcbcFwAdbORjd1ScSW+qokZIURE7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732132198; a=rsa-sha256; cv=none; b=FEL9fmGyZpymaxRWuc/K9yS88+9iHe+M81kimYpbs9PNYYuw+KfUI3zpaBz51hzR7esBBd hswXT0Ftslvbdr2tdPRqe5fa1I263Qm6liAIp5YOWukv1ulaZ8/TJhnlVEdxDRk1REl1yA YqAmlFfhxcx4yFKknGegIW3Iwa53IJPPwSxmzZfzXTmqla6Ndk/diitIqebKkCYFundJIO 14Sy/37EZWYyvn/fuBRz7I+bbfn8ljyhkF5mL/PqbnU3D9M67b15rZ26pDIjHD7ufz1Ypl dJ4eKzpj67J8uZtiuWSRS28GmuGI+HRxtChoeVpc071WPh1DdttSrRXnMXxGJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtsQZ1KsXz172b; Wed, 20 Nov 2024 19:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKJnwQs006626; Wed, 20 Nov 2024 19:49:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKJnwH2006623; Wed, 20 Nov 2024 19:49:58 GMT (envelope-from git) Date: Wed, 20 Nov 2024 19:49:58 GMT Message-Id: <202411201949.4AKJnwH2006623@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: 780f28929782 - main - stand: drop inttypes.h from safe 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 780f28929782a104eefbc81f031836bf1febb6de Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=780f28929782a104eefbc81f031836bf1febb6de commit 780f28929782a104eefbc81f031836bf1febb6de Author: Warner Losh AuthorDate: 2024-11-20 19:37:08 +0000 Commit: Warner Losh CommitDate: 2024-11-20 19:49:48 +0000 stand: drop inttypes.h from safe list Nothing uses it anymore, so drop it from the 'safe' list. Also, move stand/efi/loader/main.c to using machine/_inttypes.h which is all it really needs. Sponsored by: Netflix --- stand/efi/loader/main.c | 2 +- stand/libsa/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 500fcba20938..213089961704 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 603fee71e84a..42ef3e69c18a 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -200,7 +200,7 @@ MAN=libsa.3 # Create a subset of includes that are safe, as well as adjusting those that aren't # The lists may drive people nuts, but they are explicitly opt-in FAKE_DIRS=xlocale arpa ssp -SAFE_INCS=a.out.h assert.h elf.h inttypes.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h uuid.h +SAFE_INCS=a.out.h assert.h elf.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h uuid.h STAND_H_INC=ctype.h fcntl.h signal.h stdio.h stdlib.h unistd.h OTHER_INC=stdarg.h errno.h stdint.h From nobody Wed Nov 20 20:09:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtssJ2ht4z5dhrf; Wed, 20 Nov 2024 20:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtssJ1v95z4kJ4; Wed, 20 Nov 2024 20:09:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732133380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5rfDwNxIyZnDqz5yDZxLwDQJDQ9aMj2fsCV6X8v6dbY=; b=FakEDuwrQBHbQJ8lvvh81sAeV/W9TGeC6GPm5lsJ6nrUUKi790tiKrrmxPiALvgBIkFeVx df0JZiq/zq8zcGyIZuKpq/6m1j42M+qFX2dwV/OC6MA07apepzF6XkrDdjCX+dAdITeVO4 kvLv1InCHa/kiqRWqiBKwuIwlbaPrdmKbrneNZq6TkGN2XdKbXIQRYkCa3XzKbLg36Td4y aLk8XnM80Rp7qtQU/enUt8ePPUgRGemxYZyd14adI9+y12y3Wyk2safN9aamsf5TVJW8D3 eIr0a475D4vWjz06hSwmGVfMfLopRN93lDYO4bjQ7t3pf7/N+1KQvp1IUbGwjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732133380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5rfDwNxIyZnDqz5yDZxLwDQJDQ9aMj2fsCV6X8v6dbY=; b=DlFEGhaXVFqJJ6yoGklY/RqEEBTHn7y5TwjuRKwdpQE7L9+CkpxEMecIJNuVRGcMezHLWR LDX5PrkigByV1wiLBbjCg0IUaDPz4xqvvttQpdnTmTouq6LKJx9fbM9wbxaZhH89UOCseX 6h8CulDXaGAzwuP1j6Mk8CJf+lYHy9k1skAJ9JZKo6dItU9cbBK75CcbDUI+qCyMyvwfZp eDoB5OzIyRbQP/DLmdgsEo88VhGNh+tiBbuan3C6mhhCYsUPVO3nLePivhMVbBjEYOWg1O CQTxK/7KqHmIO4REVKr69e51QrNIa9ioZC0J+nFIbMRC7PLy5NIl5d+BYOq3TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732133380; a=rsa-sha256; cv=none; b=j7XmXhyVvw2EdyFgPtphyjILfRnZjoJ91xXUmnEeS56nMDLcDI7pCWwh1kYW7+fS/jqOqL CYk7/RbuU56/LdeMXk5znJnasuyvtVkoSZovT+GI61OrOP6WcxRt0zMogA5pOt06iPrfsu lwO/UYcvSp8hpbyOVcVcMuNBwF3dXte4Fx4g1VIEo4Uz9SLHqEIW8tiwSWeTr/0uB7afzb O/3kdCCWUWrCSZlUrmjecKyjO89nqbawKNuotmuELhi0DiMVp+If0H91CYkT4oP+ATh2kr /hMonFKy60c53y2ZMjS40RcVKQcLk2lUZHZQ/8bIV66ytU6lBzwDUSW2luEUSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtssJ1DS5z17lF; Wed, 20 Nov 2024 20:09:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKK9eqP044458; Wed, 20 Nov 2024 20:09:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKK9epl044455; Wed, 20 Nov 2024 20:09:40 GMT (envelope-from git) Date: Wed, 20 Nov 2024 20:09:40 GMT Message-Id: <202411202009.4AKK9epl044455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 7a3af393d8ac - main - sys/cdefs.h: Add comments to make #if/#else/#endif triple more obvious List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a3af393d8ac2dfe72d24fe401344b60c4f87866 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=7a3af393d8ac2dfe72d24fe401344b60c4f87866 commit 7a3af393d8ac2dfe72d24fe401344b60c4f87866 Author: Jessica Clarke AuthorDate: 2024-11-20 20:09:28 +0000 Commit: Jessica Clarke CommitDate: 2024-11-20 20:09:28 +0000 sys/cdefs.h: Add comments to make #if/#else/#endif triple more obvious This block has a lot of nesting, not helped by two adjacent nested blocks involving _POSIX_C_SOURCE, with only the inner one commented, looking like it's the end of the outer one. Comment the outer one as well so it's not quite so hard to figure out. MFC after: 1 week --- sys/sys/cdefs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 0f53ff816527..4f4f09a3d763 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -596,7 +596,7 @@ #undef __ISO_C_VISIBLE #define __ISO_C_VISIBLE 2011 #endif -#else +#else /* _POSIX_C_SOURCE */ /*- * Deal with _ANSI_SOURCE: * If it is defined, and no other compilation environment is explicitly @@ -640,7 +640,7 @@ #define __ISO_C_VISIBLE 2023 #define __EXT1_VISIBLE 1 #endif -#endif +#endif /* _POSIX_C_SOURCE */ /* User override __EXT1_VISIBLE */ #if defined(__STDC_WANT_LIB_EXT1__) From nobody Wed Nov 20 21:36:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvn05y1xz5dmnC; Wed, 20 Nov 2024 21:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvn05GPJz4tS7; Wed, 20 Nov 2024 21:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L8sq4om64B/SMicDx7Z65dgBLSDeAme1owmp4VIFgs8=; b=pAwBuX8UXXZJypLpZhhjDpvIy7byryfHddwPQ9sgbXb7xSsGHZDyd3IkX7QN5PnVpCsDfp zrKF2kyHKh+FZVAzc2XTayPP9x/ZSPk3YKLt7EdzQo4ZIGo2Wka+0+UtWeZ2FoNgWSHNfd E5HzKfi+EVP45bkPnrcDw5d/nPe10MSxi7XhSqwVUrOjTdDUxr+wHWTcbFsQexdN10wvUY 3+6/P+u4iEaAOAKjFGdTINpEs9fUrqq4dX4Jspkm/Q+Vr1FM281el1KR4mfmb4rZXaCq3m rY9TSQL+8NkZKjAHVuNFJOLSRmp7KJHlCDER0C6IJiVCj070UPijCkNmRpvKVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L8sq4om64B/SMicDx7Z65dgBLSDeAme1owmp4VIFgs8=; b=JEsWN0kdMrB3NseO7PRV3P4Z2GwSLbMc9CBARtEXLyxm+o2bYoGc7hcCkI1Ft43dz53X2P Ku3nRj/Wef1bfW8X/217F9j0KAvX/134ei31fVLC4PuGOa7a3XsubJ4GS5oqh6PIhv5PxM 9hFXl9Gw1gnZwAqIUayakqo5uzx81m71aX4T7MjJJ1C8QC9k6fKDvqTwD8MVs4zKXuy0+H T9/Zdc02+SVPN4R3jwNf6bSsZ0lml6GnsL6rcfnHsf3Yh44PoQuNU54CYJjXvcNdRT+v91 KgvfJgYmrdw1x5MxA8h7rL5WO0MTpgNJQNLm/eP1FweYwADUfM3GVin9Rue4EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138564; a=rsa-sha256; cv=none; b=b0SGmGz4G9O4nDLGPBiJLEH6Fm9rKUc6uEP0Wy5ihY1Qsg85GBzhUpeoblrSwPdfE9dc0n Hr0Ba6B3aumLU6W8sLDqF0YBGoIla4m0eEGFPVVZdVgszUvVt2x11hCKUJkJQ4HoUZAf4B BKu79BJm2G6695XiEIA7IrRO346Ynjgo7QmM88VSpnUi1rzP1wHYgxaQ1Lnmyqmm3L12m4 nPqfONJOt1mvYTX6fW/tLBIyWruj8I+whV/f28if6sUHPdVtFvNdBkHbRTptnXEvh5a5S+ OybmmaSLU/UtBSud63ybWevimr0QANxVKDGJjHbx2fNNIAjRguvHdwRNpAMt2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvn02MDkz19b0; Wed, 20 Nov 2024 21:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLa4gV009844; Wed, 20 Nov 2024 21:36:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLa4i5009841; Wed, 20 Nov 2024 21:36:04 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:36:04 GMT Message-Id: <202411202136.4AKLa4i5009841@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: 4365a13bda5f - main - cdefs: Document what we do when _XOPEN_SOURCE is an empty string List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4365a13bda5fb9f930b9cca7f9797537695441d7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4365a13bda5fb9f930b9cca7f9797537695441d7 commit 4365a13bda5fb9f930b9cca7f9797537695441d7 Author: Warner Losh AuthorDate: 2024-11-20 20:51:18 +0000 Commit: Warner Losh CommitDate: 2024-11-20 21:35:56 +0000 cdefs: Document what we do when _XOPEN_SOURCE is an empty string X/Open originally had _XOPEN_SOURCE defined to signify conformance with the Single Unix Specification, starting with its third iteration. There it defined _XOPEN_SOURCE being defined as the same thing as _POSIC_C_SOURCE=2, though the different versions of the spec had slight variances as to what's defined and wheter or not _XOPEN_SOURCE_EXTENSION needed to be defined. Document that we don't do anything in this case. It turns out that enabling the proper strict environment breaks at least some old software, so for the moment it's a nop until that can be sorted out (though that is a very low proprity task). Sponsored by: Netflix --- share/man/man9/cdefs.9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 350e5d773004..0edd6e8392ca 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd July 20, 2024 +.Dd November 20, 2024 .Dt CDEFS 9 .Os .Sh NAME @@ -357,6 +357,10 @@ However, system headers not defined by that standard may define extensions. .It Dv _POSIX_C_SOURCE = 200112 Ta St -p1003.1-2001 including St -isoC-99 .It Dv _POSIX_C_SOURCE = 200809 Ta St -p1003.1-2008 including St -isoC-99 .It Dv _POSIX_C_SOURCE = 202405 Ta St -p1003.1-2024 including ISO/IEC 9899:2018 ("ISO C17"), +.It Dv _XOPEN_SOURCE defined Ta St -p1003.1-90 with XPG Extensions to St -susv1 including St -ansiC . +However, +.Fx +implements this as a NOP because too much software breaks with the correct strict environment. .It Dv _XOPEN_SOURCE = 500 Ta St -p1003.1c-95 and XPG extensions to St -susv2 including St -ansiC .It Dv _XOPEN_SOURCE = 600 Ta St -p1003.1-2001 and XPG extensions to St -susv3 including St -isoC-99 .It Dv _XOPEN_SOURCE = 700 Ta St -p1003.1-2008 and XPG extensions to St -susv4 including St -isoC-99 From nobody Wed Nov 20 21:37:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvpl1SP9z5dnFt; Wed, 20 Nov 2024 21:37: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvpl0qfpz4vJk; Wed, 20 Nov 2024 21:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91TFs/YOWvtUNSy5ICf0mczUwkvIlGhFLltr8MKVeqw=; b=vPxsLZNxnO+ISJrswoi8TZ9RJLzo+7ypn0XvOxdzJMVqHCFh0ofikEnVq2dMLwtdCw4ODq FHdUYp/3dSTGiY6RhvNCst4tMMET6stUjtVncFvLaPQxr9dnYRiOR1E07uHthBXM1lkStb 7E8NlRMq4fuAMncfvq9F2iwePAKfxSkXRXQXreYmjnEUNmHtPnlNXR/QLpus8BEpjqoBcN QCVxYYcs8aqQYpXGWy8+gVowUlpn+bFbk2jHBOSl7+s0gPYmbPnHKapgkh9S+3h0Cwuyqw dv7ffHpRxgU0GY+zNH1hQiA61rZ6mCmCgbGSG+oD+vx6/IUgrJtlXDw2EgAQvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91TFs/YOWvtUNSy5ICf0mczUwkvIlGhFLltr8MKVeqw=; b=b334fb5TLj2CPdRVArhjpr9wiRoO4RA3lG/q4YGEolIkvxcOTllO2h4r3Kg/IjWpxOIQFN eH+2GgmF4tphWasHP5nV5UBLwXbu2DkU1NjSxKN7uezB/Gypw8n5loe2KTqZBxPSRp7UrN RXIwxsvEdsu2UKfda46tB7kUQSf6y4edAhMHweBi7euc0psP946SVLF6Y63vtJKSjmFZvC v3ATRZ4GY0doOMJXA/JVY1kihUv71X3jRgNePJgv8vXliVyRYjBCNgX3qWbOfGRqRKo8xQ HUw3wQyhbRaztemtm/o8QiHXfyJRSFiLp3eKddnYrbxcBtKC49mkXan45/jGOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138655; a=rsa-sha256; cv=none; b=VjT9owZmhnGVRNGdzhGYFWTgC/ihlGuNfACLBh6wo9F7WWew/6+saKkufvIQk2OLTG4nii C0iiuFveYQBc6m0UiHIuSnNtA1JEtYsjFdoLrYFD9LakqgSiifWODuj3v6jnilvfxVrxxS /azvBdnIsO79s7UAV+6zvhWv/ry8aD75ssI/SBsW8qzRaRYW/k+k4qilZfl23h5fMFYCkP ehDHJNnmyhQ2VBjAktA7unlu82CRJOiYjgQXKg4SFsDdtXPqzWO8LTQGJahYqLKc0LAlN0 omzYVbmAsrAhOTIdvBm85PUhEUMIFSZwTKZnwo18iuKc1NTVDYLgGYP2gt9tlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvpl02Zmz1B6N; Wed, 20 Nov 2024 21:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLbY1t010401; Wed, 20 Nov 2024 21:37:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLbYGe010399; Wed, 20 Nov 2024 21:37:34 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:37:34 GMT Message-Id: <202411202137.4AKLbYGe010399@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: 459404cbc4e3 - main - rtsw: Break out as soon as we find we're doing the inversion workaround List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 459404cbc4e34fd31b184fe63f487c97d1a45783 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=459404cbc4e34fd31b184fe63f487c97d1a45783 commit 459404cbc4e34fd31b184fe63f487c97d1a45783 Author: Warner Losh AuthorDate: 2024-11-20 21:37:20 +0000 Commit: Warner Losh CommitDate: 2024-11-20 21:37:20 +0000 rtsw: Break out as soon as we find we're doing the inversion workaround Once we set that we're doing the inversion workaround, there's no sense continuing to search for the inversion workaround. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D47686 --- sys/dev/rtsx/rtsx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/rtsx/rtsx.c b/sys/dev/rtsx/rtsx.c index cc2adc8a205c..a293d5e12e5e 100644 --- a/sys/dev/rtsx/rtsx.c +++ b/sys/dev/rtsx/rtsx.c @@ -3630,6 +3630,7 @@ rtsx_attach(device_t dev) device_printf(dev, "If a card is detected without an SD card present," " add dev.rtsx.0.inversion=0 in loader.conf(5)\n"); sc->rtsx_inversion = 1; + break; } } From nobody Wed Nov 20 21:41:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvtz6jvkz5dnGl; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvtz6C6kz4vbX; Wed, 20 Nov 2024 21:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+gjsFn5mCrd4EmWLN9ydFnsnfscIumj8V72Kzznf0U4=; b=PnWfJLpyNJDHPVcDp+24/E3SHnh9OUAfoZj9E6R791l+qhEU/9rSmF3g4AN2tbyMp4zL5B 2c0UQx4l5SlERsw+ye/gLSSQAqGCDz6TdoBJ5WTjqnrK8H2toluKNyuLkG75C0XzBzLz9Q L9n2+UvUusFIEvgt8wOIfKPGDPvteB/G1lvyJprmFlQTDj1Z+oMuU6V/OFQvrgJeLDs4RM lek8eio+t5G3TYsAf6z0vILTEcNq0OWedxBK6ndEtrir2vjd3jKRdOpoEEm4l6WxM6x+Ub cINvP8q/bkaHAAXV5C3mOWGE6lfRRwIN7AsiFHSlqJtXqyML4FWfPLoOVSx8Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+gjsFn5mCrd4EmWLN9ydFnsnfscIumj8V72Kzznf0U4=; b=wNoDHF80/S4VQgFk7OAqO7VNAKCiLcV7QYQoZI7IX4sa2oQvLJ6MpMIdOFZ7ZCmuDTlLBI FHHn8QImUXWRzkDnIBnOYsMt9u2Bd9lqqHolR7NxIDA4vSdeJSq834yQ+LUnA4BM5Pyoaq a0dRadlHszMBYrbmFeVJ69N8m9b2uQgIauwO92OV+nzf5hp9CcbIkTYgNOGZt4OKw6qhOc Sefzl8vxlq9cWmkTGPuEdHY+IESeW+wQjalr/07jt/368qlTwHOfgqMFU734rPmm08X3m/ PPQ1iXDzVK232uCGRUXmNgV6dN263NCXub1ZT+Q/KR5QHMwewOZ2/Hh3nbxnvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138875; a=rsa-sha256; cv=none; b=QVAHe5d5/1hlY7fkmlcapk/J5Vi5thaxPG4lyorMF7Hg362/JFILJrvkFMDl2cDngXnRfy yeOa6QReZynIavmxQoSiYwSx9Zi+3kWrrDWSWcpWb1dfd9b7rqpQG/bU87Gpm6HT+smf6M DA+WEb0tqFvC2NxtnsKETN/CUBzjnI+bR+m36ad14G/DRc/WKMpoP8/rYxjxk8820T4jVb fiz8FJ00SWjT55vwPC7EmsHuPhc/TK+wSEyLUSSy7eGOK6YP+TbQt3T2pDVIQWDduS6Ee3 ub4Ha6muevLcSl/HuwGvskop7iROa6IxzJGWTHqdhbyNWilUJc/MMUL2lIOhJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvtz5gz0z19rD; Wed, 20 Nov 2024 21:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLfFTW021942; Wed, 20 Nov 2024 21:41:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfF5u021939; Wed, 20 Nov 2024 21:41:15 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:15 GMT Message-Id: <202411202141.4AKLfF5u021939@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: 91a805447374 - stable/14 - linux sendfile: Fix handling of non-blocking sockets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 91a80544737486dbe5bbae28c05c2a7a654cb61f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=91a80544737486dbe5bbae28c05c2a7a654cb61f commit 91a80544737486dbe5bbae28c05c2a7a654cb61f Author: Mark Johnston AuthorDate: 2024-11-13 14:15:47 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 linux sendfile: Fix handling of non-blocking sockets FreeBSD sendfile() may perform a partial transfer and return EAGAIN if the socket is non-blocking. Linux sendfile() expects no error in this case, so squash EAGAIN. PR: 282495 Tested by: pieter@krikkit.xyz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47447 (cherry picked from commit a43b745aaf4f5bbc96875d2ab3ec9bea8024eda4) --- sys/compat/linux/linux_socket.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 705a64de8ede..d35ff37aee98 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2537,6 +2537,13 @@ sendfile_sendfile(struct thread *td, struct file *fp, l_int out, current_offset = *offset; error = fo_sendfile(fp, out, NULL, NULL, current_offset, count, sbytes, 0, td); + if (error == EAGAIN && *sbytes > 0) { + /* + * The socket is non-blocking and we didn't finish sending. + * Squash the error, since that's what Linux does. + */ + error = 0; + } if (error == 0) { current_offset += *sbytes; if (offset != NULL) From nobody Wed Nov 20 21:41:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvv16rc3z5dnNm; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv11F94z4vk0; Wed, 20 Nov 2024 21:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTvGDWRvCUkNsh1kRansgFWkDtOIqe01kgHT8vbVxcg=; b=aBGDDZ841B51TWzI498rvbbIGMfv7Wk8ex0L0AAlkABJvkVQLGAWR/FiieC1q4UnKUTHRx MXVGNxRt8K9AdiUACWVro3V0Dfonv2wtQycUba5jWAQnr91SNzh+T262WoCGeAds58j9GM FJuMvkxJJog+3H6gFMQWMZrbqUhbNH3VZIHUQliJ12iCY7jAljVghvZIzum6Yxh2KjVRcQ oWzdqfT0i9hNARGNKH6LuTZhyKqldXK/rHk4Ya0LDcT9FhC7GZ4OHUCN0syqcsLpqyvQUb gllhgSROGuVEY2Q5RyMbVhbbmBHHyy3kPzEgDiEogmh9ket0qJ41jNnNmb9iuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTvGDWRvCUkNsh1kRansgFWkDtOIqe01kgHT8vbVxcg=; b=v0tzhJ1xfx+OPZdjfm/peF/ckvW89va1zy7ozJMBb1EzfW/TeOOwewn5ywYcdPFw3KmGDi QUG6he28oaNoDrebFDPM9SCpmRvR8qMYC0l87Nmh0Vl0CV6cLy6EB3uzBmAUf6PLOIEyty cK6ETedN8O7J3DXb88Vmye3UBJlQMGMfun2tQg9nRqE0fVYngNKt8/eEsbifT3EiBm4Tjx CHqBt05AZFT0KJU80nkEeptAayK1MS44vi3q7B1VnRLLcKaQTst0thMP9sUS5UllJWlz5P o/E7C4D9E1KFYaXgH/Rp7oCGTJH83lRjqAZ8S12e+Uj9skeYAv0o+wxfGC5SBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138877; a=rsa-sha256; cv=none; b=cZ61OYPB6nsEKy770PGNTQS7JfGvJY/xpCnxFflB+4/vJYsUFx++1ppXMFv0nr0k1+dpRm TUuVHd5MK8LRKmSyxHz5CIa6n/BUwjPb4joJwngri9QQgaRMWaPXR1HRspFJIJ4KJ/aHOg AJU1yhoET5MUQMsih8nGClJGjGu/OMi3CWvuJGaETmZI1QoDAMC4B0K+Z2eXMQKa3/1cQG 1GHLUPRP2dhKcdZM8qJbG39h76NtGM3VoCLH+OQojrjGJXPyt7hLqVrWdbfNq6rUO1dLeR CRL01DxudXiIGC66za2z0D7F8vs6osvtizID0lT7RklACyPV0k75ibV5IqFm3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvv06P0Xz19td; Wed, 20 Nov 2024 21:41:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLfGi1021992; Wed, 20 Nov 2024 21:41:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfGoa021989; Wed, 20 Nov 2024 21:41:16 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:16 GMT Message-Id: <202411202141.4AKLfGoa021989@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: c7aea0912655 - stable/14 - gve: Add DQO RDA 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: c7aea091265580ea178df1ee2d26cda3c7aef75b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c7aea091265580ea178df1ee2d26cda3c7aef75b commit c7aea091265580ea178df1ee2d26cda3c7aef75b Author: Shailend Chand AuthorDate: 2024-11-05 19:38:29 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 gve: Add DQO RDA support DQO is the descriptor format for our next generation virtual NIC. It is necessary to make full use of the hardware bandwidth on many newer GCP VM shapes. One major change with DQO from its predecessor GQI is that it uses dual descriptor rings for both TX and RX queues. The TX path uses a descriptor ring to send descriptors to HW, and receives packet completion events on a TX completion ring. The RX path posts buffers to HW using an RX descriptor ring and receives incoming packets on an RX completion ring. In GQI-QPL, the hardware could not access arbitrary regions of guest memory, which is why there was a pre-negotitated bounce buffer (QPL: Queue Page List). DQO-RDA has no such limitation. "RDA" is in contrast to QPL and stands for "Raw DMA Addressing" which just means that HW does not need a fixed bounce buffer and can DMA arbitrary regions of guest memory. A subsequent patch will introduce the DQO-QPL datapath that uses the same descriptor format as in this patch, but will have a fixed bounce buffer. Signed-off-by: Shailend Chand Reviewed-by: markj MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46690 (cherry picked from commit d438b4ef0cfc6986b93d0754f49ebf3ead50f269) --- share/man/man4/gve.4 | 53 +++- sys/conf/files | 2 + sys/dev/gve/gve.h | 213 +++++++++++-- sys/dev/gve/gve_adminq.c | 123 +++++++- sys/dev/gve/gve_adminq.h | 55 +++- sys/dev/gve/gve_dqo.h | 306 ++++++++++++++++++ sys/dev/gve/gve_main.c | 67 +++- sys/dev/gve/gve_plat.h | 3 + sys/dev/gve/gve_rx.c | 110 +++++-- sys/dev/gve/gve_rx_dqo.c | 633 +++++++++++++++++++++++++++++++++++++ sys/dev/gve/gve_sysctl.c | 60 +++- sys/dev/gve/gve_tx.c | 139 ++++++--- sys/dev/gve/gve_tx_dqo.c | 793 +++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/gve/gve_utils.c | 46 ++- sys/modules/gve/Makefile | 12 +- 15 files changed, 2471 insertions(+), 144 deletions(-) diff --git a/share/man/man4/gve.4 b/share/man/man4/gve.4 index 7dba99e68773..82db2af548ae 100644 --- a/share/man/man4/gve.4 +++ b/share/man/man4/gve.4 @@ -1,6 +1,6 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" -.\" Copyright (c) 2023 Google LLC +.\" Copyright (c) 2023-2024 Google LLC .\" .\" Redistribution and use in source and binary forms, with or without modification, .\" are permitted provided that the following conditions are met: @@ -26,7 +26,7 @@ .\" ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd April 26, 2023 +.Dd October 14, 2024 .Dt GVE 4 .Os .Sh NAME @@ -192,16 +192,61 @@ These two messages correspoond to the NIC alerting the driver to link state chan .Pp Apart from these messages, the driver exposes per-queue packet and error counters as sysctl nodes. Global (across queues) counters can be read using -.Xr netstat 8 . +.Xr netstat 1 . +.Sh SYSCTL VARIABLES +.Nm +exposes the following +.Xr sysctl 8 +variables: +.Bl -tag -width indent +.It Va hw.gve.driver_version +The driver version. +This is read-only. +.It Va hw.gve.queue_format +The queue format in use. +This is read-only. +.It Va hw.gve.disable_hw_lro +Setting this boot-time tunable to 1 disables Large Receive Offload (LRO) in the NIC. +The default value is 0, which means hardware LRO is enabled by default. +The software LRO stack in the kernel is always used. +This sysctl variable needs to be set before loading the driver, using +.Xr loader.conf 5 . +.El .Sh LIMITATIONS .Nm does not support the transmission of VLAN-tagged packets. All VLAN-tagged traffic is dropped. +.Sh QUEUE FORMATS +.Nm +features different datapath modes called queue formats: +.Pp +.Bl -bullet -compact +.It +GQI_QPL: "QPL" stands for "Queue Page List" and refers to the fact that +hardware expects a fixed bounce buffer and cannot access arbitrary memory. +GQI is the older descriptor format. +The G in "GQI" refers to an older generation of hardware, and the "QI" +stands for "Queue In-order" referring to the fact that the NIC sends +Tx and Rx completions in the same order as the one in which the corresponding +descriptors were posted by the driver. +.It +DQO_RDA: DQO is the descriptor format required to take full advantage of +next generation VM shapes. +"RDA" stands for "Raw DMA Addressing" and refers to the fact that hardware +can work with DMA-ed packets and does not expect them to be copied into or +out of a fixed bounce buffer. +The D in "DQO" refers to a newer generation of hardware, and the "QO" +stands for "Queue Out-of-order" referring to the fact that the NIC might +send Tx and Rx completions in an order different from the one in which +the corresponding descriptors were posted by the driver. +.El .Sh SUPPORT Please email gvnic-drivers@google.com with the specifics of the issue encountered. .Sh SEE ALSO +.Xr netstat 1 , +.Xr loader.conf 5 , .Xr ifconfig 8 , -.Xr netstat 8 +.Xr sysctl 8 .Sh HISTORY The .Nm diff --git a/sys/conf/files b/sys/conf/files index 3810032f7094..68ca2fe2e6ec 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1737,8 +1737,10 @@ dev/gve/gve_adminq.c optional gve dev/gve/gve_main.c optional gve dev/gve/gve_qpl.c optional gve dev/gve/gve_rx.c optional gve +dev/gve/gve_rx_dqo.c optional gve dev/gve/gve_sysctl.c optional gve dev/gve/gve_tx.c optional gve +dev/gve/gve_tx_dqo.c optional gve dev/gve/gve_utils.c optional gve dev/goldfish/goldfish_rtc.c optional goldfish_rtc fdt dev/gpio/acpi_gpiobus.c optional acpi gpio diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h index c446199dff2d..98f1139c6bc2 100644 --- a/sys/dev/gve/gve.h +++ b/sys/dev/gve/gve.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * - * Copyright (c) 2023 Google LLC + * Copyright (c) 2023-2024 Google LLC * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -53,6 +53,9 @@ /* Each RX bounce buffer page can fit two packet buffers. */ #define GVE_DEFAULT_RX_BUFFER_OFFSET (PAGE_SIZE / 2) +/* PTYPEs are always 10 bits. */ +#define GVE_NUM_PTYPES 1024 + /* * Number of descriptors per queue page list. * Page count AKA QPL size can be derived by dividing the number of elements in @@ -224,30 +227,61 @@ struct gve_rxq_stats { counter_u64_t rx_frag_copy_cnt; counter_u64_t rx_dropped_pkt_desc_err; counter_u64_t rx_dropped_pkt_mbuf_alloc_fail; + counter_u64_t rx_mbuf_dmamap_err; + counter_u64_t rx_mbuf_mclget_null; }; #define NUM_RX_STATS (sizeof(struct gve_rxq_stats) / sizeof(counter_u64_t)) +struct gve_rx_buf_dqo { + struct mbuf *mbuf; + bus_dmamap_t dmamap; + uint64_t addr; + bool mapped; + SLIST_ENTRY(gve_rx_buf_dqo) slist_entry; +}; + /* power-of-2 sized receive ring */ struct gve_rx_ring { struct gve_ring_com com; struct gve_dma_handle desc_ring_mem; - struct gve_dma_handle data_ring_mem; - - /* accessed in the receive hot path */ - struct { - struct gve_rx_desc *desc_ring; - union gve_rx_data_slot *data_ring; - struct gve_rx_slot_page_info *page_info; - - struct gve_rx_ctx ctx; - struct lro_ctrl lro; - uint8_t seq_no; /* helps traverse the descriptor ring */ - uint32_t cnt; /* free-running total number of completed packets */ - uint32_t fill_cnt; /* free-running total number of descs and buffs posted */ - uint32_t mask; /* masks the cnt and fill_cnt to the size of the ring */ - struct gve_rxq_stats stats; - } __aligned(CACHE_LINE_SIZE); + uint32_t cnt; /* free-running total number of completed packets */ + uint32_t fill_cnt; /* free-running total number of descs and buffs posted */ + + union { + /* GQI-only fields */ + struct { + struct gve_dma_handle data_ring_mem; + + /* accessed in the GQ receive hot path */ + struct gve_rx_desc *desc_ring; + union gve_rx_data_slot *data_ring; + struct gve_rx_slot_page_info *page_info; + uint32_t mask; /* masks the cnt and fill_cnt to the size of the ring */ + uint8_t seq_no; /* helps traverse the descriptor ring */ + }; + + /* DQO-only fields */ + struct { + struct gve_dma_handle compl_ring_mem; + + struct gve_rx_compl_desc_dqo *compl_ring; + struct gve_rx_desc_dqo *desc_ring; + struct gve_rx_buf_dqo *bufs; /* Parking place for posted buffers */ + bus_dma_tag_t buf_dmatag; /* To dmamap posted mbufs with */ + + uint32_t buf_cnt; /* Size of the bufs array */ + uint32_t mask; /* One less than the sizes of the desc and compl rings */ + uint32_t head; /* The index at which to post the next buffer at */ + uint32_t tail; /* The index at which to receive the next compl at */ + uint8_t cur_gen_bit; /* Gets flipped on every cycle of the compl ring */ + SLIST_HEAD(, gve_rx_buf_dqo) free_bufs; + } dqo; + }; + + struct lro_ctrl lro; + struct gve_rx_ctx ctx; + struct gve_rxq_stats stats; } __aligned(CACHE_LINE_SIZE); @@ -277,11 +311,26 @@ struct gve_txq_stats { counter_u64_t tx_dropped_pkt; counter_u64_t tx_dropped_pkt_nospace_device; counter_u64_t tx_dropped_pkt_nospace_bufring; + counter_u64_t tx_delayed_pkt_nospace_descring; + counter_u64_t tx_delayed_pkt_nospace_compring; + counter_u64_t tx_delayed_pkt_tsoerr; counter_u64_t tx_dropped_pkt_vlan; + counter_u64_t tx_mbuf_collapse; + counter_u64_t tx_mbuf_defrag; + counter_u64_t tx_mbuf_defrag_err; + counter_u64_t tx_mbuf_dmamap_enomem_err; + counter_u64_t tx_mbuf_dmamap_err; }; #define NUM_TX_STATS (sizeof(struct gve_txq_stats) / sizeof(counter_u64_t)) +struct gve_tx_pending_pkt_dqo { + struct mbuf *mbuf; + bus_dmamap_t dmamap; + uint8_t state; /* the gve_packet_state enum */ + int next; /* To chain the free_pending_pkts lists */ +}; + /* power-of-2 sized transmit ring */ struct gve_tx_ring { struct gve_ring_com com; @@ -290,22 +339,95 @@ struct gve_tx_ring { struct task xmit_task; struct taskqueue *xmit_tq; - /* accessed in the transmit hot path */ - struct { - union gve_tx_desc *desc_ring; - struct gve_tx_buffer_state *info; - struct buf_ring *br; + /* Accessed when writing descriptors */ + struct buf_ring *br; + struct mtx ring_mtx; + + uint32_t req; /* free-running total number of packets written to the nic */ + uint32_t done; /* free-running total number of completed packets */ + + union { + /* GQI specific stuff */ + struct { + union gve_tx_desc *desc_ring; + struct gve_tx_buffer_state *info; + + struct gve_tx_fifo fifo; + + uint32_t mask; /* masks the req and done to the size of the ring */ + }; + + /* DQO specific stuff */ + struct { + struct gve_dma_handle compl_ring_mem; + + /* Accessed when writing descriptors */ + struct { + union gve_tx_desc_dqo *desc_ring; + uint32_t desc_mask; /* masks head and tail to the size of desc_ring */ + uint32_t desc_head; /* last desc read by NIC, cached value of hw_tx_head */ + uint32_t desc_tail; /* last desc written by driver */ + uint32_t last_re_idx; /* desc which last had "report event" set */ + + /* + * The head index of a singly linked list containing pending packet objects + * to park mbufs till the NIC sends completions. Once this list is depleted, + * the "_prd" suffixed producer list, grown by the completion taskqueue, + * is stolen. + */ + int32_t free_pending_pkts_csm; + + bus_dma_tag_t buf_dmatag; /* DMA params for mapping Tx mbufs */ + } __aligned(CACHE_LINE_SIZE); + + /* Accessed when processing completions */ + struct { + struct gve_tx_compl_desc_dqo *compl_ring; + uint32_t compl_mask; /* masks head to the size of compl_ring */ + uint32_t compl_head; /* last completion read by driver */ + uint8_t cur_gen_bit; /* NIC flips a bit on every pass */ + uint32_t hw_tx_head; /* last desc read by NIC */ + + /* + * The completion taskqueue moves pending-packet objects to this + * list after freeing the mbuf. The "_prd" denotes that this is + * a producer list. The trasnmit taskqueue steals this list once + * its consumer list, with the "_csm" suffix, is depleted. + */ + int32_t free_pending_pkts_prd; + } __aligned(CACHE_LINE_SIZE); + + /* Accessed by both the completion and xmit loops */ + struct { + /* completion tags index into this array */ + struct gve_tx_pending_pkt_dqo *pending_pkts; + uint16_t num_pending_pkts; + } __aligned(CACHE_LINE_SIZE); + } dqo; + }; + struct gve_txq_stats stats; +} __aligned(CACHE_LINE_SIZE); - struct gve_tx_fifo fifo; - struct mtx ring_mtx; +enum gve_packet_state { + /* + * Packet does not yet have a dmamap created. + * This should always be zero since state is not explicitly initialized. + */ + GVE_PACKET_STATE_UNALLOCATED, + /* Packet has a dmamap and is in free list, available to be allocated. */ + GVE_PACKET_STATE_FREE, + /* Packet is expecting a regular data completion */ + GVE_PACKET_STATE_PENDING_DATA_COMPL, +}; - uint32_t req; /* free-running total number of packets written to the nic */ - uint32_t done; /* free-running total number of completed packets */ - uint32_t mask; /* masks the req and done to the size of the ring */ - struct gve_txq_stats stats; - } __aligned(CACHE_LINE_SIZE); +struct gve_ptype { + uint8_t l3_type; /* `gve_l3_type` in gve_adminq.h */ + uint8_t l4_type; /* `gve_l4_type` in gve_adminq.h */ +}; -} __aligned(CACHE_LINE_SIZE); +struct gve_ptype_lut { + struct gve_ptype ptypes[GVE_NUM_PTYPES]; +}; struct gve_priv { if_t ifp; @@ -348,6 +470,8 @@ struct gve_priv { struct gve_tx_ring *tx; struct gve_rx_ring *rx; + struct gve_ptype_lut *ptype_lut_dqo; + /* * Admin queue - see gve_adminq.h * Since AQ cmds do not run in steady state, 32 bit counters suffice @@ -370,6 +494,7 @@ struct gve_priv { uint32_t adminq_dcfg_device_resources_cnt; uint32_t adminq_set_driver_parameter_cnt; uint32_t adminq_verify_driver_compatibility_cnt; + uint32_t adminq_get_ptype_map_cnt; uint32_t interface_up_cnt; uint32_t interface_down_cnt; @@ -400,6 +525,12 @@ gve_clear_state_flag(struct gve_priv *priv, int pos) BIT_CLR_ATOMIC(GVE_NUM_STATE_FLAGS, pos, &priv->state_flags); } +static inline bool +gve_is_gqi(struct gve_priv *priv) +{ + return (priv->queue_format == GVE_GQI_QPL_FORMAT); +} + /* Defined in gve_main.c */ void gve_schedule_reset(struct gve_priv *priv); @@ -407,6 +538,7 @@ void gve_schedule_reset(struct gve_priv *priv); uint32_t gve_reg_bar_read_4(struct gve_priv *priv, bus_size_t offset); void gve_reg_bar_write_4(struct gve_priv *priv, bus_size_t offset, uint32_t val); void gve_db_bar_write_4(struct gve_priv *priv, bus_size_t offset, uint32_t val); +void gve_db_bar_dqo_write_4(struct gve_priv *priv, bus_size_t offset, uint32_t val); /* QPL (Queue Page List) functions defined in gve_qpl.c */ int gve_alloc_qpls(struct gve_priv *priv); @@ -425,6 +557,14 @@ void gve_qflush(if_t ifp); void gve_xmit_tq(void *arg, int pending); void gve_tx_cleanup_tq(void *arg, int pending); +/* TX functions defined in gve_tx_dqo.c */ +int gve_tx_alloc_ring_dqo(struct gve_priv *priv, int i); +void gve_tx_free_ring_dqo(struct gve_priv *priv, int i); +void gve_clear_tx_ring_dqo(struct gve_priv *priv, int i); +int gve_tx_intr_dqo(void *arg); +int gve_xmit_dqo(struct gve_tx_ring *tx, struct mbuf **mbuf_ptr); +void gve_tx_cleanup_tq_dqo(void *arg, int pending); + /* RX functions defined in gve_rx.c */ int gve_alloc_rx_rings(struct gve_priv *priv); void gve_free_rx_rings(struct gve_priv *priv); @@ -433,6 +573,14 @@ int gve_destroy_rx_rings(struct gve_priv *priv); int gve_rx_intr(void *arg); void gve_rx_cleanup_tq(void *arg, int pending); +/* RX functions defined in gve_rx_dqo.c */ +int gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i); +void gve_rx_free_ring_dqo(struct gve_priv *priv, int i); +void gve_rx_prefill_buffers_dqo(struct gve_rx_ring *rx); +void gve_clear_rx_ring_dqo(struct gve_priv *priv, int i); +int gve_rx_intr_dqo(void *arg); +void gve_rx_cleanup_tq_dqo(void *arg, int pending); + /* DMA functions defined in gve_utils.c */ int gve_dma_alloc_coherent(struct gve_priv *priv, int size, int align, struct gve_dma_handle *dma); @@ -447,7 +595,10 @@ int gve_alloc_irqs(struct gve_priv *priv); void gve_unmask_all_queue_irqs(struct gve_priv *priv); void gve_mask_all_queue_irqs(struct gve_priv *priv); -/* Systcl functions defined in gve_sysctl.c*/ +/* Systcl functions defined in gve_sysctl.c */ +extern bool gve_disable_hw_lro; +extern char gve_queue_format[8]; +extern char gve_version[8]; void gve_setup_sysctl(struct gve_priv *priv); void gve_accum_stats(struct gve_priv *priv, uint64_t *rpackets, uint64_t *rbytes, uint64_t *rx_dropped_pkt, uint64_t *tpackets, diff --git a/sys/dev/gve/gve_adminq.c b/sys/dev/gve/gve_adminq.c index 3c332607ebd4..7865b979888b 100644 --- a/sys/dev/gve/gve_adminq.c +++ b/sys/dev/gve/gve_adminq.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * - * Copyright (c) 2023 Google LLC + * Copyright (c) 2023-2024 Google LLC * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -57,6 +57,7 @@ void gve_parse_device_option(struct gve_priv *priv, struct gve_device_descriptor *device_descriptor, struct gve_device_option *option, struct gve_device_option_gqi_qpl **dev_op_gqi_qpl, + struct gve_device_option_dqo_rda **dev_op_dqo_rda, struct gve_device_option_jumbo_frames **dev_op_jumbo_frames) { uint32_t req_feat_mask = be32toh(option->required_features_mask); @@ -85,6 +86,23 @@ void gve_parse_device_option(struct gve_priv *priv, *dev_op_gqi_qpl = (void *)(option + 1); break; + case GVE_DEV_OPT_ID_DQO_RDA: + if (option_length < sizeof(**dev_op_dqo_rda) || + req_feat_mask != GVE_DEV_OPT_REQ_FEAT_MASK_DQO_RDA) { + device_printf(priv->dev, GVE_DEVICE_OPTION_ERROR_FMT, + "DQO RDA", (int)sizeof(**dev_op_dqo_rda), + GVE_DEV_OPT_REQ_FEAT_MASK_DQO_RDA, + option_length, req_feat_mask); + break; + } + + if (option_length > sizeof(**dev_op_dqo_rda)) { + device_printf(priv->dev, GVE_DEVICE_OPTION_TOO_BIG_FMT, + "DQO RDA"); + } + *dev_op_dqo_rda = (void *)(option + 1); + break; + case GVE_DEV_OPT_ID_JUMBO_FRAMES: if (option_length < sizeof(**dev_op_jumbo_frames) || req_feat_mask != GVE_DEV_OPT_REQ_FEAT_MASK_JUMBO_FRAMES) { @@ -117,6 +135,7 @@ static int gve_process_device_options(struct gve_priv *priv, struct gve_device_descriptor *descriptor, struct gve_device_option_gqi_qpl **dev_op_gqi_qpl, + struct gve_device_option_dqo_rda **dev_op_dqo_rda, struct gve_device_option_jumbo_frames **dev_op_jumbo_frames) { char *desc_end = (char *)descriptor + be16toh(descriptor->total_length); @@ -130,12 +149,12 @@ gve_process_device_options(struct gve_priv *priv, if ((char *)(dev_opt + 1) > desc_end || (char *)(dev_opt + 1) + be16toh(dev_opt->option_length) > desc_end) { device_printf(priv->dev, - "options exceed device_descriptor's total length.\n"); + "options exceed device descriptor's total length.\n"); return (EINVAL); } gve_parse_device_option(priv, descriptor, dev_opt, - dev_op_gqi_qpl, dev_op_jumbo_frames); + dev_op_gqi_qpl, dev_op_dqo_rda, dev_op_jumbo_frames); dev_opt = (void *)((char *)(dev_opt + 1) + be16toh(dev_opt->option_length)); } @@ -221,16 +240,35 @@ gve_adminq_create_rx_queue(struct gve_priv *priv, uint32_t queue_index) cmd.opcode = htobe32(GVE_ADMINQ_CREATE_RX_QUEUE); cmd.create_rx_queue = (struct gve_adminq_create_rx_queue) { .queue_id = htobe32(queue_index), - .index = htobe32(queue_index), .ntfy_id = htobe32(rx->com.ntfy_id), .queue_resources_addr = htobe64(qres_dma->bus_addr), - .rx_desc_ring_addr = htobe64(rx->desc_ring_mem.bus_addr), - .rx_data_ring_addr = htobe64(rx->data_ring_mem.bus_addr), - .queue_page_list_id = htobe32((rx->com.qpl)->id), .rx_ring_size = htobe16(priv->rx_desc_cnt), .packet_buffer_size = htobe16(GVE_DEFAULT_RX_BUFFER_SIZE), }; + if (gve_is_gqi(priv)) { + cmd.create_rx_queue.rx_desc_ring_addr = + htobe64(rx->desc_ring_mem.bus_addr); + cmd.create_rx_queue.rx_data_ring_addr = + htobe64(rx->data_ring_mem.bus_addr); + cmd.create_rx_queue.index = + htobe32(queue_index); + cmd.create_rx_queue.queue_page_list_id = + htobe32((rx->com.qpl)->id); + } else { + cmd.create_rx_queue.queue_page_list_id = + htobe32(GVE_RAW_ADDRESSING_QPL_ID); + cmd.create_rx_queue.rx_desc_ring_addr = + htobe64(rx->dqo.compl_ring_mem.bus_addr); + cmd.create_rx_queue.rx_data_ring_addr = + htobe64(rx->desc_ring_mem.bus_addr); + cmd.create_rx_queue.rx_buff_ring_size = + htobe16(priv->rx_desc_cnt); + cmd.create_rx_queue.enable_rsc = + !!((if_getcapenable(priv->ifp) & IFCAP_LRO) && + !gve_disable_hw_lro); + } + return (gve_adminq_execute_cmd(priv, &cmd)); } @@ -272,11 +310,21 @@ gve_adminq_create_tx_queue(struct gve_priv *priv, uint32_t queue_index) .queue_id = htobe32(queue_index), .queue_resources_addr = htobe64(qres_dma->bus_addr), .tx_ring_addr = htobe64(tx->desc_ring_mem.bus_addr), - .queue_page_list_id = htobe32((tx->com.qpl)->id), .ntfy_id = htobe32(tx->com.ntfy_id), .tx_ring_size = htobe16(priv->tx_desc_cnt), }; + if (gve_is_gqi(priv)) { + cmd.create_tx_queue.queue_page_list_id = + htobe32((tx->com.qpl)->id); + } else { + cmd.create_tx_queue.queue_page_list_id = + htobe32(GVE_RAW_ADDRESSING_QPL_ID); + cmd.create_tx_queue.tx_comp_ring_addr = + htobe64(tx->dqo.compl_ring_mem.bus_addr); + cmd.create_tx_queue.tx_comp_ring_size = + htobe16(priv->tx_desc_cnt); + } return (gve_adminq_execute_cmd(priv, &cmd)); } @@ -338,6 +386,7 @@ gve_adminq_describe_device(struct gve_priv *priv) struct gve_device_descriptor *desc; struct gve_dma_handle desc_mem; struct gve_device_option_gqi_qpl *dev_op_gqi_qpl = NULL; + struct gve_device_option_dqo_rda *dev_op_dqo_rda = NULL; struct gve_device_option_jumbo_frames *dev_op_jumbo_frames = NULL; uint32_t supported_features_mask = 0; int rc; @@ -366,12 +415,24 @@ gve_adminq_describe_device(struct gve_priv *priv) bus_dmamap_sync(desc_mem.tag, desc_mem.map, BUS_DMASYNC_POSTREAD); - rc = gve_process_device_options(priv, desc, &dev_op_gqi_qpl, + rc = gve_process_device_options(priv, desc, + &dev_op_gqi_qpl, &dev_op_dqo_rda, &dev_op_jumbo_frames); if (rc != 0) goto free_device_descriptor; - if (dev_op_gqi_qpl != NULL) { + if (dev_op_dqo_rda != NULL) { + snprintf(gve_queue_format, sizeof(gve_queue_format), + "%s", "DQO RDA"); + priv->queue_format = GVE_DQO_RDA_FORMAT; + supported_features_mask = be32toh( + dev_op_dqo_rda->supported_features_mask); + if (bootverbose) + device_printf(priv->dev, + "Driver is running with DQO RDA queue format.\n"); + } else if (dev_op_gqi_qpl != NULL) { + snprintf(gve_queue_format, sizeof(gve_queue_format), + "%s", "GQI QPL"); priv->queue_format = GVE_GQI_QPL_FORMAT; supported_features_mask = be32toh( dev_op_gqi_qpl->supported_features_mask); @@ -380,7 +441,7 @@ gve_adminq_describe_device(struct gve_priv *priv) "Driver is running with GQI QPL queue format.\n"); } else { device_printf(priv->dev, "No compatible queue formats\n"); - rc = (EINVAL); + rc = EINVAL; goto free_device_descriptor; } @@ -506,6 +567,41 @@ gve_adminq_verify_driver_compatibility(struct gve_priv *priv, return (gve_adminq_execute_cmd(priv, &aq_cmd)); } +int +gve_adminq_get_ptype_map_dqo(struct gve_priv *priv, + struct gve_ptype_lut *ptype_lut_dqo) +{ + struct gve_adminq_command aq_cmd = (struct gve_adminq_command){}; + struct gve_ptype_map *ptype_map; + struct gve_dma_handle dma; + int err = 0; + int i; + + err = gve_dma_alloc_coherent(priv, sizeof(*ptype_map), PAGE_SIZE, &dma); + if (err) + return (err); + ptype_map = dma.cpu_addr; + + aq_cmd.opcode = htobe32(GVE_ADMINQ_GET_PTYPE_MAP); + aq_cmd.get_ptype_map = (struct gve_adminq_get_ptype_map) { + .ptype_map_len = htobe64(sizeof(*ptype_map)), + .ptype_map_addr = htobe64(dma.bus_addr), + }; + + err = gve_adminq_execute_cmd(priv, &aq_cmd); + if (err) + goto err; + + /* Populate ptype_lut_dqo. */ + for (i = 0; i < GVE_NUM_PTYPES; i++) { + ptype_lut_dqo->ptypes[i].l3_type = ptype_map->ptypes[i].l3_type; + ptype_lut_dqo->ptypes[i].l4_type = ptype_map->ptypes[i].l4_type; + } +err: + gve_dma_free_coherent(&dma); + return (err); +} + int gve_adminq_alloc(struct gve_priv *priv) { @@ -543,6 +639,7 @@ gve_adminq_alloc(struct gve_priv *priv) priv->adminq_destroy_rx_queue_cnt = 0; priv->adminq_dcfg_device_resources_cnt = 0; priv->adminq_set_driver_parameter_cnt = 0; + priv->adminq_get_ptype_map_cnt = 0; gve_reg_bar_write_4(priv, GVE_REG_ADMINQ_ADDR, priv->adminq_bus_addr / ADMINQ_SIZE); @@ -772,6 +869,10 @@ gve_adminq_issue_cmd(struct gve_priv *priv, struct gve_adminq_command *cmd_orig) priv->adminq_verify_driver_compatibility_cnt++; break; + case GVE_ADMINQ_GET_PTYPE_MAP: + priv->adminq_get_ptype_map_cnt++; + break; + default: device_printf(priv->dev, "Unknown AQ command opcode %d\n", opcode); } diff --git a/sys/dev/gve/gve_adminq.h b/sys/dev/gve/gve_adminq.h index 5923e5f353d1..b5d512331d42 100644 --- a/sys/dev/gve/gve_adminq.h +++ b/sys/dev/gve/gve_adminq.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * - * Copyright (c) 2023 Google LLC + * Copyright (c) 2023-2024 Google LLC * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -137,9 +137,11 @@ _Static_assert(sizeof(struct gve_device_option_gqi_qpl) == 4, struct gve_device_option_dqo_rda { __be32 supported_features_mask; + __be16 tx_comp_ring_entries; + __be16 rx_buff_ring_entries; }; -_Static_assert(sizeof(struct gve_device_option_dqo_rda) == 4, +_Static_assert(sizeof(struct gve_device_option_dqo_rda) == 8, "gve: bad admin queue struct length"); struct gve_device_option_modify_ring { @@ -196,7 +198,6 @@ enum gve_driver_capability { gve_driver_capability_gqi_rda = 1, gve_driver_capability_dqo_qpl = 2, /* reserved for future use */ gve_driver_capability_dqo_rda = 3, - gve_driver_capability_alt_miss_compl = 4, }; #define GVE_CAP1(a) BIT((int) a) @@ -209,7 +210,9 @@ enum gve_driver_capability { * Only a few bits (as shown in `gve_driver_compatibility`) are currently * defined. The rest are reserved for future use. */ -#define GVE_DRIVER_CAPABILITY_FLAGS1 (GVE_CAP1(gve_driver_capability_gqi_qpl)) +#define GVE_DRIVER_CAPABILITY_FLAGS1 \ + (GVE_CAP1(gve_driver_capability_gqi_qpl) | \ + GVE_CAP1(gve_driver_capability_dqo_rda)) #define GVE_DRIVER_CAPABILITY_FLAGS2 0x0 #define GVE_DRIVER_CAPABILITY_FLAGS3 0x0 #define GVE_DRIVER_CAPABILITY_FLAGS4 0x0 @@ -282,6 +285,8 @@ struct gve_adminq_create_tx_queue { _Static_assert(sizeof(struct gve_adminq_create_tx_queue) == 48, "gve: bad admin queue struct length"); +#define GVE_RAW_ADDRESSING_QPL_ID 0xFFFFFFFF + struct gve_adminq_create_rx_queue { __be32 queue_id; __be32 index; @@ -352,6 +357,23 @@ struct stats { _Static_assert(sizeof(struct stats) == 16, "gve: bad admin queue struct length"); +/* These are control path types for PTYPE which are the same as the data path + * types. + */ +struct gve_ptype_entry { + uint8_t l3_type; + uint8_t l4_type; +}; + +struct gve_ptype_map { + struct gve_ptype_entry ptypes[1 << 10]; /* PTYPES are always 10 bits. */ +}; + +struct gve_adminq_get_ptype_map { + __be64 ptype_map_len; + __be64 ptype_map_addr; +}; + struct gve_adminq_command { __be32 opcode; __be32 status; @@ -368,6 +390,7 @@ struct gve_adminq_command { struct gve_adminq_set_driver_parameter set_driver_param; struct gve_adminq_verify_driver_compatibility verify_driver_compatibility; + struct gve_adminq_get_ptype_map get_ptype_map; uint8_t reserved[56]; }; }; @@ -375,6 +398,24 @@ struct gve_adminq_command { _Static_assert(sizeof(struct gve_adminq_command) == 64, "gve: bad admin queue struct length"); +enum gve_l3_type { + /* Must be zero so zero initialized LUT is unknown. */ + GVE_L3_TYPE_UNKNOWN = 0, + GVE_L3_TYPE_OTHER, + GVE_L3_TYPE_IPV4, + GVE_L3_TYPE_IPV6, +}; + +enum gve_l4_type { + /* Must be zero so zero initialized LUT is unknown. */ + GVE_L4_TYPE_UNKNOWN = 0, + GVE_L4_TYPE_OTHER, + GVE_L4_TYPE_TCP, + GVE_L4_TYPE_UDP, + GVE_L4_TYPE_ICMP, + GVE_L4_TYPE_SCTP, +}; + int gve_adminq_create_rx_queues(struct gve_priv *priv, uint32_t num_queues); int gve_adminq_create_tx_queues(struct gve_priv *priv, uint32_t num_queues); int gve_adminq_destroy_tx_queues(struct gve_priv *priv, uint32_t num_queues); @@ -387,8 +428,10 @@ int gve_adminq_configure_device_resources(struct gve_priv *priv); int gve_adminq_deconfigure_device_resources(struct gve_priv *priv); void gve_release_adminq(struct gve_priv *priv); int gve_adminq_register_page_list(struct gve_priv *priv, - struct gve_queue_page_list *qpl); + struct gve_queue_page_list *qpl); int gve_adminq_unregister_page_list(struct gve_priv *priv, uint32_t page_list_id); int gve_adminq_verify_driver_compatibility(struct gve_priv *priv, - uint64_t driver_info_len, vm_paddr_t driver_info_addr); + uint64_t driver_info_len, vm_paddr_t driver_info_addr); +int gve_adminq_get_ptype_map_dqo(struct gve_priv *priv, + struct gve_ptype_lut *ptype_lut); #endif /* _GVE_AQ_H_ */ diff --git a/sys/dev/gve/gve_dqo.h b/sys/dev/gve/gve_dqo.h new file mode 100644 index 000000000000..5f3f36d2245f --- /dev/null +++ b/sys/dev/gve/gve_dqo.h @@ -0,0 +1,306 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 2024 Google LLC + * + * 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. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 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. + */ + +/* GVE DQO Descriptor formats */ + +#ifndef _GVE_DESC_DQO_H_ +#define _GVE_DESC_DQO_H_ + +#include "gve_plat.h" + +#define GVE_ITR_ENABLE_BIT_DQO BIT(0) +#define GVE_ITR_NO_UPDATE_DQO (3 << 3) +#define GVE_ITR_INTERVAL_DQO_SHIFT 5 +#define GVE_ITR_INTERVAL_DQO_MASK ((1 << 12) - 1) +#define GVE_TX_IRQ_RATELIMIT_US_DQO 50 +#define GVE_RX_IRQ_RATELIMIT_US_DQO 20 + +#define GVE_TX_MAX_HDR_SIZE_DQO 255 +#define GVE_TX_MIN_TSO_MSS_DQO 88 + +/* + * Ringing the doorbell too often can hurt performance. + * + * HW requires this value to be at least 8. + */ +#define GVE_RX_BUF_THRESH_DQO 32 + +/* + * Start dropping RX fragments if at least these many + * buffers cannot be posted to the NIC. + */ +#define GVE_RX_DQO_MIN_PENDING_BUFS 32 + +/* Basic TX descriptor (DTYPE 0x0C) */ +struct gve_tx_pkt_desc_dqo { + __le64 buf_addr; + + /* Must be GVE_TX_PKT_DESC_DTYPE_DQO (0xc) */ + uint8_t dtype:5; + + /* Denotes the last descriptor of a packet. */ + uint8_t end_of_packet:1; + uint8_t checksum_offload_enable:1; + + /* If set, will generate a descriptor completion for this descriptor. */ + uint8_t report_event:1; + uint8_t reserved0; + __le16 reserved1; + + /* The TX completion for this packet will contain this tag. */ + __le16 compl_tag; + uint16_t buf_size:14; + uint16_t reserved2:2; +} __packed; +_Static_assert(sizeof(struct gve_tx_pkt_desc_dqo) == 16, + "gve: bad dqo desc struct length"); + +#define GVE_TX_PKT_DESC_DTYPE_DQO 0xc + +/* + * Maximum number of data descriptors allowed per packet, or per-TSO segment. + */ +#define GVE_TX_MAX_DATA_DESCS_DQO 10 +#define GVE_TX_MAX_BUF_SIZE_DQO ((16 * 1024) - 1) +#define GVE_TSO_MAXSIZE_DQO IP_MAXPACKET + +_Static_assert(GVE_TX_MAX_BUF_SIZE_DQO * GVE_TX_MAX_DATA_DESCS_DQO >= + GVE_TSO_MAXSIZE_DQO, + "gve: bad tso parameters"); + +/* + * "report_event" on TX packet descriptors may only be reported on the last + * descriptor of a TX packet, and they must be spaced apart with at least this + * value. + */ +#define GVE_TX_MIN_RE_INTERVAL 32 + +struct gve_tx_context_cmd_dtype { + uint8_t dtype:5; + uint8_t tso:1; + uint8_t reserved1:2; + uint8_t reserved2; +}; + +_Static_assert(sizeof(struct gve_tx_context_cmd_dtype) == 2, + "gve: bad dqo desc struct length"); + +/* + * TX Native TSO Context DTYPE (0x05) + * + * "flex" fields allow the driver to send additional packet context to HW. + */ +struct gve_tx_tso_context_desc_dqo { + /* The L4 payload bytes that should be segmented. */ + uint32_t tso_total_len:24; + uint32_t flex10:8; + + /* Max segment size in TSO excluding headers. */ + uint16_t mss:14; + uint16_t reserved:2; + + uint8_t header_len; /* Header length to use for TSO offload */ + uint8_t flex11; + struct gve_tx_context_cmd_dtype cmd_dtype; + uint8_t flex0; + uint8_t flex5; + uint8_t flex6; + uint8_t flex7; + uint8_t flex8; + uint8_t flex9; +} __packed; +_Static_assert(sizeof(struct gve_tx_tso_context_desc_dqo) == 16, + "gve: bad dqo desc struct length"); + +#define GVE_TX_TSO_CTX_DESC_DTYPE_DQO 0x5 *** 2433 LINES SKIPPED *** From nobody Wed Nov 20 21:41:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvv50Lxwz5dnLP; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv20drXz4vY2; Wed, 20 Nov 2024 21:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03Ia9PK4sTptF/fggEma1rC2jDNuAYwIAv3IjvkQ9wA=; b=cv4XOM0cYgQa//EkvfShYVmKKDoyKm4sW9GQWbRv+Cde0iHkkhY9ZM6QxaVm4IbrgnAKEk 8ZdkLiCnTQQowrZHIz188Nvl1zxfzm7hbFy/NkEg/9FIfjra7wOl+mpLe/sN4I9jDCRYmz rgdsykLMiljSRsAQX0nrTqNxGHAjiyIRXgWr+iwmQQOinOYG2X7tZS1Vft9vuLCDSWgEAl qcP3XCbDOhuYy4zEgnofXf2YUZZ2UAC9gbiHa32mhsq2qzKpUuGDlBntyOTGphitk1nidg fCJEk1QUSUdk+zb53JdRhD8aiXdYiYLkqPUnM4nObMoFO+G1YIyzRHiL258abg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03Ia9PK4sTptF/fggEma1rC2jDNuAYwIAv3IjvkQ9wA=; b=mTYrpxwzuZo4KCAjJmLtv6jpHIs2+WubFaCsE3Llv9uzB5XU+UgmNsYnyGXsM5YDig4emj 4kBv2vBhc6lBBP2ukTmIaHNQSMGhrmOExZnnR1QFV3VoMiKJYxQ1sU8rSBmqEWjBGLb6eB gnUFutDg9yHBZea2OT1k7DcXbGkMp0Ds8CLPXiUt6f7ixvJl2QqMlmPLUvB4XzSO99pnpa 8xNeawMolaqemBGCgZK/Jiap1+7TpL7z4/SB6NOlpTKROWFQRNZBLJGPOAHf/7xHX6vfnO YDjW91dKg2leHaCC7YXUpMfz+PDEVnvdgE87d/0GYAVb9z0XUV1NkA+C9omy5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138878; a=rsa-sha256; cv=none; b=mGeVL8KLaeVJpfNbTe7tGBkGKrD41507/XPHKViuWb8hwOcUITUf3+Cv1xMlAbvRJBeHkL O8nw2MVp0A6wIy35hCHqK+8frzw/JE1xPRmhS9HbhwD9dhelCydBbzNPWe/HZZ8XS5YuFv kOGfEhz4b7txNujzaA7QKiLJK5FOE/gtCpPa7O3SapyNHw2oyApze7tA0xXq3jEoc3jA/u TM/ZZOCc+LveaJcJg2Sgyy+ZfuAGMKi0+573zLGIrvbzbH4RH3Pqi0G0d2jjUemEYyX/Nx yAhIM8AnFtwc6u67Yn8Dm7fo2wgPB4L2KDhVZ98UY0+a2a8F8laSPtK1HPTgXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvv207L2z19kg; Wed, 20 Nov 2024 21:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLfHr5022034; Wed, 20 Nov 2024 21:41:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfHVk022031; Wed, 20 Nov 2024 21:41:17 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:17 GMT Message-Id: <202411202141.4AKLfHVk022031@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: 1bda36a393c2 - stable/14 - gve: Add DQO QPL 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 1bda36a393c24a05581522a9dc56b4f6f5b53e10 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1bda36a393c24a05581522a9dc56b4f6f5b53e10 commit 1bda36a393c24a05581522a9dc56b4f6f5b53e10 Author: Shailend Chand AuthorDate: 2024-11-05 19:38:30 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 gve: Add DQO QPL support DQO is the descriptor format for our next generation virtual NIC. It is necessary to make full use of the hardware bandwidth on many newer GCP VM shapes. This patch extends the previously introduced DQO descriptor format with a "QPL" mode. QPL stands for Queue Page List and refers to the fact that the hardware cannot access arbitrary regions of the host memory and instead expects a fixed bounce buffer comprising of a list of pages. The QPL aspects are similar to the already existing GQI queue queue format: in that the mbufs being input in the Rx path have external storage in the form of vm pages attached to them; and in the Tx path we always copy the mbuf payload into QPL pages. Signed-off-by: Shailend Chand Reviewed-by: markj MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46691 (cherry picked from commit 2348ac893d10f06d2d84e1e4bd5ca9f1c5da92d8) --- share/man/man4/gve.4 | 2 + sys/dev/gve/gve.h | 101 ++++++++++- sys/dev/gve/gve_adminq.c | 38 +++- sys/dev/gve/gve_adminq.h | 14 +- sys/dev/gve/gve_dqo.h | 17 +- sys/dev/gve/gve_main.c | 20 ++- sys/dev/gve/gve_qpl.c | 32 +++- sys/dev/gve/gve_rx.c | 18 -- sys/dev/gve/gve_rx_dqo.c | 449 +++++++++++++++++++++++++++++++++++++++++++---- sys/dev/gve/gve_sysctl.c | 8 + sys/dev/gve/gve_tx.c | 5 +- sys/dev/gve/gve_tx_dqo.c | 425 ++++++++++++++++++++++++++++++++++++-------- 12 files changed, 983 insertions(+), 146 deletions(-) diff --git a/share/man/man4/gve.4 b/share/man/man4/gve.4 index 82db2af548ae..8c2b3cabbd38 100644 --- a/share/man/man4/gve.4 +++ b/share/man/man4/gve.4 @@ -239,6 +239,8 @@ The D in "DQO" refers to a newer generation of hardware, and the "QO" stands for "Queue Out-of-order" referring to the fact that the NIC might send Tx and Rx completions in an order different from the one in which the corresponding descriptors were posted by the driver. +.It +DQO_QPL: The next generation descriptor format in the "QPL" mode. .El .Sh SUPPORT Please email gvnic-drivers@google.com with the specifics of the issue encountered. diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h index 98f1139c6bc2..43082d64ba95 100644 --- a/sys/dev/gve/gve.h +++ b/sys/dev/gve/gve.h @@ -105,6 +105,7 @@ enum gve_queue_format { GVE_GQI_RDA_FORMAT = 0x1, GVE_GQI_QPL_FORMAT = 0x2, GVE_DQO_RDA_FORMAT = 0x3, + GVE_DQO_QPL_FORMAT = 0x4, }; enum gve_state_flags_bit { @@ -226,6 +227,7 @@ struct gve_rxq_stats { counter_u64_t rx_frag_flip_cnt; counter_u64_t rx_frag_copy_cnt; counter_u64_t rx_dropped_pkt_desc_err; + counter_u64_t rx_dropped_pkt_buf_post_fail; counter_u64_t rx_dropped_pkt_mbuf_alloc_fail; counter_u64_t rx_mbuf_dmamap_err; counter_u64_t rx_mbuf_mclget_null; @@ -233,11 +235,34 @@ struct gve_rxq_stats { #define NUM_RX_STATS (sizeof(struct gve_rxq_stats) / sizeof(counter_u64_t)) +union gve_rx_qpl_buf_id_dqo { + struct { + uint16_t buf_id:11; /* Index into rx->dqo.bufs */ + uint8_t frag_num:5; /* Which frag in the QPL page */ + }; + uint16_t all; +} __packed; +_Static_assert(sizeof(union gve_rx_qpl_buf_id_dqo) == 2, + "gve: bad dqo qpl rx buf id length"); + struct gve_rx_buf_dqo { - struct mbuf *mbuf; - bus_dmamap_t dmamap; - uint64_t addr; - bool mapped; + union { + /* RDA */ + struct { + struct mbuf *mbuf; + bus_dmamap_t dmamap; + uint64_t addr; + bool mapped; + }; + /* QPL */ + struct { + uint8_t num_nic_frags; /* number of pending completions */ + uint8_t next_idx; /* index of the next frag to post */ + /* for chaining rx->dqo.used_bufs */ + STAILQ_ENTRY(gve_rx_buf_dqo) stailq_entry; + }; + }; + /* for chaining rx->dqo.free_bufs */ SLIST_ENTRY(gve_rx_buf_dqo) slist_entry; }; @@ -276,6 +301,13 @@ struct gve_rx_ring { uint32_t tail; /* The index at which to receive the next compl at */ uint8_t cur_gen_bit; /* Gets flipped on every cycle of the compl ring */ SLIST_HEAD(, gve_rx_buf_dqo) free_bufs; + + /* + * Only used in QPL mode. Pages refered to by if_input-ed mbufs + * stay parked here till their wire count comes back to 1. + * Pages are moved here after there aren't any pending completions. + */ + STAILQ_HEAD(, gve_rx_buf_dqo) used_bufs; } dqo; }; @@ -313,6 +345,7 @@ struct gve_txq_stats { counter_u64_t tx_dropped_pkt_nospace_bufring; counter_u64_t tx_delayed_pkt_nospace_descring; counter_u64_t tx_delayed_pkt_nospace_compring; + counter_u64_t tx_delayed_pkt_nospace_qpl_bufs; counter_u64_t tx_delayed_pkt_tsoerr; counter_u64_t tx_dropped_pkt_vlan; counter_u64_t tx_mbuf_collapse; @@ -326,7 +359,19 @@ struct gve_txq_stats { struct gve_tx_pending_pkt_dqo { struct mbuf *mbuf; - bus_dmamap_t dmamap; + union { + /* RDA */ + bus_dmamap_t dmamap; + /* QPL */ + struct { + /* + * A linked list of entries from qpl_bufs that served + * as the bounce buffer for this packet. + */ + int32_t qpl_buf_head; + uint32_t num_qpl_bufs; + }; + }; uint8_t state; /* the gve_packet_state enum */ int next; /* To chain the free_pending_pkts lists */ }; @@ -377,7 +422,20 @@ struct gve_tx_ring { */ int32_t free_pending_pkts_csm; - bus_dma_tag_t buf_dmatag; /* DMA params for mapping Tx mbufs */ + /* + * The head index of a singly linked list representing QPL page fragments + * to copy mbuf payload into for the NIC to see. Once this list is depleted, + * the "_prd" suffixed producer list, grown by the completion taskqueue, + * is stolen. + * + * Only used in QPL mode. int32_t because atomic_swap_16 doesn't exist. + */ + int32_t free_qpl_bufs_csm; + uint32_t qpl_bufs_consumed; /* Allows quickly checking for buf availability */ + uint32_t qpl_bufs_produced_cached; /* Cached value of qpl_bufs_produced */ + + /* DMA params for mapping Tx mbufs. Only used in RDA mode. */ + bus_dma_tag_t buf_dmatag; } __aligned(CACHE_LINE_SIZE); /* Accessed when processing completions */ @@ -395,6 +453,18 @@ struct gve_tx_ring { * its consumer list, with the "_csm" suffix, is depleted. */ int32_t free_pending_pkts_prd; + + /* + * The completion taskqueue moves the QPL pages corresponding to a + * completed packet into this list. It is only used in QPL mode. + * The "_prd" denotes that this is a producer list. The trasnmit + * taskqueue steals this list once its consumer list, with the "_csm" + * suffix, is depleted. + * + * Only used in QPL mode. int32_t because atomic_swap_16 doesn't exist. + */ + int32_t free_qpl_bufs_prd; + uint32_t qpl_bufs_produced; } __aligned(CACHE_LINE_SIZE); /* Accessed by both the completion and xmit loops */ @@ -402,6 +472,16 @@ struct gve_tx_ring { /* completion tags index into this array */ struct gve_tx_pending_pkt_dqo *pending_pkts; uint16_t num_pending_pkts; + + /* + * Represents QPL page fragments. An index into this array + * always represents the same QPL page fragment. The value + * is also an index into this array and servers as a means + * to chain buffers into linked lists whose heads are + * either free_qpl_bufs_prd or free_qpl_bufs_csm or + * qpl_bufs_head. + */ + int32_t *qpl_bufs; } __aligned(CACHE_LINE_SIZE); } dqo; }; @@ -531,6 +611,13 @@ gve_is_gqi(struct gve_priv *priv) return (priv->queue_format == GVE_GQI_QPL_FORMAT); } +static inline bool +gve_is_qpl(struct gve_priv *priv) +{ + return (priv->queue_format == GVE_GQI_QPL_FORMAT || + priv->queue_format == GVE_DQO_QPL_FORMAT); +} + /* Defined in gve_main.c */ void gve_schedule_reset(struct gve_priv *priv); @@ -545,6 +632,7 @@ int gve_alloc_qpls(struct gve_priv *priv); void gve_free_qpls(struct gve_priv *priv); int gve_register_qpls(struct gve_priv *priv); int gve_unregister_qpls(struct gve_priv *priv); +void gve_mextadd_free(struct mbuf *mbuf); /* TX functions defined in gve_tx.c */ int gve_alloc_tx_rings(struct gve_priv *priv); @@ -563,6 +651,7 @@ void gve_tx_free_ring_dqo(struct gve_priv *priv, int i); void gve_clear_tx_ring_dqo(struct gve_priv *priv, int i); int gve_tx_intr_dqo(void *arg); int gve_xmit_dqo(struct gve_tx_ring *tx, struct mbuf **mbuf_ptr); +int gve_xmit_dqo_qpl(struct gve_tx_ring *tx, struct mbuf *mbuf); void gve_tx_cleanup_tq_dqo(void *arg, int pending); /* RX functions defined in gve_rx.c */ diff --git a/sys/dev/gve/gve_adminq.c b/sys/dev/gve/gve_adminq.c index 7865b979888b..dd03f817f45a 100644 --- a/sys/dev/gve/gve_adminq.c +++ b/sys/dev/gve/gve_adminq.c @@ -58,6 +58,7 @@ void gve_parse_device_option(struct gve_priv *priv, struct gve_device_option *option, struct gve_device_option_gqi_qpl **dev_op_gqi_qpl, struct gve_device_option_dqo_rda **dev_op_dqo_rda, + struct gve_device_option_dqo_qpl **dev_op_dqo_qpl, struct gve_device_option_jumbo_frames **dev_op_jumbo_frames) { uint32_t req_feat_mask = be32toh(option->required_features_mask); @@ -103,6 +104,23 @@ void gve_parse_device_option(struct gve_priv *priv, *dev_op_dqo_rda = (void *)(option + 1); break; + case GVE_DEV_OPT_ID_DQO_QPL: + if (option_length < sizeof(**dev_op_dqo_qpl) || + req_feat_mask != GVE_DEV_OPT_REQ_FEAT_MASK_DQO_QPL) { + device_printf(priv->dev, GVE_DEVICE_OPTION_ERROR_FMT, + "DQO QPL", (int)sizeof(**dev_op_dqo_qpl), + GVE_DEV_OPT_REQ_FEAT_MASK_DQO_QPL, + option_length, req_feat_mask); + break; + } + + if (option_length > sizeof(**dev_op_dqo_qpl)) { + device_printf(priv->dev, GVE_DEVICE_OPTION_TOO_BIG_FMT, + "DQO QPL"); + } + *dev_op_dqo_qpl = (void *)(option + 1); + break; + case GVE_DEV_OPT_ID_JUMBO_FRAMES: if (option_length < sizeof(**dev_op_jumbo_frames) || req_feat_mask != GVE_DEV_OPT_REQ_FEAT_MASK_JUMBO_FRAMES) { @@ -136,6 +154,7 @@ gve_process_device_options(struct gve_priv *priv, struct gve_device_descriptor *descriptor, struct gve_device_option_gqi_qpl **dev_op_gqi_qpl, struct gve_device_option_dqo_rda **dev_op_dqo_rda, + struct gve_device_option_dqo_qpl **dev_op_dqo_qpl, struct gve_device_option_jumbo_frames **dev_op_jumbo_frames) { char *desc_end = (char *)descriptor + be16toh(descriptor->total_length); @@ -154,7 +173,10 @@ gve_process_device_options(struct gve_priv *priv, } gve_parse_device_option(priv, descriptor, dev_opt, - dev_op_gqi_qpl, dev_op_dqo_rda, dev_op_jumbo_frames); + dev_op_gqi_qpl, + dev_op_dqo_rda, + dev_op_dqo_qpl, + dev_op_jumbo_frames); dev_opt = (void *)((char *)(dev_opt + 1) + be16toh(dev_opt->option_length)); } @@ -387,6 +409,7 @@ gve_adminq_describe_device(struct gve_priv *priv) struct gve_dma_handle desc_mem; struct gve_device_option_gqi_qpl *dev_op_gqi_qpl = NULL; struct gve_device_option_dqo_rda *dev_op_dqo_rda = NULL; + struct gve_device_option_dqo_qpl *dev_op_dqo_qpl = NULL; struct gve_device_option_jumbo_frames *dev_op_jumbo_frames = NULL; uint32_t supported_features_mask = 0; int rc; @@ -416,7 +439,9 @@ gve_adminq_describe_device(struct gve_priv *priv) bus_dmamap_sync(desc_mem.tag, desc_mem.map, BUS_DMASYNC_POSTREAD); rc = gve_process_device_options(priv, desc, - &dev_op_gqi_qpl, &dev_op_dqo_rda, + &dev_op_gqi_qpl, + &dev_op_dqo_rda, + &dev_op_dqo_qpl, &dev_op_jumbo_frames); if (rc != 0) goto free_device_descriptor; @@ -430,6 +455,15 @@ gve_adminq_describe_device(struct gve_priv *priv) if (bootverbose) device_printf(priv->dev, "Driver is running with DQO RDA queue format.\n"); + } else if (dev_op_dqo_qpl != NULL) { + snprintf(gve_queue_format, sizeof(gve_queue_format), + "%s", "DQO QPL"); + priv->queue_format = GVE_DQO_QPL_FORMAT; + supported_features_mask = be32toh( + dev_op_dqo_qpl->supported_features_mask); + if (bootverbose) + device_printf(priv->dev, + "Driver is running with DQO QPL queue format.\n"); } else if (dev_op_gqi_qpl != NULL) { snprintf(gve_queue_format, sizeof(gve_queue_format), "%s", "GQI QPL"); diff --git a/sys/dev/gve/gve_adminq.h b/sys/dev/gve/gve_adminq.h index b5d512331d42..37a7cb3ecbb8 100644 --- a/sys/dev/gve/gve_adminq.h +++ b/sys/dev/gve/gve_adminq.h @@ -144,6 +144,15 @@ struct gve_device_option_dqo_rda { _Static_assert(sizeof(struct gve_device_option_dqo_rda) == 8, "gve: bad admin queue struct length"); +struct gve_device_option_dqo_qpl { + __be32 supported_features_mask; + __be16 tx_comp_ring_entries; + __be16 rx_buff_ring_entries; +}; + +_Static_assert(sizeof(struct gve_device_option_dqo_qpl) == 8, + "gve: bad admin queue struct length"); + struct gve_device_option_modify_ring { __be32 supported_features_mask; __be16 max_rx_ring_size; @@ -168,6 +177,7 @@ enum gve_dev_opt_id { GVE_DEV_OPT_ID_GQI_QPL = 0x3, GVE_DEV_OPT_ID_DQO_RDA = 0x4, GVE_DEV_OPT_ID_MODIFY_RING = 0x6, + GVE_DEV_OPT_ID_DQO_QPL = 0x7, GVE_DEV_OPT_ID_JUMBO_FRAMES = 0x8, }; @@ -182,6 +192,7 @@ enum gve_dev_opt_req_feat_mask { GVE_DEV_OPT_REQ_FEAT_MASK_GQI_RDA = 0x0, GVE_DEV_OPT_REQ_FEAT_MASK_GQI_QPL = 0x0, GVE_DEV_OPT_REQ_FEAT_MASK_DQO_RDA = 0x0, + GVE_DEV_OPT_REQ_FEAT_MASK_DQO_QPL = 0x0, GVE_DEV_OPT_REQ_FEAT_MASK_MODIFY_RING = 0x0, GVE_DEV_OPT_REQ_FEAT_MASK_JUMBO_FRAMES = 0x0, }; @@ -196,7 +207,7 @@ enum gve_sup_feature_mask { enum gve_driver_capability { gve_driver_capability_gqi_qpl = 0, gve_driver_capability_gqi_rda = 1, - gve_driver_capability_dqo_qpl = 2, /* reserved for future use */ + gve_driver_capability_dqo_qpl = 2, gve_driver_capability_dqo_rda = 3, }; @@ -212,6 +223,7 @@ enum gve_driver_capability { */ #define GVE_DRIVER_CAPABILITY_FLAGS1 \ (GVE_CAP1(gve_driver_capability_gqi_qpl) | \ + GVE_CAP1(gve_driver_capability_dqo_qpl) | \ GVE_CAP1(gve_driver_capability_dqo_rda)) #define GVE_DRIVER_CAPABILITY_FLAGS2 0x0 #define GVE_DRIVER_CAPABILITY_FLAGS3 0x0 diff --git a/sys/dev/gve/gve_dqo.h b/sys/dev/gve/gve_dqo.h index 5f3f36d2245f..214138303a77 100644 --- a/sys/dev/gve/gve_dqo.h +++ b/sys/dev/gve/gve_dqo.h @@ -57,7 +57,22 @@ * Start dropping RX fragments if at least these many * buffers cannot be posted to the NIC. */ -#define GVE_RX_DQO_MIN_PENDING_BUFS 32 +#define GVE_RX_DQO_MIN_PENDING_BUFS 128 + +#define GVE_DQ_NUM_FRAGS_IN_PAGE (PAGE_SIZE / GVE_DEFAULT_RX_BUFFER_SIZE) + +/* + * gve_rx_qpl_buf_id_dqo's 11 bit wide buf_id field limits the total + * number of pages per QPL to 2048. + */ +#define GVE_RX_NUM_QPL_PAGES_DQO 2048 + +/* 2K TX buffers for DQO-QPL */ +#define GVE_TX_BUF_SHIFT_DQO 11 +#define GVE_TX_BUF_SIZE_DQO BIT(GVE_TX_BUF_SHIFT_DQO) +#define GVE_TX_BUFS_PER_PAGE_DQO (PAGE_SIZE >> GVE_TX_BUF_SHIFT_DQO) + +#define GVE_TX_NUM_QPL_PAGES_DQO 512 /* Basic TX descriptor (DTYPE 0x0C) */ struct gve_tx_pkt_desc_dqo { diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index 3fa8fec51910..5575c82f0681 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -32,9 +32,9 @@ #include "gve_adminq.h" #include "gve_dqo.h" -#define GVE_DRIVER_VERSION "GVE-FBSD-1.2.0\n" +#define GVE_DRIVER_VERSION "GVE-FBSD-1.3.0\n" #define GVE_VERSION_MAJOR 1 -#define GVE_VERSION_MINOR 2 +#define GVE_VERSION_MINOR 3 #define GVE_VERSION_SUB 0 #define GVE_DEFAULT_RX_COPYBREAK 256 @@ -125,7 +125,7 @@ gve_up(struct gve_priv *priv) if (if_getcapenable(ifp) & IFCAP_TSO6) if_sethwassistbits(ifp, CSUM_IP6_TSO, 0); - if (gve_is_gqi(priv)) { + if (gve_is_qpl(priv)) { err = gve_register_qpls(priv); if (err != 0) goto reset; @@ -177,7 +177,7 @@ gve_down(struct gve_priv *priv) if (gve_destroy_tx_rings(priv) != 0) goto reset; - if (gve_is_gqi(priv)) { + if (gve_is_qpl(priv)) { if (gve_unregister_qpls(priv) != 0) goto reset; } @@ -375,13 +375,15 @@ gve_setup_ifnet(device_t dev, struct gve_priv *priv) /* * Set TSO limits, must match the arguments to bus_dma_tag_create - * when creating tx->dqo.buf_dmatag + * when creating tx->dqo.buf_dmatag. Only applies to the RDA mode + * because in QPL we copy the entire pakcet into the bounce buffer + * and thus it does not matter how fragmented the mbuf is. */ - if (!gve_is_gqi(priv)) { - if_sethwtsomax(ifp, GVE_TSO_MAXSIZE_DQO); + if (!gve_is_gqi(priv) && !gve_is_qpl(priv)) { if_sethwtsomaxsegcount(ifp, GVE_TX_MAX_DATA_DESCS_DQO); if_sethwtsomaxsegsize(ifp, GVE_TX_MAX_BUF_SIZE_DQO); } + if_sethwtsomax(ifp, GVE_TSO_MAXSIZE_DQO); #if __FreeBSD_version >= 1400086 if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); @@ -465,7 +467,7 @@ gve_free_rings(struct gve_priv *priv) gve_free_irqs(priv); gve_free_tx_rings(priv); gve_free_rx_rings(priv); - if (gve_is_gqi(priv)) + if (gve_is_qpl(priv)) gve_free_qpls(priv); } @@ -474,7 +476,7 @@ gve_alloc_rings(struct gve_priv *priv) { int err; - if (gve_is_gqi(priv)) { + if (gve_is_qpl(priv)) { err = gve_alloc_qpls(priv); if (err != 0) goto abort; diff --git a/sys/dev/gve/gve_qpl.c b/sys/dev/gve/gve_qpl.c index 9a946a2a2f2d..1fcc2b5365c9 100644 --- a/sys/dev/gve/gve_qpl.c +++ b/sys/dev/gve/gve_qpl.c @@ -32,13 +32,14 @@ #include "gve.h" #include "gve_adminq.h" +#include "gve_dqo.h" static MALLOC_DEFINE(M_GVE_QPL, "gve qpl", "gve qpl allocations"); static uint32_t gve_num_tx_qpls(struct gve_priv *priv) { - if (priv->queue_format != GVE_GQI_QPL_FORMAT) + if (!gve_is_qpl(priv)) return (0); return (priv->tx_cfg.max_queues); @@ -47,7 +48,7 @@ gve_num_tx_qpls(struct gve_priv *priv) static uint32_t gve_num_rx_qpls(struct gve_priv *priv) { - if (priv->queue_format != GVE_GQI_QPL_FORMAT) + if (!gve_is_qpl(priv)) return (0); return (priv->rx_cfg.max_queues); @@ -189,6 +190,7 @@ gve_free_qpls(struct gve_priv *priv) int gve_alloc_qpls(struct gve_priv *priv) { int num_qpls = gve_num_tx_qpls(priv) + gve_num_rx_qpls(priv); + int num_pages; int err; int i; @@ -198,15 +200,19 @@ int gve_alloc_qpls(struct gve_priv *priv) priv->qpls = malloc(num_qpls * sizeof(*priv->qpls), M_GVE_QPL, M_WAITOK | M_ZERO); + num_pages = gve_is_gqi(priv) ? + priv->tx_desc_cnt / GVE_QPL_DIVISOR : + GVE_TX_NUM_QPL_PAGES_DQO; for (i = 0; i < gve_num_tx_qpls(priv); i++) { - err = gve_alloc_qpl(priv, i, priv->tx_desc_cnt / GVE_QPL_DIVISOR, + err = gve_alloc_qpl(priv, i, num_pages, /*single_kva=*/true); if (err != 0) goto abort; } + num_pages = gve_is_gqi(priv) ? priv->rx_desc_cnt : GVE_RX_NUM_QPL_PAGES_DQO; for (; i < num_qpls; i++) { - err = gve_alloc_qpl(priv, i, priv->rx_desc_cnt, /*single_kva=*/false); + err = gve_alloc_qpl(priv, i, num_pages, /*single_kva=*/false); if (err != 0) goto abort; } @@ -283,3 +289,21 @@ gve_unregister_qpls(struct gve_priv *priv) gve_clear_state_flag(priv, GVE_STATE_FLAG_QPLREG_OK); return (0); } + +void +gve_mextadd_free(struct mbuf *mbuf) +{ + vm_page_t page = (vm_page_t)mbuf->m_ext.ext_arg1; + vm_offset_t va = (vm_offset_t)mbuf->m_ext.ext_arg2; + + /* + * Free the page only if this is the last ref. + * The interface might no longer exist by the time + * this callback is called, see gve_free_qpl. + */ + if (__predict_false(vm_page_unwire_noq(page))) { + pmap_qremove(va, 1); + kva_free(va, PAGE_SIZE); + vm_page_free(page); + } +} diff --git a/sys/dev/gve/gve_rx.c b/sys/dev/gve/gve_rx.c index 69bb13fc56c6..35f22f2308f0 100644 --- a/sys/dev/gve/gve_rx.c +++ b/sys/dev/gve/gve_rx.c @@ -409,24 +409,6 @@ gve_set_rss_type(__be16 flag, struct mbuf *mbuf) } } -static void -gve_mextadd_free(struct mbuf *mbuf) -{ - vm_page_t page = (vm_page_t)mbuf->m_ext.ext_arg1; - vm_offset_t va = (vm_offset_t)mbuf->m_ext.ext_arg2; - - /* - * Free the page only if this is the last ref. - * The interface might no longer exist by the time - * this callback is called, see gve_free_qpl. - */ - if (__predict_false(vm_page_unwire_noq(page))) { - pmap_qremove(va, 1); - kva_free(va, PAGE_SIZE); - vm_page_free(page); - } -} - static void gve_rx_flip_buff(struct gve_rx_slot_page_info *page_info, __be64 *slot_addr) { diff --git a/sys/dev/gve/gve_rx_dqo.c b/sys/dev/gve/gve_rx_dqo.c index b391449328e1..6c5d656aaa04 100644 --- a/sys/dev/gve/gve_rx_dqo.c +++ b/sys/dev/gve/gve_rx_dqo.c @@ -38,6 +38,9 @@ gve_free_rx_mbufs_dqo(struct gve_rx_ring *rx) struct gve_rx_buf_dqo *buf; int i; + if (gve_is_qpl(rx->com.priv)) + return; + for (i = 0; i < rx->dqo.buf_cnt; i++) { buf = &rx->dqo.bufs[i]; if (!buf->mbuf) @@ -70,7 +73,7 @@ gve_rx_free_ring_dqo(struct gve_priv *priv, int i) if (rx->dqo.bufs != NULL) { gve_free_rx_mbufs_dqo(rx); - if (rx->dqo.buf_dmatag) { + if (!gve_is_qpl(priv) && rx->dqo.buf_dmatag) { for (j = 0; j < rx->dqo.buf_cnt; j++) if (rx->dqo.bufs[j].mapped) bus_dmamap_destroy(rx->dqo.buf_dmatag, @@ -81,7 +84,7 @@ gve_rx_free_ring_dqo(struct gve_priv *priv, int i) rx->dqo.bufs = NULL; } - if (rx->dqo.buf_dmatag) + if (!gve_is_qpl(priv) && rx->dqo.buf_dmatag) bus_dma_tag_destroy(rx->dqo.buf_dmatag); } @@ -103,6 +106,31 @@ gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i) rx->dqo.desc_ring = rx->desc_ring_mem.cpu_addr; rx->dqo.mask = priv->rx_desc_cnt - 1; + err = gve_dma_alloc_coherent(priv, + sizeof(struct gve_rx_compl_desc_dqo) * priv->rx_desc_cnt, + CACHE_LINE_SIZE, &rx->dqo.compl_ring_mem); + if (err != 0) { + device_printf(priv->dev, + "Failed to alloc compl ring for rx ring %d", i); + goto abort; + } + rx->dqo.compl_ring = rx->dqo.compl_ring_mem.cpu_addr; + rx->dqo.mask = priv->rx_desc_cnt - 1; + + rx->dqo.buf_cnt = gve_is_qpl(priv) ? GVE_RX_NUM_QPL_PAGES_DQO : + priv->rx_desc_cnt; + rx->dqo.bufs = malloc(rx->dqo.buf_cnt * sizeof(struct gve_rx_buf_dqo), + M_GVE, M_WAITOK | M_ZERO); + + if (gve_is_qpl(priv)) { + rx->com.qpl = &priv->qpls[priv->tx_cfg.max_queues + i]; + if (rx->com.qpl == NULL) { + device_printf(priv->dev, "No QPL left for rx ring %d", i); + return (ENOMEM); + } + return (0); + } + err = bus_dma_tag_create( bus_get_dma_tag(priv->dev), /* parent */ 1, 0, /* alignment, bounds */ @@ -123,9 +151,6 @@ gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i) goto abort; } - rx->dqo.buf_cnt = priv->rx_desc_cnt; - rx->dqo.bufs = malloc(rx->dqo.buf_cnt * sizeof(struct gve_rx_buf_dqo), - M_GVE, M_WAITOK | M_ZERO); for (j = 0; j < rx->dqo.buf_cnt; j++) { err = bus_dmamap_create(rx->dqo.buf_dmatag, 0, &rx->dqo.bufs[j].dmamap); @@ -138,17 +163,6 @@ gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i) rx->dqo.bufs[j].mapped = true; } - err = gve_dma_alloc_coherent(priv, - sizeof(struct gve_rx_compl_desc_dqo) * priv->rx_desc_cnt, - CACHE_LINE_SIZE, &rx->dqo.compl_ring_mem); - if (err != 0) { - device_printf(priv->dev, - "Failed to alloc compl ring for rx ring %d", i); - goto abort; - } - rx->dqo.compl_ring = rx->dqo.compl_ring_mem.cpu_addr; - rx->dqo.mask = priv->rx_desc_cnt - 1; - return (0); abort: @@ -202,10 +216,36 @@ gve_clear_rx_ring_dqo(struct gve_priv *priv, int i) gve_free_rx_mbufs_dqo(rx); - SLIST_INIT(&rx->dqo.free_bufs); - for (j = 0; j < rx->dqo.buf_cnt; j++) - SLIST_INSERT_HEAD(&rx->dqo.free_bufs, - &rx->dqo.bufs[j], slist_entry); + if (gve_is_qpl(priv)) { + SLIST_INIT(&rx->dqo.free_bufs); + STAILQ_INIT(&rx->dqo.used_bufs); + + for (j = 0; j < rx->dqo.buf_cnt; j++) { + struct gve_rx_buf_dqo *buf = &rx->dqo.bufs[j]; + + vm_page_t page = rx->com.qpl->pages[buf - rx->dqo.bufs]; + u_int ref_count = atomic_load_int(&page->ref_count); + + /* + * An ifconfig down+up might see pages still in flight + * from the previous innings. + */ + if (VPRC_WIRE_COUNT(ref_count) == 1) + SLIST_INSERT_HEAD(&rx->dqo.free_bufs, + buf, slist_entry); + else + STAILQ_INSERT_TAIL(&rx->dqo.used_bufs, + buf, stailq_entry); + + buf->num_nic_frags = 0; + buf->next_idx = 0; + } + } else { + SLIST_INIT(&rx->dqo.free_bufs); + for (j = 0; j < rx->dqo.buf_cnt; j++) + SLIST_INSERT_HEAD(&rx->dqo.free_bufs, + &rx->dqo.bufs[j], slist_entry); + } } int @@ -223,6 +263,20 @@ gve_rx_intr_dqo(void *arg) return (FILTER_HANDLED); } +static void +gve_rx_advance_head_dqo(struct gve_rx_ring *rx) +{ + rx->dqo.head = (rx->dqo.head + 1) & rx->dqo.mask; + rx->fill_cnt++; /* rx->fill_cnt is just a sysctl counter */ + + if ((rx->dqo.head & (GVE_RX_BUF_THRESH_DQO - 1)) == 0) { + bus_dmamap_sync(rx->desc_ring_mem.tag, rx->desc_ring_mem.map, + BUS_DMASYNC_PREWRITE); + gve_db_bar_dqo_write_4(rx->com.priv, rx->com.db_offset, + rx->dqo.head); + } +} + static void gve_rx_post_buf_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf) { @@ -235,15 +289,7 @@ gve_rx_post_buf_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf) desc->buf_id = htole16(buf - rx->dqo.bufs); desc->buf_addr = htole64(buf->addr); - rx->dqo.head = (rx->dqo.head + 1) & rx->dqo.mask; - rx->fill_cnt++; /* rx->fill_cnt is just a sysctl counter */ - - if ((rx->dqo.head & (GVE_RX_BUF_THRESH_DQO - 1)) == 0) { - bus_dmamap_sync(rx->desc_ring_mem.tag, rx->desc_ring_mem.map, - BUS_DMASYNC_PREWRITE); - gve_db_bar_dqo_write_4(rx->com.priv, rx->com.db_offset, - rx->dqo.head); - } + gve_rx_advance_head_dqo(rx); } static int @@ -294,6 +340,103 @@ abort_with_buf: return (err); } +static struct gve_dma_handle * +gve_get_page_dma_handle(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf) +{ + return (&(rx->com.qpl->dmas[buf - rx->dqo.bufs])); +} + +static void +gve_rx_post_qpl_buf_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf, + uint8_t frag_num) +{ + struct gve_rx_desc_dqo *desc = &rx->dqo.desc_ring[rx->dqo.head]; + union gve_rx_qpl_buf_id_dqo composed_id; + struct gve_dma_handle *page_dma_handle; + + composed_id.buf_id = buf - rx->dqo.bufs; + composed_id.frag_num = frag_num; + desc->buf_id = htole16(composed_id.all); + + page_dma_handle = gve_get_page_dma_handle(rx, buf); + bus_dmamap_sync(page_dma_handle->tag, page_dma_handle->map, + BUS_DMASYNC_PREREAD); + desc->buf_addr = htole64(page_dma_handle->bus_addr + + frag_num * GVE_DEFAULT_RX_BUFFER_SIZE); + + buf->num_nic_frags++; + gve_rx_advance_head_dqo(rx); +} + +static void +gve_rx_maybe_extract_from_used_bufs(struct gve_rx_ring *rx, bool just_one) +{ + struct gve_rx_buf_dqo *hol_blocker = NULL; + struct gve_rx_buf_dqo *buf; + u_int ref_count; + vm_page_t page; + + while (true) { + buf = STAILQ_FIRST(&rx->dqo.used_bufs); + if (__predict_false(buf == NULL)) + break; + + page = rx->com.qpl->pages[buf - rx->dqo.bufs]; + ref_count = atomic_load_int(&page->ref_count); + + if (VPRC_WIRE_COUNT(ref_count) != 1) { + /* Account for one head-of-line blocker */ + if (hol_blocker != NULL) + break; + hol_blocker = buf; + STAILQ_REMOVE_HEAD(&rx->dqo.used_bufs, + stailq_entry); + continue; + } + + STAILQ_REMOVE_HEAD(&rx->dqo.used_bufs, + stailq_entry); + SLIST_INSERT_HEAD(&rx->dqo.free_bufs, + buf, slist_entry); + if (just_one) + break; + } + + if (hol_blocker != NULL) + STAILQ_INSERT_HEAD(&rx->dqo.used_bufs, + hol_blocker, stailq_entry); +} + +static int +gve_rx_post_new_dqo_qpl_buf(struct gve_rx_ring *rx) +{ + struct gve_rx_buf_dqo *buf; + + buf = SLIST_FIRST(&rx->dqo.free_bufs); + if (__predict_false(buf == NULL)) { + gve_rx_maybe_extract_from_used_bufs(rx, /*just_one=*/true); + buf = SLIST_FIRST(&rx->dqo.free_bufs); + if (__predict_false(buf == NULL)) + return (ENOBUFS); + } + + gve_rx_post_qpl_buf_dqo(rx, buf, buf->next_idx); + if (buf->next_idx == GVE_DQ_NUM_FRAGS_IN_PAGE - 1) + buf->next_idx = 0; + else + buf->next_idx++; + + /* + * We have posted all the frags in this buf to the NIC. + * - buf will enter used_bufs once the last completion arrives. + * - It will renter free_bufs in gve_rx_maybe_extract_from_used_bufs + * when its wire count drops back to 1. + */ + if (buf->next_idx == 0) + SLIST_REMOVE_HEAD(&rx->dqo.free_bufs, slist_entry); + return (0); +} + static void gve_rx_post_buffers_dqo(struct gve_rx_ring *rx, int how) { @@ -306,7 +449,10 @@ gve_rx_post_buffers_dqo(struct gve_rx_ring *rx, int how) num_to_post = rx->dqo.mask - num_pending_bufs; for (i = 0; i < num_to_post; i++) { - err = gve_rx_post_new_mbuf_dqo(rx, how); + if (gve_is_qpl(rx->com.priv)) + err = gve_rx_post_new_dqo_qpl_buf(rx); + else + err = gve_rx_post_new_mbuf_dqo(rx, how); if (err) break; } @@ -427,7 +573,7 @@ gve_rx_input_mbuf_dqo(struct gve_rx_ring *rx, } static int -gve_rx_copybreak_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf, +gve_rx_copybreak_dqo(struct gve_rx_ring *rx, void *va, struct gve_rx_compl_desc_dqo *compl_desc, uint16_t frag_len) { struct mbuf *mbuf; @@ -440,14 +586,13 @@ gve_rx_copybreak_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf, counter_u64_add_protected(rx->stats.rx_copybreak_cnt, 1); counter_exit(); - m_copyback(mbuf, 0, frag_len, mtod(buf->mbuf, char*)); + m_copyback(mbuf, 0, frag_len, va); mbuf->m_len = frag_len; rx->ctx.mbuf_head = mbuf; rx->ctx.mbuf_tail = mbuf; rx->ctx.total_size += frag_len; - gve_rx_post_buf_dqo(rx, buf); gve_rx_input_mbuf_dqo(rx, compl_desc); return (0); } @@ -495,10 +640,12 @@ gve_rx_dqo(struct gve_priv *priv, struct gve_rx_ring *rx, frag_len = compl_desc->packet_len; if (frag_len <= priv->rx_copybreak && !ctx->mbuf_head && is_last_frag) { - err = gve_rx_copybreak_dqo(rx, buf, compl_desc, frag_len); + err = gve_rx_copybreak_dqo(rx, mtod(buf->mbuf, char*), + compl_desc, frag_len); if (__predict_false(err != 0)) goto drop_frag; (*work_done)++; + gve_rx_post_buf_dqo(rx, buf); return; } @@ -579,6 +726,233 @@ drop_frag_clear_ctx: rx->ctx = (struct gve_rx_ctx){}; } +static void * +gve_get_cpu_addr_for_qpl_buf(struct gve_rx_ring *rx, + struct gve_rx_buf_dqo *buf, uint8_t buf_frag_num) +{ + int page_idx = buf - rx->dqo.bufs; + void *va = rx->com.qpl->dmas[page_idx].cpu_addr; + + va = (char *)va + (buf_frag_num * GVE_DEFAULT_RX_BUFFER_SIZE); + return (va); +} + +static int +gve_rx_add_clmbuf_to_ctx(struct gve_rx_ring *rx, + struct gve_rx_ctx *ctx, struct gve_rx_buf_dqo *buf, + uint8_t buf_frag_num, uint16_t frag_len) +{ + void *va = gve_get_cpu_addr_for_qpl_buf(rx, buf, buf_frag_num); + struct mbuf *mbuf; + + if (ctx->mbuf_tail == NULL) { + mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + if (mbuf == NULL) + return (ENOMEM); + ctx->mbuf_head = mbuf; + ctx->mbuf_tail = mbuf; + } else { + mbuf = m_getcl(M_NOWAIT, MT_DATA, 0); + if (mbuf == NULL) + return (ENOMEM); + ctx->mbuf_tail->m_next = mbuf; + ctx->mbuf_tail = mbuf; + } + + mbuf->m_len = frag_len; + ctx->total_size += frag_len; + + m_copyback(mbuf, 0, frag_len, va); + counter_enter(); + counter_u64_add_protected(rx->stats.rx_frag_copy_cnt, 1); + counter_exit(); + return (0); +} + +static int +gve_rx_add_extmbuf_to_ctx(struct gve_rx_ring *rx, + struct gve_rx_ctx *ctx, struct gve_rx_buf_dqo *buf, + uint8_t buf_frag_num, uint16_t frag_len) +{ + struct mbuf *mbuf; + void *page_addr; + vm_page_t page; + int page_idx; + void *va; *** 765 LINES SKIPPED *** From nobody Wed Nov 20 21:41:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvv50TKWz5dn7H; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv31cKVz4vpD; Wed, 20 Nov 2024 21:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oUHydZZ7kDAzaqe7/Dy4PWUNzldW39Y/aIj+upo7QSg=; b=GS5yV3iozCnSFBgrkAI5Q3dF/sIaejX25K6OMKCqJ39xyEKthAGddRXErg1AqJbWMhbBYQ WyJMSJBzfZ3YUst+Dg6Je+8W5/XjV0pg4zREIxJOHJNEt3MM7kTcN3VW2QReVjJqVu4HWv CNed5pOEKLk/B72As4XwWZzAX9K8vzYYMkOVRP/70EoDC2FX8k+qU4iifPT+4E+gjv1fUH oAE6gkHmvHdKQCNHuZkQowvQcG+q7O2+3Jq6hi/9CPKrNMdsrL4dNusOs5GZZ/gqK43Iz3 ikC3+OFFm1X2P6rNj7XBHb0p75WdFWhZPo/TZCpFUnWxRZMKxJkhBLnTO/OojQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oUHydZZ7kDAzaqe7/Dy4PWUNzldW39Y/aIj+upo7QSg=; b=D2mWH+bg6Ve+1gw9mqpvtU3wXSlYivaTfePoGAxxGFk8ESq4QGoCSgQgKbHD2WgCmxpjjp DIKA1+V2srZj+milCblItH2GkC5om97z6RESdjXLFlAZFNnAT4qYNITpwYOytQih3ETBQv xwKeqxcOVDiUXZIAhMSW+aSmCI0SwhpI0KLB0aH/roMvz7FWifPjXGCOZZpqc7Mo+jGWq7 3yVgn464M6UTQw9in2JNMddN9jkAkIeq3h9lg4WgcA8BQtCosAjWlJvFzC19//owTE2lPH T1ZHhON3x/28m47+3RM8x3GLjjfuD7FW8s+6k4/RAe+GRfVaBH3GpgdeWTbayg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138879; a=rsa-sha256; cv=none; b=sEd0y/Wl7N57uBg1SYnjll8C7goRVJQt1vviLE8ViwMNfWVIG51Hx2zK3zI6SEiYfztRFH wgft7MW55dGdPsSYwso5HqRJN+bi/Q7Zlb6w285y2GmPK1A+6Jt+pJFlx6RBY2pvyyA2vP IzkX1zYU7/PI/QBrh7X35JSN9iPHOrthf3z2TdhXdKD5bpegh9TkgKUIDRTVU1rR0r0BDZ idSvyfXC/RgQTaC0CaQJuz5m2g1RtIJW1TrH1/qIxUXWyNpw/WJrEKBRLRqGkuhDyOb/2F SKGfXvlaVQ5rmXhtmou3qjjw/R9t8SS4GoXxqmFQGH/MRRSjfTfUIZcoWP6sFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvv315Ryz1B99; Wed, 20 Nov 2024 21:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLfJRd022073; Wed, 20 Nov 2024 21:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfJ6D022070; Wed, 20 Nov 2024 21:41:19 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:19 GMT Message-Id: <202411202141.4AKLfJ6D022070@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: 3afdae488574 - stable/14 - gve: Fix TX livelock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3afdae4885743a2ed5cec3f08d8d8ec9e9376b59 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3afdae4885743a2ed5cec3f08d8d8ec9e9376b59 commit 3afdae4885743a2ed5cec3f08d8d8ec9e9376b59 Author: Shailend Chand AuthorDate: 2024-11-05 19:38:31 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 gve: Fix TX livelock Before this change the transmit taskqueue would enqueue itself when it cannot find space on the NIC ring with the hope that eventually space would be made. This results in the following livelock that only occurs after passing ~200Gbps of TCP traffic for many hours: 100% CPU ┌───────────┐wait on ┌──────────┐ ┌───────────┐ │user thread│ cpu │gve xmit │wait on │gve cleanup│ │with mbuf ├────────►│taskqueue ├────────►│taskqueue │ │uma lock │ │ │ NIC ring│ │ └───────────┘ └──────────┘ space └─────┬─────┘ ▲ │ │ wait on mbuf uma lock │ └───────────────────────────────────────────┘ Further details about the livelock are available on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281560. After this change, the transmit taskqueue no longer spins till there is room on the NIC ring. It instead stops itself and lets the completion-processing taskqueue wake it up. Since I'm touching the trasnmit taskqueue I've also corrected the name of a counter and also fixed a bug where EINVAL mbufs were not being freed and were instead living forever on the bufring. Signed-off-by: Shailend Chand Reviewed-by: markj MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47138 (cherry picked from commit 40097cd67c0d52e2b288e8555b12faf02768d89c) --- sys/dev/gve/gve.h | 3 +- sys/dev/gve/gve_main.c | 4 +- sys/dev/gve/gve_sysctl.c | 6 +-- sys/dev/gve/gve_tx.c | 98 ++++++++++++++++++++++++++++++++++++++---------- sys/dev/gve/gve_tx_dqo.c | 10 +++++ 5 files changed, 95 insertions(+), 26 deletions(-) diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h index 43082d64ba95..92ab6838d5bb 100644 --- a/sys/dev/gve/gve.h +++ b/sys/dev/gve/gve.h @@ -341,7 +341,7 @@ struct gve_txq_stats { counter_u64_t tpackets; counter_u64_t tso_packet_cnt; counter_u64_t tx_dropped_pkt; - counter_u64_t tx_dropped_pkt_nospace_device; + counter_u64_t tx_delayed_pkt_nospace_device; counter_u64_t tx_dropped_pkt_nospace_bufring; counter_u64_t tx_delayed_pkt_nospace_descring; counter_u64_t tx_delayed_pkt_nospace_compring; @@ -383,6 +383,7 @@ struct gve_tx_ring { struct task xmit_task; struct taskqueue *xmit_tq; + bool stopped; /* Accessed when writing descriptors */ struct buf_ring *br; diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index 5575c82f0681..e40f77b08e85 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -32,10 +32,10 @@ #include "gve_adminq.h" #include "gve_dqo.h" -#define GVE_DRIVER_VERSION "GVE-FBSD-1.3.0\n" +#define GVE_DRIVER_VERSION "GVE-FBSD-1.3.1\n" #define GVE_VERSION_MAJOR 1 #define GVE_VERSION_MINOR 3 -#define GVE_VERSION_SUB 0 +#define GVE_VERSION_SUB 1 #define GVE_DEFAULT_RX_COPYBREAK 256 diff --git a/sys/dev/gve/gve_sysctl.c b/sys/dev/gve/gve_sysctl.c index b9f2eefa5bb0..7a091d9caa43 100644 --- a/sys/dev/gve/gve_sysctl.c +++ b/sys/dev/gve/gve_sysctl.c @@ -140,9 +140,9 @@ gve_setup_txq_sysctl(struct sysctl_ctx_list *ctx, "tx_bytes", CTLFLAG_RD, &stats->tbytes, "Bytes transmitted"); SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, - "tx_dropped_pkt_nospace_device", CTLFLAG_RD, - &stats->tx_dropped_pkt_nospace_device, - "Packets dropped due to no space in device"); + "tx_delayed_pkt_nospace_device", CTLFLAG_RD, + &stats->tx_delayed_pkt_nospace_device, + "Packets delayed due to no space in device"); SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, "tx_dropped_pkt_nospace_bufring", CTLFLAG_RD, &stats->tx_dropped_pkt_nospace_bufring, diff --git a/sys/dev/gve/gve_tx.c b/sys/dev/gve/gve_tx.c index 60a54878b685..e7e10e526cb9 100644 --- a/sys/dev/gve/gve_tx.c +++ b/sys/dev/gve/gve_tx.c @@ -246,6 +246,8 @@ gve_start_tx_ring(struct gve_priv *priv, int i, struct gve_tx_ring *tx = &priv->tx[i]; struct gve_ring_com *com = &tx->com; + atomic_store_bool(&tx->stopped, false); + NET_TASK_INIT(&com->cleanup_task, 0, cleanup, tx); com->cleanup_tq = taskqueue_create_fast("gve tx", M_WAITOK, taskqueue_thread_enqueue, &com->cleanup_tq); @@ -427,6 +429,11 @@ gve_tx_cleanup_tq(void *arg, int pending) gve_db_bar_write_4(priv, tx->com.irq_db_offset, GVE_IRQ_MASK); taskqueue_enqueue(tx->com.cleanup_tq, &tx->com.cleanup_task); } + + if (atomic_load_bool(&tx->stopped) && space_freed) { + atomic_store_bool(&tx->stopped, false); + taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); + } } static void @@ -671,8 +678,7 @@ gve_xmit(struct gve_tx_ring *tx, struct mbuf *mbuf) bytes_required = gve_fifo_bytes_required(tx, first_seg_len, pkt_len); if (__predict_false(!gve_can_tx(tx, bytes_required))) { counter_enter(); - counter_u64_add_protected(tx->stats.tx_dropped_pkt_nospace_device, 1); - counter_u64_add_protected(tx->stats.tx_dropped_pkt, 1); + counter_u64_add_protected(tx->stats.tx_delayed_pkt_nospace_device, 1); counter_exit(); return (ENOBUFS); } @@ -733,6 +739,59 @@ gve_xmit(struct gve_tx_ring *tx, struct mbuf *mbuf) return (0); } +static int +gve_xmit_mbuf(struct gve_tx_ring *tx, + struct mbuf **mbuf) +{ + if (gve_is_gqi(tx->com.priv)) + return (gve_xmit(tx, *mbuf)); + + if (gve_is_qpl(tx->com.priv)) + return (gve_xmit_dqo_qpl(tx, *mbuf)); + + /* + * gve_xmit_dqo might attempt to defrag the mbuf chain. + * The reference is passed in so that in the case of + * errors, the new mbuf chain is what's put back on the br. + */ + return (gve_xmit_dqo(tx, mbuf)); +} + +/* + * Has the side-effect of stopping the xmit queue by setting tx->stopped + */ +static int +gve_xmit_retry_enobuf_mbuf(struct gve_tx_ring *tx, + struct mbuf **mbuf) +{ + int err; + + atomic_store_bool(&tx->stopped, true); + + /* + * Room made in the queue BEFORE the barrier will be seen by the + * gve_xmit_mbuf retry below. + * + * If room is made in the queue AFTER the barrier, the cleanup tq + * iteration creating the room will either see a tx->stopped value + * of 0 or the 1 we just wrote: + * + * If it sees a 1, then it would enqueue the xmit tq. Enqueue + * implies a retry on the waiting pkt. + * + * If it sees a 0, then that implies a previous iteration overwrote + * our 1, and that iteration would enqueue the xmit tq. Enqueue + * implies a retry on the waiting pkt. + */ + atomic_thread_fence_seq_cst(); + + err = gve_xmit_mbuf(tx, mbuf); + if (err == 0) + atomic_store_bool(&tx->stopped, false); + + return (err); +} + static void gve_xmit_br(struct gve_tx_ring *tx) { @@ -743,24 +802,23 @@ gve_xmit_br(struct gve_tx_ring *tx) while ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0 && (mbuf = drbr_peek(ifp, tx->br)) != NULL) { + err = gve_xmit_mbuf(tx, &mbuf); - if (gve_is_gqi(priv)) - err = gve_xmit(tx, mbuf); - else { - /* - * gve_xmit_dqo might attempt to defrag the mbuf chain. - * The reference is passed in so that in the case of - * errors, the new mbuf chain is what's put back on the br. - */ - if (gve_is_qpl(priv)) - err = gve_xmit_dqo_qpl(tx, mbuf); - else - err = gve_xmit_dqo(tx, &mbuf); - } + /* + * We need to stop this taskqueue when we can't xmit the pkt due + * to lack of space in the NIC ring (ENOBUFS). The retry exists + * to guard against a TOCTTOU bug that could end up freezing the + * queue forever. + */ + if (__predict_false(mbuf != NULL && err == ENOBUFS)) + err = gve_xmit_retry_enobuf_mbuf(tx, &mbuf); if (__predict_false(err != 0 && mbuf != NULL)) { - drbr_putback(ifp, tx->br, mbuf); - taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); + if (err == EINVAL) { + drbr_advance(ifp, tx->br); + m_freem(mbuf); + } else + drbr_putback(ifp, tx->br, mbuf); break; } @@ -827,7 +885,8 @@ gve_xmit_ifp(if_t ifp, struct mbuf *mbuf) is_br_empty = drbr_empty(ifp, tx->br); err = drbr_enqueue(ifp, tx->br, mbuf); if (__predict_false(err != 0)) { - taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); + if (!atomic_load_bool(&tx->stopped)) + taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); counter_enter(); counter_u64_add_protected(tx->stats.tx_dropped_pkt_nospace_bufring, 1); counter_u64_add_protected(tx->stats.tx_dropped_pkt, 1); @@ -842,9 +901,8 @@ gve_xmit_ifp(if_t ifp, struct mbuf *mbuf) if (is_br_empty && (GVE_RING_TRYLOCK(tx) != 0)) { gve_xmit_br(tx); GVE_RING_UNLOCK(tx); - } else { + } else if (!atomic_load_bool(&tx->stopped)) taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); - } return (0); } diff --git a/sys/dev/gve/gve_tx_dqo.c b/sys/dev/gve/gve_tx_dqo.c index 323c032a3e65..fab2d6d0f613 100644 --- a/sys/dev/gve/gve_tx_dqo.c +++ b/sys/dev/gve/gve_tx_dqo.c @@ -1052,6 +1052,16 @@ gve_tx_cleanup_dqo(struct gve_priv *priv, struct gve_tx_ring *tx, int budget) work_done++; } + /* + * Waking the xmit taskqueue has to occur after room has been made in + * the queue. + */ + atomic_thread_fence_seq_cst(); + if (atomic_load_bool(&tx->stopped) && work_done) { + atomic_store_bool(&tx->stopped, false); + taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); + } + tx->done += work_done; /* tx->done is just a sysctl counter */ counter_enter(); counter_u64_add_protected(tx->stats.tbytes, bytes_done); From nobody Wed Nov 20 21:41:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvv50c96z5dnJX; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv43tJTz4vtq; Wed, 20 Nov 2024 21:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rn+X7PwaU7KeyHmz2NcEr+X6ajAfKAx2mgaXLfN5vGE=; b=FBudMDGTu8LRc1Wud0S8PWoHOez74iBMxpY5wfUCrymUGtnWrJqIMbtPaUnc8oTUXK/vLo xVW3Pecz2lUw5dF9gbegp3mDuROSXJKMjCsKGL6M3Hy0JXo44Q/KdrtiGDLtgnu5TvoyWs HfRbT17umbyAKqL/zzri3qswwUIF8UFhvqQ3nbm9UMRPvUJyNQx7kTz/4hlsj7OtdS5tDc cw52aX0GrZ1XtJbtPOUjbkAyFykRz4GDvze5/hCnCZMjNUWMIX5YaRRQX/37Dx/LDOPUpi bSDy3MTlN2jS4cm0Bj2JHnz2SjhoE6MudaJEp3RoHMFbTxfaNg6cXxNgdlNM3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rn+X7PwaU7KeyHmz2NcEr+X6ajAfKAx2mgaXLfN5vGE=; b=IYzrLSyCZfjipcDzDCvo/b9JUbatZNw16UhZQjwDDkqrQMUOlZTqC63W4PDhTv9qBBxmQm kAbTAMlnvaLFsNEILOPM2tww2dJutZ9CEdJdTPrxmp8UgTMBuA6J+3IVECiim16JEsOa3W NLvpYT6mecvNcdFH9CG1JpUSvy4rXouSiSFxRAY+mD/vJmKFKWXT2y5jppfoKgssEkhA0r hCf+LjKbI0sBZRHOlenb6LBSjlp1RKOZdUMhFbVz5DFj3pE4RrgJSy7bakbKt1xwoxpbE4 2LvAznDZIMp4KGn+C7Abyv3Px3CJKlqtLQJeuYiLAJHzi4pMK+Bvik5LnDT/YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138880; a=rsa-sha256; cv=none; b=FfL4HeQgd50mfklelqmiCuQpjYhqT6vIdKzYJXL6AbdHkUG2JIhMOCIHLiB5iAPkSFLXJU MzgOo2idHwUbu6BJAy3XlfcxqKGIZ00uJvcoVHhuloIbr15ovp3mMbsms5VTjjwOXDQpE9 BYln+YTkxcNiOc4YA9+mKds8EIy0pzLkn0pQ3qKeyhScL2Nbczogc7/DRldieT1lEYJHQ7 ej3I6nCAAi3wfSn6PFQFENB8EUDRVEj54cxLixZY0rYjB+yzSJYToedIfhWpX+6Tz5E26i sO+2GEYfhCs5TX/lebSdLeqDtiQQsv0vCi896gg1VNvFSOCXOC7/1tG03NwClw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvv41v1zz19rG; Wed, 20 Nov 2024 21:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLfKYD022128; Wed, 20 Nov 2024 21:41:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfK72022123; Wed, 20 Nov 2024 21:41:20 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:20 GMT Message-Id: <202411202141.4AKLfK72022123@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: 30d40692531d - stable/14 - pf: Add a TCP rdr test on IPv6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 30d40692531dd79a74ed5e356e68063caeb8803f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=30d40692531dd79a74ed5e356e68063caeb8803f commit 30d40692531dd79a74ed5e356e68063caeb8803f Author: Tom Jones AuthorDate: 2023-10-06 13:19:31 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 pf: Add a TCP rdr test on IPv6 Reviewed by: kp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42105 (cherry picked from commit b9870ba93ea90a12f5a5727c80f7958b17f9afcc) --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/rdr.sh | 127 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 085cdf043606..cc61a48f80ea 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -28,6 +28,7 @@ ATF_TESTS_SH+= altq \ pfsync \ prio \ proxy \ + rdr \ ridentifier \ route_to \ rtable \ diff --git a/tests/sys/netpfil/pf/rdr.sh b/tests/sys/netpfil/pf/rdr.sh new file mode 100644 index 000000000000..efa3750e8f42 --- /dev/null +++ b/tests/sys/netpfil/pf/rdr.sh @@ -0,0 +1,127 @@ +# +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright © 2023 Tom Jones +# +# 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)/utils.subr + +atf_test_case "tcp_v6" "cleanup" +tcp_v6_head() +{ + atf_set descr 'TCP rdr with IPv6' + atf_set require.user root + atf_set require.progs scapy python3 +} + +# +# Test that rdr works for TCP with IPv6. +# +# a <-----> b <-----> c +# +# Test configures three jails (a, b and c) and connects them together with b as +# a router between a and c. +# +# TCP traffic to b on port 80 is redirected to c on port 8000 +# +# Test for incorrect checksums after the rewrite by looking at a packet capture (see bug 210860) +# +tcp_v6_body() +{ + pft_init + + j="rdr:tcp_v6" + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + + echo $epair_one + echo $epair_two + + vnet_mkjail ${j}a ${epair_one}b + vnet_mkjail ${j}b ${epair_one}a ${epair_two}a + vnet_mkjail ${j}c ${epair_two}b + + # configure addresses for b + jexec ${j}b ifconfig lo0 up + jexec ${j}b ifconfig ${epair_one}a inet6 2001:db8:a::1/64 up no_dad + jexec ${j}b ifconfig ${epair_two}a inet6 2001:db8:b::1/64 up no_dad + + # configure addresses for a + jexec ${j}a ifconfig lo0 up + jexec ${j}a ifconfig ${epair_one}b inet6 2001:db8:a::2/64 up no_dad + + # configure addresses for c + jexec ${j}c ifconfig lo0 up + jexec ${j}c ifconfig ${epair_two}b inet6 2001:db8:b::2/64 up no_dad + + # enable forwarding in the b jail + jexec ${j}b sysctl net.inet6.ip6.forwarding=1 + + # add routes so a and c can find each other + jexec ${j}a route add -inet6 2001:db8:b::0/64 2001:db8:a::1 + jexec ${j}c route add -inet6 2001:db8:a::0/64 2001:db8:b::1 + + jexec ${j}b pfctl -e + + pft_set_rules ${j}b \ + "rdr on ${epair_one}a proto tcp from any to any port 80 -> 2001:db8:b::2 port 8000" + + # Check that a can reach c over the router + atf_check -s exit:0 -o ignore \ + jexec ${j}a ping -6 -c 1 2001:db8:b::2 + + # capture packets on c so we can look for incorrect checksums + jexec ${j}c tcpdump --immediate-mode -w ${j}.pcap tcp and port 8000 & + tcpdumppid=$! + + # start a web server and give it a second to start + jexec ${j}c python3 -m http.server & + sleep 1 + + # http directly from a to c -> a ---> b + atf_check -s exit:0 -o ignore \ + jexec ${j}a fetch -T 1 -o /dev/null -q "http://[2001:db8:b::2]:8000" + + # http from a to b with a redirect -> a ---> b + atf_check -s exit:0 -o ignore \ + jexec ${j}a fetch -T 1 -o /dev/null -q "http://[2001:db8:a::1]:80" + + # ask tcpdump to stop so we can check the packet capture + jexec ${j}c kill -s SIGINT $tcpdumppid + + # Check for 'incorrect' in packet capture, this should tell us if + # checksums are bad with rdr rules + count=$(jexec ${j}c tcpdump -vvvv -r ${j}.pcap | grep incorrect | wc -l) + atf_check_equal " 0" "$count" +} + +tcp_v6_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "tcp_v6" +} From nobody Wed Nov 20 21:41:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvv54Mgxz5dnJc; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv52z4Fz4vtr; Wed, 20 Nov 2024 21:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dcx1zLqHp4sF4940tlsbyJw7Cxxki97/hVHeOCNGYAA=; b=TjJMHhf0qHqvSR79TKVHnisjtsa7YyCo7JrWey/5hLBH/FalSY7Ke9bx1IMneei+0NtidN roavP6JqdAdRDEQwmx2/VMoMBmHYAbZvG+u7WDwhQZEWUI0r3c72nv/bEEqas8tdXQm/pu XeILAvHDo5s98fpS1jAhDUWoN77tZD2hdown10HkI/Grmwn/QEVBpoUFrEzGQK4FLl5e62 BX68yywn35vDJw9DJLIoNM5WzWcfxTfgWLjg25+2M+7e523K0CSbrv7sdmvDyeSKrQR3ob 1sEXLLLh03amjJ0ICp7XNPpqf69e36B291chsuaVTixRn5FghGSb1plnnBt9AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dcx1zLqHp4sF4940tlsbyJw7Cxxki97/hVHeOCNGYAA=; b=Fx3NCx5J3/qNQ5WAvCev4kiNeLbZ3wKYUfLl/6TfPpe3REx+VJGV41/uXVjnm0AEy3x7m8 IFS9xNdyGEVmwnt4umwMNzzzq1EtzG38BfbjyrhGHHMgeW7OdHWHY05q95HiLwJPK7hGnV bRryWRiGNX2HNdI1/FiYIfixsbXtIY3JgRLMCg3Mpy/gnVNIiUXkyM0rqu1ykk1anyGYyO +YBID+qNx96ko83REMJWTO21GTpdH94Qnilw14bCY0eIRkt4HhX3rIZxnVITN1ItEeleeS 18gAOtRWqNpEszwuF5WAKFGsGcZqTNjxZ6FC5Ucw/mSnfgN96wv5hg4I4AgRYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138881; a=rsa-sha256; cv=none; b=n84SNKCKzifjiMkeqAPaCV7V6QTkfllv6LMoDT/nFLqQ2xi2pme8dsRJfc5fmeFi1d1obX eaws5A4QtDyWB5t8T3vIS6hTvpCciqcJTpRIAtbk+4iRLHrVLbjIeN/7OrpgfA3gK8FCp8 Pabb4dqJPsy6AoIMz7gEQJnElTHQm8aVeEKV29SWizl3yyKHj3EGATt62jvnLF0pPaH8Jb gZciJhnKzM8Wxk8db18z4bAk5eR9vI0Brt3AnpcxN2z9CLoaPySmQH7rsug5XcP8ISqkoA 9AkHY75L3atm8EizjoI0ygoCOGFXilSUHBrr4Fp/+OethJI0TxIqEZl121b/xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvv52TxJz19bJ; Wed, 20 Nov 2024 21:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLfL9u022179; Wed, 20 Nov 2024 21:41:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfLJG022174; Wed, 20 Nov 2024 21:41:21 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:21 GMT Message-Id: <202411202141.4AKLfLJG022174@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: f5b3ce0d75f0 - stable/14 - pf: Correct SPDX identifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: f5b3ce0d75f0493f6bbf4d38ad45abef23196ea4 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f5b3ce0d75f0493f6bbf4d38ad45abef23196ea4 commit f5b3ce0d75f0493f6bbf4d38ad45abef23196ea4 Author: Tom Jones AuthorDate: 2024-02-23 15:58:38 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:09 +0000 pf: Correct SPDX identifier Pointed out by: Mike Karels (cherry picked from commit 3db693f7da8a1aaf0a8887e7791ebb5d67c7a2d9) --- tests/sys/netpfil/pf/rdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/rdr.sh b/tests/sys/netpfil/pf/rdr.sh index efa3750e8f42..5e60b97c653b 100644 --- a/tests/sys/netpfil/pf/rdr.sh +++ b/tests/sys/netpfil/pf/rdr.sh @@ -1,6 +1,6 @@ # # -# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# SPDX-License-Identifier: BSD-2-Clause # # Copyright © 2023 Tom Jones # From nobody Wed Nov 20 21:41:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvv75rgDz5dnRl; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv74sprz4vmf; Wed, 20 Nov 2024 21:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cE2QgcN9wm2D/RD+tZ4tIiYHnF5hxFR/lr8sEAaKEOs=; b=Wzj2KQ3dNEUP9auD5IhIOFadkW0G8OClAFaFKd9BjGWXICKyhwguqhKYfh9+kWzPMIHisF B0vs2exv+G++xAqO+tR/nWqacLy9lo5Fo/NrG6/GubdTzwb/I2UmohRq7TPb9LGUTM1QzG PGTgXueIqS9x/C1V/TJXAOXvTtFE89s+ZHa2mhCwCYl1t92+xyCO9m9bIRhYrwTUb4L2vv YNlH6SNiHz2aC0Vm7mmKduS876pc3OCR9ICFqqkyPSAMAXU2bnehRJrPDY04uzsy4zKBqQ IRUTimQtJgBMH4cZCeK2o/mJvAy4UbBneKeIO3+bi9bk2ww1tlKksIy4rKl6pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cE2QgcN9wm2D/RD+tZ4tIiYHnF5hxFR/lr8sEAaKEOs=; b=ruw5JdvWi19w7vbo7B92PKhSUaGlbA/efRv1yxpVVfH/yG38DkF7KRAdBYep2W5Mm7hvlo EyN37CmBs84jh1/VUXUMdOPL9GS4LBdC5dB9jsgszOC7+Q4VmmcbT7cj2x0sg7OBC9LCd5 QAobi2k9uPUqLV8KqCNtziquekr1jhI/idDf3FK1JoH3aKxCPCP0jPx0oKu5rydTzJ4eL6 Ps6poMK4Eds+QF7QVHatMboaGdIeYIUICwiKQ7JSnnJjMgHGpr6Ff6k13oNqXBPBK1cYM5 9/cyrWv7rMpwQG+QuyQJ4xJKhJXFptVj1chSXv8/JnH1EguLw9FP3+vFSEPI5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138883; a=rsa-sha256; cv=none; b=edRW/onxbTcsSxi7Q7lWSbGNQuo4Zw9bSQuScXoo17cij83OktrgjmapNpF+/27HefRBpD 8/FNyK/opu92V0RbkATWe3/K3Q5Rf7ytpXQAAOBrs/KWTosWH1Q048DIOuK+QAW/UJkn6g gTHw8EIA0fjWU4cQ3E0XaLhgYz2Y8m9Spl1H51wtOvS606GcwQiWz6BZj3yXXYtUw9EOoa 0NpR343Rj8ED23JSgy6jwfZzvYAIx3di7iNOz15zkmDXH2jrjZTiJAeBQYWyjh8wKtGg42 GC2+66S0zSNiavy7JMkE3OXcyejuDwufLVOeyeudQ9ExAY1EPs2tOmwOkJATQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvv74Tzvz19nw; Wed, 20 Nov 2024 21:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLfNw5022301; Wed, 20 Nov 2024 21:41:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfNoJ022298; Wed, 20 Nov 2024 21:41:23 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:23 GMT Message-Id: <202411202141.4AKLfNoJ022298@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: 5df40377e7b0 - stable/14 - pf: Make pf_get_translation() more expressive List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5df40377e7b01c8fe7f5e36ffeb825514cf42072 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5df40377e7b01c8fe7f5e36ffeb825514cf42072 commit 5df40377e7b01c8fe7f5e36ffeb825514cf42072 Author: Mark Johnston AuthorDate: 2024-08-19 14:14:30 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:09 +0000 pf: Make pf_get_translation() more expressive Currently pf_get_translation() returns a pointer to a matching nat/rdr/binat rule, or NULL if no rule was matched or an error occurred while applying the translation. That is, we don't distinguish between errors and the lack of a matching rule. This, if an error (e.g., a memory allocation failure or a state conflict) occurs, we simply handle the packet as if no translation rule was present. This is not desireable. Make pf_get_translation() return the matching rule as an out-param and instead return a reason code which indicates whether there was no translation rule, or there was a translation rule and we failed to apply it, or there was a translation rule and we applied it successfully. Reviewed by: kp, allanjude MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D45672 (cherry picked from commit 7e65cfc9bbe5a9d735ef38f7ed49965b234b8a20) --- sys/net/pfvar.h | 5 +++-- sys/netpfil/pf/pf.c | 18 ++++++++++++---- sys/netpfil/pf/pf_lb.c | 57 +++++++++++++++++++++++++++++++++----------------- 3 files changed, 55 insertions(+), 25 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 290f339e7d00..465e47b940b3 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2510,11 +2510,12 @@ u_short pf_map_addr(u_int8_t, struct pf_krule *, struct pf_addr *, struct pf_addr *, struct pfi_kkif **nkif, struct pf_addr *, struct pf_ksrc_node **); -struct pf_krule *pf_get_translation(struct pf_pdesc *, struct mbuf *, +u_short pf_get_translation(struct pf_pdesc *, struct mbuf *, int, struct pfi_kkif *, struct pf_ksrc_node **, struct pf_state_key **, struct pf_state_key **, struct pf_addr *, struct pf_addr *, - uint16_t, uint16_t, struct pf_kanchor_stackframe *); + uint16_t, uint16_t, struct pf_kanchor_stackframe *, + struct pf_krule **); struct pf_state_key *pf_state_key_setup(struct pf_pdesc *, struct mbuf *, int, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d6541bc6627b..4fd884852d90 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4641,7 +4641,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, struct pf_ksrc_node *nsn = NULL; struct tcphdr *th = &pd->hdr.tcp; struct pf_state_key *sk = NULL, *nk = NULL; - u_short reason; + u_short reason, transerror; int rewrite = 0, hdrlen = 0; int tag = -1; int asd = 0; @@ -4654,6 +4654,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, PF_RULES_RASSERT(); + SLIST_INIT(&match_rules); + if (inp != NULL) { INP_LOCK_ASSERT(inp); pd->lookup.uid = inp->inp_cred->cr_uid; @@ -4722,8 +4724,17 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, r = TAILQ_FIRST(pf_main_ruleset.rules[PF_RULESET_FILTER].active.ptr); /* check packet for BINAT/NAT/RDR */ - if ((nr = pf_get_translation(pd, m, off, kif, &nsn, &sk, - &nk, saddr, daddr, sport, dport, anchor_stack)) != NULL) { + transerror = pf_get_translation(pd, m, off, kif, &nsn, &sk, + &nk, saddr, daddr, sport, dport, anchor_stack, &nr); + switch (transerror) { + default: + /* A translation error occurred. */ + REASON_SET(&reason, transerror); + goto cleanup; + case PFRES_MAX: + /* No match. */ + break; + case PFRES_MATCH: KASSERT(sk != NULL, ("%s: null sk", __func__)); KASSERT(nk != NULL, ("%s: null nk", __func__)); @@ -4872,7 +4883,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pd->nat_rule = nr; } - SLIST_INIT(&match_rules); while (r != NULL) { pf_counter_u64_add(&r->evaluations, 1); if (pfi_kkif_match(r->kif, kif) == r->ifnot) diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 7524bf138e6d..6b0b95e9ce01 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -591,22 +591,26 @@ done: return (reason); } -struct pf_krule * +u_short pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, struct pfi_kkif *kif, struct pf_ksrc_node **sn, struct pf_state_key **skp, struct pf_state_key **nkp, struct pf_addr *saddr, struct pf_addr *daddr, - uint16_t sport, uint16_t dport, struct pf_kanchor_stackframe *anchor_stack) + uint16_t sport, uint16_t dport, struct pf_kanchor_stackframe *anchor_stack, + struct pf_krule **rp) { struct pf_krule *r = NULL; struct pf_addr *naddr; uint16_t *nportp; uint16_t low, high; + u_short reason; PF_RULES_RASSERT(); KASSERT(*skp == NULL, ("*skp not NULL")); KASSERT(*nkp == NULL, ("*nkp not NULL")); + *rp = NULL; + if (pd->dir == PF_OUT) { r = pf_match_translation(pd, m, off, kif, saddr, sport, daddr, dport, PF_RULESET_BINAT, anchor_stack); @@ -624,23 +628,23 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, } if (r == NULL) - return (NULL); + return (PFRES_MAX); switch (r->action) { case PF_NONAT: case PF_NOBINAT: case PF_NORDR: - return (NULL); + return (PFRES_MAX); } *skp = pf_state_key_setup(pd, m, off, saddr, daddr, sport, dport); if (*skp == NULL) - return (NULL); + return (PFRES_MEMORY); *nkp = pf_state_key_clone(*skp); if (*nkp == NULL) { uma_zfree(V_pf_state_key_z, *skp); *skp = NULL; - return (NULL); + return (PFRES_MEMORY); } naddr = &(*nkp)->addr[1]; @@ -664,6 +668,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, r->rpool.mape.offset, r->rpool.mape.psidlen, r->rpool.mape.psid)); + reason = PFRES_MAPFAILED; goto notrans; } } else if (pf_get_sport(pd->af, pd->proto, r, saddr, sport, @@ -671,6 +676,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, DPFPRINTF(PF_DEBUG_MISC, ("pf: NAT proxy port allocation (%u-%u) failed\n", r->rpool.proxy_port[0], r->rpool.proxy_port[1])); + reason = PFRES_MAPFAILED; goto notrans; } break; @@ -682,8 +688,10 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, #ifdef INET case AF_INET: if (r->rpool.cur->addr.p.dyn-> - pfid_acnt4 < 1) + pfid_acnt4 < 1) { + reason = PFRES_MAPFAILED; goto notrans; + } PF_POOLMASK(naddr, &r->rpool.cur->addr.p.dyn-> pfid_addr4, @@ -694,8 +702,10 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, #ifdef INET6 case AF_INET6: if (r->rpool.cur->addr.p.dyn-> - pfid_acnt6 < 1) + pfid_acnt6 < 1) { + reason = PFRES_MAPFAILED; goto notrans; + } PF_POOLMASK(naddr, &r->rpool.cur->addr.p.dyn-> pfid_addr6, @@ -715,8 +725,10 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, switch (pd->af) { #ifdef INET case AF_INET: - if (r->src.addr.p.dyn-> pfid_acnt4 < 1) + if (r->src.addr.p.dyn->pfid_acnt4 < 1) { + reason = PFRES_MAPFAILED; goto notrans; + } PF_POOLMASK(naddr, &r->src.addr.p.dyn->pfid_addr4, &r->src.addr.p.dyn->pfid_mask4, @@ -725,8 +737,10 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, #endif /* INET */ #ifdef INET6 case AF_INET6: - if (r->src.addr.p.dyn->pfid_acnt6 < 1) + if (r->src.addr.p.dyn->pfid_acnt6 < 1) { + reason = PFRES_MAPFAILED; goto notrans; + } PF_POOLMASK(naddr, &r->src.addr.p.dyn->pfid_addr6, &r->src.addr.p.dyn->pfid_mask6, @@ -744,7 +758,8 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, struct pf_state_key_cmp key; uint16_t cut, low, high, nport; - if (pf_map_addr(pd->af, r, saddr, naddr, NULL, NULL, sn)) + reason = pf_map_addr(pd->af, r, saddr, naddr, NULL, NULL, sn); + if (reason != 0) goto notrans; if ((r->rpool.opts & PF_POOL_TYPEMASK) == PF_POOL_BITMASK) PF_POOLMASK(naddr, naddr, &r->rpool.cur->addr.v.a.mask, @@ -815,12 +830,13 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, DPFPRINTF(PF_DEBUG_MISC, ("pf: RDR source port allocation failed\n")); - if (0) { + reason = PFRES_MAPFAILED; + goto notrans; + out: - DPFPRINTF(PF_DEBUG_MISC, - ("pf: RDR source port allocation %u->%u\n", - ntohs(sport), ntohs((*nkp)->port[0]))); - } + DPFPRINTF(PF_DEBUG_MISC, + ("pf: RDR source port allocation %u->%u\n", + ntohs(sport), ntohs((*nkp)->port[0]))); break; } default: @@ -828,14 +844,17 @@ out: } /* Return success only if translation really happened. */ - if (bcmp(*skp, *nkp, sizeof(struct pf_state_key_cmp))) - return (r); + if (bcmp(*skp, *nkp, sizeof(struct pf_state_key_cmp))) { + *rp = r; + return (PFRES_MATCH); + } + reason = PFRES_MAX; notrans: uma_zfree(V_pf_state_key_z, *nkp); uma_zfree(V_pf_state_key_z, *skp); *skp = *nkp = NULL; *sn = NULL; - return (NULL); + return (reason); } From nobody Wed Nov 20 21:41:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtvv90mNQz5dnRm; Wed, 20 Nov 2024 21:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv86CyMz4vqw; Wed, 20 Nov 2024 21:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x6m60nzs1+9mC5UVglduqx8fFCDDzoN9NTKG1pWd4Ow=; b=xFgDp3/i9LVXPFC+FvwM+ZVsC4z9vz+GdcscpTMagbiIyidNUit91QuFjtnV4H0kn0cjum qbpIxgGncu9LcojaF0Fx62exkq2fA+wXyQGgv0ZYrTIxA4KEMyvV3N6Na2EgbBxWyhH09f XIrVmSnrYkCysyDSG0t0wMr3gZ/ODaNgEZ5sMXUgWZXtNjimGR2KCSydYEZoLSVeZQcyx7 GmZlpJbVWOJWvJ0nFSQUABNHs0FfAgprcN/YBA3mwbAmAZRG34XrZhr/1WmrkOS9MVs2KK uZtsGnZiv6jsofcuk/19/aG2MdU4sHkVozRDZUFRK6muGL4x64vRHfTnUxyzWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x6m60nzs1+9mC5UVglduqx8fFCDDzoN9NTKG1pWd4Ow=; b=bLXmk0d3iYiweitdFm6edWqLraSzv5dmv/sOS5wMWE5OZATVm6Dyqu0QYUeIRpKuVFPYhJ TC4Wj0DNJ8SzmmMLvsNq6haceApASjFF0qOxGFYZtOO75s8IYBeRvvJ+iAzu70tLlN3byF IsydhgTQ8Ddtr85/Rn+Nl5+kY2uQ+Zd59CebEhAjgi3x5Sw9gKYPqtweTeUzSd68DJbFmI KtzczKGRa0zIOUFeRLGcOiLLrCrs2ZV7b47fju2desoP1L0gZvwcoJlO+9AA8Dyv0ek85y AOxKnxZzpm2gRBYVuk43Y01VZT7kFf4GY2aPlAT3wCijgqCgoT4DwBExkZHAUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138884; a=rsa-sha256; cv=none; b=yLPh/P0xlnSyI4vTbbL9vCHS695lx1K+PC2UYCqX+U42lm4fciau5qLYgVzze35qLnHOet TUAxW9GwxqhlvtPaUBUX6b2MhKzCsi1+W9WuMQw1Enz8Ce0Umpx3Pirab62QMMp58W/Xvq xb50EL0fMh813vq9bcIe+rbQqxZ/AdCULpj1TJ6AUqRwfPOR3FJnhV+1ps9tyt+gxVpqrK ikTStjmERn7/ysRt7btMWERBF7nP5/F7hiw2LAOG7IP5rTVtRjsy2OWYbN13O18uketgKx i3K3dfM88IsV/rsLOLCxS43dW9/wyR53/SEBPCUe0YhnlOBoY/aZwQRoszmjqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtvv85D7nz1B6d; Wed, 20 Nov 2024 21:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKLfOkj022356; Wed, 20 Nov 2024 21:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfOJe022352; Wed, 20 Nov 2024 21:41:24 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:24 GMT Message-Id: <202411202141.4AKLfOJe022352@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: f4f4c52c0f46 - stable/14 - pf: Let pf_state_insert() handle redirect state conflicts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: f4f4c52c0f46531082925aded23510f9adeb6fff Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f4c52c0f46531082925aded23510f9adeb6fff commit f4f4c52c0f46531082925aded23510f9adeb6fff Author: Mark Johnston AuthorDate: 2024-09-10 14:34:45 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:09 +0000 pf: Let pf_state_insert() handle redirect state conflicts When handling a redirect state conflict, pf_get_translation() tries modifying the source port to avoid it. If it fails to find a free port, the translation is aborted. Instead, if we fail to find a free source port, simply press on with the original source port and let pf_state_insert() handle the conflict as it pleases, rather than second-guessing what it will do. In particular, pf_state_insert() has special handling for TCP connections in a terminal state, and might succeed despite a state conflict. Reviewed by: kp MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D46612 (cherry picked from commit 9569fddd8d0e48211e67fdc63dd72eba83883525) --- sys/netpfil/pf/pf_lb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 6b0b95e9ce01..3f5b3f90a4e4 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -370,7 +370,7 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, struct pf_addr *naddr, struct pfi_kkif **nkif, struct pf_addr *init_addr, struct pf_ksrc_node **sn) { - u_short reason = 0; + u_short reason = PFRES_MATCH; struct pf_kpool *rpool = &r->rpool; struct pf_addr *raddr = NULL, *rmask = NULL; struct pf_srchash *sh = NULL; @@ -828,10 +828,15 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, } } + /* + * We failed to find a match. Push on ahead anyway, let + * pf_state_insert() be the arbiter of whether the state + * conflict is tolerable. In particular, with TCP connections + * the state may be reused if the TCP state is terminal. + */ DPFPRINTF(PF_DEBUG_MISC, ("pf: RDR source port allocation failed\n")); - reason = PFRES_MAPFAILED; - goto notrans; + break; out: DPFPRINTF(PF_DEBUG_MISC, From nobody Wed Nov 20 22:34:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtx445FPgz5dqmV; Wed, 20 Nov 2024 22:34: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtx444T0Xz4487; Wed, 20 Nov 2024 22:34:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732142052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NagTyYGwMUrfkbYZfzvm+hGV1sczkff6r551jCzPIYE=; b=j1+ArlNpo8bXTfltmk6zOmwy/9asWExfhACy9u5jSKyVG0jaFk5AFLkIjfDVGvCUlLhnDw CqxjoxQ8fnMNjk/0HAcxLUAcur04Uj2IRuNcdgmJRv5I0fzmLv3Uhn7aSsv+02DNq542lP 7HPmiO54bXKLsz0OF9uzVps9lTV8uQnvE2qBElP7ss0GRzHWIMK1Ou5MeDi6TDcuiW/nD4 JyZTLO3OfPcffLuSkvHPGi/0NK9dvmAmTqpC65yYd+h5eBKJQkxo8BzyACIi1s6vYPbqBQ FNQrZh0OMC3fruFWf9o9SSZ2eC59AQ3g3Yd3A4Q4aDn1D0q6FFqrChRiSuW87Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732142052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NagTyYGwMUrfkbYZfzvm+hGV1sczkff6r551jCzPIYE=; b=kmoWMFJsvuXXEFDh+ZO0wrr1dw7l4JJ/rZRhd07GwAYtkBHx71AIoE/qKub1+Y2BNQgMV3 Zbz8MpGvJDF7H3n7OObMD+Hrw9tN9cihLIottJpHH4J1rxjPmpPCEgilVLap6kI6yHrbsv 6oARkDs5TtttF97dQQU99rySzwFYiTSfpzJci42pzxnABEWPr9OuQJf69xA6p4OHxg8alz 9vNth9VLxXKRrDGp4UyKQ3Z6nr/7sgUFeAUMvKm6YFGIDA+TRRQVeNNxcDgwSuy1FFHzYP tsHvtab17M59m8GurHHd5fy2IR7RzhsFtRtkRv5XB6RIkBT9FCU/8YugkMnNZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732142052; a=rsa-sha256; cv=none; b=jccR63I7YDvYcTFY+2gMOrrLxFYuU+rv6LD9/y67RiA3N+z+suyc9v22kK1lnpd5nzEZAw zKkLitH0VhDb3oV4meyiveBjkzZtpFsQL5Rf/0+wuC8fxNCG0wv4FwMNgDw3+T3Ya35O75 AZPzx46UqZldBIcIWxTL60GVrTg9Ffm1JpAo2NH/rVbp181iEV6JV1wn4EmSjQlNppZGkG OPApDUC5fCgCdt/Pj8Sgl3PltVu/tQj1QzRPjn/6PiVdvdEtILlibKbvjBgTxa2kgNNBIS 7f1kGrwWExX0XBpr/Z4GO+cqeHd+jj8ylGn/qS8+vF9O+9S31c7442dsh7m3Fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtx4443SJz1C9Q; Wed, 20 Nov 2024 22:34:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKMYCfJ021401; Wed, 20 Nov 2024 22:34:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKMYCxA021398; Wed, 20 Nov 2024 22:34:12 GMT (envelope-from git) Date: Wed, 20 Nov 2024 22:34:12 GMT Message-Id: <202411202234.4AKMYCxA021398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: accf71534c61 - main - geom: Allow BSD type '!0' partitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: accf71534c612b76ee2701f2dfcaa464748e527a Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=accf71534c612b76ee2701f2dfcaa464748e527a commit accf71534c612b76ee2701f2dfcaa464748e527a Author: Jose Luis Duran AuthorDate: 2024-11-17 23:55:14 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-20 22:28:57 +0000 geom: Allow BSD type '!0' partitions Allow the creation of '!0' partition types. Fix it by not considering "0" an invalid partition type. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47652 --- sys/geom/part/g_part_bsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/part/g_part_bsd.c b/sys/geom/part/g_part_bsd.c index d6d1b7346d9b..51912bedbdc2 100644 --- a/sys/geom/part/g_part_bsd.c +++ b/sys/geom/part/g_part_bsd.c @@ -136,7 +136,7 @@ bsd_parse_type(const char *type, uint8_t *fstype) if (type[0] == '!') { lt = strtol(type + 1, &endp, 0); - if (type[1] == '\0' || *endp != '\0' || lt <= 0 || lt >= 256) + if (type[1] == '\0' || *endp != '\0' || lt < 0 || lt >= 256) return (EINVAL); *fstype = (u_int)lt; return (0); From nobody Wed Nov 20 22:34:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtx456D4Vz5dqg6; Wed, 20 Nov 2024 22:34:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtx455cjDz4488; Wed, 20 Nov 2024 22:34:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732142053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cEkasTTRII3/prKC9sRSRZQhbiI2cD4nUZzMiaQQKwM=; b=RIbVFrLd8unzHRG0fjUP8zueVs/2x3BDpKAWI9ridbHk+oN/KZo48C6pOE5OE/5ILGDSCq 7Y3lukC80i99s58ugSjQBFVyJywvLrejP26+U9Z2ULssfH3mrvGkgUCNTx5sADWxSi1EII D31+EOQbWShbgb0U9GVQvB8m+W6VYhZz881wzrUY0R5djUWgHXs9pWnEuklZ/w2LUkzLyJ 6LmgDIScITuYl/YAWBFGeWrkqpipaqSk4VSQiJd1f6/KGuTOwg5qkhNEVFvsmbmLe2MdGk uEuQXyrSlNafI9YzUlNkLG/2Q1TPHXqLcZO2IoQ3MuNpRG/UyDvpitd0cJSkpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732142053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cEkasTTRII3/prKC9sRSRZQhbiI2cD4nUZzMiaQQKwM=; b=bYRJwmJfZOCzmqV/tx/o736HGOo4E6HAAr9DqsMr4eF+waQ6frOhd1QreCWkMAPXJyxhMH yuqDttFmylYRT1xVWDhYgRo4s9+ZAth8EXSIuDVpADLwf6lS0R8WVlC1VLZq3ueYeDWyGs /bUVr8jiGIHKzDIpSv3d3mDE01Y44KB2vLYpIcVzV3lq4XEqYzlJOvsBsiIQbVW7ehv+mc Q9hfn7dKwD/gfG0fq75PsXcbXFuDYK2/rhUJq1009vuoMTHqGS8jegC49cUK3Dz4ZKun/g y0IO6fhgb+JYwuuiU9T58wAFO/pCeaeDMR0MMHJnkF37wnsF1Q2YAkrRdfyhHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732142053; a=rsa-sha256; cv=none; b=V6LZAi1PuInMi9nJLeMUYM94zCpA84QxXB1FLRUCNATu9jyZU0N2kj6nI99wT6O3VSVeHV atk1h+pPT70IchEmaSv3AGDnmYIBFyF6KAffOdZB4ClviEp+38HouKz+ViCSPllc7dCQmG 6U9eMp1zuMIS04s8ZrEKmDINlzXusyMfxqRkDvplc4HHpOtCYSuZLZ8P9YUNpdRtkHkG4A dK4gsJvLB1REOMHhhwM+UqjJLRdpLtBEtot6/yVEC3Jy0+07ve7uLK2H8aKqcyvbxxI7W3 NbAwPTw0AiC48EGa4D9IQgaZSdsu1N/5p0Wh3kFCFoa7gcAm1CU3/eBD9MBy+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 4Xtx455CVHz1C9R; Wed, 20 Nov 2024 22:34:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKMYD4Z021453; Wed, 20 Nov 2024 22:34:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKMYDPC021450; Wed, 20 Nov 2024 22:34:13 GMT (envelope-from git) Date: Wed, 20 Nov 2024 22:34:13 GMT Message-Id: <202411202234.4AKMYDPC021450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 87e87fecb139 - main - nanobsd: Remove dependency on bsdlabel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87e87fecb139d60a00837f004de0d37dbecd205c Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=87e87fecb139d60a00837f004de0d37dbecd205c commit 87e87fecb139d60a00837f004de0d37dbecd205c Author: Jose Luis Duran AuthorDate: 2024-11-18 00:16:50 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-20 22:31:56 +0000 nanobsd: Remove dependency on bsdlabel The bsdlabel utility is deprecated, gpart should be used instead: - Offset the first 16 sectors, just like bsdlabel did (used for metadata) - Use a freebsd-ufs partition type (regardless bsdlabel creating a '!0') Reviewed by: emaste, imp Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47653 --- tools/tools/nanobsd/legacy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 58288d063b4a..a45b447337b2 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -116,14 +116,15 @@ create_code_slice ( ) ( trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT - bsdlabel -w ${MD} + gpart create -s bsd "${MD}" + gpart add -t freebsd-ufs -b 16 "${MD}" if [ -f ${NANO_WORLDDIR}/boot/boot ]; then echo "Making bootable partition" gpart bootcode -b ${NANO_WORLDDIR}/boot/boot ${MD} else echo "Partition will not be bootable" fi - bsdlabel ${MD} + gpart list ${MD} # Create first image populate_slice /dev/${MD}${NANO_PARTITION_ROOT} ${NANO_WORLDDIR} ${MNT} "${NANO_ROOT}" From nobody Wed Nov 20 23:59:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtyyT74bSz5dvg5; Wed, 20 Nov 2024 23:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtyyT4zg9z4CW0; Wed, 20 Nov 2024 23:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/h7bk3DckHj7vSIJ3p5zg1STO0QRTGaBwsR4VraIHQQ=; b=npFuaESSv/8atZt+J2SiCyT8GhjwYyIPGsLXqBXCnUfyMlhV8Gt9A3e6kLFxP5fMAWBT6N iorXFRwWrR7ZR8skC6CF1V+lTSAMTP5MiM0AFg7DqrjdVGUtnHPTLd5kn/mm2Dv+yxXhWG BlRI1rOSSjGgB/zG8A06hjuuVzKPtdm/GJUqiWkFgoeWmvNeSV2uvQJkxmdWOhGynTFrSv 1qTdLC/wD0gR+Md2ZY8lTFpAsZbz8U57CdEvgxgnTYTml3qg8OUJftCIZhUgDHifm/Mu3g BNnEXlGg0yTf7ooq3RTIJMZ+GyB3yZcBvFVC5fTLArJ+hy/QI4J0iOfVqRPRrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/h7bk3DckHj7vSIJ3p5zg1STO0QRTGaBwsR4VraIHQQ=; b=YBff+B7TCn7hq1/msnREx+Opzms3dolbTR6hEzBfHAzQ0UTxKwi8mv0esJb6341belKt2E ekUkxIOjCxEuIG8bffLlHoMdrra0mxNoqiNblQcAS2UkI6JnJXDkrfBaI4Jk5bDHqhGPHM R+qpuOlPzVWnyd6pBHsUZ+NuHDdumAuentkZSQNSLEOVYnxaAlGM3UKc3OsMD39Bx8SMQS ApgqVL9aaGxnJMR5H3mn02/P4+4NDbAhHnJ33Zy2gTj6Lq9UiPgweA4L3YSfK2nCvAo7Lx gDH/c17JA38hmKodjFbiuUW3Bn7lvRQhX1YAHVYifi/A1Gv61m+PDE/N+L7gZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732147169; a=rsa-sha256; cv=none; b=fnBiGcRalCLLEP1N82/QLP38in8pF7SUsgvd2f9Tn4xye4+HmFwooEF9Lt7ZuMNgypNp6A XFoudKQuIs9ufPXhKvuy7bJBCVFHSa9bwE35kmuilsT7GM1+dTM5jxdmtXg7uSp7M46loy b/YGi0SZcAvwU6djys2JTqsF2zHUKxAGO9BGsmi0/eI+2t5ArDaYt1hiZwYrloZuRkFxE7 bOCy3LhRVMH9P/7QFo0p8UaX+LQm0QJwNNiW1OiXZULOUJ8etVoU4zCloljJDy+FoMPb3P Vhs2/bgX+uq8iDRifccDx3zajEtvwwAS2y+ttl7i/C0jVovNEMB19FFnx0amHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtyyT4ZnQzGKw; Wed, 20 Nov 2024 23:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AKNxTdo069618; Wed, 20 Nov 2024 23:59:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKNxTQ5069614; Wed, 20 Nov 2024 23:59:29 GMT (envelope-from git) Date: Wed, 20 Nov 2024 23:59:29 GMT Message-Id: <202411202359.4AKNxTQ5069614@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 8de007ad19dc - main - igc.4: Remove non-existent timer tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8de007ad19dcda5bea9bac9fb2c140e4ed62ba78 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=8de007ad19dcda5bea9bac9fb2c140e4ed62ba78 commit 8de007ad19dcda5bea9bac9fb2c140e4ed62ba78 Author: Kevin Bowling AuthorDate: 2024-11-20 23:55:45 +0000 Commit: Kevin Bowling CommitDate: 2024-11-20 23:59:23 +0000 igc.4: Remove non-existent timer tunables These were removed in a40ecb6f7405 because they do not apply to igc hardware which uses EITR for interval timing. MFC after: 3 days Sponsored by: BBOX.io --- share/man/man4/igc.4 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index cf36e584a679..f9bca716f7fe 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -100,21 +100,6 @@ Disable or enable hardware stripping of CRC field. This is mostly useful on BMC/IPMI shared interfaces where stripping the CRC causes remote access over IPMI to fail. Default 0 (enabled). -.It Va hw.igc.rx_int_delay -This value delays the generation of receive interrupts in units -of 1.024 microseconds. -The default value is 0, since adapters may hang with this feature being -enabled. -.It Va hw.igc.rx_abs_int_delay -If hw.igc.rx_int_delay is non-zero, this tunable limits the -maximum delay in which a receive interrupt is generated. -.It Va hw.igc.tx_int_delay -This value delays the generation of transmit interrupts in units -of 1.024 microseconds. -The default value is 64. -.It Va hw.igc.tx_abs_int_delay -If hw.igc.tx_int_delay is non-zero, this tunable limits the -maximum delay in which a transmit interrupt is generated. .It Va hw.igc.sbp Show bad packets when in promiscuous mode. Default is false. From nobody Thu Nov 21 00:05:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtz5M0xDNz5dwJH; Thu, 21 Nov 2024 00:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtz5M0FTLz4DTZ; Thu, 21 Nov 2024 00:05:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySko/hqykwmMp1Q3TDY4LCZ5TnHgPX27dDFlUmUKMlc=; b=KBgGFjwha7xOCqokZ8e5bqb+B9DFVABWp+Oc7wCATmKNnJQ3u/BY979U3rews3rCRMPseV y29XU7qFBD5pdlbnzhHKItV4xGChZxx6Pl83YP6qBhHWuB7rHvUx8UGyh6W1xOqpZ4Hv1B qgdA8ObNUrDjuafE+UkpR/sForASi4MZ3ir3kEv17tPlfB8EMJc1xrjqtzHm95xp8EosLA Ny4OxmsaIkbO8vtLOmBm/98AemKZbq8pbgYAF0WZPDjlZfYcvjo0f21NQaDbiASvjwGsdQ cejHVHBySwNASf5WwNKKVrLh3KRqle36uNVbio7Xud7Uq/em7eTQoqfqSS4oTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySko/hqykwmMp1Q3TDY4LCZ5TnHgPX27dDFlUmUKMlc=; b=LadW2ltJZ4ukqm44G5B35/Um7Qv2CstaafAWcRnLWZBOSPg3WbF5hfYAVpAdkMzWhJOysY QbkeAr8TdGaqB/x5inj/cI3Xam2KtOlf67Gve3B37LA/peSogwD8qHQVsc33wB2hLwX+p7 raYiVlaXYX+sx//7DKcrg22QL9L7zDPLnCugr2MeylwUG2dkG/zhuMCuhXrqgcToMSnNDl VAJtjffD2P0asT4ciqPDxBQSM0Ad3MGJjpHJFPvFM3DsrBt6G5EnETXgxThEM54kx6Njv/ kCO8A3SVEDGC8ZrNfyeuxWM6mNyV1sobp5Cybf+N8SfYRqUqrxd9jxUpAvA45A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732147527; a=rsa-sha256; cv=none; b=cUn7BDf+04mMHhLZvgJFNxgQR7HQgDr9YxqPHkp6qLDXKRx+qYBnyURo/KeiUKAAlOmVUs bAxfTx5hDT8/R7F5uNv5UNEHjXsr4mgd9gjWZyTfLuCHMnUOjtCfJPrGyEG9sPVRrN3ICT N2qowtvXkLkpw6BGN1+p10PS77Vf181rvePCZd8KFAVXnZevjgIEZcjZ5Q2EuMShlQgjYa EcwNu1Yd0OEw/SqqiBmfJ+Y0HGemPT6Cmf/2y7/p/uR4Vq64wU2G443PEC9ytnPi3QlwI6 eTgwsH8DgHy4S8V8t1BaeQHOXnWvDcGBqwD272pmdiGJx481A41DB73Cg5ydMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtz5L6kg4zGYD; Thu, 21 Nov 2024 00:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL05QU9087598; Thu, 21 Nov 2024 00:05:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL05QQY087595; Thu, 21 Nov 2024 00:05:26 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:05:26 GMT Message-Id: <202411210005.4AL05QQY087595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: b62012538e96 - stable/14 - release: install wireless firmware onto disc1 and dvd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: b62012538e967b22736e8c2214b222f21146bddc Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b62012538e967b22736e8c2214b222f21146bddc commit b62012538e967b22736e8c2214b222f21146bddc Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 23:51:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 00:04:56 +0000 release: install wireless firmware onto disc1 and dvd Wireless driver firmware is no longer added to the src tree. In order to have wireless support in the installer for the new drivers we install the firmware packages onto disc1 (and memstick) and dvd if built on FreeBSD and NOPKG is not defined (to not break cross-builds from Linux or OSX and to allow people to opt-out). Sponsored by: The FreeBSD Foundation Submitted by: cperciva (the orig. commands and where to place them) Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D47407 (cherry picked from commit 7e2996c1f5b4e684cae40c2418b68061df9997d9) --- release/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/release/Makefile b/release/Makefile index 3d96880d1661..c5970b184b96 100644 --- a/release/Makefile +++ b/release/Makefile @@ -70,6 +70,17 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} .endfor .endif +.if ${.MAKE.OS} == "FreeBSD" +# For installing packages into the release media. +.if defined(NO_ROOT) +PKG_ENV+= INSTALL_AS_USER=yes +PKG_ARGS+= -o METALOG=METALOG +.endif +PKG_ENV+= ASSUME_ALWAYS_YES=yes +PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos +PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install +.endif + .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) VOLUME_LABEL= FreeBSD_Install .endif @@ -186,6 +197,10 @@ disc1: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf @@ -256,6 +271,10 @@ dvd: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf From nobody Thu Nov 21 00:05:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtz5N2ltCz5dwSp; Thu, 21 Nov 2024 00:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtz5N0n8Nz4Dkc; Thu, 21 Nov 2024 00:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzDZ5wsTivtafmLsM67gD6BDOUM0cjuONpOyyBwdFRI=; b=ErMpjylADYx8wHba+mI+f/wSAhraryAxvyXPm2PGNvyUssFNL2zYcZqrY3rj9mRl8F5AEl G+YU/uTwe/BVTGtht6329Y/oLv265g52c8a5bO74hkW6XJ8WmCcumPOdQ578bYCEOfUZZI qPtkXO9I2Vk/22aJnmfgmB17A6CEEedKKMnLuyc6/BUaskuzMEbcfZrCUjUWZJI3O9gmI9 oYlbJmO5qR85MMKsRjcERZScGsLmgEcVD5uNUJLRf9G4B0QxfyL81QFSqIeAQmMUpFVK9x tRTAjJiPlHrcVdQBphOkUBwls+EsjXL+EJM02vfcOZ55gUkf0n4vnkwf8gmv4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzDZ5wsTivtafmLsM67gD6BDOUM0cjuONpOyyBwdFRI=; b=qtDAm9MH+PWGzrFGAnXxON8wYVDFNX9mzIPOALaZ7yedtHFuDU8vb6FtINP+IyehDFP0Hb R0SyBEI5f38tvCN2HqOwxJAZ/wGkwxyshINuzdXX3gpokBrbU5DZGtd15lo4j2WJ4oTWho u5Pzc4rgthJ/yRyWYUgEEapqm6QPnBR5ytqgXndmuYX1kMTVt1XlAh6E/mTqKcz23Pr+jM 1BzPnOdX/9Z7Qi2LWnj6xTxbd2eieq0GaKQ1mqWFYXPvrBbdeIS1ET9tfsN9xjDqBq6DjC smVlXAYdWgaT8wWQnb/rWVB83O3BKjfCpnbKNPLthVkxgnnLV0X+ijtTPXyYMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732147528; a=rsa-sha256; cv=none; b=VYOxGjXc6pXCmdluaETKxsRs368hI3M6GfhqxH1bKdy82o4TUGPQNCcSiXBGHWwXcck+kZ Q7AoedgbkiavIOFZhXI5bwE96+64mP4B4ftSq2ZTr2Km6Q87A4lCYHIHTwyDpGmnxFh1HO 6mWfnFb0lwa3d/jfnjtk68wnWrNa3IVBQk6lEByUMmpKDbYtcx1DiFUdV/XVaSu57z1A+R q6FAdFEQMqCjKJXD05Nfjr0sJj+Wr/ZEGewFzFMLDX/sLMfVZvbCyxM89dYV/VEubjUNbd 8SC/QDAADpn0oykR5A6BOpTv9lN5jVlU/nxzPz18YRbp/WTeMQLZvtQoAhf9kA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtz5N0PjdzGYF; Thu, 21 Nov 2024 00:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL05RrL087652; Thu, 21 Nov 2024 00:05:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL05RjE087649; Thu, 21 Nov 2024 00:05:27 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:05:27 GMT Message-Id: <202411210005.4AL05RjE087649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7d0c12e1f907 - stable/14 - bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7d0c12e1f907ddf9be6668449a966703c0f781d1 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7d0c12e1f907ddf9be6668449a966703c0f781d1 commit 7d0c12e1f907ddf9be6668449a966703c0f781d1 Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 00:04:57 +0000 bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant Make sure an interface is back up before (re-)starting wpa_supplicant in wlanconfig not relying on wpa to UP the interface (though we fixed that). Sponsored by: The FreeBSD Foundation Reviewed by: emaste (in D47491) Differential Revision: https://reviews.freebsd.org/D47491 (cherry picked from commit 5399052c63a7a3d2f54615d31bfd092ab887a600) --- usr.sbin/bsdinstall/scripts/wlanconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 338e4f0a4109..728833f8d4a0 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -55,7 +55,8 @@ country_set() "$WLAN_IFACE" "$ifconfig_args" error_str="${error_str#ifconfig: }" # Restart wpa_supplicant(8) (should not fail). - [ "$iface_up" ] && f_eval_catch -d wlanconfig wpa_supplicant \ + [ "$iface_up" ] && ifconfig "$WLAN_IFACE" up && \ + f_eval_catch -d wlanconfig wpa_supplicant \ 'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \ "$WLAN_IFACE" "$BSDINSTALL_TMPETC" if [ "$error_str" ]; then From nobody Thu Nov 21 00:05:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtz5P46bKz5dw44; Thu, 21 Nov 2024 00:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtz5P2dF6z4DXF; Thu, 21 Nov 2024 00:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OsZU/oSvIJjPFScRjAUDfEJvF5CsT52NYTVzyItALds=; b=ua7dER6CE2O3b3X0ocN9g8OcZMYO5j1az3s86BUO7RQBQTvUz1qvg9gYoKT7SLRORMd8NY adA7+PlB4ikGLsETIol+WD+p2tDxuifv58tsBALQ4k5NzWE5AkrHOuNT+WtJN/M+rFULeW QsI/ffh5jI02sIWCKAtreYH0RADxRxZ725+6skHXPTcY1n9PyhloKo62fzLIJx9/s9pFNX 8TG3hloe+v6XaCplSlqjYgqQaTgkRF/fbQ1/Sv9SQ3BzdnZ3kbC8GCqxZUmeBUZC3oQGzc gbL7+mMH07Cb8AjboN1ypqhFncE5HF5zCkhAd68Sc+cQ3xDxCCpxuBPJa0/sEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OsZU/oSvIJjPFScRjAUDfEJvF5CsT52NYTVzyItALds=; b=v8FC4UQ+M+bLVdbI7tOt4nsAIr4a4DGxJXAsSazOVW5LsFAGF83dwrCPIw6aknlRIVhUqA 8PpICGkyi9hfPBTsRGL4Q169Wje29PMYm7ONNCsIpHyDLu6ESyylZVKO0mJBN3z+VDWlWu xu6ZB2U0esNXD6+llXpm1LS/xxlPR8EsldhDLUURdvXnE3xScpubsRi412nTgcfPYIZtED hCFT2RSixNUB1Qpe4HIWVsxrPigAtR3r4TO0hApdvNgP9LgPgalo2bWnB+gENIMZJk8IG/ PCcu5lHyuBls9CO0kMr5Z8EV04PSUQyEiZOT9eEHNL0E6dss1QOYuUTUQrlBBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732147529; a=rsa-sha256; cv=none; b=rGsyoIKO1VVIOF1P6mi6DIrM5A5wHFCOyt7RInWQNOOLvW1T+jaFBqP2ibAzICD9NmAm3I uE/nTUrdUsopuFDXuRft7RbKfJuybAoK52GmwFai3ELaUEcRkkGYGxtYzdCZhf58cSIJRe avowF9btJC/9jxsLbz5NPIvgh+asV7yPFPfPCCdMsEBDn3is0XKDNeYVh5/VijIqe/AJPa oC7pAplocnfBXUdGY5i2co3WT2zVsB52SQrfDo6huBiw1Q/DlyV0K8GGAMT6arAoEUlNoP GLcjwF5ervPW3+pjQv1BHsX+9oG2jF0n8PUYguDSxYxE5wLIx4zjcGBlQAVuvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtz5P1R1PzG60; Thu, 21 Nov 2024 00:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL05TgI087700; Thu, 21 Nov 2024 00:05:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL05Tjg087697; Thu, 21 Nov 2024 00:05:29 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:05:29 GMT Message-Id: <202411210005.4AL05Tjg087697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 15f6edf20e4e - stable/14 - bsdinstall: add menu to install firmware List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 15f6edf20e4e1542f2385a9cbd6e996e23252858 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=15f6edf20e4e1542f2385a9cbd6e996e23252858 commit 15f6edf20e4e1542f2385a9cbd6e996e23252858 Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 00:04:57 +0000 bsdinstall: add menu to install firmware Add a menu to the installer to run fwget(8) inside the newly installed system to install firmware known to be needed. This requires working netowrking. This is needed at least for wireless currently for when we entirely stop shipping new firmware in src.git to have working networking on the installed system (we already do need this for at least rtw89). Sponsored by: The FreeBSD Foundation Tested with: 4 different iwlwifi chipsets in a system (earlier version) Suggested improvments by: jrtc27 Differential Revision: https://reviews.freebsd.org/D47491 (cherry picked from commit bbe2a1da2df639c616869aa838244c8094779bd4) --- usr.sbin/bsdinstall/bsdinstall.8 | 19 +++++- usr.sbin/bsdinstall/scripts/Makefile | 1 + usr.sbin/bsdinstall/scripts/auto | 1 + usr.sbin/bsdinstall/scripts/firmware | 125 +++++++++++++++++++++++++++++++++++ 4 files changed, 145 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index c8bf143322ae..50c8948a7989 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -1,6 +1,10 @@ .\"- .\" Copyright (c) 2011-2013 Nathan Whitehorn All rights reserved. .\" Copyright (c) 2018 Roberto Fernandez Cueto +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Björn Zeeb +.\" 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 @@ -23,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 18, 2023 +.Dd November 4, 2024 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -240,6 +244,12 @@ Extracts the distributions listed in .Ev DISTRIBUTIONS into .Ev BSDINSTALL_CHROOT . +.It Cm firmware +executes +.Xr fwget 8 +inside the +.Ev BSDINSTALL_CHROOT +to install any needed and available firmware for the new system. .It Cm rootpass Interactively invokes .Xr passwd 1 @@ -323,6 +333,13 @@ Default: Path to a log file for the installation. Default: .Dq Pa $TMPDIR/bsdinstall_log +.It Ev BSDINSTALL_SKIP_FIRMWARE +If not empty, the +.Cm auto +target +will not invoke the +.Cm firmware +target. .It Ev BSDINSTALL_SKIP_HARDENING If not empty, the .Cm auto diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index 2d226f418783..cbe190d85f12 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -7,6 +7,7 @@ SCRIPTS=auto \ docsinstall \ entropy \ fetchmissingdists \ + firmware \ hardening \ hostname \ jail \ diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index fd5b634696ae..6a89b3dfdd81 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -364,6 +364,7 @@ fi [ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time [ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services [ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening +[ -z "$BSDINSTALL_SKIP_FIRMWARE" ] && bsdinstall firmware [ -z "$BSDINSTALL_SKIP_USERS" ] && dialog --backtitle "$OSNAME Installer" \ --title "Add User Accounts" --yesno \ diff --git a/usr.sbin/bsdinstall/scripts/firmware b/usr.sbin/bsdinstall/scripts/firmware new file mode 100644 index 000000000000..a563f0e578e4 --- /dev/null +++ b/usr.sbin/bsdinstall/scripts/firmware @@ -0,0 +1,125 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr + +msg_freebsd_firmware_installation="$OSNAME Firmware Installation" +msg_freebsd_installer="$OSNAME Installer" +msg_firmware_menu_text="This menu allows you to install firmware packages for your system" +hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" +hline_ok="Press OK to continue" + +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_firmware_menu_text" + local hline + local check_list= # Empty; filled below + local fwlist _fw + + fwlist=`chroot $BSDINSTALL_CHROOT fwget -q -n` + case "${fwlist}" in + "") # No firmware to install + # Print a dialog with OK and a 3 line timeout bar. + local height width rows msg + + msg="No firmware to install, continuing..." + hline="$hline_ok" + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$msg\" \ + \"-\" \ + \"n\" \ + \"-\" \ + \"\$hline\" + + ${DIALOG} --title "${title}" --backtitle "${btitle}" \ + --hline "${hline}" \ + --nocancel --pause "${msg}" $height $width 5 + f_dialog_menutag_store -s "" + return $DIALOG_OK + ;; + *) + local desc status height width rows selected retval + hline="$hline_arrows_space_tab_enter" + + for _fw in ${fwlist}; do + desc="${_fw}" + f_shell_escape "$desc" desc + # install each firmware package by default. + check_list="$check_list + '$_fw' '$desc' 'on' + " + done + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\$hline\" \ + $check_list + + selected=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --separate-output \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + retval=$? + f_dialog_menutag_store -s "$selected" + return $retval + ;; + esac +} + +# Initialize +f_dialog_title "$msg_freebsd_firmware_installation" +f_dialog_backtitle "$msg_freebsd_installer" + +# Gather the firmware files and present them to the user +dialog_menu_main || f_die +f_dialog_menutag_fetch selected + +# Nothing to install? +if [ "${selected}" == "" ]; then + exit 0 +fi + +f_mustberoot_init + +# pkg(8) needs name servers (unless we could use a local repo in the future). +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ + +${DIALOG} --title "$DIALOG_TITLE" --backtitle "$DIALOG_BACKTITLE" \ + --infobox "Installing firmware. This may take a moment." 0 0 + +# Install each of the selected firmware packages +for fw in ${selected}; do + # We install one at a time in case one is not avail. + # pkg-install.8 needs an option to skip unavail. + ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install -qy ${fw} +done + +# end From nobody Thu Nov 21 00:39:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtzrG2JJsz5dxkF; Thu, 21 Nov 2024 00:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtzrG24NMz4Gy2; Thu, 21 Nov 2024 00:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732149550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jgF6CBshNcXI47S0YiNZkApnXBaGXKvCjxPc/lAUYmo=; b=qE2Zf/GwcuNxwvtX44RMtxBSVzildWSzhdyG1brDVNyWyUnyAfZVqU1HqKs96JRA+Xs2KV kOqTJiaZCbBM1OD68PYHEsTuWctLL7m8JUgfVy48/3QaIFFgSP/gXTSokmmGaLqOHQAPYw /lU1M0QNwc4U9gfFeSve6vvYQAd7qjVYde5app/RG/A/3n07b/HqIb+UzQk2URwejl4gGK gkAZV3+1g3FERSWXY3+wrhpJEUMi2or44B8uQzYWAGjVc9Sg/rTVF9MKgEKmrJ//cn9Z5U PSHX3TmaF6x6Kh3+CIcLwOIozzIPn4ABELQIv4TdOBMTO8vbfOBv4mAPiv/tzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732149550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jgF6CBshNcXI47S0YiNZkApnXBaGXKvCjxPc/lAUYmo=; b=Q1jxO5dT7F+XUvhD370qjk0dlKlvvW+8ns6LwEDRcsALd4OOgLZmSvN0G4sLoEoyr0hBpv TOtGKQMlvCwGhthif1EVrfg1qOX7Thy3jJI54+7nN9IOdpN8H4t+LIn8zkY01vSLGQPysJ y+BGYP+h6nXaSVM1d4/RUO+EAcaMk/2/jH/GZq/W28sIelmvoWY+EPd7nWjPiajjcJaaRi WZFeiTEZczARUetzlRSdgdU3W7dbuBmhebzQUGA3Ww6iPfXZxWpj6Wu5+P9zfM75M8Z8rJ dOUgd1B8H2r6nzt0JNJAgqQN62CPK5yn76q4oi+wCvuqjc0PrKy8ziUDw3n5lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732149550; a=rsa-sha256; cv=none; b=Bk2uJz4KbQRbI/lVL3uTsoZytl9KYLzI4BRwZbo+CHYI9TkItwcBii6bNJroT0z+79vVDl iHXuuvHCaoO/fqfdd6mUnoQ21PWit6TpHG6e6hxs0e536c6iPJD4/oDVcvV11KTDatoUJf Ef1XWyLfqvT9CgV0qkMhx4wysaCULDc/3OYB7fr+wfMz30yFycCrEy2d5YVCv795de5DcW t++dGoLjkoF8WJIjN8Fc8wTRIss6QUgpClwrZlb0amYvgVg1uLkngwsPiVpoJ1gVjxeY1D 8IqhbRjtnqCZgpMfYSGr+mFIY9k2rFI2xzLtAsX6Vs8Fe87Sp49HPnz8ChQ4MQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtzrG1YJHzHMT; Thu, 21 Nov 2024 00:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL0dAvn044276; Thu, 21 Nov 2024 00:39:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL0dAGL044273; Thu, 21 Nov 2024 00:39:10 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:39:10 GMT Message-Id: <202411210039.4AL0dAGL044273@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: 09000cc133d8 - main - tcp: mechanically rename hostcache metrics structure fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 09000cc133d82fc614d9f61d064e3acf7fa8b875 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=09000cc133d82fc614d9f61d064e3acf7fa8b875 commit 09000cc133d82fc614d9f61d064e3acf7fa8b875 Author: Gleb Smirnoff AuthorDate: 2024-11-21 00:28:15 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-21 00:29:00 +0000 tcp: mechanically rename hostcache metrics structure fields Use hc_ prefix instead of rmx_. The latter stands for "route metrix" and is an artifact from the 90-ies, when TCP caching was embedded into the routing table. The rename should have happened back in 97d8d152c28bb. No functional change. Done with sed(1) command: s/rmx_(mtu|ssthresh|rtt|rttvar|cwnd|sendpipe|recvpipe|granularity|expire|q|hits|updates)/hc_\1/g --- sys/netinet/tcp_hostcache.c | 186 ++++++++++++++++++++++---------------------- sys/netinet/tcp_input.c | 22 +++--- sys/netinet/tcp_subr.c | 12 +-- sys/netinet/tcp_var.h | 14 ++-- 4 files changed, 117 insertions(+), 117 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index a42ed8dc0d15..900c70b5cd14 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -99,23 +99,23 @@ struct hc_head { struct hc_metrics { /* housekeeping */ - CK_SLIST_ENTRY(hc_metrics) rmx_q; + CK_SLIST_ENTRY(hc_metrics) hc_q; struct in_addr ip4; /* IP address */ struct in6_addr ip6; /* IP6 address */ uint32_t ip6_zoneid; /* IPv6 scope zone id */ /* endpoint specific values for tcp */ - uint32_t rmx_mtu; /* MTU for this path */ - uint32_t rmx_ssthresh; /* outbound gateway buffer limit */ - uint32_t rmx_rtt; /* estimated round trip time */ - uint32_t rmx_rttvar; /* estimated rtt variance */ - uint32_t rmx_cwnd; /* congestion window */ - uint32_t rmx_sendpipe; /* outbound delay-bandwidth product */ - uint32_t rmx_recvpipe; /* inbound delay-bandwidth product */ + uint32_t hc_mtu; /* MTU for this path */ + uint32_t hc_ssthresh; /* outbound gateway buffer limit */ + uint32_t hc_rtt; /* estimated round trip time */ + uint32_t hc_rttvar; /* estimated rtt variance */ + uint32_t hc_cwnd; /* congestion window */ + uint32_t hc_sendpipe; /* outbound delay-bandwidth product */ + uint32_t hc_recvpipe; /* inbound delay-bandwidth product */ /* TCP hostcache internal data */ - int rmx_expire; /* lifetime for object */ + int hc_expire; /* lifetime for object */ #ifdef TCP_HC_COUNTERS - u_long rmx_hits; /* number of hits */ - u_long rmx_updates; /* number of updates */ + u_long hc_hits; /* number of hits */ + u_long hc_updates; /* number of updates */ #endif }; @@ -347,17 +347,17 @@ tcp_hc_lookup(struct in_conninfo *inc) * Iterate through entries in bucket row looking for a match. */ smr_enter(V_tcp_hostcache.smr); - CK_SLIST_FOREACH(hc_entry, &hc_head->hch_bucket, rmx_q) + CK_SLIST_FOREACH(hc_entry, &hc_head->hch_bucket, hc_q) if (tcp_hc_cmp(hc_entry, inc)) break; if (hc_entry != NULL) { - if (atomic_load_int(&hc_entry->rmx_expire) != + if (atomic_load_int(&hc_entry->hc_expire) != V_tcp_hostcache.expire) - atomic_store_int(&hc_entry->rmx_expire, + atomic_store_int(&hc_entry->hc_expire, V_tcp_hostcache.expire); #ifdef TCP_HC_COUNTERS - hc_entry->rmx_hits++; + hc_entry->hc_hits++; #endif } else smr_exit(V_tcp_hostcache.smr); @@ -393,13 +393,13 @@ tcp_hc_get(struct in_conninfo *inc, struct hc_metrics_lite *hc_metrics_lite) return; } - hc_metrics_lite->rmx_mtu = atomic_load_32(&hc_entry->rmx_mtu); - hc_metrics_lite->rmx_ssthresh = atomic_load_32(&hc_entry->rmx_ssthresh); - hc_metrics_lite->rmx_rtt = atomic_load_32(&hc_entry->rmx_rtt); - hc_metrics_lite->rmx_rttvar = atomic_load_32(&hc_entry->rmx_rttvar); - hc_metrics_lite->rmx_cwnd = atomic_load_32(&hc_entry->rmx_cwnd); - hc_metrics_lite->rmx_sendpipe = atomic_load_32(&hc_entry->rmx_sendpipe); - hc_metrics_lite->rmx_recvpipe = atomic_load_32(&hc_entry->rmx_recvpipe); + hc_metrics_lite->hc_mtu = atomic_load_32(&hc_entry->hc_mtu); + hc_metrics_lite->hc_ssthresh = atomic_load_32(&hc_entry->hc_ssthresh); + hc_metrics_lite->hc_rtt = atomic_load_32(&hc_entry->hc_rtt); + hc_metrics_lite->hc_rttvar = atomic_load_32(&hc_entry->hc_rttvar); + hc_metrics_lite->hc_cwnd = atomic_load_32(&hc_entry->hc_cwnd); + hc_metrics_lite->hc_sendpipe = atomic_load_32(&hc_entry->hc_sendpipe); + hc_metrics_lite->hc_recvpipe = atomic_load_32(&hc_entry->hc_recvpipe); smr_exit(V_tcp_hostcache.smr); } @@ -423,7 +423,7 @@ tcp_hc_getmtu(struct in_conninfo *inc) return (0); } - mtu = atomic_load_32(&hc_entry->rmx_mtu); + mtu = atomic_load_32(&hc_entry->hc_mtu); smr_exit(V_tcp_hostcache.smr); return (mtu); @@ -436,7 +436,7 @@ tcp_hc_getmtu(struct in_conninfo *inc) void tcp_hc_updatemtu(struct in_conninfo *inc, uint32_t mtu) { - struct hc_metrics_lite hcml = { .rmx_mtu = mtu }; + struct hc_metrics_lite hcml = { .hc_mtu = mtu }; return (tcp_hc_update(inc, &hcml)); } @@ -460,20 +460,20 @@ tcp_hc_update(struct in_conninfo *inc, struct hc_metrics_lite *hcml) hc_prev = NULL; THC_LOCK(hc_head); - CK_SLIST_FOREACH(hc_entry, &hc_head->hch_bucket, rmx_q) { + CK_SLIST_FOREACH(hc_entry, &hc_head->hch_bucket, hc_q) { if (tcp_hc_cmp(hc_entry, inc)) break; - if (CK_SLIST_NEXT(hc_entry, rmx_q) != NULL) + if (CK_SLIST_NEXT(hc_entry, hc_q) != NULL) hc_prev = hc_entry; } if (hc_entry != NULL) { - if (atomic_load_int(&hc_entry->rmx_expire) != + if (atomic_load_int(&hc_entry->hc_expire) != V_tcp_hostcache.expire) - atomic_store_int(&hc_entry->rmx_expire, + atomic_store_int(&hc_entry->hc_expire, V_tcp_hostcache.expire); #ifdef TCP_HC_COUNTERS - hc_entry->rmx_updates++; + hc_entry->hc_updates++; #endif new = false; } else { @@ -491,18 +491,18 @@ tcp_hc_update(struct in_conninfo *inc, struct hc_metrics_lite *hcml) atomic_load_int(&V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { if (hc_prev != NULL) { - hc_entry = CK_SLIST_NEXT(hc_prev, rmx_q); - KASSERT(CK_SLIST_NEXT(hc_entry, rmx_q) == NULL, + hc_entry = CK_SLIST_NEXT(hc_prev, hc_q); + KASSERT(CK_SLIST_NEXT(hc_entry, hc_q) == NULL, ("%s: %p is not one to last", __func__, hc_prev)); - CK_SLIST_REMOVE_AFTER(hc_prev, rmx_q); + CK_SLIST_REMOVE_AFTER(hc_prev, hc_q); } else if ((hc_entry = CK_SLIST_FIRST(&hc_head->hch_bucket)) != NULL) { - KASSERT(CK_SLIST_NEXT(hc_entry, rmx_q) == NULL, + KASSERT(CK_SLIST_NEXT(hc_entry, hc_q) == NULL, ("%s: %p is not the only element", __func__, hc_entry)); CK_SLIST_REMOVE_HEAD(&hc_head->hch_bucket, - rmx_q); + hc_q); } else { THC_UNLOCK(hc_head); return; @@ -535,7 +535,7 @@ tcp_hc_update(struct in_conninfo *inc, struct hc_metrics_lite *hcml) hc_entry->ip6_zoneid = inc->inc6_zoneid; } else hc_entry->ip4 = inc->inc_faddr; - hc_entry->rmx_expire = V_tcp_hostcache.expire; + hc_entry->hc_expire = V_tcp_hostcache.expire; new = true; } @@ -543,60 +543,60 @@ tcp_hc_update(struct in_conninfo *inc, struct hc_metrics_lite *hcml) * Fill in data. Use atomics, since an existing entry is * accessible by readers in SMR section. */ - if (hcml->rmx_mtu != 0) { - atomic_store_32(&hc_entry->rmx_mtu, hcml->rmx_mtu); + if (hcml->hc_mtu != 0) { + atomic_store_32(&hc_entry->hc_mtu, hcml->hc_mtu); } - if (hcml->rmx_rtt != 0) { - if (hc_entry->rmx_rtt == 0) - v = hcml->rmx_rtt; + if (hcml->hc_rtt != 0) { + if (hc_entry->hc_rtt == 0) + v = hcml->hc_rtt; else - v = ((uint64_t)hc_entry->rmx_rtt + - (uint64_t)hcml->rmx_rtt) / 2; - atomic_store_32(&hc_entry->rmx_rtt, v); + v = ((uint64_t)hc_entry->hc_rtt + + (uint64_t)hcml->hc_rtt) / 2; + atomic_store_32(&hc_entry->hc_rtt, v); TCPSTAT_INC(tcps_cachedrtt); } - if (hcml->rmx_rttvar != 0) { - if (hc_entry->rmx_rttvar == 0) - v = hcml->rmx_rttvar; + if (hcml->hc_rttvar != 0) { + if (hc_entry->hc_rttvar == 0) + v = hcml->hc_rttvar; else - v = ((uint64_t)hc_entry->rmx_rttvar + - (uint64_t)hcml->rmx_rttvar) / 2; - atomic_store_32(&hc_entry->rmx_rttvar, v); + v = ((uint64_t)hc_entry->hc_rttvar + + (uint64_t)hcml->hc_rttvar) / 2; + atomic_store_32(&hc_entry->hc_rttvar, v); TCPSTAT_INC(tcps_cachedrttvar); } - if (hcml->rmx_ssthresh != 0) { - if (hc_entry->rmx_ssthresh == 0) - v = hcml->rmx_ssthresh; + if (hcml->hc_ssthresh != 0) { + if (hc_entry->hc_ssthresh == 0) + v = hcml->hc_ssthresh; else - v = (hc_entry->rmx_ssthresh + hcml->rmx_ssthresh) / 2; - atomic_store_32(&hc_entry->rmx_ssthresh, v); + v = (hc_entry->hc_ssthresh + hcml->hc_ssthresh) / 2; + atomic_store_32(&hc_entry->hc_ssthresh, v); TCPSTAT_INC(tcps_cachedssthresh); } - if (hcml->rmx_cwnd != 0) { - if (hc_entry->rmx_cwnd == 0) - v = hcml->rmx_cwnd; + if (hcml->hc_cwnd != 0) { + if (hc_entry->hc_cwnd == 0) + v = hcml->hc_cwnd; else - v = ((uint64_t)hc_entry->rmx_cwnd + - (uint64_t)hcml->rmx_cwnd) / 2; - atomic_store_32(&hc_entry->rmx_cwnd, v); + v = ((uint64_t)hc_entry->hc_cwnd + + (uint64_t)hcml->hc_cwnd) / 2; + atomic_store_32(&hc_entry->hc_cwnd, v); /* TCPSTAT_INC(tcps_cachedcwnd); */ } - if (hcml->rmx_sendpipe != 0) { - if (hc_entry->rmx_sendpipe == 0) - v = hcml->rmx_sendpipe; + if (hcml->hc_sendpipe != 0) { + if (hc_entry->hc_sendpipe == 0) + v = hcml->hc_sendpipe; else - v = ((uint64_t)hc_entry->rmx_sendpipe + - (uint64_t)hcml->rmx_sendpipe) /2; - atomic_store_32(&hc_entry->rmx_sendpipe, v); + v = ((uint64_t)hc_entry->hc_sendpipe + + (uint64_t)hcml->hc_sendpipe) /2; + atomic_store_32(&hc_entry->hc_sendpipe, v); /* TCPSTAT_INC(tcps_cachedsendpipe); */ } - if (hcml->rmx_recvpipe != 0) { - if (hc_entry->rmx_recvpipe == 0) - v = hcml->rmx_recvpipe; + if (hcml->hc_recvpipe != 0) { + if (hc_entry->hc_recvpipe == 0) + v = hcml->hc_recvpipe; else - v = ((uint64_t)hc_entry->rmx_recvpipe + - (uint64_t)hcml->rmx_recvpipe) /2; - atomic_store_32(&hc_entry->rmx_recvpipe, v); + v = ((uint64_t)hc_entry->hc_recvpipe + + (uint64_t)hcml->hc_recvpipe) /2; + atomic_store_32(&hc_entry->hc_recvpipe, v); /* TCPSTAT_INC(tcps_cachedrecvpipe); */ } @@ -604,17 +604,17 @@ tcp_hc_update(struct in_conninfo *inc, struct hc_metrics_lite *hcml) * Put it upfront. */ if (new) { - CK_SLIST_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); + CK_SLIST_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, hc_q); hc_head->hch_length++; KASSERT(hc_head->hch_length <= V_tcp_hostcache.bucket_limit, ("tcp_hostcache: bucket length too high at %p", hc_head)); atomic_add_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_added); } else if (hc_entry != CK_SLIST_FIRST(&hc_head->hch_bucket)) { - KASSERT(CK_SLIST_NEXT(hc_prev, rmx_q) == hc_entry, + KASSERT(CK_SLIST_NEXT(hc_prev, hc_q) == hc_entry, ("%s: %p next is not %p", __func__, hc_prev, hc_entry)); - CK_SLIST_REMOVE_AFTER(hc_prev, rmx_q); - CK_SLIST_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); + CK_SLIST_REMOVE_AFTER(hc_prev, hc_q); + CK_SLIST_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, hc_q); } THC_UNLOCK(hc_head); } @@ -667,7 +667,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { THC_LOCK(&V_tcp_hostcache.hashbase[i]); CK_SLIST_FOREACH(hc_entry, - &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { + &V_tcp_hostcache.hashbase[i].hch_bucket, hc_q) { sbuf_printf(&sb, "%-15s %5u %8u %6lums %6lums %8u %8u %8u " #ifdef TCP_HC_COUNTERS @@ -681,20 +681,20 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) #else "IPv6?", #endif - hc_entry->rmx_mtu, - hc_entry->rmx_ssthresh, - msec((u_long)hc_entry->rmx_rtt * + hc_entry->hc_mtu, + hc_entry->hc_ssthresh, + msec((u_long)hc_entry->hc_rtt * (RTM_RTTUNIT / (hz * TCP_RTT_SCALE))), - msec((u_long)hc_entry->rmx_rttvar * + msec((u_long)hc_entry->hc_rttvar * (RTM_RTTUNIT / (hz * TCP_RTTVAR_SCALE))), - hc_entry->rmx_cwnd, - hc_entry->rmx_sendpipe, - hc_entry->rmx_recvpipe, + hc_entry->hc_cwnd, + hc_entry->hc_sendpipe, + hc_entry->hc_recvpipe, #ifdef TCP_HC_COUNTERS - hc_entry->rmx_hits, - hc_entry->rmx_updates, + hc_entry->hc_hits, + hc_entry->hc_updates, #endif - hc_entry->rmx_expire); + hc_entry->hc_expire); } THC_UNLOCK(&V_tcp_hostcache.hashbase[i]); sbuf_drain(&sb); @@ -761,33 +761,33 @@ tcp_hc_purge_internal(int all) head = &V_tcp_hostcache.hashbase[i]; hc_prev = NULL; THC_LOCK(head); - CK_SLIST_FOREACH_SAFE(hc_entry, &head->hch_bucket, rmx_q, + CK_SLIST_FOREACH_SAFE(hc_entry, &head->hch_bucket, hc_q, hc_next) { KASSERT(head->hch_length > 0 && head->hch_length <= V_tcp_hostcache.bucket_limit, ("tcp_hostcache: " "bucket length out of range at %u: %u", i, head->hch_length)); if (all || - atomic_load_int(&hc_entry->rmx_expire) <= 0) { + atomic_load_int(&hc_entry->hc_expire) <= 0) { if (hc_prev != NULL) { KASSERT(hc_entry == - CK_SLIST_NEXT(hc_prev, rmx_q), + CK_SLIST_NEXT(hc_prev, hc_q), ("%s: %p is not next to %p", __func__, hc_entry, hc_prev)); - CK_SLIST_REMOVE_AFTER(hc_prev, rmx_q); + CK_SLIST_REMOVE_AFTER(hc_prev, hc_q); } else { KASSERT(hc_entry == CK_SLIST_FIRST(&head->hch_bucket), ("%s: %p is not first", __func__, hc_entry)); CK_SLIST_REMOVE_HEAD(&head->hch_bucket, - rmx_q); + hc_q); } uma_zfree_smr(V_tcp_hostcache.zone, hc_entry); head->hch_length--; atomic_subtract_int(&V_tcp_hostcache.cache_count, 1); } else { - atomic_subtract_int(&hc_entry->rmx_expire, + atomic_subtract_int(&hc_entry->hc_expire, V_tcp_hostcache.prune); hc_prev = hc_entry; } diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 7ef480d949e4..f9ecdf93cc47 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -368,11 +368,11 @@ cc_conn_init(struct tcpcb *tp) tcp_hc_get(&inp->inp_inc, &metrics); maxseg = tcp_maxseg(tp); - if (tp->t_srtt == 0 && (rtt = metrics.rmx_rtt)) { + if (tp->t_srtt == 0 && (rtt = metrics.hc_rtt)) { tp->t_srtt = rtt; TCPSTAT_INC(tcps_usedrtt); - if (metrics.rmx_rttvar) { - tp->t_rttvar = metrics.rmx_rttvar; + if (metrics.hc_rttvar) { + tp->t_rttvar = metrics.hc_rttvar; TCPSTAT_INC(tcps_usedrttvar); } else { /* default variation is +- 1 rtt */ @@ -383,14 +383,14 @@ cc_conn_init(struct tcpcb *tp) ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1, tp->t_rttmin, TCPTV_REXMTMAX); } - if (metrics.rmx_ssthresh) { + if (metrics.hc_ssthresh) { /* * There's some sort of gateway or interface * buffer limit on the path. Use this to set * the slow start threshold, but set the * threshold to no less than 2*mss. */ - tp->snd_ssthresh = max(2 * maxseg, metrics.rmx_ssthresh); + tp->snd_ssthresh = max(2 * maxseg, metrics.hc_ssthresh); TCPSTAT_INC(tcps_usedssthresh); } @@ -3888,8 +3888,8 @@ tcp_mss_update(struct tcpcb *tp, int offer, int mtuoffer, * If there's a discovered mtu in tcp hostcache, use it. * Else, use the link mtu. */ - if (metrics.rmx_mtu) - mss = min(metrics.rmx_mtu, maxmtu) - min_protoh; + if (metrics.hc_mtu) + mss = min(metrics.hc_mtu, maxmtu) - min_protoh; else { #ifdef INET6 if (isipv6) { @@ -3981,8 +3981,8 @@ tcp_mss(struct tcpcb *tp, int offer) */ so = inp->inp_socket; SOCK_SENDBUF_LOCK(so); - if ((so->so_snd.sb_hiwat == V_tcp_sendspace) && metrics.rmx_sendpipe) - bufsize = metrics.rmx_sendpipe; + if ((so->so_snd.sb_hiwat == V_tcp_sendspace) && metrics.hc_sendpipe) + bufsize = metrics.hc_sendpipe; else bufsize = so->so_snd.sb_hiwat; if (bufsize < mss) @@ -4016,8 +4016,8 @@ tcp_mss(struct tcpcb *tp, int offer) } SOCK_RECVBUF_LOCK(so); - if ((so->so_rcv.sb_hiwat == V_tcp_recvspace) && metrics.rmx_recvpipe) - bufsize = metrics.rmx_recvpipe; + if ((so->so_rcv.sb_hiwat == V_tcp_recvspace) && metrics.hc_recvpipe) + bufsize = metrics.hc_recvpipe; else bufsize = so->so_rcv.sb_hiwat; if (bufsize > mss) { diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 872ea6249051..c30b3aaf76c3 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2507,13 +2507,13 @@ tcp_discardcb(struct tcpcb *tp) ); } else ssthresh = 0; - metrics.rmx_ssthresh = ssthresh; + metrics.hc_ssthresh = ssthresh; - metrics.rmx_rtt = tp->t_srtt; - metrics.rmx_rttvar = tp->t_rttvar; - metrics.rmx_cwnd = tp->snd_cwnd; - metrics.rmx_sendpipe = 0; - metrics.rmx_recvpipe = 0; + metrics.hc_rtt = tp->t_srtt; + metrics.hc_rttvar = tp->t_rttvar; + metrics.hc_cwnd = tp->snd_cwnd; + metrics.hc_sendpipe = 0; + metrics.hc_recvpipe = 0; tcp_hc_update(&inp->inp_inc, &metrics); } diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 9f28e8247e3e..17c39bd93287 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -892,13 +892,13 @@ struct tcpopt { #define TO_SYN 0x01 /* parse SYN-only options */ struct hc_metrics_lite { /* must stay in sync with hc_metrics */ - uint32_t rmx_mtu; /* MTU for this path */ - uint32_t rmx_ssthresh; /* outbound gateway buffer limit */ - uint32_t rmx_rtt; /* estimated round trip time */ - uint32_t rmx_rttvar; /* estimated rtt variance */ - uint32_t rmx_cwnd; /* congestion window */ - uint32_t rmx_sendpipe; /* outbound delay-bandwidth product */ - uint32_t rmx_recvpipe; /* inbound delay-bandwidth product */ + uint32_t hc_mtu; /* MTU for this path */ + uint32_t hc_ssthresh; /* outbound gateway buffer limit */ + uint32_t hc_rtt; /* estimated round trip time */ + uint32_t hc_rttvar; /* estimated rtt variance */ + uint32_t hc_cwnd; /* congestion window */ + uint32_t hc_sendpipe; /* outbound delay-bandwidth product */ + uint32_t hc_recvpipe; /* inbound delay-bandwidth product */ }; #ifndef _NETINET_IN_PCB_H_ From nobody Thu Nov 21 00:39:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtzrH3Qw4z5dxsF; Thu, 21 Nov 2024 00:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtzrH2b8Pz4Gy3; Thu, 21 Nov 2024 00:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732149551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ilIiT2rBxNNVmZeKtqKdsbR/vV6h1BRFZxTCYTjlOJQ=; b=ts/mSp1d7nO0BTBLpQ8CY+lMaZcK7zfHOZKM7XqljOEBTChRKbmv2G+3vsQ4UoJnrA2cpA 8VK9LaHJWVXtwexXLWetGp+76DFnBP02KS8GCoU+W6WJwcw1cVhtbe2wg7JvxkGZt/olzr MiXyvBXB0LwfcpN6EUtSKVMFzWgYZPIU+hh7g7C5hsUSpny4lEVEavB5WKHuY/2u49RkhB yaIW6l+uifSoivEjalA2/X/B3sfh/jS4NO6TICcj4gFARJ5rWL3Qq6Yt0V7BOMyKKCTf4W LFhN6K91BJbdZbuElIrSQx1nws3yfta56rqMJ7ADpBjnqTRGOTLQLHv0+MHHlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732149551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ilIiT2rBxNNVmZeKtqKdsbR/vV6h1BRFZxTCYTjlOJQ=; b=wqYFWyb01zCkNy2Y3X7AsPu2VvN+VV+PHYBdV4CP8j8TRVwjypXUD4WKL7L1IgQ63Loofn u3u8FSeAdiyR3yRsh3ZVAme8c4OP+aYuYDwkS9zDG3tt/1bbqVutWNrODsB8xU9NPXhn6f wbyO1ECYn/ffbETcfBrH1dYId1KqrI3pmsMLO6vQl2HTNPMC6v5JlST92n0SsNf8lhZQDl m/NeP8pnkfD3D3tvIorS8q8jO4GNx58P0u1Ol5iA5szL5wzp3nG51KpbB26m3ZfXdrILf9 EapQXjpmDq5yLvAZmItrZ9QtZGPCh90CXlTRTbLjuDhrfRF3J7z3oft94Qb+XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732149551; a=rsa-sha256; cv=none; b=YXeXw89Z5XvjmFn+QNuBXXkKbXdfIA1yG+UP5KxtxHBqNwvxwo/ZvjR3DRIi5KasAtD2nM OSl2NlfCIi2kX8lOnMb6hRoA5jTxjttmhCfLQjIlhS4hrHqhQ/rTma7Y312wnFA1K6sLPw 3U43v+Rm2gsFoMx38pGKID2s8oalT5mZCTud+bRH303/87y5HGZJlTf/0jFBSBu7TLWZ5J WhErZox8JfLwtVCTuJgOUrkowwUrW9uyBr5PbrB8ROiu0t3MvlqOssDCzvnz6v2srW1xLb NFTyKjAQATpgpZaNZgIwRUGtW/gpWE10hyfzlI7TkPc88W5lR6Ih5n3SEEuy4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtzrH2BRszH4W; Thu, 21 Nov 2024 00:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL0dBVi044365; Thu, 21 Nov 2024 00:39:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL0dBh5044360; Thu, 21 Nov 2024 00:39:11 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:39:11 GMT Message-Id: <202411210039.4AL0dBh5044360@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: b80c06cc0af4 - main - tcp: use const argument in the TCP hostcache KPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b80c06cc0af4a913778d6014eae6ce30e1ec2c68 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b80c06cc0af4a913778d6014eae6ce30e1ec2c68 commit b80c06cc0af4a913778d6014eae6ce30e1ec2c68 Author: Gleb Smirnoff AuthorDate: 2024-11-21 00:30:42 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-21 00:30:42 +0000 tcp: use const argument in the TCP hostcache KPI The hostcache can't modify tcpcb, inpcb or connection info. --- sys/netinet/tcp_hostcache.c | 15 ++++++++------- sys/netinet/tcp_var.h | 8 ++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 900c70b5cd14..dbc966acc56b 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -146,7 +146,7 @@ VNET_DEFINE_STATIC(struct tcp_hostcache, tcp_hostcache); VNET_DEFINE_STATIC(struct callout, tcp_hc_callout); #define V_tcp_hc_callout VNET(tcp_hc_callout) -static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); +static struct hc_metrics *tcp_hc_lookup(const struct in_conninfo *); static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS); static int sysctl_tcp_hc_histo(SYSCTL_HANDLER_ARGS); static int sysctl_tcp_hc_purgenow(SYSCTL_HANDLER_ARGS); @@ -312,7 +312,7 @@ tcp_hc_destroy(void) * Internal function: compare cache entry to a connection. */ static bool -tcp_hc_cmp(struct hc_metrics *hc_entry, struct in_conninfo *inc) +tcp_hc_cmp(struct hc_metrics *hc_entry, const struct in_conninfo *inc) { if (inc->inc_flags & INC_ISIPV6) { @@ -334,7 +334,7 @@ tcp_hc_cmp(struct hc_metrics *hc_entry, struct in_conninfo *inc) * On success returns in SMR section. */ static struct hc_metrics * -tcp_hc_lookup(struct in_conninfo *inc) +tcp_hc_lookup(const struct in_conninfo *inc) { struct hc_head *hc_head; struct hc_metrics *hc_entry; @@ -371,7 +371,8 @@ tcp_hc_lookup(struct in_conninfo *inc) * a value is not set. */ void -tcp_hc_get(struct in_conninfo *inc, struct hc_metrics_lite *hc_metrics_lite) +tcp_hc_get(const struct in_conninfo *inc, + struct hc_metrics_lite *hc_metrics_lite) { struct hc_metrics *hc_entry; @@ -410,7 +411,7 @@ tcp_hc_get(struct in_conninfo *inc, struct hc_metrics_lite *hc_metrics_lite) * set. */ uint32_t -tcp_hc_getmtu(struct in_conninfo *inc) +tcp_hc_getmtu(const struct in_conninfo *inc) { struct hc_metrics *hc_entry; uint32_t mtu; @@ -434,7 +435,7 @@ tcp_hc_getmtu(struct in_conninfo *inc) * Creates a new entry if none was found. */ void -tcp_hc_updatemtu(struct in_conninfo *inc, uint32_t mtu) +tcp_hc_updatemtu(const struct in_conninfo *inc, uint32_t mtu) { struct hc_metrics_lite hcml = { .hc_mtu = mtu }; @@ -446,7 +447,7 @@ tcp_hc_updatemtu(struct in_conninfo *inc, uint32_t mtu) * Creates a new entry if none was found. */ void -tcp_hc_update(struct in_conninfo *inc, struct hc_metrics_lite *hcml) +tcp_hc_update(const struct in_conninfo *inc, struct hc_metrics_lite *hcml) { struct hc_head *hc_head; struct hc_metrics *hc_entry, *hc_prev; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 17c39bd93287..466b263854b7 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1486,10 +1486,10 @@ void tcp_hc_init(void); #ifdef VIMAGE void tcp_hc_destroy(void); #endif -void tcp_hc_get(struct in_conninfo *, struct hc_metrics_lite *); -uint32_t tcp_hc_getmtu(struct in_conninfo *); -void tcp_hc_updatemtu(struct in_conninfo *, uint32_t); -void tcp_hc_update(struct in_conninfo *, struct hc_metrics_lite *); +void tcp_hc_get(const struct in_conninfo *, struct hc_metrics_lite *); +uint32_t tcp_hc_getmtu(const struct in_conninfo *); +void tcp_hc_updatemtu(const struct in_conninfo *, uint32_t); +void tcp_hc_update(const struct in_conninfo *, struct hc_metrics_lite *); void cc_after_idle(struct tcpcb *tp); extern struct protosw tcp_protosw; /* shared for TOE */ From nobody Thu Nov 21 00:39:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtzrJ59txz5dxls; Thu, 21 Nov 2024 00:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtzrJ404cz4HSr; Thu, 21 Nov 2024 00:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732149552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R9wYONsljD/BoH0idHwZflfaiMxqTj5NTetVY/yDly4=; b=ZHh2eSCcn7fUOOFcyHVxNX7UwC3GXIJq6AEGHjOL8dQzxpmqEgF0ryHZl6QyGzKLErnGFv S3TeesWnZYxYU0EXo8/wVzY4dgl5ofJkiJeUPkaaYanaUzRbNX0J0F7FnajyvdFGUim2Yq JIbcQoCpelVoi8SQeLme/Kam8D3CzQUO4aJXUKzqIIYK6joDbwbSHIAPHGR42/tYaMjiLn VWhy7e81S1wiZVWfjNePESuQSLPrfOdeEOn6phwbKQD1qdzS+9D5Ubp8T50893TsKeIXHT KB+Xy/Ti1Hno4FnbrWQ16YhTZUs4gV8fkQQI9wm3C/z3aWWTKfBHG6BmGSxtDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732149552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R9wYONsljD/BoH0idHwZflfaiMxqTj5NTetVY/yDly4=; b=b6p82brfVa2b+E2CVNO1Bizjebg8xsCHexykg2C7n3rD1Ecq95za78q7mAZT6f4qHmL5u/ Xpf5ruD9TiHiaZ6vooQgbOq7giSwxv0UYnVhr1ila9WBuiCqs/cZ4yGlNhv1QsQDx7Rmwh cUZAnfT6ElGRgRu6pYmvmkOUfItoin8yGoxkxzqiBrYBKTVzeNV5TqzeYiGv9XWEn12iqk IoylvT0JQ1Qe62HKcdIn/yQ3TgzDAWF+F7TSYHuxq2noRbhCBz/DDbY9Q68LBeJd5x1Jp1 adsloHQ1vz8V3CI17xANyewFGj3aw2N4KeCcU2XQ5lM6bvY+EJL1orj7+y9UqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732149552; a=rsa-sha256; cv=none; b=l5n9ZHkiXxRSFFuAn9kA2i9N667QKlRJVwrRi7du08HpLPiJQyG8duc+7kHcW7DgCMR096 HVEWw7yoju6Fr8WEx0Qbs1EhvrcyktwkzwDAEOvWopaNGSgygxqkQfvp/B1wTFtHQ49Fhm aSZbfTDkjxPTYgPyCafDNF9j6yed1+nfgb68UjdatV3ajcWmv98oLM/NXma3Bb+VraNH8S 6TdmfsRXPIEa450Umw/6wmuQoAYvkH3IasdedStwB6tTdGUWRGeTDCQfS7+2ZSmQ0cWZ+L lhqVK2OtpcPzXBjT8UN7cUeZDFaS+4JKsSxOjqonivxj17Eus67CpFtt/3dfvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtzrJ3DfnzH70; Thu, 21 Nov 2024 00:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL0dCrv044496; Thu, 21 Nov 2024 00:39:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL0dCfs044493; Thu, 21 Nov 2024 00:39:12 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:39:12 GMT Message-Id: <202411210039.4AL0dCfs044493@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: 2944a888eabf - main - tcp: remove so != NULL check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 2944a888eabffd4db47dde0f30aa0f5061460f56 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=2944a888eabffd4db47dde0f30aa0f5061460f56 commit 2944a888eabffd4db47dde0f30aa0f5061460f56 Author: Gleb Smirnoff AuthorDate: 2024-11-21 00:32:29 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-21 00:37:18 +0000 tcp: remove so != NULL check In the modern FreeBSD network stack a socket outlives its tcpcb. --- sys/netinet/tcp_subr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index c30b3aaf76c3..4baeb6f8f2d2 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2469,10 +2469,8 @@ tcp_discardcb(struct tcpcb *tp) * XXXRRS: Updating must be after the stack fini() since * that may be converting some internal representation of * say srtt etc into the general one used by other stacks. - * Lets also at least protect against the so being NULL - * as RW stated below. */ - if ((tp->t_rttupdated >= 4) && (so != NULL)) { + if (tp->t_rttupdated >= 4) { struct hc_metrics_lite metrics; uint32_t ssthresh; @@ -2482,9 +2480,6 @@ tcp_discardcb(struct tcpcb *tp) * are satisfied. This gives us better new start value * for the congestion avoidance for new connections. * ssthresh is only set if packet loss occurred on a session. - * - * XXXRW: 'so' may be NULL here, and/or socket buffer may be - * being torn down. Ideally this code would not use 'so'. */ ssthresh = tp->snd_ssthresh; if (ssthresh != 0 && ssthresh < so->so_snd.sb_hiwat / 2) { From nobody Thu Nov 21 00:39:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XtzrK6z9vz5dxsG; Thu, 21 Nov 2024 00:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtzrK4mHCz4HKx; Thu, 21 Nov 2024 00:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732149553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YwrwCmO/lIsZVY6pFn6cDRhFHaF1ueixl+kp1AYJfOY=; b=CQBOuTrQ1hVy9gu1xuB0pTPPUS77caYw5Im9wRcX6bINXNG87zwrZdAsw5SxBXNH1r8ljU eHyLJDi1PE2EPJ2XzuWgSoLR4OrmdXvxao9BHMahD0LaO/9MbosE9kleC5q+H/pth+OKON 0BbFFAd/pGObHwkX5Fba3Xfn/bN9nlqr3MhfMB+TznHbENB+7GPCOeEjYJpwsuNLtVFUor GXvirO1bLc+cFxJL+v+h0yG8KTqGjJpRbJy7iybY6200hJHu9FCpyhglKJup7bhhWXkxE0 KyrnCHa6OGaSovBbs6VhwUiAPqanuJ91F1M42tofP257BXqA/mWDt6334oA8Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732149553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YwrwCmO/lIsZVY6pFn6cDRhFHaF1ueixl+kp1AYJfOY=; b=J5YBX22T/g/2kANSVEDk0uTx5AR5fnRoSQSf/PbgorQ73PlPtnHo8S6YAPalTTz+QFaDo7 uXqqYJ4pTj2c/ifBjb9DU3vB0cBVScvnDlODn2rF4LiTaQCVASXhrESC52qjTTPRIPaPt0 Q1ZYeMa+OlhfPMrkKtDj0LFm2JJF+W5ieIjkUlY/y1WyIjoCb3c3wR6c5KY80IiQzfj+G2 frZ+mIJ5KHiqE0JUK8TeRj4GIPl6OAido9odjIr5ajYuKs+GCj9iG15niYPalt+oApoP2p OYtlefxXlagBb3M7+qvw6iH1wUl24fuzWuwARef5+lHksSJpoXw+kQDzcfQ7iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732149553; a=rsa-sha256; cv=none; b=KTc1h3ztfZkrH6TYr7OUo/pcawxrYgOU+rNFBqCMTnYD5/BmuWKsmpSFBHD9WUaKoASixp o6NEc22lo304ohUDth32HKuHfcUZ9f8CF5GLnRHooxIvl7b8tT40eE3WK0zl+vWh78/1/P kOKq23TLX18FqioniZaFmbSnkoxfObqzrNeZRfKpSZJPiHZ+3fm+wp17VInlMQls8kf5n7 BzjIhj4sqNOSAyoi8BQdzIcE4uVDzJqy0wpBocU6eStgiXLFgOZfiN7bCf6vlyTk5ruNcC Yz7Zn5fSnfiOV7H1xuvKa6wRdbOcRt1+zmLy1aAY+0KN9G/D9E5FCfSrg0sCIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XtzrK47tdzHCZ; Thu, 21 Nov 2024 00:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL0dD6Z044571; Thu, 21 Nov 2024 00:39:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL0dDZh044568; Thu, 21 Nov 2024 00:39:13 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:39:13 GMT Message-Id: <202411210039.4AL0dDZh044568@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: 3789810845f1 - main - tcp: avoid bcopy() in tcp_mss_update() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3789810845f14102c88ca31f7dccb18621b960a0 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3789810845f14102c88ca31f7dccb18621b960a0 commit 3789810845f14102c88ca31f7dccb18621b960a0 Author: Gleb Smirnoff AuthorDate: 2024-11-21 00:35:59 +0000 Commit: Gleb Smirnoff CommitDate: 2024-11-21 00:37:24 +0000 tcp: avoid bcopy() in tcp_mss_update() --- sys/netinet/tcp_input.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index f9ecdf93cc47..03d493b1d7a9 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3877,19 +3877,16 @@ tcp_mss_update(struct tcpcb *tp, int offer, int mtuoffer, offer = max(offer, V_tcp_minmss); } - /* - * rmx information is now retrieved from tcp_hostcache. - */ - tcp_hc_get(&inp->inp_inc, &metrics); - if (metricptr != NULL) - bcopy(&metrics, metricptr, sizeof(struct hc_metrics_lite)); + if (metricptr == NULL) + metricptr = &metrics; + tcp_hc_get(&inp->inp_inc, metricptr); /* * If there's a discovered mtu in tcp hostcache, use it. * Else, use the link mtu. */ - if (metrics.hc_mtu) - mss = min(metrics.hc_mtu, maxmtu) - min_protoh; + if (metricptr->hc_mtu) + mss = min(metricptr->hc_mtu, maxmtu) - min_protoh; else { #ifdef INET6 if (isipv6) { From nobody Thu Nov 21 00:46:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv0124y4dz5dy8b; Thu, 21 Nov 2024 00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv01240lrz4K41; Thu, 21 Nov 2024 00: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=1732150006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sodQmHETNl67IZZoqkuIQICo5/JGKkKN3+ZkFbEVYCs=; b=NcmUIoeLAYFiop2Szt5bBh1cJkP15AP+qY878o2iup8URKJR0vDvn1PoSL0iZPfCUt66ly jSJGRPqKyWWQaNKHgVOyAzDJ5/XpQfHBmsQMv/Pl0/g2RVHz57/qodS2jnIla5RJBcP3uZ 6JA1DAkhPNZSXQALMthSXoBsJvg6YaVsMgNKHD0u8yam6b88BofCZDQlkhFSMHts986OYz u63Jrqh3FjI2JQ7HCiBQknF9So6U8qFhLhKp9LnkuGkOTi4LqYrzBrsFLLUGKRABxIl7e3 +xJfFYtB+88lPLVZGc35PEGacrZL4+Ylku3YyracTD80Y05yWpD38lzSiSQC3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732150006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sodQmHETNl67IZZoqkuIQICo5/JGKkKN3+ZkFbEVYCs=; b=XrxXNXPKDLuZn4fiOlk+NcJLzJ6SMIHSzvw/9zZ2+3gI53F+SZHrppex3Sn/aAGiK65VCS YCa2O+lGoQtLSGmyqqxUNfsLBbw0/vGZDYYbyefHhfJYBe5da+Gd+i7zPG62poPuh1UrJH wSHdy3ss5i9b500OlCpOeKx0sk2Fd/wtblKdR5XzpzdPIkLCuDB77YnZbGEQEM2Epi1BTa lFC8xLDQ/yyuoDT8DqrfFa5/kUzx4hPi1aL6TsJ1d9PWPOEaOJd6mYhJCN8cuc7dhSocPU PVbnEYW/Zs4jut3ZgdHcwRSjbnVjK0oawtdp1fUpoR6qstlqY3cyvbaTs8KtLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732150006; a=rsa-sha256; cv=none; b=OgENqxSOvKV5JSV0nrg7Us6RlPnWd8GUyjrb005IQeiVTLobHuSyhUNH7x4Crz+qqCmL1V CmZJ901rPsqlYjeaQQO1xeutOhRSxvopA3vRwk9YPQasAhdfZG8ujuq8xH/y9knQogeoBf XZgRAPiQmtLpaHg52HWJOdtjhABqyumkopYrAM14wZkKGo4P/TFDfizBX7oLegRUs9qXAl hOusbTru1heKpV1dEISiHD6qqsL7bjjRWeoqZwy/kiLunLazBsR5uxu+cbiVsbujXV0KXh MsGpnvg/m9Zf8ekfQd9QlLKlV2qNUguimiiz17ZfxGSiHPoJl08uhYUFaSObNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv0123Bt9zH5D; Thu, 21 Nov 2024 00:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL0kkC3061818; Thu, 21 Nov 2024 00:46:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL0kkka061815; Thu, 21 Nov 2024 00:46:46 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:46:46 GMT Message-Id: <202411210046.4AL0kkka061815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 098ed26bf456 - stable/14 - libc: indicate existing functions that are POSIX 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 098ed26bf4564362c4478b8c92b11ab9ca074da1 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=098ed26bf4564362c4478b8c92b11ab9ca074da1 commit 098ed26bf4564362c4478b8c92b11ab9ca074da1 Author: Ed Maste AuthorDate: 2024-11-14 19:30:54 +0000 Commit: Ed Maste CommitDate: 2024-11-21 00:45:07 +0000 libc: indicate existing functions that are POSIX 2024 Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47581 (cherry picked from commit dfa0ac74c2fbc1cde3e8cdb1ab9fe5cbb90a9b16) --- lib/libc/stdio/mktemp.3 | 5 ++++- lib/libc/stdio/printf.3 | 6 ++++++ lib/libc/stdlib/getenv.3 | 3 ++- lib/libc/stdlib/reallocarray.3 | 4 ++++ lib/libc/string/memmem.3 | 6 +++--- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3 index cfb6f79be251..5b0547c89fcd 100644 --- a/lib/libc/stdio/mktemp.3 +++ b/lib/libc/stdio/mktemp.3 @@ -277,7 +277,10 @@ function is expected to conform to and is not specified by .St -p1003.1-2008 . The -.Fn mkostemp , +.Fn mkostemp +function conforms to +.St -p1003.1-2024 . +The .Fn mkstemps , .Fn mkostemps and diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index a7b0c7399e2e..af1dcf90b4f9 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -830,6 +830,12 @@ and .Fn vdprintf conform to .St -p1003.1-2008 . +The functions +.Fn asprintf +and +.Fn vasprintf +conform to +.St -p1003.1-2024 . .Sh HISTORY The functions .Fn asprintf diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index df5c1e59074a..bea6ca42699f 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -220,7 +220,8 @@ functions conforms to .St -p1003.1-2001 . The .Fn secure_getenv -function is expected to be glibc-compatible. +function conforms to +.St -p1003.1-2024 . .Sh HISTORY The functions .Fn setenv diff --git a/lib/libc/stdlib/reallocarray.3 b/lib/libc/stdlib/reallocarray.3 index d92be7d3f66b..80035c67a497 100644 --- a/lib/libc/stdlib/reallocarray.3 +++ b/lib/libc/stdlib/reallocarray.3 @@ -131,6 +131,10 @@ if ((newp = reallocarray(p, num, size)) == NULL) { .Ed .Sh SEE ALSO .Xr realloc 3 +.Sh STANDARDS +.Fn reallocarray +conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn reallocarray diff --git a/lib/libc/string/memmem.3 b/lib/libc/string/memmem.3 index 5d8bcc84e31f..e301a0bd1e0f 100644 --- a/lib/libc/string/memmem.3 +++ b/lib/libc/string/memmem.3 @@ -67,10 +67,10 @@ is returned. .Xr memchr 3 , .Xr strchr 3 , .Xr strstr 3 -.Sh CONFORMING TO +.Sh STANDARDS .Fn memmem -started as a GNU extension but is now available in at least -the GNU, musl, bionic, OpenBSD, NetBSD, macOS, and illumos C runtime libraries. +conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn memmem From nobody Thu Nov 21 00:46:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv0135bv4z5dyK7; Thu, 21 Nov 2024 00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv0134dCKz4K42; Thu, 21 Nov 2024 00: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=1732150007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lAZPKPbeMNl4RD03u6qbJYsbSzrajZTIZpiG+ieq/iQ=; b=r5lW3+iZdm6bR7O+Xy7MtrBSeTkyZktGz9+ebbPN3n/YVlVit6SqErVMrGpq/3RmPkuo5N qRG+YUp+4Es6Jda62vL6HwILyuUBKMJ9KwvnNTwSIZyyc7NCe/juoi0d+CYa+yqLXJ1b0B 637U4KaLQDUJeSx7sdIj/ruvQ/3FqIwZ1RJK04ygf5bVfnTcUs7H0GPir7mcO0G3UubDjU Cb1yaiTz/EipZeSsjWaRnCKaubKqmYNMbN83jzwVgFagLJmUH/+imLgxR0H/LNi8z9znzO wU+obyu+NBoM0knIeEx+BPk+58Uha428KLfqDyXi0H2WBpa2jBeEib+de5qYhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732150007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lAZPKPbeMNl4RD03u6qbJYsbSzrajZTIZpiG+ieq/iQ=; b=glX291c6Is7kwqBoxscx584slVcE7RG3ubNduScsWewN9d6lGc2niKdL8gvaqKJM5f2ITo /PRz4JmMBEQrVMU1jgahlwwVcrIAjz/vmEWE58qdUF64J4gzNKAdmMDP17qJhn7fuqVSS3 ZsveGFcmPV6Mit0oYUdB2uGXOZ/8NwilmuxtOLwC1BbcmDM6ImVdgEWNBQOMcKo4hrTj0G XarAkQBgHRcOAJ6IYW2fifNZEr3Qnc/kTv6i+RwvpURx0Ts6vvTICXpjWdi2mx9gS8E6RC ZBZY5F1WTVuivJx86ppKU7CIWTk+xreNEtouFqVi+vmEmv8+II9hzkPi0zKC3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732150007; a=rsa-sha256; cv=none; b=UdF0MpnYCGwiFpH01Jf1a6F7I1YHRJ+OIfcVRlz6aRgCM2+HgRJ00NIYjK+q9XWmpS3dHi 76FxS89IZ51xIZgph2iUR8iIXN4DLXzW3E+uDMDG/cHy9Q7FMD5P0E69PO+gVF12YrySPZ 9eudNLKlA79Cy54DJTKnIqproeCmVV22XbmyytU/iNkHpTgFMEUbB5YzJ+ir+Iewms8nmu vg07Ku6JlGNGGVJJA06NvBH7BCb2iRnnT1Dvh82ecn3OxHPoCAkRsc8iDU7mNnHXVA+Tah twjXRpTaEoreAVv0EyKTb43+hOYHv3hu/ZveskikWpwqfLLf5t4yUO8IUNFLng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv0134DTWzHDS; Thu, 21 Nov 2024 00:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL0klhU061882; Thu, 21 Nov 2024 00:46:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL0klci061879; Thu, 21 Nov 2024 00:46:47 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:46:47 GMT Message-Id: <202411210046.4AL0klci061879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2e8ab3d4e9b9 - stable/14 - fork: Document _Fork (and fork) as POSIX 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2e8ab3d4e9b98e648c086aee3685f1b5ba433d90 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2e8ab3d4e9b98e648c086aee3685f1b5ba433d90 commit 2e8ab3d4e9b98e648c086aee3685f1b5ba433d90 Author: Ed Maste AuthorDate: 2024-11-15 14:22:54 +0000 Commit: Ed Maste CommitDate: 2024-11-21 00:45:07 +0000 fork: Document _Fork (and fork) as POSIX 2024 Also remove some information from HISTORY that is no longer needed (and could be confusing), now that _Fork is part of a standard. Reported by: kib Reviewed by: imp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47588 (cherry picked from commit 566c039d1e7555343fcf6439a10e56f5a632c0fe) --- lib/libc/sys/fork.2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index a3af078b3d69..dcc3d4d017c1 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -252,18 +252,18 @@ There is insufficient swap space for the new process. .Xr vfork 2 , .Xr wait 2 , .Xr pthread_atfork 3 +.Sh STANDARDS +The +.Fn fork +and +.Fn _Fork +functions conform to +.St -p1003.1-2024 . .Sh HISTORY The .Fn fork function appeared in .At v1 . -.Pp -The -.Fn _Fork -function was defined by Austin Group together with the removal -of a requirement that the -.Fn fork -implementation must be async-signal safe. The .Fn _Fork function appeared in From nobody Thu Nov 21 01:26:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv0tL0JNJz5f1cr; Thu, 21 Nov 2024 01:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv0tK6rNsz4PkG; Thu, 21 Nov 2024 01:26:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732152362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1ikpDbZi/evTfcPbYV+OawvkcUVJKURVuRCEdCgNB4=; b=TTyVlpFMQc/Bp5/U8qaefcvG00tFMulrUNfGgTl+wWJveVhTUciCOGhwb5paXDksHE61t6 gAQMwiO21jh4clynxLmuYGPQl0jL4Xf6WgSTdrZoQvz7K6+uSdyCsHwEaudnHIebuNzJmX yQ+EDF2O7wrqt0Kve+F+c5CAk1tgJ8CV8m7sTfWiYFPipwx3YRY2U1mpc9qfQUSK/+qfJX LEvWZLUhCr648qG01HzZpTIbgvMZjuZ8UxQtmziGOZLVjXGHPUpyQeHvVDSToy/sOtWO/J 7QAlaVbZf8F0kZAxW5P4SBYchf6OXDK9hapbDBoqUWypfrh8LrTTlcyjP0uJLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732152362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1ikpDbZi/evTfcPbYV+OawvkcUVJKURVuRCEdCgNB4=; b=eHGrV8ZsTXXgAtuHt/QC8Zrv1g5kyff5StDxud5Fm1msRjlnkjbeO29OhPVEnCJ6Dwa8yZ 9Bjv/lsfQCEwqN3TEFRwo4/Df27f4f94TKVq5TZe5EuCWny9odGli+fut4GnrlxcSdnWQ9 iY0OeNPKh9dq+0jq5EL1btw2hraCkArGczjoXHgYE9R4ZbQjJnUYtE+pSQRf3uKPiHmmYh OD3X6FIrtO6nvEHqdHrB9/cMJc98E3X7O36vSbhQJMRpeTsr38wQHFxPhZVzWU3rsqly3N fLajaK67VN3/viZPeiHEw92LhzN7U3ozws6NUNcNkAoUMST3i5VAW01t3KdPlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732152362; a=rsa-sha256; cv=none; b=cqGublVOXcR3gmioMpBNH2DEwVLa0ywv2IoSjRzhkXN9G3HZpSA6GkPIUKUik8q1u7x7fP HfNgdzL0JhPvdwsE1r7sq/N/4Sje/xl+pJNJ/zwIYDGyvtru67viqSXbSTkJ5U5FNlE/iF fowEfne+59NbTUf6jl9RvEfcAQ92OI9siF1hIcBxNOxkhzAeboBm1AwbM+nFCf6EdGHjYu XsjFhFp7HIhG8tGOIsH6dDkRa/79kXA8OZWk2gJMwd+y5zPE6+umXvX/8ZWw92ZHRUI0+V HBwZ4qDWBE2udJQ4xDU/KvNlHiERimE5PNQ1CJq4SOg9Y6SaO9WV1XouAQybJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv0tK6KSGzHvt; Thu, 21 Nov 2024 01:26:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL1Q1dT037118; Thu, 21 Nov 2024 01:26:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL1Q1BS037115; Thu, 21 Nov 2024 01:26:01 GMT (envelope-from git) Date: Thu, 21 Nov 2024 01:26:01 GMT Message-Id: <202411210126.4AL1Q1BS037115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: eea2e089f8da - main - ixgbe: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eea2e089f8dadf850a30ed837edd7a386427a9ed Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=eea2e089f8dadf850a30ed837edd7a386427a9ed commit eea2e089f8dadf850a30ed837edd7a386427a9ed Author: Michael Tuexen AuthorDate: 2024-11-21 01:18:17 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 01:25:06 +0000 ixgbe: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to fix the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Michael notes emperically 82599 has an unexpected middle mask: Chip First Middle Last 82599 0xFF6 0xFF6 0xF7F which should be fixed up to 0xF76 (RFC 3168) in a future commit. Reviewed by: rrs, rscheff MFC after: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44258 --- sys/dev/ixgbe/if_ix.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index f8a620295aa4..ad690fdccef4 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -204,6 +204,7 @@ static int ixgbe_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wol_enable(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wufc(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Deferred interrupt tasklets */ static void ixgbe_handle_msf(void *); @@ -2756,6 +2757,24 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + #ifdef IXGBE_DEBUG /* testing sysctls (for all devices) */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", @@ -4742,6 +4761,43 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) return (error); } /* ixgbe_sysctl_eee_state */ +static int +ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IXGBE_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IXGBE_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IXGBE_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IXGBE_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IXGBE_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /************************************************************************ * ixgbe_init_device_features ************************************************************************/ From nobody Thu Nov 21 01:57:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv1Z76PBQz5f3Tv; Thu, 21 Nov 2024 01:57: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv1Z769jbz4SZ9; Thu, 21 Nov 2024 01:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732154223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yIr8JwiQqau05qORpnnefKq4b9NeXNMFnnJl8E/F4nU=; b=NMLxHwLV9r0HB4iMSj+rZjttmMZxln29TZhZaHved3qXYNNnrsLDcPHpzyP7HHnTo9mxEd +4DGLZeDKESHIbImJ9qG+g8jQeDpHJ7wf/HbCBnepHf9Kj7NsN5eY2rW69Zh1IwZu3jx1p 4qEv7ep0KTOh9Y5g6NEutDqC3K9aNg/Hgd8GCDqiGCvGNItqMcv2zUk4vEssro9ACeFUgs XB5ALvZkd99IRID+vAvvs95iKW+5GZsnzmGnRZ2CHHUGc7Ccqrpw91WqMOONCSZl4MPj9X /1jXl/DqSIpIxKxsxpWukEjNxOpOOA0Iyilf9eD/XSrfgU0LlEF2ABHTT+Is1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732154223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yIr8JwiQqau05qORpnnefKq4b9NeXNMFnnJl8E/F4nU=; b=thy0KB25eI/Bxb7TYCVenEE4p6BkXCaS4spcFpngQNKvVpcjS0fA+ehqJk6tXdcuZ/FTk6 smVWhvf6uu4XWLju8tZ7mPt8q3kadzE9+fs3ey0KUgLRGDTF5RZj1yMOPjlnxZrmiohOBp ewQ2epC8Lm8ajxEN7T7nOcYV607o25HXxipMdmTBBBktANAgbXcykw55Kcw7HpnOd3URdJ y6MlrZoiFT8JAtMxqe4t74rBhd9o9haZSYKuSJBF5/Dnhw1AMEKh9uuvLSvlw9fDBfX9wu jpGSkj3HJZEwDAFSdugiOzXZr3HJqWGBYY5kSOZl/Hi99xdPQEiQS443B5F+Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732154223; a=rsa-sha256; cv=none; b=MjS3+vlvSifZ+C4b0A2gB/ZHzT2WaDC1ffx+6gCiL0GEsk45abLCnrpIsbnz6MFb4y8RPK ur9GN+jtaAdCM3xdEVP1PTkql0Zwvkv2CmiuZtdirPF4dXsxLQ6NOqdB6CKBfmnYRKdOjU 5qlDqna+0BRIkO92r3/w2BPMDFMYCvdDQTAXY2saQNwVKfHsMMSj5fkLEeZHkmhLzWnGr8 7TAQEW25aIpfnqg4VndEDC4OxvAKdPlNEPgWRC/SfBZtmXzkeHpjk9UeAenPOYdIkJBzeV jQFicVjxFZVLwkxBdyxiWevrN5zuQCcmvncA77q4XDpNju0wQwHRepl7fowxMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv1Z75mVBzKH7; Thu, 21 Nov 2024 01:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL1v3NR092006; Thu, 21 Nov 2024 01:57:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL1v3hF092003; Thu, 21 Nov 2024 01:57:03 GMT (envelope-from git) Date: Thu, 21 Nov 2024 01:57:03 GMT Message-Id: <202411210157.4AL1v3hF092003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: d99eb8230eb7 - main - rtwn: change the USB TX transfers to only do one pending transfer per endpoint List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b commit d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b Author: Adrian Chadd AuthorDate: 2024-11-12 04:48:12 +0000 Commit: Adrian Chadd CommitDate: 2024-11-21 01:56:56 +0000 rtwn: change the USB TX transfers to only do one pending transfer per endpoint I found I was getting constant device timeouts when doing anything more complicated than a single SSH on laptop with RTL8811AU. After digging into it, i found a variety of fun situations, including traffic stalls that would recover w/ a shorter (1 second) USB transfer timeout. However, the big one is a straight up hang of any TX endpoint until the NIC was reset. The RX side kept going just fine; only the TX endpoints would hang. Reproducing it was easy - just start up a couple of traffic streams on different WME AC's - eg a best effort + bulk transfer, like browsing the web and doing an ssh clone - throw in a ping -i 0.1 to your gateway, and it would very quickly hit device timeouts every couple of seconds. I put everything into a single TX EP and the hangs went away. Well, mostly. So after some MORE digging, I found that this driver isn't checking if the transfers are going into the correct EPs for the packet WME access category / 802.11 TID; and would frequently be able to schedule multiple transfers into the same endpoint. Then there's a second problem - there's an array of endpoints used for setting up the USB device, with .endpoint = UE_ADDR_ANY, however they're also being setup with the same endpoint configured in multiple transfer configs. Eg, a NIC with 3 or 4 bulk TX endpoints will configure the BK and BE endpoints with the same physical endpoint ID. This also leads to timed out transfers. My /guess/ was that the firmware isn't happy with one or both of the above, and so I solved both. * drop the USB transfer timeout to 1 second, not 5 seconds - that way we'll either get a 1 second traffic pause and USB transfer failure, or a 5 second device timeout. Having both the TX timeout and the USB transfer timeout made recovery from a USB transfer timeout (without a NIC reset) almost impossible. * enforce one transfer per endpoint; * separate pending/active buffer tracking per endpoint; * each endpoint now has its own TX callback to make sure the queue / end point ID is known; * and only frames from a given endpoint pending queue is going into the active queue and into that endpoint. * Finally, create a local wme2qid array and populate it with the endpoint mapping that ensures unique physical endpoint use. Locally tested: * rtl8812AU, 11n STA mode * rtl8192EU, 11n STA mode (with diffs to fix the channel config / power timeouts.) Differential Revision: https://reviews.freebsd.org/D47522 --- sys/dev/rtwn/if_rtwnvar.h | 2 +- sys/dev/rtwn/usb/rtwn_usb_attach.c | 26 ++++++---- sys/dev/rtwn/usb/rtwn_usb_ep.c | 23 ++++++--- sys/dev/rtwn/usb/rtwn_usb_tx.c | 100 ++++++++++++++++++++++++++++++------- sys/dev/rtwn/usb/rtwn_usb_tx.h | 5 +- sys/dev/rtwn/usb/rtwn_usb_var.h | 12 +++-- 6 files changed, 129 insertions(+), 39 deletions(-) diff --git a/sys/dev/rtwn/if_rtwnvar.h b/sys/dev/rtwn/if_rtwnvar.h index 6a44b7b73902..f4c6d7ee64b4 100644 --- a/sys/dev/rtwn/if_rtwnvar.h +++ b/sys/dev/rtwn/if_rtwnvar.h @@ -32,7 +32,7 @@ #define RTWN_MACID_VALID 0x8000 #define RTWN_MACID_LIMIT 128 -#define RTWN_TX_TIMEOUT 5000 /* ms */ +#define RTWN_TX_TIMEOUT 1000 /* ms */ #define RTWN_MAX_EPOUT 4 #define RTWN_PORT_COUNT 2 diff --git a/sys/dev/rtwn/usb/rtwn_usb_attach.c b/sys/dev/rtwn/usb/rtwn_usb_attach.c index 71798ffc14f9..4958939a768a 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_attach.c +++ b/sys/dev/rtwn/usb/rtwn_usb_attach.c @@ -156,10 +156,12 @@ rtwn_usb_alloc_tx_list(struct rtwn_softc *sc) if (error != 0) return (error); - STAILQ_INIT(&uc->uc_tx_active); - STAILQ_INIT(&uc->uc_tx_inactive); - STAILQ_INIT(&uc->uc_tx_pending); + for (i = RTWN_BULK_TX_FIRST; i < RTWN_BULK_EP_COUNT; i++) { + STAILQ_INIT(&uc->uc_tx_active[i]); + STAILQ_INIT(&uc->uc_tx_pending[i]); + } + STAILQ_INIT(&uc->uc_tx_inactive); for (i = 0; i < RTWN_USB_TX_LIST_COUNT; i++) STAILQ_INSERT_HEAD(&uc->uc_tx_inactive, &uc->uc_tx[i], next); @@ -207,23 +209,29 @@ static void rtwn_usb_free_tx_list(struct rtwn_softc *sc) { struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); + int i; rtwn_usb_free_list(sc, uc->uc_tx, RTWN_USB_TX_LIST_COUNT); - STAILQ_INIT(&uc->uc_tx_active); + for (i = RTWN_BULK_TX_FIRST; i < RTWN_BULK_EP_COUNT; i++) { + STAILQ_INIT(&uc->uc_tx_active[i]); + STAILQ_INIT(&uc->uc_tx_pending[i]); + } STAILQ_INIT(&uc->uc_tx_inactive); - STAILQ_INIT(&uc->uc_tx_pending); } static void rtwn_usb_reset_lists(struct rtwn_softc *sc, struct ieee80211vap *vap) { struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); + int i; RTWN_ASSERT_LOCKED(sc); - rtwn_usb_reset_tx_list(uc, &uc->uc_tx_active, vap); - rtwn_usb_reset_tx_list(uc, &uc->uc_tx_pending, vap); + for (i = RTWN_BULK_TX_FIRST; i < RTWN_BULK_EP_COUNT; i++) { + rtwn_usb_reset_tx_list(uc, &uc->uc_tx_active[i], vap); + rtwn_usb_reset_tx_list(uc, &uc->uc_tx_pending[i], vap); + } if (vap == NULL) { rtwn_usb_reset_rx_list(uc); sc->qfullmsk = 0; @@ -295,7 +303,7 @@ rtwn_usb_abort_xfers(struct rtwn_softc *sc) /* abort any pending transfers */ RTWN_UNLOCK(sc); - for (i = 0; i < RTWN_N_TRANSFER; i++) + for (i = 0; i < RTWN_BULK_EP_COUNT; i++) usbd_transfer_drain(uc->uc_xfer[i]); RTWN_LOCK(sc); } @@ -432,7 +440,7 @@ rtwn_usb_detach(device_t self) rtwn_usb_free_rx_list(sc); /* Detach all USB transfers. */ - usbd_transfer_unsetup(uc->uc_xfer, RTWN_N_TRANSFER); + usbd_transfer_unsetup(uc->uc_xfer, RTWN_BULK_EP_COUNT); rtwn_detach_private(sc); mtx_destroy(&sc->sc_mtx); diff --git a/sys/dev/rtwn/usb/rtwn_usb_ep.c b/sys/dev/rtwn/usb/rtwn_usb_ep.c index 0848a45a9f86..f9b0672324fe 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_ep.c +++ b/sys/dev/rtwn/usb/rtwn_usb_ep.c @@ -55,7 +55,7 @@ #include -static const struct usb_config rtwn_config_common[RTWN_N_TRANSFER] = { +static const struct usb_config rtwn_config_common[RTWN_BULK_EP_COUNT] = { [RTWN_BULK_RX] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, @@ -76,7 +76,7 @@ static const struct usb_config rtwn_config_common[RTWN_N_TRANSFER] = { .pipe_bof = 1, .force_short_xfer = 1, }, - .callback = rtwn_bulk_tx_callback, + .callback = rtwn_bulk_tx_callback_be, .timeout = RTWN_TX_TIMEOUT, /* ms */ }, [RTWN_BULK_TX_BK] = { @@ -89,7 +89,7 @@ static const struct usb_config rtwn_config_common[RTWN_N_TRANSFER] = { .pipe_bof = 1, .force_short_xfer = 1, }, - .callback = rtwn_bulk_tx_callback, + .callback = rtwn_bulk_tx_callback_bk, .timeout = RTWN_TX_TIMEOUT, /* ms */ }, [RTWN_BULK_TX_VI] = { @@ -102,7 +102,7 @@ static const struct usb_config rtwn_config_common[RTWN_N_TRANSFER] = { .pipe_bof = 1, .force_short_xfer = 1 }, - .callback = rtwn_bulk_tx_callback, + .callback = rtwn_bulk_tx_callback_vi, .timeout = RTWN_TX_TIMEOUT, /* ms */ }, [RTWN_BULK_TX_VO] = { @@ -115,7 +115,7 @@ static const struct usb_config rtwn_config_common[RTWN_N_TRANSFER] = { .pipe_bof = 1, .force_short_xfer = 1 }, - .callback = rtwn_bulk_tx_callback, + .callback = rtwn_bulk_tx_callback_vo, .timeout = RTWN_TX_TIMEOUT, /* ms */ }, }; @@ -200,22 +200,33 @@ rtwn_usb_setup_endpoints(struct rtwn_usb_softc *uc) /* NB: keep in sync with rtwn_dma_init(). */ rtwn_config[RTWN_BULK_TX_VO].endpoint = addr[0]; + uc->wme2qid[WME_AC_VO] = RTWN_BULK_TX_VO; switch (uc->ntx) { case 4: case 3: rtwn_config[RTWN_BULK_TX_BE].endpoint = addr[2]; rtwn_config[RTWN_BULK_TX_BK].endpoint = addr[2]; rtwn_config[RTWN_BULK_TX_VI].endpoint = addr[1]; + uc->wme2qid[WME_AC_BE] = RTWN_BULK_TX_BE; + uc->wme2qid[WME_AC_BK] = RTWN_BULK_TX_BE; + uc->wme2qid[WME_AC_VI] = RTWN_BULK_TX_VI; break; case 2: rtwn_config[RTWN_BULK_TX_BE].endpoint = addr[1]; rtwn_config[RTWN_BULK_TX_BK].endpoint = addr[1]; rtwn_config[RTWN_BULK_TX_VI].endpoint = addr[0]; + uc->wme2qid[WME_AC_BE] = RTWN_BULK_TX_VI; + uc->wme2qid[WME_AC_BK] = RTWN_BULK_TX_VI; + uc->wme2qid[WME_AC_VI] = RTWN_BULK_TX_VO; break; case 1: rtwn_config[RTWN_BULK_TX_BE].endpoint = addr[0]; rtwn_config[RTWN_BULK_TX_BK].endpoint = addr[0]; rtwn_config[RTWN_BULK_TX_VI].endpoint = addr[0]; + + uc->wme2qid[WME_AC_BE] = RTWN_BULK_TX_VO; + uc->wme2qid[WME_AC_BK] = RTWN_BULK_TX_VO; + uc->wme2qid[WME_AC_VI] = RTWN_BULK_TX_VO; break; default: KASSERT(0, ("unhandled number of endpoints %d\n", uc->ntx)); @@ -225,7 +236,7 @@ rtwn_usb_setup_endpoints(struct rtwn_usb_softc *uc) rtwn_config[RTWN_BULK_RX].bufsize = uc->uc_rx_buf_size * RTWN_USB_RXBUFSZ_UNIT; error = usbd_transfer_setup(uc->uc_udev, &iface_index, - uc->uc_xfer, rtwn_config, RTWN_N_TRANSFER, uc, &sc->sc_mtx); + uc->uc_xfer, rtwn_config, RTWN_BULK_EP_COUNT, uc, &sc->sc_mtx); free(rtwn_config, M_TEMP); if (error) { diff --git a/sys/dev/rtwn/usb/rtwn_usb_tx.c b/sys/dev/rtwn/usb/rtwn_usb_tx.c index 0fb8632d9a16..86d41ed10d91 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_tx.c +++ b/sys/dev/rtwn/usb/rtwn_usb_tx.c @@ -65,10 +65,6 @@ static struct rtwn_data * rtwn_usb_getbuf(struct rtwn_usb_softc *); static void rtwn_usb_txeof(struct rtwn_usb_softc *, struct rtwn_data *, int); -static const uint8_t wme2qid[] = - { RTWN_BULK_TX_BE, RTWN_BULK_TX_BK, - RTWN_BULK_TX_VI, RTWN_BULK_TX_VO }; - static struct rtwn_data * _rtwn_usb_getbuf(struct rtwn_usb_softc *uc) { @@ -105,6 +101,7 @@ static void rtwn_usb_txeof(struct rtwn_usb_softc *uc, struct rtwn_data *data, int status) { struct rtwn_softc *sc = &uc->uc_sc; + bool is_empty = true; RTWN_ASSERT_LOCKED(sc); @@ -120,42 +117,54 @@ rtwn_usb_txeof(struct rtwn_usb_softc *uc, struct rtwn_data *data, int status) STAILQ_INSERT_TAIL(&uc->uc_tx_inactive, data, next); sc->qfullmsk = 0; + #ifndef D4054 - if (STAILQ_EMPTY(&uc->uc_tx_active) && STAILQ_EMPTY(&uc->uc_tx_pending)) + for (int i = RTWN_BULK_TX_FIRST; i < RTWN_BULK_EP_COUNT; i++) { + if (!STAILQ_EMPTY(&uc->uc_tx_active[i]) || + !STAILQ_EMPTY(&uc->uc_tx_pending[i])) + is_empty = false; + } + + if (is_empty) sc->sc_tx_timer = 0; else sc->sc_tx_timer = 5; #endif } -void -rtwn_bulk_tx_callback(struct usb_xfer *xfer, usb_error_t error) +static void +rtwn_bulk_tx_callback_qid(struct usb_xfer *xfer, usb_error_t error, int qid) { struct rtwn_usb_softc *uc = usbd_xfer_softc(xfer); struct rtwn_softc *sc = &uc->uc_sc; struct rtwn_data *data; + bool do_is_empty_check = false; + int i; + + RTWN_DPRINTF(sc, RTWN_DEBUG_XMIT, + "%s: called, qid=%d\n", __func__, qid); RTWN_ASSERT_LOCKED(sc); switch (USB_GET_STATE(xfer)){ case USB_ST_TRANSFERRED: - data = STAILQ_FIRST(&uc->uc_tx_active); + data = STAILQ_FIRST(&uc->uc_tx_active[qid]); if (data == NULL) goto tr_setup; - STAILQ_REMOVE_HEAD(&uc->uc_tx_active, next); + STAILQ_REMOVE_HEAD(&uc->uc_tx_active[qid], next); rtwn_usb_txeof(uc, data, 0); /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - data = STAILQ_FIRST(&uc->uc_tx_pending); + data = STAILQ_FIRST(&uc->uc_tx_pending[qid]); if (data == NULL) { RTWN_DPRINTF(sc, RTWN_DEBUG_XMIT, "%s: empty pending queue\n", __func__); - sc->sc_tx_n_active = 0; + do_is_empty_check = true; goto finish; } - STAILQ_REMOVE_HEAD(&uc->uc_tx_pending, next); - STAILQ_INSERT_TAIL(&uc->uc_tx_active, data, next); + STAILQ_REMOVE_HEAD(&uc->uc_tx_pending[qid], next); + STAILQ_INSERT_TAIL(&uc->uc_tx_active[qid], data, next); /* * Note: if this is a beacon frame, ensure that it will go @@ -169,11 +178,17 @@ tr_setup: sc->sc_tx_n_active++; break; default: - data = STAILQ_FIRST(&uc->uc_tx_active); + data = STAILQ_FIRST(&uc->uc_tx_active[qid]); if (data == NULL) goto tr_setup; - STAILQ_REMOVE_HEAD(&uc->uc_tx_active, next); + STAILQ_REMOVE_HEAD(&uc->uc_tx_active[qid], next); rtwn_usb_txeof(uc, data, 1); + if (error != 0) + device_printf(sc->sc_dev, + "%s: called; txeof qid=%d, error=%s\n", + __func__, + qid, + usbd_errstr(error)); if (error != USB_ERR_CANCELLED) { usbd_xfer_set_stall(xfer); goto tr_setup; @@ -181,6 +196,19 @@ tr_setup: break; } finish: + + /* + * Clear sc_tx_n_active if all the pending transfers are 0. + * + * This is currently a crutch because net80211 doesn't provide + * a way to defer all the FF checks or one of the FF checks. + * Eventually this should just be tracked per-endpoint. + */ + for (i = RTWN_BULK_TX_FIRST; i < RTWN_BULK_EP_COUNT; i++) + if (STAILQ_FIRST(&uc->uc_tx_pending[i]) != NULL) + do_is_empty_check = false; + if (do_is_empty_check) + sc->sc_tx_n_active = 0; #ifdef IEEE80211_SUPPORT_SUPERG /* * If the TX active queue drops below a certain @@ -210,6 +238,34 @@ finish: rtwn_start(sc); } +void +rtwn_bulk_tx_callback_be(struct usb_xfer *xfer, usb_error_t error) +{ + + rtwn_bulk_tx_callback_qid(xfer, error, RTWN_BULK_TX_BE); +} + +void +rtwn_bulk_tx_callback_bk(struct usb_xfer *xfer, usb_error_t error) +{ + + rtwn_bulk_tx_callback_qid(xfer, error, RTWN_BULK_TX_BK); +} + +void +rtwn_bulk_tx_callback_vi(struct usb_xfer *xfer, usb_error_t error) +{ + + rtwn_bulk_tx_callback_qid(xfer, error, RTWN_BULK_TX_VI); +} + +void +rtwn_bulk_tx_callback_vo(struct usb_xfer *xfer, usb_error_t error) +{ + + rtwn_bulk_tx_callback_qid(xfer, error, RTWN_BULK_TX_VO); +} + static void rtwn_usb_tx_checksum(struct rtwn_tx_desc_common *txd) { @@ -226,6 +282,7 @@ rtwn_usb_tx_start(struct rtwn_softc *sc, struct ieee80211_node *ni, struct rtwn_data *data; struct usb_xfer *xfer; uint16_t ac; + int qid = 0; RTWN_ASSERT_LOCKED(sc); @@ -236,17 +293,23 @@ rtwn_usb_tx_start(struct rtwn_softc *sc, struct ieee80211_node *ni, if (data == NULL) return (ENOBUFS); + /* TODO: should really get a consistent AC/TID, ath(4) style */ ac = M_WME_GETAC(m); switch (type) { case IEEE80211_FC0_TYPE_CTL: case IEEE80211_FC0_TYPE_MGT: - xfer = uc->uc_xfer[RTWN_BULK_TX_VO]; + qid = RTWN_BULK_TX_VO; break; default: - xfer = uc->uc_xfer[wme2qid[ac]]; + qid = uc->wme2qid[ac]; break; } + xfer = uc->uc_xfer[qid]; + + RTWN_DPRINTF(sc, RTWN_DEBUG_XMIT, + "%s: called, ac=%d, qid=%d, xfer=%p\n", + __func__, ac, qid, xfer); txd = (struct rtwn_tx_desc_common *)tx_desc; txd->pktlen = htole16(m->m_pkthdr.len); @@ -264,6 +327,7 @@ rtwn_usb_tx_start(struct rtwn_softc *sc, struct ieee80211_node *ni, data->buflen = m->m_pkthdr.len + sc->txdesc_len; data->id = id; data->ni = ni; + data->qid = qid; if (data->ni != NULL) { data->m = m; #ifndef D4054 @@ -271,7 +335,7 @@ rtwn_usb_tx_start(struct rtwn_softc *sc, struct ieee80211_node *ni, #endif } - STAILQ_INSERT_TAIL(&uc->uc_tx_pending, data, next); + STAILQ_INSERT_TAIL(&uc->uc_tx_pending[qid], data, next); if (STAILQ_EMPTY(&uc->uc_tx_inactive)) sc->qfullmsk = 1; diff --git a/sys/dev/rtwn/usb/rtwn_usb_tx.h b/sys/dev/rtwn/usb/rtwn_usb_tx.h index 7b762cc01a00..193103f32707 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_tx.h +++ b/sys/dev/rtwn/usb/rtwn_usb_tx.h @@ -17,7 +17,10 @@ #ifndef RTWN_USB_TX_H #define RTWN_USB_TX_H -void rtwn_bulk_tx_callback(struct usb_xfer *, usb_error_t); +void rtwn_bulk_tx_callback_bk(struct usb_xfer *, usb_error_t); +void rtwn_bulk_tx_callback_be(struct usb_xfer *, usb_error_t); +void rtwn_bulk_tx_callback_vi(struct usb_xfer *, usb_error_t); +void rtwn_bulk_tx_callback_vo(struct usb_xfer *, usb_error_t); int rtwn_usb_tx_start(struct rtwn_softc *, struct ieee80211_node *, struct mbuf *, uint8_t *, uint8_t, int); diff --git a/sys/dev/rtwn/usb/rtwn_usb_var.h b/sys/dev/rtwn/usb/rtwn_usb_var.h index bad697bfa1db..646dde66aeab 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_var.h +++ b/sys/dev/rtwn/usb/rtwn_usb_var.h @@ -37,6 +37,7 @@ struct rtwn_data { uint8_t *buf; /* 'id' is meaningful for beacons only */ int id; + int qid; uint16_t buflen; struct mbuf *m; struct ieee80211_node *ni; @@ -50,15 +51,16 @@ enum { RTWN_BULK_TX_BK, /* = WME_AC_BK */ RTWN_BULK_TX_VI, /* = WME_AC_VI */ RTWN_BULK_TX_VO, /* = WME_AC_VO */ - RTWN_N_TRANSFER = 5, + RTWN_BULK_EP_COUNT = 5, }; #define RTWN_EP_QUEUES RTWN_BULK_RX +#define RTWN_BULK_TX_FIRST RTWN_BULK_TX_BE struct rtwn_usb_softc { struct rtwn_softc uc_sc; /* must be the first */ struct usb_device *uc_udev; - struct usb_xfer *uc_xfer[RTWN_N_TRANSFER]; + struct usb_xfer *uc_xfer[RTWN_BULK_EP_COUNT]; struct rtwn_data uc_rx[RTWN_USB_RX_LIST_COUNT]; rtwn_datahead uc_rx_active; @@ -70,14 +72,16 @@ struct rtwn_usb_softc { int uc_rx_off; struct rtwn_data uc_tx[RTWN_USB_TX_LIST_COUNT]; - rtwn_datahead uc_tx_active; + rtwn_datahead uc_tx_active[RTWN_BULK_EP_COUNT]; rtwn_datahead uc_tx_inactive; - rtwn_datahead uc_tx_pending; + rtwn_datahead uc_tx_pending[RTWN_BULK_EP_COUNT]; int (*uc_align_rx)(int, int); int ntx; int tx_agg_desc_num; + + uint8_t wme2qid[4]; }; #define RTWN_USB_SOFTC(sc) ((struct rtwn_usb_softc *)(sc)) From nobody Thu Nov 21 02:25:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv2Bb2v1Dz5f4wF; Thu, 21 Nov 2024 02:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv2Bb2K18z4VJ2; Thu, 21 Nov 2024 02:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732155911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HXWtknvsa85JMxrOOxDlMuuUkq2+gh9A/1m5JyRw3pQ=; b=jtG6aafvwwMjaySNZru0Fx7p1ve0/F2n1fo0YDNin5XibKzduJwDj0pu1wRBoFzG7JzJuv hNruOAlmY3V8kWCryRvlysAhBsewBd28h3e2fBy/cneF+zY6bF+l1B3zMcTjCkscz6LQCl Bzdaq8bTuudZVpFzcBxjO33eibN7M6xXtHn+pqDisQ3gq9zK5UvonPEknzIeBHsDjoPQ3M ShJfRgY+J2iG9J1xbl3y27MIlAoPNFC871cUnCMD64L6q4eX3bNVkstjN2AeKonppMsTZp iAsDegOLChnwotv9jmUZ8hv/RTW0a5u2A8+mWfhrmB2W3pYQ9o+CJHxxKT+Urg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732155911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HXWtknvsa85JMxrOOxDlMuuUkq2+gh9A/1m5JyRw3pQ=; b=xiz8v73QnSwsKByZ+mOeOZhUeza3ktKhi3SZ5AbX7Bmv6N2R3jllCT3v/tAHs8N6q8SMKh +8LS8AHjhLmRWxB9VvRJXUx0i1KmeJAxbDPlz6IhFEov8um5eNbdzJZ9q7DUnOFPFRZ7HT uF6NGkik+0QifHcgeXkd8Qng7hu4Hiu/Dx/jRn21Pn0l/LavYjdgnNOlTdpd280Q9Oy9Ge miED9iB4apQvbOwU6z5+rVHxogFbaCHjOA0pr2Rm3NxGMPZEnCGWFCj5Ed5c0M5WEo4FNV GGauOyYM9obAmd/hs0EtoaDljM+JEDDZ3/wRd8Pxi0rhZiSQ4V0LaOpKpeJdXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732155911; a=rsa-sha256; cv=none; b=v5E5aS5vubPeuvlNy1b/nMtHOn5J0MCC1MW5BVNHlAUgnIa2qkIL1pz/KgoGUSWszD0ktW 0+nSonqD8kp7OFLphm22dmv9GaiNQmiEzvM5rDCCFtwbCDERUb3Na6qR6kQqDminSUphcH U2jQaagvevUW4/PdQA58yFPblYiEivltFUVZcc2cfc/JJZ+R54alPKEzksee+N4NTvONpX iisBV+e5mRUyEvyvhpURr8W1GorHFXa+CQPmzHsvKqjyHsSdd/4sHgEvxgYpHsAsjtqWfX dt4phrb1gTAMIcef5LgG2sbZZNltgbeaeXwWXSFXusAs7AeC+N8z1+x9Ns4D2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv2Bb1pBQzL8Z; Thu, 21 Nov 2024 02:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL2PBxU048117; Thu, 21 Nov 2024 02:25:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL2PBWm048114; Thu, 21 Nov 2024 02:25:11 GMT (envelope-from git) Date: Thu, 21 Nov 2024 02:25:11 GMT Message-Id: <202411210225.4AL2PBWm048114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 90853dfac851 - main - e1000: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90853dfac851afa9e8840f5a38383256d75458b6 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=90853dfac851afa9e8840f5a38383256d75458b6 commit 90853dfac851afa9e8840f5a38383256d75458b6 Author: Michael Tuexen AuthorDate: 2024-11-21 02:22:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 02:23:55 +0000 e1000: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Reviewed by: rrs MFC after: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44259 --- sys/dev/e1000/if_em.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 0b99f1b06130..98521e6e6ee9 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -333,6 +333,7 @@ static int em_is_valid_ether_addr(u8 *); static void em_newitr(struct e1000_softc *, struct em_rx_queue *, struct tx_ring *, struct rx_ring *); static bool em_automask_tso(if_ctx_t); +static int em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct e1000_softc *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -876,6 +877,24 @@ em_if_attach_pre(if_ctx_t ctx) igb_sysctl_dmac, "I", "DMA Coalesce"); } + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -5182,6 +5201,43 @@ em_sysctl_int_delay(SYSCTL_HANDLER_ARGS) return (0); } +static int +em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct e1000_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = E1000_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = E1000_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = E1000_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = E1000_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + E1000_WRITE_REG(&sc->hw, reg, val); + return (0); +} + static void em_add_int_delay_sysctl(struct e1000_softc *sc, const char *name, const char *description, struct em_int_delay_info *info, From nobody Thu Nov 21 02:38:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv2VL44WJz5f5Rt; Thu, 21 Nov 2024 02:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv2VL3VJ6z4W9Y; Thu, 21 Nov 2024 02:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732156730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tR5Kh1IvoJFc4A69yZfEmr0ySCS9oQyBO1ues6RW7kk=; b=JnfDM8QsuJwZIvbxqCxmnQwbFJrZWH3CudCJ3FoDGQvSlXn1op5nolYdaPWFQXXf1C+ivS xRKBPQIkqyvDEINUho3Anbi6LnVtbJj8VEUP2KBO66bboAcljjfzlE7pTQeJUjB0SozTHn Bt5fOsApf6Rp8vqT42cFcltIKPGgHiD/pwD8vufsqPOVydG0IJdjSuUAfR7NGFyXzTxq8y 6YsYaJ8CDf/QrfAwo0Pd2oEvz95xiZJh6qaGtNo0MTrbB+TDub+UNqTytj3X1umvcMvv2U GKDfMZrjfoVwlvkWzqKPDlGN53/n0JT2ghGWOtTFD/4XkySph2XFxYIDvr0Tpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732156730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tR5Kh1IvoJFc4A69yZfEmr0ySCS9oQyBO1ues6RW7kk=; b=ytjyvVphLFYOCkt41IolYSheT4uRoG2l5w4kcrio6dXeNchAQmuztm2BnEtsbd2YgJzSsb /tYSN+38RmMRabPwawb8E+cxUkA9Gb+kdZ9saMpzAXkgNyOj49Iz2lY9sEzDp2SHSP9rHW s1ooWMuE5WZiU4IqvuBaOHmRLnvwmYSYObXdyABAn7uXxwLTyj81frRl2/Wxg4ko8xXuJt n6CZGm9N5wmUFUQyoVPubLogvjwMIDk7zf4EGu0TpcXf1/WFBf0DFAgbFJ4cncCPZon905 uWsTxGt6kIXrpZj51L37whX4+PF617jxYr9iCUKn5RtdUdHvbEdK7GC6WRaMPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732156730; a=rsa-sha256; cv=none; b=bE/vyXqB5nrWCujkYVY6WpeiQU7dZMPWLbKFkOFdOmGuKYh3pvf1msQBaNausJoBFt35iV U6zCLNwSFNVCEB3j7khU6OXXhu8tKI8DuampAnrctF/G8XPuk4oCHVJBFVJDspZ1YSWpha XfUw6guj4sMs4MdehCiwthbsIpakVM4i30c9K4q+kiT3S/IuTQI5oe2CzGoiNKZqEBfHim u4XO9m/6C65X49naG8a5dZiT4EAXvb4FQVTCwSoJjKUtNojYP6myBN4KFkUdJh7Urgv0kK zuc052ZXSOaQGF7kkXk76QrAe6B6ibEQtxeD3ohvYtbNildShBDx4VlfcKqJ3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv2VL2XmdzLZx; Thu, 21 Nov 2024 02:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL2coSq067799; Thu, 21 Nov 2024 02:38:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL2coM7067796; Thu, 21 Nov 2024 02:38:50 GMT (envelope-from git) Date: Thu, 21 Nov 2024 02:38:50 GMT Message-Id: <202411210238.4AL2coM7067796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: ab540d44ba32 - main - igc: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab540d44ba3201ff8313b90ba0096004603b2e34 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=ab540d44ba3201ff8313b90ba0096004603b2e34 commit ab540d44ba3201ff8313b90ba0096004603b2e34 Author: Kevin Bowling AuthorDate: 2024-11-21 02:38:01 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 02:38:01 +0000 igc: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. MFC after: 3 days Sponsored by: Netflix --- sys/dev/igc/if_igc.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/igc/igc_regs.h | 2 ++ 2 files changed, 61 insertions(+) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 38fb1406b1c1..9a4d0b2dd0ac 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -127,6 +127,7 @@ static void igc_print_debug_info(struct igc_softc *); static int igc_is_valid_ether_addr(u8 *); static void igc_neweitr(struct igc_softc *, struct igc_rx_queue *, struct tx_ring *, struct rx_ring *); +static int igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_softc *); static void igc_release_hw_control(struct igc_softc *); @@ -497,6 +498,27 @@ igc_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, igc_sysctl_dmac, "I", "DMA Coalesce"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + /* Determine hardware and mac info */ igc_identify_hardware(ctx); @@ -3013,6 +3035,43 @@ igc_print_nvm_info(struct igc_softc *sc) printf("\n"); } +static int +igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct igc_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IGC_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IGC_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IGC_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IGC_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IGC_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /* * Set flow control using sysctl: * Flow control values: diff --git a/sys/dev/igc/igc_regs.h b/sys/dev/igc/igc_regs.h index 26614dc33df6..17fa89e492e8 100644 --- a/sys/dev/igc/igc_regs.h +++ b/sys/dev/igc/igc_regs.h @@ -145,6 +145,8 @@ #define IGC_FFVT_REG(_i) (0x09800 + ((_i) * 8)) #define IGC_FFLT_REG(_i) (0x05F00 + ((_i) * 8)) #define IGC_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */ +#define IGC_DTXTCPFLGL 0x0359C /* DMA Tx Control flag low - RW */ +#define IGC_DTXTCPFLGH 0x035A0 /* DMA Tx Control flag high - RW */ /* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000 /* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ From nobody Thu Nov 21 05:40:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv6XV5BHYz5fGXB; Thu, 21 Nov 2024 05:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv6XV4kdvz4pBp; Thu, 21 Nov 2024 05:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732167658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4TVAqQ1JH9eNwWrXvDMQl4zHZns6jcoclim4TEdMjU=; b=TC8ULldohhspdDPZYZEq/udMtIdkkoJK5qiYemU/xEETqFo8/qiEn2itzdXqSi4r/nRRHB uCMCrZycXUL8OMt7wG8KK/S32LJczXbh2nMQsi6dvTQsCAJPGlSyH4l4gFccXsXae61fVF migjyge/5Ml6ZL5KwZm1pnecmwN4SekhMTTEDOg6vnTR1s5DXrL5Pa6OSxtgpIvJbjNITr KUrR+1Gr12vqooOoSJ4gQ66kWinq2cJakoHkZxSsGm8zSBhAdxdV/iPSzXt/0D1kVGc83R 7elywrC6iyi5ZpGY2Z//KNNZdQ8Mg7WrruDc4SNshL6sGztsguvsWRJq7Eo4rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732167658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4TVAqQ1JH9eNwWrXvDMQl4zHZns6jcoclim4TEdMjU=; b=JqSgSpU80x0ku6nJ1WdEJj7UifcgGB5eJdGFYlR4+SbCLMpU0jFf3mAiyKWGlbi6PNZGQB HKxndEa9DgD+bl6RK219+VVeVj5dzWhnQZfk48yfIJx54XJyAAwLGOI+hSs0iBTRtFCq6R SIsUEdkNh4kObgFqKDd0l+hNVZgUiwZR4IRveRSrWE9Yl9WQiKlwSEe8DitQTaVm8jL3xx RZhbQAxURsohRZNhvaB53q0Kb9eJDF2vH6FEN2FurdmGYyhJLC7/s5FMzfOj8u8ItZpUdh t1OtzUPWtHXjvlyvSWvrfD4BxEGlCo8H2iOvC7DFcI5uEtw2ue2/OqFVUnWTaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732167658; a=rsa-sha256; cv=none; b=DlRyELsDE7kzmCcyfJ4Dt36XRGTiCKMPIqIENJ/2KSoXOefQ+ylLan9nNhBw3dGKLoT9QF sCrkAnay4ycyBgDSfHXicUSGo5kzMKvpt34Yf8EMvhD3vrc7JCUv4fuylFoAJV73lY4SzB N2bqW4tLlbZGfO5hEcC70lc/eh8cnR1gA6emqRVQL9H8mCdODxTNvtFR+yHs03UTVcHcxd wquAjin/dq6mHTztv1hycLytDzFmvLSoc4aLNMI2X4RCVdH0DofnhsjdEK+LgrSVwlVnQQ FajRuphlked/6qttuSGJ3RLZNJbh11Cf+1425BHSEedaY4RhY3KB5qRg2kT59g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv6XV4Km6zR5T; Thu, 21 Nov 2024 05:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL5ewd5013449; Thu, 21 Nov 2024 05:40:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5ewVl013446; Thu, 21 Nov 2024 05:40:58 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:40:58 GMT Message-Id: <202411210540.4AL5ewVl013446@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: 1f78bbb5c415 - main - newsyslog.conf(5): Accept human unit suffix in the size filed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 1f78bbb5c415efefa782c1be7f9a2e4a5008903b Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=1f78bbb5c415efefa782c1be7f9a2e4a5008903b commit 1f78bbb5c415efefa782c1be7f9a2e4a5008903b Author: K Rin AuthorDate: 2024-11-01 05:12:06 +0000 Commit: Li-Wen Hsu CommitDate: 2024-11-21 05:39:09 +0000 newsyslog.conf(5): Accept human unit suffix in the size filed MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1505 --- usr.sbin/newsyslog/Makefile | 2 +- usr.sbin/newsyslog/newsyslog.c | 19 ++++++++++++++++--- usr.sbin/newsyslog/newsyslog.conf.5 | 9 ++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/usr.sbin/newsyslog/Makefile b/usr.sbin/newsyslog/Makefile index 0afbe3b814a7..26ff30d4a0b3 100644 --- a/usr.sbin/newsyslog/Makefile +++ b/usr.sbin/newsyslog/Makefile @@ -6,7 +6,7 @@ CONFS= newsyslog.conf PROG= newsyslog MAN= newsyslog.8 newsyslog.conf.5 SRCS= newsyslog.c ptimes.c -LIBADD= sbuf +LIBADD= sbuf util HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index e9b84bae342d..d07f302fd24f 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -77,6 +77,7 @@ #include #include #include +#include #include #include #include @@ -1335,9 +1336,21 @@ parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p, badline("malformed line (missing fields):\n%s", errline); *parse = '\0'; - if (isdigitch(*q)) - working->trsize = atoi(q); - else if (strcmp(q, "*") == 0) + if (isdigitch(*q)) { + char last_digit = q[strlen(q) - 1]; + if (isdigitch(last_digit)) + working->trsize = atoi(q); + else { + uint64_t trsize = 0; + if (expand_number(q, &trsize) == 0) + working->trsize = trsize / 1024; + else { + working->trsize = -1; + warnx("Invalid value of '%s' for 'size' in line:\n%s", + q, errline); + } + } + } else if (strcmp(q, "*") == 0) working->trsize = -1; else { warnx("Invalid value of '%s' for 'size' in line:\n%s", diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5 index a8ab132edaa8..a9deb079e294 100644 --- a/usr.sbin/newsyslog/newsyslog.conf.5 +++ b/usr.sbin/newsyslog/newsyslog.conf.5 @@ -18,7 +18,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd December 25, 2023 +.Dd November 11, 2024 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -116,8 +116,10 @@ Specify the maximum number of archive files which may exist. This does not consider the current log file. .It Ar size When the size of the log file reaches -.Ar size -in kilobytes, the log file will be trimmed as described above. +.Ar size , +in kilobytes by default, or with suffix suffixes like k, M, G, ... as supported by +.Xr expand_number 3 , +the log file will be trimmed as described above. If this field contains an asterisk .Pq Ql * , the log file will not be trimmed based on size. @@ -438,6 +440,7 @@ entry: .Xr gzip 1 , .Xr xz 1 , .Xr zstd 1 , +.Xr expand_number 3 , .Xr syslog 3 , .Xr chown 8 , .Xr newsyslog 8 , From nobody Thu Nov 21 05:52:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv6nP02RKz5fHBY; Thu, 21 Nov 2024 05:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv6nN6gKDz4qQq; Thu, 21 Nov 2024 05:52:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fes70WqxV2iIozuhm3KxoX/U/vx9SAMLGphPSdE9lWg=; b=TGgUBZ/TvBpcX2VzHPsOzGnzhQt05QUrqEqFcbxJIK5zAfRhrWRqK76+CINVqVtxLSL4oy iwucXaUWLrGJFtWk6ylp61hdfJ8uUlXCAfcem18+TDlcr+7fRRTyIsNISmGnVAOf1vHBHO qLe5MXP3WoQBNXfzij5RUOo9Tmmt2K3GEDYZtdhFPvcv4AU3npXp0TdPZIdNkGWeefIJ80 VssTOUoE/tKOSlWk27N/PA7ndGKyB+tcAh2TyhvqMuoVs+uaHEAK0Q/k6kgWddMxpFND/7 KrCzFiToW1dpg7megi9yeYN65J8kdY26tNCcVQ02KhTZhr2TiQHwaanmKpFh4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fes70WqxV2iIozuhm3KxoX/U/vx9SAMLGphPSdE9lWg=; b=hw+OBLW7MM8u2eJ3psZPE56hB9erJT62ASDKDuNJOGidIdJ/pQp8GnLpArtUmVAge+Wu51 69176CsXSM7eBwBYCuky3t1lh8uC1OMZxElA332LjtfXDgGmhcfO69W1bnF/osJFvBUPXE W50/mBhGOxzQS3eA2d6hPvnmhZWNd/Ovmc0LJbWB+5idBDmMR8wjQiIQH15fHPCJRWLENu 0jKBlWVjbb74v30BA+21qUktsidN43gNA/zx6ZLjq+mjIko6X7BphK6w2V8anH4ZhyfHeX 1BFKS6AGBlmQ2f9knOCJIM1eQN5RS/M7xIhLc0aFTE0r2nc6s6GrzdHbYRTaQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732168328; a=rsa-sha256; cv=none; b=v3XAD2SrM6/NnIlao4xQDRhgC+Jt2dveKLLtvEZNdA6H+aOeaUdy1lZxLfvWXrMF7ggBZM QVK14FUQ9HUOuptWwIqnYrUhJnVbtPg7R9h4ycu0n8uolSLwkJ7jrXXugjEG2hFbXXaQ9E 2q0jS7StL6Be2/5LDQ7CqrBGnIugjQHBMcY7N9QiJXuvjdk/oOMRYKCS1kb+S3w13I7OnZ l5+eXqf1wwU55GyaDevU345iCa2hCKpgVLeYJIYn4gmZrIKTffVe8HYUocaqqZeRIIrb5r EyFdb9xzLEuek0Fs3SVDHTTY9lvSt/YmvCQ6/ziFuBFR3ZFy4zBQgdqCHck3WA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv6nN6H9mzR8C; Thu, 21 Nov 2024 05:52:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL5q8rt037120; Thu, 21 Nov 2024 05:52:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5q8VR037101; Thu, 21 Nov 2024 05:52:08 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:52:08 GMT Message-Id: <202411210552.4AL5q8VR037101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: c66d2795bdb5 - stable/14 - e1000: Improve igb(4) SFP 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c66d2795bdb5368045fd2f946038d5196b0f8817 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c66d2795bdb5368045fd2f946038d5196b0f8817 commit c66d2795bdb5368045fd2f946038d5196b0f8817 Author: Kevin Bowling AuthorDate: 2024-11-07 06:02:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 05:51:50 +0000 e1000: Improve igb(4) SFP support * Adds support for SFPs that are not correctly coded as an SFP transceiver. i.e. Coherent-Finisar FCLF8522P2BTL. * Configures multi-rate SFPs i.e. Coherent-Finisar FCLF8522P2BTL as SGMII so they can do 10/100/1000 auto-negotiation. * Adds support for 100BaseLX SGMII transceivers. * Some code cleanup and additional debugging. Reviewed by: emaste, markj, Franco Fichtner Tested by: Natalino Picone Sponsored by: Nozomi Networks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47337 (cherry picked from commit 15853a5fc9548d9805a2ef22f24e2eb580198341) --- sys/dev/e1000/e1000_82575.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/sys/dev/e1000/e1000_82575.c b/sys/dev/e1000/e1000_82575.c index a33aa9eb2903..47b8006314f8 100644 --- a/sys/dev/e1000/e1000_82575.c +++ b/sys/dev/e1000/e1000_82575.c @@ -1686,20 +1686,19 @@ static s32 e1000_get_media_type_82575(struct e1000_hw *hw) break; } - /* do not change link mode for 100BaseFX */ - if (dev_spec->eth_flags.e100_base_fx) - break; - /* change current link mode setting */ ctrl_ext &= ~E1000_CTRL_EXT_LINK_MODE_MASK; - if (hw->phy.media_type == e1000_media_type_copper) + if (dev_spec->sgmii_active) ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_SGMII; else ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES; E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); + break; + default: + DEBUGOUT("e1000_get_media_type_82575 unknown link type\n"); break; } @@ -1750,24 +1749,27 @@ static s32 e1000_set_sfp_media_type_82575(struct e1000_hw *hw) /* Check if there is some SFP module plugged and powered */ if ((tranceiver_type == E1000_SFF_IDENTIFIER_SFP) || - (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) { + (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) dev_spec->module_plugged = true; - if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { - hw->phy.media_type = e1000_media_type_internal_serdes; - } else if (eth_flags->e100_base_fx) { - dev_spec->sgmii_active = true; - hw->phy.media_type = e1000_media_type_internal_serdes; - } else if (eth_flags->e1000_base_t) { - dev_spec->sgmii_active = true; - hw->phy.media_type = e1000_media_type_copper; - } else { - hw->phy.media_type = e1000_media_type_unknown; - DEBUGOUT("PHY module has not been recognized\n"); - goto out; - } + else + DEBUGOUT("PHY module is not SFP/SFF %x\n", tranceiver_type); + + if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { + hw->phy.media_type = e1000_media_type_internal_serdes; + DEBUGOUT("PHY module is 1000_base_lxsx\n"); + } else if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) { + dev_spec->sgmii_active = true; + hw->phy.media_type = e1000_media_type_internal_serdes; + DEBUGOUT("PHY module is 100_base_fxlx\n"); + } else if (eth_flags->e1000_base_t) { + dev_spec->sgmii_active = true; + hw->phy.media_type = e1000_media_type_copper; + DEBUGOUT("PHY module is 1000_base_t\n"); } else { hw->phy.media_type = e1000_media_type_unknown; + DEBUGOUT("PHY module has not been recognized\n"); } + ret_val = E1000_SUCCESS; out: /* Restore I2C interface setting */ From nobody Thu Nov 21 05:52:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv6nz5ksGz5fH6Y; Thu, 21 Nov 2024 05:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv6nz50L6z4qVW; Thu, 21 Nov 2024 05:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B9GxUM1rX140xSvzVeujX1a+iY4eL0HVuTmqILBEF4Y=; b=Uclv1oe4MCu60sMWyI1DU+54X9tqqj5RTswiydoJ/jKu3HvnZ9pXG9YoWIU24r5T+DbrsK RhoH3bWpZWIDZaQn/dP2Yb2MLrpepPBaoGZZEwGjw2GX1unB4B+zTUZlUyU9Lfcy539q3l cZ4DPQd5r1vzkFxDqJKOoCwA+4Fi23yFGEV+/iqKqLU7GRLWoDQ6anOzOGljbB8IWvTAxv E3pL1sMb3QHlriBhIj/PUNPnNfPBfW74nkrJtzu1Ot+0YmlWM2yr+XoU1lTWNx8aIXLDs3 uzr7G4yWFjCxrLdrtXUxWPJxvCWTXUIYMVbIRa1bvyOhUEMmPXJq63upLy7Z+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B9GxUM1rX140xSvzVeujX1a+iY4eL0HVuTmqILBEF4Y=; b=A0+wJR0Ga8lUjI85FFgyywxk7Nun6PzsIgHlY4+6BWUdBA33fv65FfcdtWRO2KkoDNeE7q OJrNroXzoOmPPJzFVxB2La/+rSWOE86SNyvdKdDA/UXPVgqZgrXsn5ukKrVmrs+Hwv1tGf aeZXGXaiAd6wRGwzKBwYwKDL34/dTxh690Vmfm0uLhXF2qg1brdPEUEN0Bu6rWT3WdaeMi ew+fD8+bhZf4mfQ43aT9UP3OOYKWQebNuEgDgS51eoyKjUktHpkwA3NjyZaETNQvpQEkRR bCSXiAWIHPP5/dFCqUIoNQqIh7lfv4WVJ9gbo2JxlMdTuiaSV9KR94yEM8wUtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732168359; a=rsa-sha256; cv=none; b=mtPVp/SQ0x4qkhfzLzQ3881nsCpyy0YTQKpJDsEmDbr1L7mVgQ6FAzHzVMoGXdr6FS29QL VMiNrDySGKEl4fqxqtyNpEe96I8CMW8HC/JmMTVaD4HQBtl3UdEN1aYLvY4TiQ/2P52Asv KKoqnL9z+dZ1r3rRJ8464+hmVKP/UZ87aWgV0mhAPi3Tl4fwNF+Q9HpZsff/h9LpynDSwU osuzckxFzPUPbdDgUBbR9H/UOLmhCYCUtSYP4k/rBD65nD5mWm5kqmQK3N+FDxq4L1U46r vzoZPSHtiAZjsj0uYKxpnSvFj8rb8OjJbjw0JEpqVfF3ZcGnB0jhyGQ++TfAPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv6nz4bnszRjS; Thu, 21 Nov 2024 05:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL5qdgx038153; Thu, 21 Nov 2024 05:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5qdf1038150; Thu, 21 Nov 2024 05:52:39 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:52:39 GMT Message-Id: <202411210552.4AL5qdf1038150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: cf6a8711e437 - stable/13 - e1000: Improve igb(4) SFP 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cf6a8711e437c69da5e2d34d27862a3f8beff892 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cf6a8711e437c69da5e2d34d27862a3f8beff892 commit cf6a8711e437c69da5e2d34d27862a3f8beff892 Author: Kevin Bowling AuthorDate: 2024-11-07 06:02:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 05:52:27 +0000 e1000: Improve igb(4) SFP support * Adds support for SFPs that are not correctly coded as an SFP transceiver. i.e. Coherent-Finisar FCLF8522P2BTL. * Configures multi-rate SFPs i.e. Coherent-Finisar FCLF8522P2BTL as SGMII so they can do 10/100/1000 auto-negotiation. * Adds support for 100BaseLX SGMII transceivers. * Some code cleanup and additional debugging. Reviewed by: emaste, markj, Franco Fichtner Tested by: Natalino Picone Sponsored by: Nozomi Networks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47337 (cherry picked from commit 15853a5fc9548d9805a2ef22f24e2eb580198341) --- sys/dev/e1000/e1000_82575.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/sys/dev/e1000/e1000_82575.c b/sys/dev/e1000/e1000_82575.c index a33aa9eb2903..47b8006314f8 100644 --- a/sys/dev/e1000/e1000_82575.c +++ b/sys/dev/e1000/e1000_82575.c @@ -1686,20 +1686,19 @@ static s32 e1000_get_media_type_82575(struct e1000_hw *hw) break; } - /* do not change link mode for 100BaseFX */ - if (dev_spec->eth_flags.e100_base_fx) - break; - /* change current link mode setting */ ctrl_ext &= ~E1000_CTRL_EXT_LINK_MODE_MASK; - if (hw->phy.media_type == e1000_media_type_copper) + if (dev_spec->sgmii_active) ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_SGMII; else ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES; E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); + break; + default: + DEBUGOUT("e1000_get_media_type_82575 unknown link type\n"); break; } @@ -1750,24 +1749,27 @@ static s32 e1000_set_sfp_media_type_82575(struct e1000_hw *hw) /* Check if there is some SFP module plugged and powered */ if ((tranceiver_type == E1000_SFF_IDENTIFIER_SFP) || - (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) { + (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) dev_spec->module_plugged = true; - if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { - hw->phy.media_type = e1000_media_type_internal_serdes; - } else if (eth_flags->e100_base_fx) { - dev_spec->sgmii_active = true; - hw->phy.media_type = e1000_media_type_internal_serdes; - } else if (eth_flags->e1000_base_t) { - dev_spec->sgmii_active = true; - hw->phy.media_type = e1000_media_type_copper; - } else { - hw->phy.media_type = e1000_media_type_unknown; - DEBUGOUT("PHY module has not been recognized\n"); - goto out; - } + else + DEBUGOUT("PHY module is not SFP/SFF %x\n", tranceiver_type); + + if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { + hw->phy.media_type = e1000_media_type_internal_serdes; + DEBUGOUT("PHY module is 1000_base_lxsx\n"); + } else if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) { + dev_spec->sgmii_active = true; + hw->phy.media_type = e1000_media_type_internal_serdes; + DEBUGOUT("PHY module is 100_base_fxlx\n"); + } else if (eth_flags->e1000_base_t) { + dev_spec->sgmii_active = true; + hw->phy.media_type = e1000_media_type_copper; + DEBUGOUT("PHY module is 1000_base_t\n"); } else { hw->phy.media_type = e1000_media_type_unknown; + DEBUGOUT("PHY module has not been recognized\n"); } + ret_val = E1000_SUCCESS; out: /* Restore I2C interface setting */ From nobody Thu Nov 21 05:53:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv6ps5rGRz5fGys; Thu, 21 Nov 2024 05:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv6ps5HXhz4qyc; Thu, 21 Nov 2024 05:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JEza1AwwDnixsKXzYIzcnO9DmB+C8ImLX9FBuPbnFjA=; b=RLK7w2xoFxvwP5xKz67jCj1PA+XvlrDc51Z+o+9TIk1ydjGGY3wWrFcmCOOgUQcuGvtjGm WsveIQLkDK15FgpJ6AsvU0xOtd2YaCoo7zHqcAS3TrRS13qg4y9+fsvoTThtB25SIIdBzx ZEhIZvUjMYzzgk6K3HpT89WPF7W3H6PfAhatqgZVPV4jHnI0Lezn0I5KTixGDIF/JD2zL/ ejnccX7b7m7UYbFFLwZtb881bYXIrb4km5KbxwjNzcp/df1h+50v6matoQby7yPEyLi0cU PQ5LZ6TaMh+/tkxawt/nDlamzcMcMKAPr0H1Js21jP/64okiV+DbPFy0zersKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JEza1AwwDnixsKXzYIzcnO9DmB+C8ImLX9FBuPbnFjA=; b=KgT4rPpilK7/stTNY6i+CjYKF0dtLOy6ZrdPJ4Y79tsl/lxwfqG5fga4sOYpRXcp/mdg9n adrQPOaHOOpIRVrrYu7SnxAw8oCgGcO/9sRnZVz2MlrPTV1rk36gVCs+54qECQ/0HsnwU1 bLw4yI2Ka9SPAd0mloY8ZqWEXig57fJAwFCDt+K7c6NkQ/BqziWeSSVczsK3qQ61XdCMLL J6BB3AgUipGIWaQne2nd+bfy5XuJkUR6vjXyJxBAgF0iSOn1uGFlS03TslaEq/B7aD1qZ3 9IqnNHZtUqbLau8D+TKi4SroQjAnZpZKlS8lYEYzChcpUSP9DymugGaTjHtmkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732168405; a=rsa-sha256; cv=none; b=Oi2vkjnANdKGZjyjIwh5BuH70N0CTok4qvmCU4w5c9kfcmOjgavBlwpGEUfhJZRQAtlRHi 1jAJ25Ts4knwNy/qSS+YYb9badlM7Oc9araCR9y1VYAHXE2yf9yvmAUXzob0rHhcpu+qoV vpESzJn0tUIjOkOqdLZebBYpSpzKCSyEkhgax1HRB2T7YCv4/mnr6Fjch+12U9KLhbIL4o rIn8yn9isHK4fV7xd0nop4U8ZEAenhHftcXEpO/P/SlQp6OH6C+ShtdxDPAEJczdUcOFP1 pNMFQYfBtPs+5KzQ0K0+daJWm5HhfTj6u1nB5y3no77eUEo8v8V7wZbWuJFzWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv6ps4XhzzRg8; Thu, 21 Nov 2024 05:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL5rP0I038489; Thu, 21 Nov 2024 05:53:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5rPsS038486; Thu, 21 Nov 2024 05:53:25 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:53:25 GMT Message-Id: <202411210553.4AL5rPsS038486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 4de746ee9852 - stable/14 - ixgbe: Add support for 1Gbit DAC links List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4de746ee98528fb29763cbef72b50c7d2d822b32 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=4de746ee98528fb29763cbef72b50c7d2d822b32 commit 4de746ee98528fb29763cbef72b50c7d2d822b32 Author: Kevin Bowling AuthorDate: 2024-11-14 06:33:28 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 05:53:15 +0000 ixgbe: Add support for 1Gbit DAC links This is a relatively well known trick for the X520 (82599), can be useful for testing and lab settings. It's not an official standard or particularly common but ubiquitous Broadcom switch ASICs deal with it. We'll call it 1000Base-KX because it's SerDes on the passive cable and I don't think it's worth adding another media type for this. Reviewed by: emaste Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47352 (cherry picked from commit 48ddd1b9f88753c6875566fbb67bc622453e4993) --- sys/dev/ixgbe/if_ix.c | 7 ++++++- sys/dev/ixgbe/ixgbe_82599.c | 11 +++++++++++ sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 80f288a4ccf0..f8a620295aa4 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1315,9 +1315,11 @@ ixgbe_add_media_types(if_ctx_t ctx) } if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU || - layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) + layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_TWINAX, 0, NULL); + ifmedia_add(sc->media, IFM_ETHER | IFM_1000_KX, 0, NULL); + } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_LR, 0, NULL); @@ -2323,6 +2325,9 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= IFM_10G_TWINAX | IFM_FDX; break; + case IXGBE_LINK_SPEED_1GB_FULL: + ifmr->ifm_active |= IFM_1000_KX | IFM_FDX; + break; } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) switch (sc->link_speed) { diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 1ecab83a4e92..b2b40371648b 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -441,6 +441,17 @@ s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw, goto out; } + if (hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core0 || + hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core1) { + *speed = IXGBE_LINK_SPEED_10GB_FULL; + *autoneg = true; + + if (hw->phy.multispeed_fiber) + *speed |= IXGBE_LINK_SPEED_1GB_FULL; + + goto out; + } + /* * Determine link capabilities based on the stored value of AUTOC, * which represents EEPROM defaults. If AUTOC value has not diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index da7d16a514d0..218a9dac3b78 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1436,7 +1436,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (((comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && - (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE))) + (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Thu Nov 21 05:53:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv6qQ5BW3z5fHR7; Thu, 21 Nov 2024 05:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv6qQ2Wykz4r7T; Thu, 21 Nov 2024 05:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4sOlLNiTLO/vT5rICOVIaqjvXbgu+Zyk7xbVgTLiID4=; b=hzm4x7MjmCwYaHBbnO9+kS9UvxuyHBRj/3XF9VWX2AxeBvk8qNmWb/0ZjwTRHHZFmZJtNf ZDt7PJsXHm8DglgO0r0yIgBiHnXNBs/YOoN9SzxwSUARif/6ilOEQla5/RliR9WOmKP9tQ nu5vyXClJLYT3o/ymDvGTvWDhKHMfNgtPAwF8w0x7FKBbDEh09m7csfpSyDabVbstGEdmk NZiRV7yJ9wKfwF8gYLjlfgBYngJYbFUIQ9AjCEK1YYLv7YAodiUtAyhchckYn6KDSPh6ZP eZLt5VbxiNW8jc/6fcyvE93U5Pd4MBKktAbbBmTPFQzrIRbaiqskQr7yypZaIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4sOlLNiTLO/vT5rICOVIaqjvXbgu+Zyk7xbVgTLiID4=; b=nw2QFxtejh2DO3zD0U5mJcne9iZS+f2qrXxuR8PkpDPSVS5dBq09ay2+vOmiEYqxf0kRCa +DfxtR8+dzIGMlgoWrjpn58Achn12EMx5Cxrfwl9O9V8TlKGSfeA2q5DOd4WqSbnhieFeR DtYQ31g58NtU8bq966BWsMU6IbGJ1gzX2gXt8YEWndtICpkJbAO6LcMQ2OKRV9x2KR2QgJ ZUd/FgxPzXRZEZ+Gk5y6aMDXjnbb0Te6ofv4HFwiWL2VIWfiXh6OAEmV/mHURCFKBg3k3/ TMIdwWOtOfqkjGTFlpu6ZGrn93ajf3VylcmlkO9UtoIHVpW1Y/lhw9lwnwGyPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732168434; a=rsa-sha256; cv=none; b=k+nOpU9vjcyp9+GYWLDNbykw6YDrGrOXuOiUoKsgfOVz2/k3UD41NE0GJS7mMTnElYBTOn 50gm3/Vc0Kso3Mch5scWvwc2Vp2PAQVzYpOMhP1Yzw2xD2hbFZVWwRwKbuJmHqGpMgktwb joGwY44ZzEceABPeF+EdVVnnkMskYj4ik3FVXC5/STRFGqE8vajU95h/T3SunzX+OZ1wJ3 0oRYdIrY62+ynCGBZCj0WCVYyXpgDjy7QHTrh42M2iz+R+zRfe2E8GYwROuPM5ri0u8iyH +EjNxtAgqLYzxN6XwF0yJ6zd/2lPIV4yOstNdz19NlcWJZqJ4e6CGEHDkYoFiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv6qQ27dvzRf2; Thu, 21 Nov 2024 05:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL5rsxf038830; Thu, 21 Nov 2024 05:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5rsM6038827; Thu, 21 Nov 2024 05:53:54 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:53:54 GMT Message-Id: <202411210553.4AL5rsM6038827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: f6a3934d63fd - stable/13 - ixgbe: Add support for 1Gbit DAC links List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f6a3934d63fd1439f363d5a733a0fa71525c6e7d Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f6a3934d63fd1439f363d5a733a0fa71525c6e7d commit f6a3934d63fd1439f363d5a733a0fa71525c6e7d Author: Kevin Bowling AuthorDate: 2024-11-14 06:33:28 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 05:53:37 +0000 ixgbe: Add support for 1Gbit DAC links This is a relatively well known trick for the X520 (82599), can be useful for testing and lab settings. It's not an official standard or particularly common but ubiquitous Broadcom switch ASICs deal with it. We'll call it 1000Base-KX because it's SerDes on the passive cable and I don't think it's worth adding another media type for this. Reviewed by: emaste Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47352 (cherry picked from commit 48ddd1b9f88753c6875566fbb67bc622453e4993) --- sys/dev/ixgbe/if_ix.c | 7 ++++++- sys/dev/ixgbe/ixgbe_82599.c | 11 +++++++++++ sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 23e378ba70c6..8ddb0315f254 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1316,9 +1316,11 @@ ixgbe_add_media_types(if_ctx_t ctx) } if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU || - layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) + layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_TWINAX, 0, NULL); + ifmedia_add(sc->media, IFM_ETHER | IFM_1000_KX, 0, NULL); + } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_LR, 0, NULL); @@ -2310,6 +2312,9 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= IFM_10G_TWINAX | IFM_FDX; break; + case IXGBE_LINK_SPEED_1GB_FULL: + ifmr->ifm_active |= IFM_1000_KX | IFM_FDX; + break; } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) switch (sc->link_speed) { diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 1ecab83a4e92..b2b40371648b 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -441,6 +441,17 @@ s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw, goto out; } + if (hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core0 || + hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core1) { + *speed = IXGBE_LINK_SPEED_10GB_FULL; + *autoneg = true; + + if (hw->phy.multispeed_fiber) + *speed |= IXGBE_LINK_SPEED_1GB_FULL; + + goto out; + } + /* * Determine link capabilities based on the stored value of AUTOC, * which represents EEPROM defaults. If AUTOC value has not diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index da7d16a514d0..218a9dac3b78 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1436,7 +1436,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (((comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && - (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE))) + (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Thu Nov 21 06:08:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv77j2zNxz5fHWR; Thu, 21 Nov 2024 06:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv77j2Tlkz4sC9; Thu, 21 Nov 2024 06:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lW7bIRrFEDeP2XKwLjuI3tLheMSx9kJUXPp9YWiyo/s=; b=ZikVMIh6kJcmM0VhC+ixsFJkAsQGTgMHW4NsTT7a6G3GVKrg6hehREtVsPZobQNwRXozRM IWOfUuZl9qVUu/QVI6V7GwahD1tv1101GqYl3TDHoZuMAyfqDmOf5fvU4t5mcfj+Z87Fxj cS23wTgDSH19JI3tvkU7EQJ3Xs268Qys0/qEOZ0YxK7YnARfD+mQBB+BhAr7oHoGOjgCgM bYd1KVHuwm1acPknXJnC2S1O8Iwk1RqG+sua9+MvEYrLlj/S2CWdz6iyCjUPc8JEM6hftS Y+bVPqXQGAVdRs3UYGinmEUwKmDg8VKJTu9rXDWpNOCP+rHebY4HgPguOD+5vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lW7bIRrFEDeP2XKwLjuI3tLheMSx9kJUXPp9YWiyo/s=; b=aB7/75KWLHsvkm+XFHQyfXpH289TogCbwcOJNhNsBMUDFs7vz2Mwcbgvj+mi4Kg4ch9M0L w39H0jbDDMSZHUBYkTYlG6jE9hi1aN2c5iaL7qFFKt4+P1MoDz1/KbeGy9Hqr6869XPSAK d2PQ39cLPGj8mUx663y5VP8XRNtnQ8CLKIlNagiu28qxx3mxdzDDSYIaWRKK/rteiplITe 5qB6CjzoVnuucIgIcN5L30/xa9aGLIfN15aEyOSG/fgDR46KL/lbJvZOARqzpWH2q17EkR sLQ0yVF45fJktHEtkUgq/JlgXwqLjUZt87mf8xQh6nTUHkQ9lJ9P4TaKUkKwCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732169281; a=rsa-sha256; cv=none; b=LsQRTSRXCfbvAEC8sbX/boK6AZJPxec5wPuG9CtnQEa0kdJe+h+wo3/mo3kUKheF9tSzwd rkzcCXZIUnNlGMBANjIrWcrkiPuxQqXy8GPb51nyzfC1TMhNfCEPxV3rXqaqh3ceRcJ1be BF4CB2uYaZwyf+hgEkPM2go5acI5wcgBRJhhY+AvKhlCcOam8F/EshSBYeRXpsiyBGPzam hfe26V++XMkWUHDaoeIf9SdDYMnAFFQ3rEkIAwqalsx+JF03nSSOqbFx0M9/UNSffZZpxO D+itOG0VclPmAhAT3D2yRHuvuIji8LOv9un33PH7RKzt/RV727mbLQOYMRXEwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv77j24jKzRCM; Thu, 21 Nov 2024 06:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL681hZ059715; Thu, 21 Nov 2024 06:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL681Jk059712; Thu, 21 Nov 2024 06:08:01 GMT (envelope-from git) Date: Thu, 21 Nov 2024 06:08:01 GMT Message-Id: <202411210608.4AL681Jk059712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 60ec1704493a - stable/14 - release: Remove empty suffix from file names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 60ec1704493ac92de9cb997c27d04ac199aa6ab0 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=60ec1704493ac92de9cb997c27d04ac199aa6ab0 commit 60ec1704493ac92de9cb997c27d04ac199aa6ab0 Author: Colin Percival AuthorDate: 2024-11-18 00:06:17 +0000 Commit: Colin Percival CommitDate: 2024-11-21 06:07:50 +0000 release: Remove empty suffix from file names For "release" builds (as opposed to "snapshot" builds -- in this context BETAs and RCs are "releases") ${SNAP_SUFFIX} is empty; but it stuck into some ociimages filenames via a copy-and-paste error. The final filenames on the download mirrors were not affected, so this does not need to be merged to releng/14.2. MFC after: 3 days Sponsored by: Amazon (cherry picked from commit d54fdd16636bbe6a38a5b0a636dd83cf64aa6e06) --- release/Makefile.mirrors | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 8af614d9a9bb..7e25d69588bd 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -380,8 +380,8 @@ oci-images-stage: . endfor . for CHECKSUM in ${CHECKSUM_FILES} cd ${RELEASEDIR}/ociimages && \ - ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} - cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM} \ ${OCI_DIR}/Latest/CHECKSUM.${CHECKSUM} . endfor .endif From nobody Thu Nov 21 06:13:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv7G15H7Nz5fJDL; Thu, 21 Nov 2024 06:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv7G14Sz3z4ssn; Thu, 21 Nov 2024 06:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7ew20UI75RZbWs7R84D/uSIAOxr2X77AH4MS3zcM820=; b=r8DdsSBcOIkw7oxyb5Lj78sEZWlEjkUfTwjkd4Yj2prPPls9v7QXBfDQwCRNioiGUds6vS LjdObRTSNhf7zvS9i84BcuCOteCupBtMQIG9W0KoU/MOd6/9yVaclXGMk9anY++JsBd9A9 MwltCKBOSG3K3ux5sbj4adtEFxSVBczKDQD/CiVbLAu6809g8pCSYiX6BxzwSjdPZwPsN+ YFNHLlZ23qE2ddFhqOHqHZuculyPw+esBeOJ0jpCC66QWfvfPJK9cgdgKjX5LtaxJs01k9 wO2s5i5hv9alve3P+lCZJHYXgqjFxmCcbNKsyuDGZQ3YJaTVgnIMsFvlZ71L9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7ew20UI75RZbWs7R84D/uSIAOxr2X77AH4MS3zcM820=; b=Oyf+T2t7LNhAvibzNkghBb49zFDbmKJHdW7IEnO66YzKE63Im+Cl4coYcWD4Q2DzRfXmIp q9kQm8ejnOV5ZJ9Eu7pAHcmJwFN8I8xiOqngW9Z+RCoR2C/PtA5FK/UtZ7up47+iGPq7sX Wie1xvzJo/oAe2Tm66RnPI76oUzdoOk+GUC1ytVGYFmxlL577vZ2kpVOGY3aY73fbxGk0w JdUOXU6z+mBn/cm1wowRNJEWzdwH0JMD1QI3vkYZ4weNLqfeheFH7/VaCa09q1H2rqPTp3 xl/aEY/Lj1NRx+KtE3X99DOPDou1g66F3Rfs44hjg8Ccxc2pVFelkTE/keRpgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732169609; a=rsa-sha256; cv=none; b=Iac6Ot+5ruoJhILICn6p308uCjsKh2D0oWU2HXSHCa71hCe/G3pt6C6AV/uqsUw74rYMaV a1nOYNIbXHcmP42rPvf5xekKGT/wMUvBh7CLq2QTwY3n9ASxLGv9ni/kL8K/gqmxo3V9n+ fLrST3+Vjooo/ZV6o85G2AivY2ALG4oNN+PbVSVkcHP+G64++P/Ey6klm0EZOwW86MVwa3 MmBaKBsz+ueJ0EpOSJVb3LQOekhxvvAXg6dAv/X+v2XNEAySqlgsA8QfQoielW2NM5eOCK U1AYW3+YKiKhydnPBGBBY3GlyO3QOF/NM+olPWEKMMy8Sm53l92UQ6+3Rhb3cQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv7G144XSzS9K; Thu, 21 Nov 2024 06:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL6DT4x076663; Thu, 21 Nov 2024 06:13:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL6DTB1076660; Thu, 21 Nov 2024 06:13:29 GMT (envelope-from git) Date: Thu, 21 Nov 2024 06:13:29 GMT Message-Id: <202411210613.4AL6DTB1076660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: e8263ace39c8 - main - release: Don't break if firmware install fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/heads/main X-Git-Reftype: branch X-Git-Commit: e8263ace39c8ecf11233c0a10d0b1839e6813046 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e8263ace39c8ecf11233c0a10d0b1839e6813046 commit e8263ace39c8ecf11233c0a10d0b1839e6813046 Author: Colin Percival AuthorDate: 2024-11-21 06:10:28 +0000 Commit: Colin Percival CommitDate: 2024-11-21 06:13:24 +0000 release: Don't break if firmware install fails On some platforms (e.g. powerpc) we don't have packages, so we can't install them onto the ISOs. Proceed with building the images anyway. Reported by: Weekly snapshot builds Fixes: 7e2996c1f5b4 ("release: install wireless firmware onto disc1 and dvd") MFC after: 1 minute --- release/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile b/release/Makefile index 9d5b64dae271..a99486ea4b84 100644 --- a/release/Makefile +++ b/release/Makefile @@ -193,7 +193,7 @@ disc1: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf @@ -269,7 +269,7 @@ dvd: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf From nobody Thu Nov 21 06:13:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xv7GV6zlmz5fJ0q; Thu, 21 Nov 2024 06:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xv7GV5y6fz4spk; Thu, 21 Nov 2024 06:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JCrtbekWNX8JgvbSsmiDIG1QxemjWyuG9cgou76dW5Q=; b=VTSxqNvhpPNIvy/iQsUyIcGgFpk7JrcVhBH50T9O5L8ADf6FPF5EzXEO1UH7kYQbp+OVtN cT3lzbvWSWjBYetP5gPPlyycIuW2rWs4eURdweALKLP4LTBEAC22uJxmjBnjBRw17OaZjA rsMTs7+zSVnBf/cleu1H/0/dsw90liXsVFER2N3whMxvXSNT7ub8M6PTv/W+QfrIYpkfJO Tt/QOSWb4w5ujIdOsOewXdavK+kmDmJb49XurQwHl06bYHSByfbxQqU1I3rR3qTpNrbi5j XPcFozcWS8maTTcaXfqr/LXcpkeBQ8Th00FOuMGZ/vG/5xH6MyYxpAKtLLYFTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JCrtbekWNX8JgvbSsmiDIG1QxemjWyuG9cgou76dW5Q=; b=oMN0UvzeekynrJ22pNvfzR5grGK6lWMaYwTeJRlrnk+M3kjpVLYk2GlZNYYP+F+gZXhdHS ghMASkqSnGqNr9PoS2a8E6MPP+ncIHOcj8T2wQSJoX6RwrJ7Q4pWTIvyHTXlmfRDr+1XVt rQxBzB2aEkvXROtYwSgTjifFuLYOwd+gTcmvYA1WbLreTH4WLGrW43BU7rd0ziU951C0Cy A4A3EAtq87XBSnBGwht7+VA0xHWeDk62XWgzsbq0pvjXufKgJNEm/tble19f/u6fCttU7k ym9Mik2r4XLEkztlNkqTb+sS9Wtv82LcKIU6iJGttTFqniLpzuvvdOvkFI5iHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732169634; a=rsa-sha256; cv=none; b=QaXDbZStOHxqXw1ylj6jf41QvDNc03fTwODTsjeqlS6wjdq+Zz81uWU6tjLmD8dnzsMl1l RiGSIn9WnbYSdZ6XOuVRM2Ff40MJL61OClSTutU4JCQaRurQDaSdjv5u9Cq7nYk5qSUH3v C8WZPbPcnujrTeVyxvI0fcx6v6HryUcRKt6U+K3v0F+Vqv9nwW2OyZpP3R2UjqMDZawhON bYYUsUOyKFmQvL6Q9pEhrEyiPe3LtYpswVvsiuiDjGIiT5Xi4xwDO83cFxl7catp76/ze8 H4SI3kilbKClfLCjDuFka2XZZpdg3N/xVwdgA/+7gKxyoYa8oYeuFG8ER212LA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xv7GV5Z5bzS9L; Thu, 21 Nov 2024 06:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AL6Ds0n076967; Thu, 21 Nov 2024 06:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL6DsUf076964; Thu, 21 Nov 2024 06:13:54 GMT (envelope-from git) Date: Thu, 21 Nov 2024 06:13:54 GMT Message-Id: <202411210613.4AL6DsUf076964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 9431091ee021 - stable/14 - release: Don't break if firmware install fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9431091ee021eca9eb4c768b566e623ba9333b41 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9431091ee021eca9eb4c768b566e623ba9333b41 commit 9431091ee021eca9eb4c768b566e623ba9333b41 Author: Colin Percival AuthorDate: 2024-11-21 06:10:28 +0000 Commit: Colin Percival CommitDate: 2024-11-21 06:13:44 +0000 release: Don't break if firmware install fails On some platforms (e.g. powerpc) we don't have packages, so we can't install them onto the ISOs. Proceed with building the images anyway. Reported by: Weekly snapshot builds Fixes: 7e2996c1f5b4 ("release: install wireless firmware onto disc1 and dvd") MFC after: 1 minute (cherry picked from commit e8263ace39c8ecf11233c0a10d0b1839e6813046) --- release/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile b/release/Makefile index c5970b184b96..152c2edfcf06 100644 --- a/release/Makefile +++ b/release/Makefile @@ -199,7 +199,7 @@ disc1: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf @@ -273,7 +273,7 @@ dvd: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf From nobody Thu Nov 21 10:38:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvF895h6Sz5cLwR; Thu, 21 Nov 2024 10:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvF8957YHz4480; Thu, 21 Nov 2024 10:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732185529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ozty4iB8fEFl10H5mAqizh7W3ypjLrqp97ocyxrkYks=; b=DgkdpjxFoC4zMA3ir9PYw+pEeJuM47g3+tz8crH5T5djSYttuIcpZwW33sORuwtSbBwsPV oKjvOeQSwJNB5oIB+VnNObyg+g5kUYEjqmqewXYoCMxhTQFH/GDDAvctZo0xic+17dDJBZ m3BuffBFxWFxAkWdxqR0SD0LuzFLnj2bfBcqYsvMDdtB+NS8q+CdGGVN3Q6IVy2UJLfwpa zVX0s/0uv2Iy8SdJ+53csUdZ3W+uyshd3+E48SwglUFsV6+ryTVu8EVuYOc1njQaDEuWFw qhNScMkAdht58PquI5m9qAFhR9rL9Bi+LxHvQuHsF3OnlJPkmhs1fAJpyta6Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732185529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ozty4iB8fEFl10H5mAqizh7W3ypjLrqp97ocyxrkYks=; b=K6lLQqYTevtPGfahuDGJgZvNnqqiaULjYI5kikL67CezIGu3arBRMRNJLOhS+2D5R6+B8h QU12yrwLBrBiATHYWMg3eXjBsKiLwAujwMU6bM4R08eTgE38KZ9vJo9paCm99MtoOF8BAg TWCOLp0Oz8a1UaDzQ2cclN+mzY2Sd3SKZQX/FGinE7/EwEoMWNGOEJ4JNNSilmg2rfJeb3 E87GXOn6gCZN1qU+ALOOEAhivWXptaIBFBnGY1fP4Fvy5o9bbCplvgqAl0CZSYSczVb4ET qDAaaERARulGfJ8I8FILcw5X7Cvv3XNowA5GnvKqJPIuCKbzaWZg6agYf0mSbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732185529; a=rsa-sha256; cv=none; b=H+b3NDq+ZaGB3v03uqhiAcsUlYNMA6D9nnXy4O5CldIwQxTC47mPMAz0mUB4tqR5AXKdic aaIx8xDNRMZ+ZBmalW2Rz2ziKo7gCxjpHJGGrAzXvT+gZnqwOHBcaFKV7ZxiNAQuAHwpsL X+Dtj7O0OsZCjV6B8Jk1ZBuTejmrxoXjQZKNL2E0z7iVr7tgMERmaTjNuTVOtOshE+Ui1s wNk4Y2kVzKaVyJ0T7K4h8FsF60TNZMne+XSVvZjbvwmWkdFluTaQFwFPqGN2Ru5C+Bmavi WwU3M9bqlzZNsXzrv2DMU5+xsJgmLvwYysUkFDP0g5MZmGnv3DhcVZWKyfQqdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvF894ZgMzcB2; Thu, 21 Nov 2024 10:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALAcnMR060653; Thu, 21 Nov 2024 10:38:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALAcn7n060650; Thu, 21 Nov 2024 10:38:49 GMT (envelope-from git) Date: Thu, 21 Nov 2024 10:38:49 GMT Message-Id: <202411211038.4ALAcn7n060650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: 976ab1425da4 - main - git-arc: Document how a reviewer group can be referenced List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 976ab1425da44b0dbd2b832599db229a1efc2d9e Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=976ab1425da44b0dbd2b832599db229a1efc2d9e commit 976ab1425da44b0dbd2b832599db229a1efc2d9e Author: Igor Ostapenko AuthorDate: 2024-11-21 10:36:50 +0000 Commit: Igor Ostapenko CommitDate: 2024-11-21 10:36:50 +0000 git-arc: Document how a reviewer group can be referenced Reviewed by: concussious.bugzilla_runbox.com, markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D47669 --- tools/tools/git/git-arc.1 | 5 ++++- tools/tools/git/git-arc.sh | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/tools/git/git-arc.1 b/tools/tools/git/git-arc.1 index 587b304dd794..f2f7ee38e140 100644 --- a/tools/tools/git/git-arc.1 +++ b/tools/tools/git/git-arc.1 @@ -185,13 +185,16 @@ $ git push freebsd HEAD:main Create a Phabricator review using the contents of the most recent commit in your git checkout: .Bd -literal -offset indent -$ git arc create -r markj HEAD +$ git arc create -r markj,#jails HEAD .Ed .Pp The commit title is used as the review title, the commit log message is used as the review description, and .Aq Mt markj@FreeBSD.org is added as a reviewer. +Also, the +.Dq Jails +reviewer group is added using its hashtag. .Pp Create a series of Phabricator reviews for each of HEAD~2, HEAD~ and HEAD: diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 050ec4ec1f2c..6ef1abf4e0c6 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -120,9 +120,9 @@ Examples: Create a Phabricator review using the contents of the most recent commit in your git checkout. The commit title is used as the review title, the commit log message is used as the review description, markj@FreeBSD.org is added as - a reviewer. + a reviewer. Also, the "Jails" reviewer group is added using its hashtag. - $ git arc create -r markj HEAD + $ git arc create -r markj,#jails HEAD Create a series of Phabricator reviews for each of HEAD~2, HEAD~ and HEAD. Pairs of consecutive commits are linked into a patch stack. Note that the From nobody Thu Nov 21 12:56:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvJC54Glwz5cWDp for ; Thu, 21 Nov 2024 12:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvJC53fG9z4Gnj; Thu, 21 Nov 2024 12:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732193793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhEvd6hHdt8Cby/QG1fg2TR9Sb/etiBaYwdYnwM++C4=; b=GAhqWsUTkb+qN84rMxJyjB5JBMGlHqX92QmaNH3qKfebCzcupinKxnrOGx6n/IKSYYGRrb lQ0gYo7sKdT0995kbFRdfZ8ZCvA9w5bsuY0rcLU1x3xIV5EBjTB8TV0Ls3pmdT54wThh32 EQ9dhn2ni+E1G9elue77Q7StF1MaSPgm6yRUibCUVkH0SXDYBtk0Pm/5t9DkJUDwvykrq4 9xAMNe8n/uXs9rlvXN8zfXwfxFdgQ5hrGQzKf8SzwKbV74jf1SZaLTeEDKp3iQej2Jlau5 ffk4fyEwWruR0Ll7VaCSwv6jyOf0KdwumgnQQtm+6XiYzfIHAAIhThBhziRSxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732193793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhEvd6hHdt8Cby/QG1fg2TR9Sb/etiBaYwdYnwM++C4=; b=VW1jcXPAohUMMaXjjHGuV9k6ww5H5Ey2qYSqxCPOU+mcLFf89VtyyqelD0i0M/0XKSNy8G Iaf6lU0vB0Qg+YTirTUh6Of9etMySIFZwCBL12NwjCzWMapaB4XvrSZ+DXryui+at9ZtqR xIMeJILpue1esZ73OaAdkzMxKoR4N5nSivtrGR7AORpErUNUsNZzYTFTyzZ70/azaUcPae 23ght3Tf1FpYwt7JvYtlyeWQvpSDaA2kklGQ8UwZ2qATyIZwPSwWnaJq56viJ+niAX+Aa+ KzJkNo/H8aA/D9LHvJ+oxB/drtIk0KOcDFqTQ2H8wxbxzBx+JeLi+WCCgmqCrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732193793; a=rsa-sha256; cv=none; b=mDSyYMr9ggzVxAIZnxPyctqMxDFBymrg6QztBKhXItes/qwna2OmZ4Uue/PzNgEECPbNhW 15Y3dYyXa7Z0R42SsqwfMffKxcE/klqJasm/sDCR38bfaOoKlA6XJf5fRQiczS6Zs58ghi etEMh7lT1fX5fFFpaBPIqY8MK1CfnTtkZpqACDUxbHANB32LEhT52BCrW1ABJxDl582ITu LxrhJjeVR3huWGhDn9sGY1E8YXe/47nAc2FrfJqAhbeeLXRMnPumW/a89nBIySeioqDmZV 1ckd5tLhJqQaZvuaD0xvvkrO519OLZns9SCqHR4NuwhCPOFZTjFTZxnuIkfPzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvJC52xlxzgjc; Thu, 21 Nov 2024 12:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALCuXtK018790; Thu, 21 Nov 2024 12:56:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALCuXMU018789; Thu, 21 Nov 2024 12:56:33 GMT (envelope-from git) Date: Thu, 21 Nov 2024 12:56:33 GMT Message-Id: <202411211256.4ALCuXMU018789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: efdccd835863..f65bf063bcac - vendor/llvm-project/release-19.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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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-19.x X-Git-Reftype: branch X-Git-Commit: f65bf063bcac0dcdca7d3b7b865e29c837566543 X-Git-Oldrev: efdccd8358633400f927c74be0f7969bda1b3775 X-Git-Newrev: f65bf063bcac0dcdca7d3b7b865e29c837566543 Auto-Submitted: auto-generated The branch vendor/llvm-project/release-19.x has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=efdccd835863..f65bf063bcac f65bf063bcac Vendor import of llvm-project branch release/19.x llvmorg-19.1.4-0-gaadaa00de76e, a.k.a. 19.1.4 release. From nobody Thu Nov 21 12:56:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvJC54Gktz5cW8D for ; Thu, 21 Nov 2024 12:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvJC53nB6z4Gqs; Thu, 21 Nov 2024 12:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732193793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=twJsMuU7o5Ah+fugl33ALsJ9MDtJH5bwi36yMx5OG8M=; b=YIjGkz/K1Nn2rb70I61/1/xvNDF+yDfyYROrDyDKFexGd3jo1gelAWbvPuPRJdx5DRoxrc /b284LRGSg2qzpcfKgUdNTlGwGyNh+emZ8/feB24HP/om9h8nhfQ/op/vUNHz/YWE4T6PA FR/L96E/zyzz1KCzrzOhkmUHqdPuu/aaYXiINqnTs11QscT9MUrbWdiHBuQVcbcgvRZ1/P n3SA2oB8++6n/wlHmDJcoRBPHii7/Sls+czWQuC5aDDpwwU83B2+nbQtMGSsgUK2TxnJJW w9LyVpWWA+0jWB2CX4i51JURBFpBIiV/YD8ee/bssWyNE2y+cX2//RH4tfDyOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732193793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=twJsMuU7o5Ah+fugl33ALsJ9MDtJH5bwi36yMx5OG8M=; b=Df/wlNDMyPolIydeKCv+SKS/NnDbcByqWP37g+/+gLNuIh2WH3KKvLqpNFuhWlNI+34HNo u3EwloqBSbixjaoRNrA9/cqv53PUCCnqG7NR6iKfd9Yhz4TJ++wWDmsccX+xsyejtPj1Bk A7ZTG5YcDuGo7KBVvm/uD6hgcCQSRpAKz9xy2hmk8BxoP1sgxGsKMZnXl9EfT/l8Dx4SR8 tjv5IjSFghvYZgmixqzj+Zxl5iPZxIGFKdqwNahQXoDVOD1XM+4HeY6hv+LBzutChKs3Tb e1ytPy1iwUtL2vZSr/hc40E7RF5SJ7oF73rhsUFYTMvvY0o5Ptpo34RewFS+rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732193793; a=rsa-sha256; cv=none; b=MJuXb/2GRW2DcwPc2y+QdUsQ7PcQAn6MUBLtGC+IvML5/Jw+R1hSVUOnUVrpOfwWRXA9dX ISg2p471Okrmtj1Kutn2tN4UDa3qE1uC+Thl+dQRi4jQocdXcRhgGFMtoFwIAQvQlKFu3w YmwgkNQPrkbISYMybgcPUUwBUaVEvJps5HtWrVm+9JogKCA1ZUW8wLorZWdeizoJ6J8xKy jEDTkG76zlJC/1IJmdwT1qRk06WXVwiJxVnEonMGS9/FtsVu0mqygsit+MirBccV2ZWgln Q8VdhuHN1DQyl3wuFzJ19vzBjkrydcmktiH7Cp6MhM9IS+PiIOWn+GYDJrYMaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvJC53NZyzfHG; Thu, 21 Nov 2024 12:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALCuXu1018809; Thu, 21 Nov 2024 12:56:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALCuXQ2018808; Thu, 21 Nov 2024 12:56:33 GMT (envelope-from git) Date: Thu, 21 Nov 2024 12:56:33 GMT Message-Id: <202411211256.4ALCuXQ2018808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 9ec7c4de3a76 - Create tag vendor/llvm-project/llvmorg-19.1.4-0-gaadaa00de76e List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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-19.1.4-0-gaadaa00de76e X-Git-Reftype: annotated tag X-Git-Commit: 9ec7c4de3a768d1ab890a155ad0a5a015e890e8b Auto-Submitted: auto-generated The annotated tag vendor/llvm-project/llvmorg-19.1.4-0-gaadaa00de76e has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-19.1.4-0-gaadaa00de76e tag vendor/llvm-project/llvmorg-19.1.4-0-gaadaa00de76e Tagger: Dimitry Andric TaggerDate: 2024-11-21 12:55:47 +0000 Tag llvm-project branch release/19.x llvmorg-19.1.4-0-gaadaa00de76e, a.k.a. 19.1.4 release. commit f65bf063bcac0dcdca7d3b7b865e29c837566543 Author: Dimitry Andric AuthorDate: 2024-11-21 12:55:29 +0000 Commit: Dimitry Andric CommitDate: 2024-11-21 12:55:29 +0000 Vendor import of llvm-project branch release/19.x llvmorg-19.1.4-0-gaadaa00de76e, a.k.a. 19.1.4 release. From nobody Thu Nov 21 14:28:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvLDh2Zyhz5d9Jb; Thu, 21 Nov 2024 14:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvLDh25fLz44wm; Thu, 21 Nov 2024 14:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732199284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/MA7Aw0m/7CCo8e9F0OIH+/A9de0RirzRhB80g5dawE=; b=SyxrYETO6Yp9fDMW/5idCrc0mTlVnVwTbLOu81l7EkY2QPGjc23f/FZjOod/pWHA1tKoqP O36QUrFPLe5kGJJExsFLy2ap8ObeXdgLsYbz9RImuKXlYVGuPICvtAea4eA7qmtcIj4Cd/ W20gsNgTWnimhl4VRfzQEdIwFbQGM2GWLSVOjMZayedFQPlcuSXNCvwsGZwCKtfM7G9m8m XSPx2TVeai64z3KC2wBRa6Zro0mF/QPHAFo/nM3bSJLQcccn114oWsxzRUozCjTV7md+Q7 CnJjjv0WYpEUhV3IGFWKVFZf9VYg2cBHxNbPW8Mf7ipwxnNnMwLjRTMr7Pz20w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732199284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/MA7Aw0m/7CCo8e9F0OIH+/A9de0RirzRhB80g5dawE=; b=lcWa1l0qOy2/WHJwGoguUurKLcMSHcA2Sy1QmUyYasrUE3KWPWCxtXnCBOBF07nS4KBh5N W84HMu2VtIkobWCW7183KtKbhKHlguFElZt37LEDDPU6E8qn6cVGHaRNJewuo7Nnb+nDfD ZJZmkyflgR4bxS6dFD8sa3cex6nLVV2unZhpoYj1xwYTCcxA2+EcPHcJiMScnBhaJ7O6kX clq3sFtyf6/ybfJzVfLFkecgm8AOg0QqQj6qHKhdAS4Lvpn24T64hdg46PESHw9z8MmfkU MDZm3drphUOkknPk0q5ONCi4cSLWPm3JOiwKahcAPEBZvZHTZGQWloVboiuV0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732199284; a=rsa-sha256; cv=none; b=BPNJvfbB6o3jUw3egi4D9S0tcvGkJkbjSVyU7b7wWZEbY+iXQzEcQ5OYYCc8V5lgw5fi5j 1j5Dh/i/qjIcEioTQu3etSvq/reNFAFu/piJBY/pox9mYF5lV7YqdIvFTksnkFSq7Xsi/x iPnNOW0c9C5GnHYjyCss+Z7oOW8+I51vN7riQh7Qs3ZNO6KYnXKAad9QAHzme4jm6fV/k9 nZ3cm04epSnKJ5FtnysY1ujgS67MeARzCw1ycZvdhPrNZaR2OEWKKzONSs9WUMhupUVLpH zZhGaxWS9JJfwUPp99CSeQOEhx/41gg1hFK7nqlExjEJDUzcuBiYaaRy+x1eAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvLDh1hvCzjtm; Thu, 21 Nov 2024 14:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALES4Qc010814; Thu, 21 Nov 2024 14:28:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALES4Nk010811; Thu, 21 Nov 2024 14:28:04 GMT (envelope-from git) Date: Thu, 21 Nov 2024 14:28:04 GMT Message-Id: <202411211428.4ALES4Nk010811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: e8eb3096d8d1 - main - pf: Fix missing connection rate for DIOCGETSRCNODES List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8eb3096d8d140edc506aab40761d1f00bf3e9e8 Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=e8eb3096d8d140edc506aab40761d1f00bf3e9e8 commit e8eb3096d8d140edc506aab40761d1f00bf3e9e8 Author: Kajetan Staszkiewicz AuthorDate: 2024-11-21 14:23:42 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2024-11-21 14:27:28 +0000 pf: Fix missing connection rate for DIOCGETSRCNODES The function pf_src_node_copy() copies struct pf_ksrc_node to its ioctl counterpart. It was missing copying of the conn_rate field, even though the code for adjusting the output for pfctl was in place. Add copying of conn_rate. Reviewed by: kp Approved by: kp (mentor) MFC after: 2 weeks Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D47679 --- sys/netpfil/pf/pf_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index c3f0166810ec..59c442698b95 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1570,6 +1570,7 @@ pf_src_node_copy(const struct pf_ksrc_node *in, struct pf_src_node *out) out->expire = 0; /* Adjust the connection rate estimate. */ + out->conn_rate = in->conn_rate; diff = secs - in->conn_rate.last; if (diff >= in->conn_rate.seconds) out->conn_rate.count = 0; From nobody Thu Nov 21 14:28:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvLDj3shPz5d7y4; Thu, 21 Nov 2024 14:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvLDj2pygz44pq; Thu, 21 Nov 2024 14:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732199285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rw9em5EhitXvQQTelDBscRmsWAeqFWL7YKlyDxN/4+E=; b=JyDjOclb7bkBSHjKsd2tT6MJe57BkLgQdSOhUk5Pmz6xvL7mntVL5c7C7z/kRurnyOyL65 BJouXc0wyHypqkr/YZgeMASW7Hx3ou6H6YLWm9prEsPdH9e+VEPX7UCsp25qp9kQFM0vVA 2HwUgU3ocTbuo8FHQ7A9EaGg07gcwDCxeMy9yCra+W8rfdmKTmfKp5BNBwNz9kV6PwqErz d0M4OGilCcZLGfRGi66LK0T8nGo/xESVwzm1G00aFf7NpcAjU8FUev7ALao2x39tYJh6Op laznB+Pc0AP/y6dZGtLuQo5xQ32rURHlu5/BkUrqrM751azjjOGK9FJa16lhWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732199285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rw9em5EhitXvQQTelDBscRmsWAeqFWL7YKlyDxN/4+E=; b=i6n21VQuYsmiIWcAi1Ksjj3TAJ9V2VeZRrXd/tmgUKxlNP5DKKAFq++xIIvAXJp5FGQoyP 92lbBW/2nlj5KN78/7CgbKWQVX5AoQwzff7Tq2KI++FIXbbjWjXCGmAJziYSmKXmEjaAF9 ZGCac7YAf+Xj14jqaL7IuwQPa2WHd4cv+WEPyLn7Zqlg9t2iNMSbeZdzDfVypFSzmrkkBu dAAz3TU3MisLhW/M6GOEAsYox6zSf1naDyTzhINFd3g2qNtb945DM4IO1CNIhsq5WypkD5 NWrXdnhat2R6r2bGmRHYmZd6AQ6bW3Fvr2IW1pIx0SXHBASNNBLwY250FiM7DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732199285; a=rsa-sha256; cv=none; b=Ma+/+OkzwLbCRmifTZaydFpsi2bkbv/c4jeIG2YeUT5pD4zh8HfMBGQrh9TmGrE2EdXGbA t48cCt65u8Hh96JH/BgJ6rYFAHHzIXxyby5y3BP8Xfi154VgvKaolqj2vPmnWrdhZmeKpV gzpx1GDlKSsOVEI82CNCtuO793C7Y5Ne1MlmyJwJ3lO5RgKNwxySByTDTkkCObiKRJmY+K vEp4AsYsJm/8qY3pEjQGLdZB/roQmtWWaQ7owz1Ttw51TNi5P/Ria9lB4P8V3BJ4p+Wxzl RZYNO+17HIBxsrkke3kLJutt0tuw/SqFiU1btl9x2LApjm3CNUBhWe/X26yf3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvLDj2QBLzk9h; Thu, 21 Nov 2024 14:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALES55d010871; Thu, 21 Nov 2024 14:28:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALES56v010868; Thu, 21 Nov 2024 14:28:05 GMT (envelope-from git) Date: Thu, 21 Nov 2024 14:28:05 GMT Message-Id: <202411211428.4ALES56v010868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: 7d929a444587 - main - pf: Fix timestamps and connection rate in source node export List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d929a444587540205e27caacf72377169611cdf Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=7d929a444587540205e27caacf72377169611cdf commit 7d929a444587540205e27caacf72377169611cdf Author: Kajetan Staszkiewicz AuthorDate: 2024-11-21 14:23:42 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2024-11-21 14:27:32 +0000 pf: Fix timestamps and connection rate in source node export When copying struct pf_ksrc_node into a netlink message some fields change their meaning. In kernel creation and expire fields are storing number of seconds since boot. Add conversion to number of seconds relative to moment of exporting the source node via netlink, as this is what pfctl expects. Add conversion of connection rate count. Reviewed by: kp Approved by: kp (mentor) Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D47321 --- sys/netpfil/pf/pf_nl.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 7a54ee78c684..bdfa9a60faa4 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1714,13 +1714,23 @@ pf_handle_get_ruleset(struct nlmsghdr *hdr, struct nl_pstate *npt) } static bool -nlattr_add_pf_threshold(struct nl_writer *nw, int attrtype, struct pf_threshold *t) +nlattr_add_pf_threshold(struct nl_writer *nw, int attrtype, + struct pf_threshold *t, int secs) { - int off = nlattr_add_nested(nw, attrtype); + int off = nlattr_add_nested(nw, attrtype); + int diff, conn_rate_count; + + /* Adjust the connection rate estimate. */ + conn_rate_count = t->count; + diff = secs - t->last; + if (diff >= t->seconds) + conn_rate_count = 0; + else + conn_rate_count -= t->count * diff / t->seconds; nlattr_add_u32(nw, PF_TH_LIMIT, t->limit); nlattr_add_u32(nw, PF_TH_SECONDS, t->seconds); - nlattr_add_u32(nw, PF_TH_COUNT, t->count); + nlattr_add_u32(nw, PF_TH_COUNT, conn_rate_count); nlattr_add_u32(nw, PF_TH_LAST, t->last); nlattr_set_len(nw, off); @@ -1736,6 +1746,7 @@ pf_handle_get_srcnodes(struct nlmsghdr *hdr, struct nl_pstate *npt) struct pf_ksrc_node *n; struct pf_srchash *sh; int i; + int secs; hdr->nlmsg_flags |= NLM_F_MULTI; @@ -1746,6 +1757,8 @@ pf_handle_get_srcnodes(struct nlmsghdr *hdr, struct nl_pstate *npt) continue; PF_HASHROW_LOCK(sh); + secs = time_uptime; + LIST_FOREACH(n, &sh->nodes, entry) { if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) { nlmsg_abort(nw); @@ -1768,9 +1781,15 @@ pf_handle_get_srcnodes(struct nlmsghdr *hdr, struct nl_pstate *npt) nlattr_add_u32(nw, PF_SN_CONNECTIONS, n->conn); nlattr_add_u8(nw, PF_SN_AF, n->af); nlattr_add_u8(nw, PF_SN_RULE_TYPE, n->ruletype); - nlattr_add_u64(nw, PF_SN_CREATION, n->creation); - nlattr_add_u64(nw, PF_SN_EXPIRE, n->expire); - nlattr_add_pf_threshold(nw, PF_SN_CONNECTION_RATE, &n->conn_rate); + + nlattr_add_u64(nw, PF_SN_CREATION, secs - n->creation); + if (n->expire > secs) + nlattr_add_u64(nw, PF_SN_EXPIRE, n->expire - secs); + else + nlattr_add_u64(nw, PF_SN_EXPIRE, 0); + + nlattr_add_pf_threshold(nw, PF_SN_CONNECTION_RATE, + &n->conn_rate, secs); if (!nlmsg_end(nw)) { PF_HASHROW_UNLOCK(sh); From nobody Thu Nov 21 15:28:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvMYw4XBzz5dDQm; Thu, 21 Nov 2024 15:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvMYw3wwWz4DDS; Thu, 21 Nov 2024 15:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732202884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=38P55/NQZLynVv5qmyUWR/MhUarL88zAio0DvdpNi4c=; b=w8bio7CFbDA7ZXqCFDG+bAYimXh7VF8ehQP2q/KBm9pS/Y4oFmlw1nykghWxN5UKXkhmIK +gJoxqAsR5tNbiM5gqNK/h9KadYH2SZOoRDk87bKNbzFd1AYQJG468ZuTJr8zSxY3dX2hz FazuBw09QQuH/Zyvm0z7MJExZshfLz3PV7oeBdwCIZyEiQZRBKV48k2DCZU8yMcV38yhQw VQJKn9NwtvrW+FXRhjiVPr21XhMh8GmJhrYTJLFdfDGiuOrIuutLBlWf3wix4fW7F9Rk6b fO9WYJAs1PbUm9qglrXod0+OnWG7tEoXNN4Uerr8jJN17W8KbBg9heVE6rP2Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732202884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=38P55/NQZLynVv5qmyUWR/MhUarL88zAio0DvdpNi4c=; b=NTdAcPStshFJojDc4ANMygnImRd2pQ0o5BLFjJ3sWjor+jDtPlO/IdOAsz1P1X8hdkKpbc fS5hKTY86WiWw9XOR5q1qxyFNE+s4ThBMdIeM9end/6xaShPzC0JlaSgzGDz2BlxBj/6tk xpRBBFJx844TK/qjK8siIBVJWH76u/TRd8CK1kuEONpu7hAfFCU9Bh7OmTYBvTqT78YEVY JGagShe9GElcXqQ93amnl2ehHEx7+5/92IzwgkCB9PtPgYBy2kGyV8voSNYh7Vfs+FPNxO sAaUNFllG6WQuCxvni/D8fTdWGyJ8PQfAMbV7huuFFI7iNVKNf2g3Bo+6TmY7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732202884; a=rsa-sha256; cv=none; b=ue1c9EJ7SDvS8TxvGnhE02/sJuhj+bpJ8+ADtsHh2k/tbT7ZUp2BPpMx9dGTk00jVsuL7T Ud3yRsvOMhd7TOad2RzLlwZv0DAXWUX7KgbqTPriG0ISZ7RFkRXZI1ZrbfQtuSwrxiVzvS uCQjNqObiJjReRjDV/LlNpNhzlyY8icCoyXEc6r2sKGO4+B6Yr9WnzzZ5fatXsEHA2tjiH w3pXCB2jnupDl3N2X0gFV9bsLapmmqVGfJmoHpwi1lL7kLkIxMUii2pKL1brmjOu6k9DSY pj5gRN60eqSEKldLB/fvp3TX4uZdfG2JFFwvg6SaflwIB+nK3V7yHpprfDID7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvMYw3RdBzlDf; Thu, 21 Nov 2024 15:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALFS4ug023407; Thu, 21 Nov 2024 15:28:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALFS4XV023404; Thu, 21 Nov 2024 15:28:04 GMT (envelope-from git) Date: Thu, 21 Nov 2024 15:28:04 GMT Message-Id: <202411211528.4ALFS4XV023404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 6b62e00da4ad - main - mac_bsdextended: Remove \n from sysctl descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b62e00da4ad0624fce5e6f0b5b39a6f44c8ba60 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6b62e00da4ad0624fce5e6f0b5b39a6f44c8ba60 commit 6b62e00da4ad0624fce5e6f0b5b39a6f44c8ba60 Author: Ed Maste AuthorDate: 2024-11-21 15:22:27 +0000 Commit: Ed Maste CommitDate: 2024-11-21 15:26:40 +0000 mac_bsdextended: Remove \n from sysctl descriptions sysctl(8) prints a newline after the description; the description should not end with one itself. Sponsored by: The FreeBSD Foundation --- sys/security/mac_bsdextended/mac_bsdextended.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index d143901330a1..95efc537735a 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -88,11 +88,11 @@ static int rule_slots = 0; static int rule_version = MB_VERSION; SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_count, CTLFLAG_RD, - &rule_count, 0, "Number of defined rules\n"); + &rule_count, 0, "Number of defined rules"); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_slots, CTLFLAG_RD, - &rule_slots, 0, "Number of used rule slots\n"); + &rule_slots, 0, "Number of used rule slots"); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_version, CTLFLAG_RD, - &rule_version, 0, "Version number for API\n"); + &rule_version, 0, "Version number for API"); /* * This is just used for logging purposes, eventually we would like to log From nobody Thu Nov 21 15:40:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvMrM11HPz5dFd1; Thu, 21 Nov 2024 15:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvMrM0WYZz4FPd; Thu, 21 Nov 2024 15:40:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732203635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ys6j1yhAZucRl4cKR0uJlKx1Uadbksm9X4b5hwkxvOI=; b=R6OauAuccc8Bfy8zKwPExams8lZaxPUDcmarYTJGbO4Zejh8CD5ueyG+y5kkoOHtuSoOcc wV9fMEqpXxCCcIWEiUjmvK+wkqD77+BCsdyArjgR+VTDdOp2xd6r5aD2AiENGnhSUriGix +bRBct5VmNgdLJjRdpG2JpmXTKyRwcBrgkvwpRDktO9DomfUKw4Mb8KBpZEDl04ZWKtCaw FNSvSC0TQW6XX3lwmZ6UYhLVYq/Qjg5S6jDRWK8YbQ5YQzUspGTs73hhaKE4CtV7gqmml7 7muI8F7kvRQ299p9D2lL5r0m6I7TbUkz6mz/t9YngKnQFveecldGBi1saN42FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732203635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ys6j1yhAZucRl4cKR0uJlKx1Uadbksm9X4b5hwkxvOI=; b=OtK8usmj9m29I0YpZL5PVzBi1R74DIxKndr7ml1yxOMzluUwxtHa5wBKWJcfsdIvoC1uNC 3b59GnE9QC8xHYP0fH0zN7y7XiUJOyilXRsNMxDExm55HaX5f+OjPMmaNoSCukgIAwUnkK CwATxPwVYNg7r0LNi2bMNqRZjBfvGcMbgQZUPZh8E7spd1jCEJHDHjpMoqu2fPRvhFhqHX YqPmBj8kd9HGodrfGhe4PpCB2iJFIpWwpR5lXIBrN0LH3J7sCOfvfZVyki+WmnhtUfsbul Ct/92aXjxwM679QXqPjeUET8s1eRV3HJaAYtAFow2BNz15mccGmX5ZPvUQDlxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732203635; a=rsa-sha256; cv=none; b=g5a5W031DTk0Q9YEmp85EHY7HConsGP5Fp5SvaWu9064MjTJLJP/9GUyP7GqcVzh9Gc2iH TdN04F9J3TTgV1rxhrpGrvbf+l2vWV0J7VlJVwlzYQpER/a9mvvqEptq1jq7OUd/yzVk+a tI6upSVy9D7Xonfs6mbzRAFG/3WL2QEfzOb5Uyya7w6YqI4LnHa9gVkf1EGT6EO9o163QM nVJP3kKX+SsM1Y1WvsY/DQgKtidEod6kkn3IjYiqWPGnMgv5W/6URQl/jdcPV1ajq/5P66 nYkrY7ZSB5ZJXpjaKYUACy4+nyaYQvLIgppUJOA//5ImdlvAMMBPPGnrvGQ/7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvMrM06xkzlR6; Thu, 21 Nov 2024 15:40:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALFeYNf051083; Thu, 21 Nov 2024 15:40:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALFeYDi051080; Thu, 21 Nov 2024 15:40:34 GMT (envelope-from git) Date: Thu, 21 Nov 2024 15:40:34 GMT Message-Id: <202411211540.4ALFeYDi051080@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7dfaf238562c - main - rtwn: Add device ID for TPLink RTL8192CU List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7dfaf238562cfb9b8f2fe9a025220fd7147fedfe Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7dfaf238562cfb9b8f2fe9a025220fd7147fedfe commit 7dfaf238562cfb9b8f2fe9a025220fd7147fedfe Author: Augustin Cavalier AuthorDate: 2024-11-09 18:47:44 +0000 Commit: Ed Maste CommitDate: 2024-11-21 15:40:11 +0000 rtwn: Add device ID for TPLink RTL8192CU --- sys/dev/rtwn/usb/rtwn_usb_attach.h | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/rtwn/usb/rtwn_usb_attach.h b/sys/dev/rtwn/usb/rtwn_usb_attach.h index 728a0a6a3b24..cd5485b36678 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_attach.h +++ b/sys/dev/rtwn/usb/rtwn_usb_attach.h @@ -96,6 +96,7 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8192CU_DEV(SITECOMEU, RTL8188CU_1), RTWN_RTL8192CU_DEV(SITECOMEU, RTL8188CU_2), RTWN_RTL8192CU_DEV(SITECOMEU, RTL8192CU), + RTWN_RTL8192CU_DEV(TPLINK, RTL8192CU), RTWN_RTL8192CU_DEV(TRENDNET, RTL8188CU), RTWN_RTL8192CU_DEV(TRENDNET, RTL8192CU), RTWN_RTL8192CU_DEV(ZYXEL, RTL8192CU), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 50968a2c80cf..c71ebbaf9405 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -4824,6 +4824,7 @@ product TOSHIBA HSDPA 0x1302 G450 modem product TOSHIBA TRANSMEMORY 0x6545 USB ThumbDrive /* TP-Link products */ +product TPLINK RTL8192CU 0x0100 RTL8192CU product TPLINK T4U 0x0101 Archer T4U product TPLINK WN821NV5 0x0107 TL-WN821N v5 product TPLINK WN822NV4 0x0108 TL-WN822N v4 From nobody Thu Nov 21 17:47:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvQfd66Kfz5dNmy; Thu, 21 Nov 2024 17:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvQfd5tvfz4XZh; Thu, 21 Nov 2024 17:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732211241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uTCDNp4CvsUGcDmlCJI74nWbuxiPmOb5IdcDUzNdtFY=; b=nv7xRnnsiemI+pC36jZuWaCFbwvV0QjmeKGJsbxS4eNLcADcwqMlsc0Zx2n3eD2ykEbUNb bwvz7PEwqd0vxOL141abOshBUTwBpQfS5d+mIo4FME29D2QAFE+fW7jIdKOA9ouLWN1C0t cgvSGSp0skshwotLA/F38LzVI8PDh8YLzRu0q/YUxpi/JMFW+NRfoAN47GagV66ngZvXig VpiSj3IrXUnfsmQLXkJo7QoJM/1rxww6YYlPriZ9NYEl2SUcotIZKPgLTDH1oP3yFfWNtw 8ibyrH+qbb8KQsAe226zYd4EKx3/Dkhjmj6fLNQRChWkmsv7VyLczzOWP2sXBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732211241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uTCDNp4CvsUGcDmlCJI74nWbuxiPmOb5IdcDUzNdtFY=; b=G6lIux79GF+ZVYo4yuLgTYeyMHRPHHBIWcMZR32tgcAPMuScSZ3RD3HKOplXDv4ILImQq0 gWCMy+5sUEw8/qWd36MIOHNx0WCrD1vH5jYdFgPt4/ieI+/m4DID5t3uV26RNC/eVVpQup ADSrYkSDmQKe5PEnERCg6aYkfCkiBuiYmOCeuToJ2HopT5MQLhkCB+JqwZFAe7/+xwzrh3 4+ShBvGLYShiM9Ufi704Gfo/+QHFdmuzqipUswQfAvZrpZST9jJoqtWn89342IIW3M2fl+ 7ytVvf6MnXPjmSrT49Xb6d3SeCgDar6hWfdnlHymwmkJ4z5rsgxr//iwQtAvcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732211241; a=rsa-sha256; cv=none; b=OTzD8Sx2JuEspiRWDMAMpYEZQAUISSUOS7erbUZQrVzoG2rd8FZt6JrXHbyZxFQIafd/5T rvpfRulwS64diPet2AW3vhlMAHmilGZmDc+FSQGf6FfmX9Rh26Z9cKLHaOT+2WMtUWtl3z 8R6yKAt3oUzEETSKtZwwGz9F0DnhBKmuYxUp0s98DcFEGWmHLOaOltuUUzrwcPvUK2kZWD VaaYOzMT1AhjBwTtiC574JRRM9p7U6EkDCsFqKMXgXMKfrgZrC2XCh8V+bdDYjZrnGyu2w 1vy+trepDoLH6UXDW2DBMyYhAM5YiBc+vxvVeEyDemPrF44Itol+4M1Mreh9Jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvQfd5419zqC7; Thu, 21 Nov 2024 17:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALHlLvM082670; Thu, 21 Nov 2024 17:47:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALHlFmh082643; Thu, 21 Nov 2024 17:47:15 GMT (envelope-from git) Date: Thu, 21 Nov 2024 17:47:15 GMT Message-Id: <202411211747.4ALHlFmh082643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 415efcecd8b8 - main - Merge llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/main X-Git-Reftype: branch X-Git-Commit: 415efcecd8b80f68e76376ef2b854cb6f5c84b5a Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=415efcecd8b80f68e76376ef2b854cb6f5c84b5a commit 415efcecd8b80f68e76376ef2b854cb6f5c84b5a Merge: 7dfaf238562c f65bf063bcac Author: Dimitry Andric AuthorDate: 2024-11-21 13:03:43 +0000 Commit: Dimitry Andric CommitDate: 2024-11-21 17:46:18 +0000 Merge llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e, a.k.a. 19.1.4 release. PR: 280562 MFC after: 1 month .../include/clang/Basic/BuiltinsLoongArchLASX.def | 146 ++++++++++----------- .../include/clang/Basic/BuiltinsLoongArchLSX.def | 132 +++++++++---------- contrib/llvm-project/clang/lib/AST/Decl.cpp | 10 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 8 ++ .../clang/lib/CodeGen/CodeGenModule.cpp | 4 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 8 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 2 +- .../compiler-rt/lib/builtins/int_math.h | 13 +- .../compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 9 +- .../lib/sanitizer_common/sanitizer_linux.cpp | 55 +++++--- contrib/llvm-project/libcxx/include/__config | 2 +- .../llvm/include/llvm/Demangle/Demangle.h | 4 + .../llvm/include/llvm/Demangle/MicrosoftDemangle.h | 4 + .../llvm-project/llvm/include/llvm/IR/Mangler.h | 6 + .../llvm/include/llvm/Target/TargetSelectionDAG.td | 6 +- .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 6 +- .../llvm/lib/Demangle/MicrosoftDemangle.cpp | 19 +++ contrib/llvm-project/llvm/lib/IR/Mangler.cpp | 36 +++-- .../llvm/lib/Target/AArch64/AArch64InstrInfo.td | 2 +- .../RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | 7 +- .../lib/Target/SystemZ/SystemZISelLowering.cpp | 3 +- .../Target/WebAssembly/WebAssemblyCFGStackify.cpp | 53 ++------ .../Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp | 13 ++ .../Target/WebAssembly/WebAssemblyInstrControl.td | 9 +- .../WebAssembly/WebAssemblyLateEHPrepare.cpp | 34 ++++- .../llvm/lib/Target/X86/X86InstrCompiler.td | 3 +- .../Transforms/InstCombine/InstCombineNegator.cpp | 11 ++ .../lib/Transforms/InstCombine/InstCombinePHI.cpp | 3 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 35 files changed, 370 insertions(+), 268 deletions(-) diff --cc contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp index 244f6ef2f53f,c45443d76e6b..c45443d76e6b mode 100755,100644..100755 --- a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp diff --cc lib/clang/include/VCSVersion.inc index b514dee27f3a,000000000000..2197c8ca2947 mode 100644,000000..100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@@ -1,8 -1,0 +1,8 @@@ - #define LLVM_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" ++#define LLVM_REVISION "llvmorg-19.1.4-0-gaadaa00de76e" +#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" + - #define CLANG_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" ++#define CLANG_REVISION "llvmorg-19.1.4-0-gaadaa00de76e" +#define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" + - #define LLDB_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" ++#define LLDB_REVISION "llvmorg-19.1.4-0-gaadaa00de76e" +#define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --cc lib/clang/include/clang/Basic/Version.inc index 2795c08bec37,000000000000..d7a4777e7cec mode 100644,000000..100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@@ -1,8 -1,0 +1,8 @@@ - #define CLANG_VERSION 19.1.3 - #define CLANG_VERSION_STRING "19.1.3" ++#define CLANG_VERSION 19.1.4 ++#define CLANG_VERSION_STRING "19.1.4" +#define CLANG_VERSION_MAJOR 19 +#define CLANG_VERSION_MAJOR_STRING "19" +#define CLANG_VERSION_MINOR 1 - #define CLANG_VERSION_PATCHLEVEL 3 ++#define CLANG_VERSION_PATCHLEVEL 4 + +#define CLANG_VENDOR "FreeBSD " diff --cc lib/clang/include/lld/Common/Version.inc index 6a1154413579,000000000000..e79b67284a98 mode 100644,000000..100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@@ -1,4 -1,0 +1,4 @@@ +// Local identifier in __FreeBSD_version style +#define LLD_FREEBSD_VERSION 1500001 + - #define LLD_VERSION_STRING "19.1.3 (FreeBSD llvmorg-19.1.3-0-gab51eccf88f5-" __XSTRING(LLD_FREEBSD_VERSION) ")" ++#define LLD_VERSION_STRING "19.1.4 (FreeBSD llvmorg-19.1.4-0-gaadaa00de76e-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --cc lib/clang/include/lldb/Version/Version.inc index 1e614fc8a0cc,000000000000..d69a702815ff mode 100644,000000..100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@@ -1,6 -1,0 +1,6 @@@ - #define LLDB_VERSION 19.1.3 - #define LLDB_VERSION_STRING "19.1.3" ++#define LLDB_VERSION 19.1.4 ++#define LLDB_VERSION_STRING "19.1.4" +#define LLDB_VERSION_MAJOR 19 +#define LLDB_VERSION_MINOR 1 - #define LLDB_VERSION_PATCH 3 ++#define LLDB_VERSION_PATCH 4 +/* #undef LLDB_FULL_VERSION_STRING */ diff --cc lib/clang/include/llvm/Config/config.h index 972b3c894dac,000000000000..a775cc7e9bbf mode 100644,000000..100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@@ -1,372 -1,0 +1,372 @@@ +#ifndef CONFIG_H +#define CONFIG_H + +// Include this header only under the llvm source tree. +// This is a private header. + +/* Exported configuration */ +#include "llvm/Config/llvm-config.h" + +/* Bug report URL. */ +#define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" + +/* Define to 1 to enable backtraces, and to 0 otherwise. */ +#define ENABLE_BACKTRACES 1 + +/* Define to 1 to enable crash overrides, and to 0 otherwise. */ +#define ENABLE_CRASH_OVERRIDES 1 + +/* Define to 1 to enable crash memory dumps, and to 0 otherwise. */ +#define LLVM_ENABLE_CRASH_DUMPS 0 + +/* Define to 1 to prefer forward slashes on Windows, and to 0 prefer + backslashes. */ +#define LLVM_WINDOWS_PREFER_FORWARD_SLASH 0 + +/* Define to 1 if you have the `backtrace' function. */ +#define HAVE_BACKTRACE TRUE + +#define BACKTRACE_HEADER + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CRASHREPORTERCLIENT_H */ + +/* can use __crashreporter_info__ */ +#if defined(__APPLE__) +#define HAVE_CRASHREPORTER_INFO 1 +#else +#define HAVE_CRASHREPORTER_INFO 0 +#endif + +/* Define to 1 if you have the declaration of `arc4random', and to 0 if you + don't. */ +#define HAVE_DECL_ARC4RANDOM 1 + +/* Define to 1 if you have the declaration of `FE_ALL_EXCEPT', and to 0 if you + don't. */ +#define HAVE_DECL_FE_ALL_EXCEPT 1 + +/* Define to 1 if you have the declaration of `FE_INEXACT', and to 0 if you + don't. */ +#define HAVE_DECL_FE_INEXACT 1 + +/* Define to 1 if you have the declaration of `strerror_s', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_S 0 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if dlopen() is available on this platform. */ +#define HAVE_DLOPEN 1 + +/* Define if dladdr() is available on this platform. */ +#define HAVE_DLADDR 1 + +#if !defined(__arm__) || defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__) +/* Define to 1 if we can register EH frames on this platform. */ +#define HAVE_REGISTER_FRAME 1 + +/* Define to 1 if we can deregister EH frames on this platform. */ +#define HAVE_DEREGISTER_FRAME 1 +#endif // !arm || USING_SJLJ_EXCEPTIONS || ARM_DWARF_EH_ + +/* Define if __unw_add_dynamic_fde() is available on this platform. */ +/* #undef HAVE_UNW_ADD_DYNAMIC_FDE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FENV_H 1 + +/* Define if libffi is available on this platform. */ +/* #undef HAVE_FFI_CALL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FFI_FFI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FFI_H */ + +/* Define to 1 if you have the `futimens' function. */ +#define HAVE_FUTIMENS 1 + +/* Define to 1 if you have the `futimes' function. */ +#define HAVE_FUTIMES 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* Define to 1 if you have the `isatty' function. */ +#define HAVE_ISATTY 1 + +/* Define to 1 if you have the `edit' library (-ledit). */ +#define HAVE_LIBEDIT TRUE + +/* Define to 1 if you have the `pfm' library (-lpfm). */ +/* #undef HAVE_LIBPFM */ + +/* Define to 1 if the `perf_branch_entry' struct has field cycles. */ +/* #undef LIBPFM_HAS_FIELD_CYCLES */ + +/* Define to 1 if you have the `psapi' library (-lpsapi). */ +/* #undef HAVE_LIBPSAPI */ + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#define HAVE_LIBPTHREAD 1 + +/* Define to 1 if you have the `pthread_getname_np' function. */ +#define HAVE_PTHREAD_GETNAME_NP 1 + +/* Define to 1 if you have the `pthread_setname_np' function. */ +#define HAVE_PTHREAD_SETNAME_NP 1 + +/* Define to 1 if you have the header file. */ +#if __has_include() +#define HAVE_LINK_H 1 +#else +#define HAVE_LINK_H 0 +#endif + +/* Define to 1 if you have the header file. */ +#if __has_include() +#define HAVE_MACH_MACH_H 1 +#endif + +/* Define to 1 if you have the `mallctl' function. */ +#if defined(__FreeBSD__) +#define HAVE_MALLCTL 1 +#endif + +/* Define to 1 if you have the `mallinfo' function. */ +#if defined(__linux__) +#define HAVE_MALLINFO 1 +#endif + +/* Define to 1 if you have the `mallinfo2' function. */ +/* #undef HAVE_MALLINFO2 */ + +/* Define to 1 if you have the header file. */ +#if __has_include() +#define HAVE_MALLOC_MALLOC_H 1 +#endif + +/* Define to 1 if you have the `malloc_zone_statistics' function. */ +#if defined(__APPLE__) +#define HAVE_MALLOC_ZONE_STATISTICS 1 +#endif + +/* Define to 1 if you have the `posix_spawn' function. */ +#define HAVE_POSIX_SPAWN 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Have pthread_mutex_lock */ +#define HAVE_PTHREAD_MUTEX_LOCK 1 + +/* Have pthread_rwlock_init */ +#define HAVE_PTHREAD_RWLOCK_INIT 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `sigaltstack' function. */ +#define HAVE_SIGALTSTACK 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if stat struct has st_mtimespec member .*/ +#if !defined(__linux__) +#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 +#endif + +/* Define to 1 if stat struct has st_mtim member. */ +#if !defined(__APPLE__) +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VALGRIND_VALGRIND_H */ + +/* Have host's _alloca */ +/* #undef HAVE__ALLOCA */ + +/* Define to 1 if you have the `_chsize_s' function. */ +/* #undef HAVE__CHSIZE_S */ + +/* Define to 1 if you have the `_Unwind_Backtrace' function. */ +#define HAVE__UNWIND_BACKTRACE 1 + +/* Have host's __alloca */ +/* #undef HAVE___ALLOCA */ + +/* Have host's __ashldi3 */ +/* #undef HAVE___ASHLDI3 */ + +/* Have host's __ashrdi3 */ +/* #undef HAVE___ASHRDI3 */ + +/* Have host's __chkstk */ +/* #undef HAVE___CHKSTK */ + +/* Have host's __chkstk_ms */ +/* #undef HAVE___CHKSTK_MS */ + +/* Have host's __cmpdi2 */ +/* #undef HAVE___CMPDI2 */ + +/* Have host's __divdi3 */ +/* #undef HAVE___DIVDI3 */ + +/* Have host's __fixdfdi */ +/* #undef HAVE___FIXDFDI */ + +/* Have host's __fixsfdi */ +/* #undef HAVE___FIXSFDI */ + +/* Have host's __floatdidf */ +/* #undef HAVE___FLOATDIDF */ + +/* Have host's __lshrdi3 */ +/* #undef HAVE___LSHRDI3 */ + +/* Have host's __main */ +/* #undef HAVE___MAIN */ + +/* Have host's __moddi3 */ +/* #undef HAVE___MODDI3 */ + +/* Have host's __udivdi3 */ +/* #undef HAVE___UDIVDI3 */ + +/* Have host's __umoddi3 */ +/* #undef HAVE___UMODDI3 */ + +/* Have host's ___chkstk */ +/* #undef HAVE____CHKSTK */ + +/* Have host's ___chkstk_ms */ +/* #undef HAVE____CHKSTK_MS */ + +/* Linker version detected at compile time. */ +/* #undef HOST_LINK_VERSION */ + +/* Define if overriding target triple is enabled */ +/* #undef LLVM_TARGET_TRIPLE_ENV */ + +/* Whether tools show host and target info when invoked with --version */ +#define LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO 1 + +/* Whether tools show optional build config flags when invoked with --version */ +#define LLVM_VERSION_PRINTER_SHOW_BUILD_CONFIG 1 + +/* Define if libxml2 is supported on this platform. */ +/* #undef LLVM_ENABLE_LIBXML2 */ + +/* Define to the extension used for shared libraries, say, ".so". */ +#if defined(__APPLE__) +#define LTDL_SHLIB_EXT ".dylib" +#else +#define LTDL_SHLIB_EXT ".so" +#endif + +/* Define to the extension used for plugin libraries, say, ".so". */ +#if defined(__APPLE__) +#define LLVM_PLUGIN_EXT ".dylib" +#else +#define LLVM_PLUGIN_EXT ".so" +#endif + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freebsd.org/submit/" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "LLVM" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "LLVM 19.1.3" ++#define PACKAGE_STRING "LLVM 19.1.4" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "19.1.3" ++#define PACKAGE_VERSION "19.1.4" + +/* Define to the vendor of this package. */ +/* #undef PACKAGE_VENDOR */ + +/* Define to a function implementing stricmp */ +/* #undef stricmp */ + +/* Define to a function implementing strdup */ +/* #undef strdup */ + +/* Whether GlobalISel rule coverage is being collected */ +#define LLVM_GISEL_COV_ENABLED 0 + +/* Define to the default GlobalISel coverage file prefix */ +/* #undef LLVM_GISEL_COV_PREFIX */ + +/* Whether Timers signpost passes in Xcode Instruments */ +#if defined(__APPLE__) +#define LLVM_SUPPORT_XCODE_SIGNPOSTS 1 +#else +#define LLVM_SUPPORT_XCODE_SIGNPOSTS 0 +#endif + +/* #undef HAVE_PROC_PID_RUSAGE */ + +#define HAVE_BUILTIN_THREAD_POINTER 1 + +#endif diff --cc lib/clang/include/llvm/Config/llvm-config.h index c3a1df747ff6,000000000000..16af33f177e6 mode 100644,000000..100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@@ -1,232 -1,0 +1,232 @@@ +/*===------- llvm/Config/llvm-config.h - llvm configuration -------*- C -*-===*/ +/* */ +/* Part of the LLVM Project, under the Apache License v2.0 with LLVM */ +/* Exceptions. */ +/* See https://llvm.org/LICENSE.txt for license information. */ +/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ +/* */ +/*===----------------------------------------------------------------------===*/ + +/* This file enumerates variables from the LLVM configuration so that they + can be in exported headers and won't override package specific directives. + This is a C header that can be included in the llvm-c headers. */ + +#ifndef LLVM_CONFIG_H +#define LLVM_CONFIG_H + +/* Define if LLVM_ENABLE_DUMP is enabled */ +/* #undef LLVM_ENABLE_DUMP */ + +/* Target triple LLVM will generate code for by default */ +/* Doesn't use `cmakedefine` because it is allowed to be empty. */ +/* #undef LLVM_DEFAULT_TARGET_TRIPLE */ + +/* Define if threads enabled */ +#define LLVM_ENABLE_THREADS 1 + +/* Has gcc/MSVC atomic intrinsics */ +#define LLVM_HAS_ATOMICS 1 + +/* Host triple LLVM will be executed on */ +/* #undef LLVM_HOST_TRIPLE */ + +/* LLVM architecture name for the native architecture, if available */ +/* #undef LLVM_NATIVE_ARCH */ + +/* LLVM name for the native AsmParser init function, if available */ +/* #undef LLVM_NATIVE_ASMPARSER */ + +/* LLVM name for the native AsmPrinter init function, if available */ +/* #undef LLVM_NATIVE_ASMPRINTER */ + +/* LLVM name for the native Disassembler init function, if available */ +/* #undef LLVM_NATIVE_DISASSEMBLER */ + +/* LLVM name for the native Target init function, if available */ +/* #undef LLVM_NATIVE_TARGET */ + +/* LLVM name for the native TargetInfo init function, if available */ +/* #undef LLVM_NATIVE_TARGETINFO */ + +/* LLVM name for the native target MC init function, if available */ +/* #undef LLVM_NATIVE_TARGETMC */ + +/* LLVM name for the native target MCA init function, if available */ +/* #undef LLVM_NATIVE_TARGETMCA */ + +/* Define if the AArch64 target is built in */ +#ifdef LLVM_TARGET_ENABLE_AARCH64 +#define LLVM_HAS_AARCH64_TARGET 1 +#else +#define LLVM_HAS_AARCH64_TARGET 0 +#endif + +/* Define if the AMDGPU target is built in */ +#define LLVM_HAS_AMDGPU_TARGET 0 + +/* Define if the ARC target is built in */ +#define LLVM_HAS_ARC_TARGET 0 + +/* Define if the ARM target is built in */ +#ifdef LLVM_TARGET_ENABLE_ARM +#define LLVM_HAS_ARM_TARGET 1 +#else +#define LLVM_HAS_ARM_TARGET 0 +#endif + +/* Define if the AVR target is built in */ +#define LLVM_HAS_AVR_TARGET 0 + +/* Define if the BPF target is built in */ +#ifdef LLVM_TARGET_ENABLE_BPF +#define LLVM_HAS_BPF_TARGET 1 +#else +#define LLVM_HAS_BPF_TARGET 0 +#endif + +/* Define if the CSKY target is built in */ +#define LLVM_HAS_CSKY_TARGET 0 + +/* Define if the DirectX target is built in */ +#define LLVM_HAS_DIRECTX_TARGET 0 + +/* Define if the Hexagon target is built in */ +#define LLVM_HAS_HEXAGON_TARGET 0 + +/* Define if the Lanai target is built in */ +#define LLVM_HAS_LANAI_TARGET 0 + +/* Define if the LoongArch target is built in */ +#define LLVM_HAS_LOONGARCH_TARGET 0 + +/* Define if the M68k target is built in */ +#define LLVM_HAS_M68K_TARGET 0 + +/* Define if the Mips target is built in */ +#ifdef LLVM_TARGET_ENABLE_MIPS +#define LLVM_HAS_MIPS_TARGET 1 +#else +#define LLVM_HAS_MIPS_TARGET 0 +#endif + +/* Define if the MSP430 target is built in */ +#define LLVM_HAS_MSP430_TARGET 0 + +/* Define if the NVPTX target is built in */ +#define LLVM_HAS_NVPTX_TARGET 0 + +/* Define if the PowerPC target is built in */ +#ifdef LLVM_TARGET_ENABLE_POWERPC +#define LLVM_HAS_POWERPC_TARGET 1 +#else +#define LLVM_HAS_POWERPC_TARGET 0 +#endif + +/* Define if the RISCV target is built in */ +#ifdef LLVM_TARGET_ENABLE_RISCV +#define LLVM_HAS_RISCV_TARGET 1 +#else +#define LLVM_HAS_RISCV_TARGET 0 +#endif + +/* Define if the Sparc target is built in */ +#define LLVM_HAS_SPARC_TARGET 0 + +/* Define if the SPIRV target is built in */ +#define LLVM_HAS_SPIRV_TARGET 0 + +/* Define if the SystemZ target is built in */ +#define LLVM_HAS_SYSTEMZ_TARGET 0 + +/* Define if the VE target is built in */ +#define LLVM_HAS_VE_TARGET 0 + +/* Define if the WebAssembly target is built in */ +#define LLVM_HAS_WEBASSEMBLY_TARGET 0 + +/* Define if the X86 target is built in */ +#ifdef LLVM_TARGET_ENABLE_X86 +#define LLVM_HAS_X86_TARGET 1 +#else +#define LLVM_HAS_X86_TARGET 0 +#endif + +/* Define if the XCore target is built in */ +#define LLVM_HAS_XCORE_TARGET 0 + +/* Define if the Xtensa target is built in */ +#define LLVM_HAS_XTENSA_TARGET 0 + +/* Define if this is Unixish platform */ +#define LLVM_ON_UNIX 1 + +/* Define if we have the Intel JIT API runtime support library */ +#define LLVM_USE_INTEL_JITEVENTS 0 + +/* Define if we have the oprofile JIT-support library */ +#define LLVM_USE_OPROFILE 0 + +/* Define if we have the perf JIT-support library */ +#define LLVM_USE_PERF 0 + +/* Major version of the LLVM API */ +#define LLVM_VERSION_MAJOR 19 + +/* Minor version of the LLVM API */ +#define LLVM_VERSION_MINOR 1 + +/* Patch version of the LLVM API */ - #define LLVM_VERSION_PATCH 3 ++#define LLVM_VERSION_PATCH 4 + +/* LLVM version string */ - #define LLVM_VERSION_STRING "19.1.3" ++#define LLVM_VERSION_STRING "19.1.4" + +/* Whether LLVM records statistics for use with GetStatistics(), + * PrintStatistics() or PrintStatisticsJSON() + */ +#define LLVM_FORCE_ENABLE_STATS 0 + +/* Define if we have z3 and want to build it */ +/* #undef LLVM_WITH_Z3 */ + +/* Define if we have curl and want to use it */ +/* #undef LLVM_ENABLE_CURL */ + +/* Define if we have cpp-httplib and want to use it */ +/* #undef LLVM_ENABLE_HTTPLIB */ + +/* Define if zlib compression is available */ +#define LLVM_ENABLE_ZLIB 1 + +/* Define if zstd compression is available */ +#define LLVM_ENABLE_ZSTD 1 + +/* Define if LLVM is using tflite */ +/* #undef LLVM_HAVE_TFLITE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYSEXITS_H 1 + +/* Define if building libLLVM shared library */ +/* #undef LLVM_BUILD_LLVM_DYLIB */ + +/* Define if building LLVM with BUILD_SHARED_LIBS */ +/* #undef LLVM_BUILD_SHARED_LIBS */ + +/* Define if building LLVM with LLVM_FORCE_USE_OLD_TOOLCHAIN_LIBS */ +/* #undef LLVM_FORCE_USE_OLD_TOOLCHAIN */ + +/* Define if llvm_unreachable should be optimized with undefined behavior + * in non assert builds */ +#define LLVM_UNREACHABLE_OPTIMIZE 1 + +/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */ +#define LLVM_ENABLE_DIA_SDK 0 + +/* Define if plugins enabled */ +/* #undef LLVM_ENABLE_PLUGINS */ + +/* Define if logf128 is available */ +/* #undef LLVM_HAS_LOGF128 */ + +#endif diff --cc lib/clang/include/llvm/Support/VCSRevision.h index 361bd66edf2f,000000000000..68785cd03f5d mode 100644,000000..100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@@ -1,2 -1,0 +1,2 @@@ - #define LLVM_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" ++#define LLVM_REVISION "llvmorg-19.1.4-0-gaadaa00de76e" +#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Thu Nov 21 18:36:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvRlb5vpTz5dRLh; Thu, 21 Nov 2024 18:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvRlb56wLz4br3; Thu, 21 Nov 2024 18:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732214203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xjAJW3ypip37hl7FAwaEiEXCh/ERAFFVp4SfjtWgXPw=; b=nu1SlfMGpLKIhg2HTORW+ELXPxxy0kufJpKRERDs6YPnob1jP+QSXEgDaObgK4z1SGfOrS w4FlS05XVdlAfsfWvCuFwV3YE4tvjvetnWjQIElflO6s96hamgAaEyTUZ1hhyg+AvMnPVh jjstM9lXS/x4dlVAD/C0UkObCo7rd9jF4R235jJ75iWGU5cNfgEpaOI2QXj0svRTZ47KIH LvmQuA26jKVwwPikCvBBHVsJVrd1MDCmR1Dc9heEU2OaahvusbAdukxp5O0minfgAHBWqg NrEbePyBjEA2HxXtJK0aYbmEEeE76v8jS5oLeC3Ay7ZjacXsEauxsHh3exZ5NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732214203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xjAJW3ypip37hl7FAwaEiEXCh/ERAFFVp4SfjtWgXPw=; b=u0LORe1UvH39ZfRPOnuSf2HOaGRYSFWGrk1ODPXA1SQhlALTyGbSe7Du6zpWnr695qUBIw aRjW8Ip0oNIJ2tnfK+nJ6HYhFVw7pkzjlChXrEAr1VmIT/M61hvJLrUjI5t+LdOmdsZz+j hSs1M020gTkjukYc/WiqznZ6Emv6Fp5ZGiJg9GOFVU3vM+5GUU+IK5lcGc7MYgRf6C0s+i vS8SvWiMF9roZr+jmY0ghWwNRmGys3X6EjlTX3+FGqHWGNzYk+tjgnMkdXGM6RNsmlHBo+ 92Ddz2soxkRUYGuDfolnRVYn6l48CUZg7XLa/0aF9LTAn/hLc+g7Rgw+NTSXGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732214203; a=rsa-sha256; cv=none; b=jwFKigTkJc37pT21fS+J2jMOgEQsRU8HJY0U7ckHKEoKp1LRVw5E4CfkQlUDUk6uwWTAAv b3NYWa2hr85TTAfWMn9CA8B6cf+9/gSWt9CJnvCj4t2w5/eHmO6PuiRuW8c+E3YRgo/T1x ATzugb5A6P4dh18I8FgKCd1tjHVVN++R1cIVN3zWEBhOOcH/P+YB4EeS9J5X0HjjT/bF1p EdTpTw4NqK8N8xbWNzW8X1POkmX/mmKp4hjRXgziqMA0YRjjf8LMb0oAs7hLxl8qKs9cdN 6cO8EO92EVe5AvNYkWXzIith6XfHjT9/7H4o76bAuhikuw8gjEhJ4AgAZ+u3/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 4XvRlb4R2mzqsT; Thu, 21 Nov 2024 18:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALIahNL076370; Thu, 21 Nov 2024 18:36:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALIahfP076367; Thu, 21 Nov 2024 18:36:43 GMT (envelope-from git) Date: Thu, 21 Nov 2024 18:36:43 GMT Message-Id: <202411211836.4ALIahfP076367@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: 59f8f51b118a - main - md: Fix linking of embedded filesystem images on aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 59f8f51b118a64119492837ee8e4973381554277 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=59f8f51b118a64119492837ee8e4973381554277 commit 59f8f51b118a64119492837ee8e4973381554277 Author: John Baldwin AuthorDate: 2024-11-21 18:36:37 +0000 Commit: John Baldwin CommitDate: 2024-11-21 18:36:37 +0000 md: Fix linking of embedded filesystem images on aarch64 embedfs.S needs the right aarch64 features for BTI and/or PAC. Obtained from: CheriBSD Fixes: c2e0d56f5e49 ("arm64: Support BTI checking in most of the kernel") Sponsored by: AFRL, DARPA --- sys/dev/md/embedfs.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/md/embedfs.S b/sys/dev/md/embedfs.S index af4f9c08ed3a..62bd118647c0 100644 --- a/sys/dev/md/embedfs.S +++ b/sys/dev/md/embedfs.S @@ -42,3 +42,9 @@ mfs_root: .type mfs_root_end, %object mfs_root_end: .size mfs_root_end, . - mfs_root_end + +#if defined(__aarch64__) +#include +#include +GNU_PROPERTY_AARCH64_FEATURE_1_NOTE(GNU_PROPERTY_AARCH64_FEATURE_1_VAL) +#endif From nobody Thu Nov 21 18:55:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvS9k5rskz5dS13; Thu, 21 Nov 2024 18:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvS9k5L2Tz4csK; Thu, 21 Nov 2024 18:55:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732215354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Liq4X2wRkEtiGqLG95hQFuBV31hIHu41DsD9OR2m64=; b=uqrstN0xYpWHDHeI+yL+drnlNecXulY/AnDnu5VFGbWuqzzCJBZF9qQphAUS7fb4UYtXR0 yCpaMhgo/S1ZAcs7j/tGpX4nxtAIUG585+7UJfdb9XsdSoNRSVqbYzQCncfnqpmBWNyRKX hlQsi37EO4b/pSCZdeOujmx4gfjfGX3TM6X02cQzdcrEQI8eT4KG1t2mJaS7ly5WpB+z+E UeHmTEELEEjghdwLGym8YmOPnS/qpIZKViyoRybK50F4pTFTs6i8vY2O2UK8nu3qmoLU0j kiYNEkEVy8+fGXO8tuDgpGbaO4z/zQXwvwY3PooEPsr50P5upJYYFPamlZSELA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732215354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Liq4X2wRkEtiGqLG95hQFuBV31hIHu41DsD9OR2m64=; b=gAC/6dDUejYf0h6N2qMiWbN8bOzrYUjQjvOiYdUxlpnAN+M+xsP+L7BTNiMcd4wyjeVDB7 RFe2fMgDpQrpO/TLE7nQyhgZPdXDxZ60GHOOqX/g1Bnjj4qn5QI5b6nqKD/EurLZCnIHyR waAeS0wOpJIrD+03+/93Qi4mj/zRZJf9ocY1ax8H/p2QOR5JFEhFIZU2zeDwVlThwHAn5y UlvbGHifNdp1Elt7uJEqH39STimijWaqUjGygVZimJ4IS4ly3ifegb6rZKlxLQhARPw68W Q7iwrhOCh3HNMJtnQVjAgHPO1fHG9tKPGWSndrZQ61f7043uMYbVZj8SUDim1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732215354; a=rsa-sha256; cv=none; b=kIBTyQcDbL0jimAsP2H6OJgdeV94XYzxy5XX7CEcTNZLP5W3ARVHyyaYZQio9RglpRciMO y7D5B0ajDV1OcEZayJe3vpJ+10pVkve7CE/UKv/JmUlWMKvliK/Jjdl/fmd++UIdrB1Yve h4eny0bMgQzSMidv98OQmGaxT2gl2qJ+rLbmIqe4xRgkrPgx0VPOyLEQQsWjNBlO+YySg7 0C5mPIHloaB8bTcpAZPLadVNpi1+G3QmwmNL5EmK+QL/D54IOScKnx0EtbzgQetEB8nYfh 6QiOKaJG6COyZ8ezvxRoJuH/KK3GM7IEkQPmv9Ex+C0AJdtais2HNctJICFPhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvS9k4x9jzrj8; Thu, 21 Nov 2024 18:55:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALItsuE013135; Thu, 21 Nov 2024 18:55:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALItsKc013132; Thu, 21 Nov 2024 18:55:54 GMT (envelope-from git) Date: Thu, 21 Nov 2024 18:55:54 GMT Message-Id: <202411211855.4ALItsKc013132@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: a079f2b52aae - main - fibs_test: Run in a jail List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a079f2b52aae74b5469f18dcbef1aff680b80282 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a079f2b52aae74b5469f18dcbef1aff680b80282 commit a079f2b52aae74b5469f18dcbef1aff680b80282 Author: Mark Johnston AuthorDate: 2024-11-21 18:54:59 +0000 Commit: Mark Johnston CommitDate: 2024-11-21 18:54:59 +0000 fibs_test: Run in a jail These tests assume exclusive use of one or more FIBs and so can't be run in parallel. Running them in a VNET jail sidesteps this problem. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield --- tests/sys/netinet/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index a6f07d135724..786b79aa94c7 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -33,6 +33,8 @@ TEST_METADATA.arp+= is_exclusive="true" TEST_METADATA.divert+= required_programs="python" \ execenv="jail" \ execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.fibs_test+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" TEST_METADATA.forward+= required_programs="python" \ execenv="jail" \ execenv_jail_params="vnet allow.raw_sockets" From nobody Thu Nov 21 18:55:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvS9l6rb1z5dRSL; Thu, 21 Nov 2024 18:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvS9l6FN9z4d90; Thu, 21 Nov 2024 18:55:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732215355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sra3WHKDZpJawFuwVgCE32tnHRwz2ZUMYBIcjeWScZ4=; b=IuE1LhJOkqOMDLg93XyXIvUTU8gEJpJVKWoTNcTNxdcA/JMzUjMPChtFWf9nEcsbVAw7VV blF/o/RDOUm4cNnQSlVESYUV4NflMTwVmD5S+j31I1fz8Mi8ZjquUbGrCr3+vLIihKNoQx al+/icS59BhH2g3fUioIhsFOWr1Ld2TvqYiuYfCIaiM7kNkyryL0f5L3dwAlfHjnCaLdOT 5Dfd7BbZxHXuq+oiDiCw2fQRaj26tGMopNuw3Xbbi6V6lDu8K63Lyb9JTrphVQYefkf4a+ SXYq8CIy2LnW9r3C63Dq8GUUt7VURmLbxF4UWOVpYqyUpvo42aJNONT6/0T5Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732215355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sra3WHKDZpJawFuwVgCE32tnHRwz2ZUMYBIcjeWScZ4=; b=sWJo9+eGEqFzsYxQIzOXXRgFsxCzUZ4XngTW5EYM41IT/mRHvfoIyZjx/ctH/9hxdJuYCq Rdcc+FhrS1JimHivxCky08TCyoplomdaHvXIWd092Vmjl6e4rlRk7pSJEikYGl/4+OKRjJ y95b5+HfITU5P1UOqsCTstEcLr5gWsE00gaBSkLhmpVXt2anjjVFIun+8iNCAXHaih6ruR 1HAw6OHp9PDuoL5Oxt+pA3DzLntjIKjaL+SMeJzDRJ5DRhHzrJg8NJgrgUcUJ9f8WkycWF e/H6a078Y6FENyscXNHlvYUrbuOwhUjDNAGNZLJT5cXD1F5RIIZYENJmy2uhxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732215355; a=rsa-sha256; cv=none; b=BdttoQZgmYeHZcU76IylBl5jCtCpxZNc4cinnwx3ohS5I4LCcCkoJ9d57TPKrvFMPT2HZZ tVFkKK/Tg+A+R0nnyPdh/lQlpoRxRxdhyc/nZHLhMN8PA8YLUif2olrykMzSwUE6oWWte2 lOYgmaK0VvDgMEqDcY+Prdfispu940Q6OcNGAVBnjIXAszdCkCKEIjfXAQcnJMb1/51Sco EKvN/z6DnZMsVST2tBEf2k5/cv+YeIV2mwmC5FDjrfjndCl3Ddy38ytme9Gj+ujypjVvMj XpbYB2xGJXQn03SPfYX7lGY00pGgRN73ezJeH67AYHPa2MNqhkDPLl9tDeWCTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvS9l5rbkzrMf; Thu, 21 Nov 2024 18:55:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALItttS013174; Thu, 21 Nov 2024 18:55:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALIttcp013171; Thu, 21 Nov 2024 18:55:55 GMT (envelope-from git) Date: Thu, 21 Nov 2024 18:55:55 GMT Message-Id: <202411211855.4ALIttcp013171@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: 30cafaa9611d - main - devd tests: Fix client_test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 30cafaa9611d82525ab32ec32304b93835a5124a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=30cafaa9611d82525ab32ec32304b93835a5124a commit 30cafaa9611d82525ab32ec32304b93835a5124a Author: Mark Johnston AuthorDate: 2024-11-21 18:55:13 +0000 Commit: Mark Johnston CommitDate: 2024-11-21 18:55:13 +0000 devd tests: Fix client_test The loop doesn't check for overflow of the event buffer, which can easily happen if other tests are running in parallel (the bectl tests in particular trigger devd events). When that overflow occurs, a funny thing can happen: the loop ends up trying to read 0 bytes from the socket, succeeds, and then prints its buffer to stdout. It does this as fast as possible, eventually timing out. Then, because kyua wants to log the test's output, it slurps the output file into memory so that it can insert it into the test db. This output file is quite large, usually around 8GB when I see it happen, and is large enough to trigger an OOM kill in my test suite runner VM. Fix the test: use a larger buffer and fail the test if we fill it before both events are observed. Also don't print the output buffer on every loop iteration, since unlike the seqpacket test that will just print the same output over and over. Reviewed by: imp, asomers MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D47625 --- sbin/devd/tests/client_test.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/sbin/devd/tests/client_test.c b/sbin/devd/tests/client_test.c index 729c7a2f8bad..fdac3c98b3c6 100644 --- a/sbin/devd/tests/client_test.c +++ b/sbin/devd/tests/client_test.c @@ -22,15 +22,14 @@ * SUCH DAMAGE. */ -#include -#include -#include - #include -#include #include #include +#include +#include +#include + #include const char create_pat[] = "!system=DEVFS subsystem=CDEV type=CREATE cdev=md"; @@ -134,29 +133,37 @@ ATF_TC_BODY(seqpacket, tc) ATF_TC_WITHOUT_HEAD(stream); ATF_TC_BODY(stream, tc) { + char *event; int s; bool got_create_event = false; bool got_destroy_event = false; - ssize_t len = 0; + size_t len = 0, sz; s = common_setup(SOCK_STREAM, "/var/run/devd.pipe"); + + /* + * Use a large buffer: we're reading from a stream socket so can't rely + * on record boundaries. Instead, we just keep appending to the buffer. + */ + sz = 1024 * 1024; + event = malloc(sz); + ATF_REQUIRE(event != NULL); + /* * Loop until both events are detected on the same or different reads. * There may be extra events due to unrelated system activity. * If we never get both events, then the test will timeout. */ - while (!(got_create_event && got_destroy_event)) { - char event[1024]; + while (!(got_create_event && got_destroy_event) && len < sz - 1) { ssize_t newlen; char *create_pos, *destroy_pos; /* Read 1 less than sizeof(event) to allow space for NULL */ - newlen = read(s, &event[len], sizeof(event) - len - 1); - ATF_REQUIRE(newlen != -1); + newlen = read(s, &event[len], sz - len - 1); + ATF_REQUIRE(newlen > 0); len += newlen; /* NULL terminate the result */ event[len] = '\0'; - printf("%s", event); create_pos = strstr(event, create_pat); if (create_pos != NULL) @@ -166,7 +173,11 @@ ATF_TC_BODY(stream, tc) if (destroy_pos != NULL) got_destroy_event = true; } + printf("%s", event); + if (len >= sz - 1) + atf_tc_fail("Event buffer overflowed"); + free(event); close(s); } From nobody Thu Nov 21 18:55:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvS9n2JZnz5dS19; Thu, 21 Nov 2024 18:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvS9n0pvyz4d93; Thu, 21 Nov 2024 18:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732215357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0nNEnXddVJnMMtX5bh7LNljTiuViIHCIBzqhlg6JjcI=; b=aY2F3EHTjip3gZOYwdyT7JKGyvtuTUkuRM7KyE8NXhwC436g6YlWTrXRbhcdxdBO0NJnPD hEYEV6W/kfch5gI3/iizoxS0St0hjewKzwv2+REyWpdGPVWOkUyM/XhZYu+7kc3FNQCocy hQ03LByZtd+gpDxT7PGFzknPE+GxqvwonBcunVXjCHCqCwiANZjdDQE2vVgaXSQjzuHkP5 WKDOAawvj0nM5M7o29Hr5JJGmp+RkfiVVI00YgUIOFpAVAVYNALHW3hPHqmgx1fyLmUwuJ iLfwTIG/Kb78I6nor926qJZMIgaORFmhPYDAuuBCEcdoY1G534NLH0Z1zuhnmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732215357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0nNEnXddVJnMMtX5bh7LNljTiuViIHCIBzqhlg6JjcI=; b=c8qsRQYW7yJohLsiG2uO46NSZhX4+cXHYW5hI6jlKmX64ET9qG43ydxsg0rYKV8ymR2/+7 xNKJYsc9oKP7tOpp7Xn0LSPxPwh3VUqpgxmbIYTy+mU4Swyz9qzsMPPgyU0AxylJojLETa qdHiE4Z3AcEBqlTLUx+ED5FCXBvCFw5N6QzOgmHvB89csNdJlackkfBevJwuxRrEd98yV0 qFuIzXjqOhNYcB8T64bO0eNEtZlYE0KDC3K+pI7mEGxJiWB2YHyIL3H66Ht+//yR87xl/p N5WpDyCp5+t8b0GT8accwM12SHJJTtSSTLmTUUPVgqx7IXSu4pVrKkIkx4SQRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732215357; a=rsa-sha256; cv=none; b=UANiddofw7yL4yLPm2rBm0cVgAC4gVhG6REOVwmhKa54v0ZbUSwo8tb+KE0quXUlsnflsy SZCJTQH9Pn48JAAG2NrWmwwBRatRxLd0Hn8x+4JHFR6mFDpw2/hq0RmeYuUcF9fOxuShCe Y6RtTgLLYqu/bkz9eOZDLXFXVEGRNauSkGmdqFjI1x9b3WsKNJU6MUpOiF5Q8lirRV8RCg r+vRQFYQx/V8fUMgka6AETLlJYTHTcs1YQNrUIIMNB7Ieabz0s61Umvz2iPY6S7mrkLobN GWIaLqrCwTPb0F1TFYMrx84vDma1LoE8NEDVEhAiJJfDIV4L5J343Y/j/cQS1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvS9m6vH5zrMg; Thu, 21 Nov 2024 18:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALItu60013228; Thu, 21 Nov 2024 18:55:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALItu0W013225; Thu, 21 Nov 2024 18:55:56 GMT (envelope-from git) Date: Thu, 21 Nov 2024 18:55:56 GMT Message-Id: <202411211855.4ALItu0W013225@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: 46f38a6dedb1 - main - netgraph: Exit the net epoch to handle control messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 46f38a6dedb1b474f04b7c2b072825fda5d7bd5a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=46f38a6dedb1b474f04b7c2b072825fda5d7bd5a commit 46f38a6dedb1b474f04b7c2b072825fda5d7bd5a Author: Mark Johnston AuthorDate: 2024-11-21 18:55:35 +0000 Commit: Mark Johnston CommitDate: 2024-11-21 18:55:35 +0000 netgraph: Exit the net epoch to handle control messages In general, in the direct dispatch case netgraph only enters the net epoch to send data messages, but this was inconsistent with the netgraph thread, which also entered the net epoch to send fn and fn2 messages to nodes. Some handlers, e.g., ng_bridge_newhook(), may sleep, and so cannot be called in epoch context; the netgraph tests occasionally panic due to this problem. Make ngthread() consistent with the direct dispatch path. Discussed with: afedorov (in D44615) MFC after: 2 weeks Sponsored by: Klara, Inc. --- sys/netgraph/ng_base.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index 5bff0663e03e..77c7cb0d3c00 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -3440,10 +3440,13 @@ ngthread(void *arg) NG_QUEUE_UNLOCK(&node->nd_input_queue); NGI_GET_NODE(item, node); /* zaps stored node */ - if ((item->el_flags & NGQF_TYPE) == NGQF_MESG) { + if ((item->el_flags & NGQF_TYPE) != NGQF_DATA) { /* - * NGQF_MESG items should never be processed in - * NET_EPOCH context. So, temporary exit from EPOCH. + * NGQF_MESG, NGQF_FN and NGQF_FN2 items + * should never be processed in + * NET_EPOCH context; they generally + * require heavier synchronization and + * may sleep. So, temporarily exit. */ NET_EPOCH_EXIT(et); ng_apply_item(node, item, rw); From nobody Thu Nov 21 20:23:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvV774Mfsz5dXlN; Thu, 21 Nov 2024 20:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvV773rtwz4p8M; Thu, 21 Nov 2024 20:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732220627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4A2FRBv0oWLTmeo3hEDAY8Sn4+vj0t9mM3UwyzjRw50=; b=pj2fuJvADKkEWiJvvawhz9V28j5FpaFU3pZ8Cd8LXxECMVPFbO+GJJOcdCpEdDRKm6CpbR LPBDLfei6/NbEOeM+YpegNZF5bIOmQyW2/r7Bsz+NiShSahH7MnMuCo0yw1EtOHvS7smwt cHuL5rkz3euZNxcPbhNakZTN7pj+RVNcVBThJ/5sGFfRfss59jCgsacSyC6MtfBlCpDs6r tguLqa/hsSQSBXttu6Y97EV4HHajMZlhKxVdojfhTcC9qy8h4asEDGdbAsnN8ZlkTtJozh YbGQcyEr6I8iHfr/+DkEDJ31RA1zoLIXDE5q1Y4ZJroCpuXhzfxH6KHEpcC4+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732220627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4A2FRBv0oWLTmeo3hEDAY8Sn4+vj0t9mM3UwyzjRw50=; b=lmExFybmIrZAn57bpTRet4BmRgoIsHGPcB96d9aQmRgnm6YcDbFu7a29x9+YfrBH1TQyTz 103n1sKsOUqJr9VM8r0IhtdhsPsVwkD4w5EPnX6WMRU/Tz6PGScygVxHiZlZYNt5EsHYgc tbVEApvP+JgsIlx23juVNq/1aUW7PzBfqIaGQmOMhXxy60St7DSPsz5eK0qOMZ+EFXkGuO KFu2UahdBK0SiqcYge3/Vu8IAcq5lo89z4EE7w4N2+Tp9j9FpYwJ+yTwnVbTc2D5yDF65w OrMAOxKeJujXAC7ocEalnT61tE3Psb8AHfTxkbLC+IvKPcb8EJKkv1mfv40oog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732220627; a=rsa-sha256; cv=none; b=pTyD2MM0xzelSvqGJt5IJruVLbIacTvSs463oBrVLJpuiztJl1KT6/r1fwAJZJrDYZnNx0 o8kcPeaJlcHLF6mPFThYdjPESQgQVfZriAbWSUw8eBYOq/JVAwxRsCCU1gNZBj8rzM6rBx tnVPkBC9h6zQoD2Mqe0+OF/ELqR3j6puPfghAX9YOe4O1vRlEdGWpTdQ3inyTtBAnMhzed 1huIn/QQr4fkapn8fGBttmeY8ux2bCdvkIHHdrYPK+fJUGlRGk1fSaSjhbp8NAzLS//+sZ uWeDHRr/DN+kgeQ/BHi2QZiqNi2LlNzixHWeZmpTutH5YNb6aJrwt/TIwEe9Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvV773JPRztBd; Thu, 21 Nov 2024 20:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALKNlqW080257; Thu, 21 Nov 2024 20:23:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALKNlEb080254; Thu, 21 Nov 2024 20:23:47 GMT (envelope-from git) Date: Thu, 21 Nov 2024 20:23:47 GMT Message-Id: <202411212023.4ALKNlEb080254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 169e23d41f8f - main - hexdump.3: Add missing LIBRARY section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 169e23d41f8ff16244f4fb04924fdc9828325dce Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=169e23d41f8ff16244f4fb04924fdc9828325dce commit 169e23d41f8ff16244f4fb04924fdc9828325dce Author: David Gilbert AuthorDate: 2024-11-21 20:23:16 +0000 Commit: Jessica Clarke CommitDate: 2024-11-21 20:23:16 +0000 hexdump.3: Add missing LIBRARY section All the other libutil section 3 manpages document this, and although it's heavily implied by the libutil.h header in the synopsis, we should still be explicit and consistent. PR: 280078 Reviewed by: jrtc27 MFC after: 1 week --- lib/libutil/hexdump.3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libutil/hexdump.3 b/lib/libutil/hexdump.3 index 677bf92680a6..e5a18e201bbd 100644 --- a/lib/libutil/hexdump.3 +++ b/lib/libutil/hexdump.3 @@ -32,6 +32,8 @@ .Sh NAME .Nm hexdump .Nd "dump a block of bytes to standard out in hexadecimal form" +.Sh LIBRARY +.Lb libutil .Sh SYNOPSIS .In libutil.h .Ft void From nobody Thu Nov 21 20:55:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvVqp70kqz5dZT6; Thu, 21 Nov 2024 20:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvVqp6BSXz4t0L; Thu, 21 Nov 2024 20:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732222534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2yGNW0mRaeW+5h/MoYxMoZ/oy0Y7hhfiVO0PX2jDrw=; b=vd3lz1T2aIRB0AZDSgSz3IRi+xoybxe46QzEjinEATzR1tHYmeBoD3qazyopo8xCjZkZ4h H2DLHbYXR9okqm/wJuVE4WgLaY37w9yfZ1fze4QRd6NztGnfQLkQAFMvQj0KQm71LBqVKz GalbyokXI9GZ7bFdARdLFKdL4t6FJZ15AY+xseMn5x9aOsilmDWFDM9ihS0Ixr9FvA9XBJ 7gj5+0wNV+Sjsp+K62hCe44zuieKpDGUsdItOEZzMBQNhcTf3rlGMD58RVR76FmYxcjLRB 41BX/59YNSJpm9Mr7CsZMbr1UZ0IO0VNKh0MHY0CmZtHUMsVSDLygYREQEL7Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732222534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2yGNW0mRaeW+5h/MoYxMoZ/oy0Y7hhfiVO0PX2jDrw=; b=N8p6r6Tbi3Lfn4Zo25R7pasamIzOq5eDZsf1oCbBziBhWZhTY8VQt5zKQb4cqegnAL28xN StIHFaH5iqLcImHcrTS4NOpJFfyrN6LjE5HEG+WnUx7IqrDD2hSkzIV2EZn+H9LOk/4tE6 1S6MaVB22LyXy41r6OJID0au5cNnZtOD2FeUfwT1M/kZAnPX6d54QSxtFKYaENPIYHe+q0 q3cEerCjbJKfZvIteWbJa4CSP3RlbKHZ7mF5Eg4H4oCJQABcKDZOYPTgHTUq/0dIfJVCfK YT0UhetnG6aFVvL2rRTBvSvnJWLRQZM0Z2r+TphrbSqDIJ8oTCxQFgm9OYkyzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732222534; a=rsa-sha256; cv=none; b=Uhp9xGDBEK8hqyDWSWgqlsnTUqgef01CbTIj0eWkhOmdE4+AMG+32K1PQoaNXEpk2Yhhrc LDjzK7RTtYq201pcfup9Htw6SrzmQmN13tPLDNpq8e0AhSR/WLup4OyHm/ZiGLNpEfruQz RY/MjQz4FlpOhacU6ccE9disICbd1mD9xKR5hoR6+jpfLI8QY+rkSJw0TY1ByAno6MbKCl mav43unsZ7f2XjMG+plkXG/62TV97BpuyyJpDRWSRpork3eVeBbfnNyTDgF8zzDiPnLFB3 dGI/Ejd3pWlJiSmzm2LOXmUTk7xAq2TApYw7s8PstiFV8ixFID6PoGWTBN7chg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvVqp5N4rzw4h; Thu, 21 Nov 2024 20:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALKtYc0037341; Thu, 21 Nov 2024 20:55:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALKtYK1037338; Thu, 21 Nov 2024 20:55:34 GMT (envelope-from git) Date: Thu, 21 Nov 2024 20:55:34 GMT Message-Id: <202411212055.4ALKtYK1037338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ae4f39464c61 - main - ng_parse: disallow negative length for malloc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae4f39464c61182c2bdfd3cc61594f8707b3daf0 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ae4f39464c61182c2bdfd3cc61594f8707b3daf0 commit ae4f39464c61182c2bdfd3cc61594f8707b3daf0 Author: Ed Maste AuthorDate: 2022-11-01 14:01:29 +0000 Commit: Ed Maste CommitDate: 2024-11-21 20:53:04 +0000 ng_parse: disallow negative length for malloc This is an interim robustness improvement; further improvements as described in the PR and/or Phabricator review are still needed. PR: 267334 Reported by: Robert Morris Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37229 --- sys/netgraph/ng_parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c index e11070274484..1a1d9d8b3064 100644 --- a/sys/netgraph/ng_parse.c +++ b/sys/netgraph/ng_parse.c @@ -1207,6 +1207,8 @@ ng_parse_composite(const struct ng_parse_type *type, const char *s, int align, len, blen, error = 0; /* Initialize */ + if (num < 0) + return (EINVAL); foff = malloc(num * sizeof(*foff), M_NETGRAPH_PARSE, M_NOWAIT | M_ZERO); if (foff == NULL) { error = ENOMEM; From nobody Thu Nov 21 21:50:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvX3d6l5Mz5ddxt; Thu, 21 Nov 2024 21:50: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvX3d5bPnz4DvF; Thu, 21 Nov 2024 21:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732225853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yPUfpDuWaYp+z9L3HEb3xwMminw5PZj6o5+u6ZdEQoA=; b=KyY/jMBozgsI9yqCGzJL8kEsTJwXlE/NXusHdemEMh1biosYJWeM2xCEd1YuxBMrRhxbWB ovEfEeNum2CzWIpnmSeI7pr4RBFywnbo/XRV4Yxzj6uKe9AVlal7gIBRU2xEZ6Vc+nHZ73 9cdIwf0NaPYNrHMGc5c3eMQzcoXy6MquHf0W40elwHCq8L+UweT5Vh7u/CCpzsRck8iRbG wWIAEkSWNo9Mf8KBH6eeoEurmRLueocRbBWedzlQCusVukf1Mxx/y6RGdjPLbis095pL2X kUCqw2PQV9zVhgy2sleNyICgGBNqsRK7fkVnuosjL75XvGWQV5WMXiM+vopVwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732225853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yPUfpDuWaYp+z9L3HEb3xwMminw5PZj6o5+u6ZdEQoA=; b=Bdbk/d49ZvmNNOBWq1ucAVOR04xL2wCe7JPljze/CEkn4ybHwdul6A+D12A8D8XL09zS8B zIXOOh6UrdO3w7hoHuVeaQc29A1R+oqzMdosCeGDmpugc/Khxo6pfbV9Rj7M9PKLy5fadx oWb7f9ZbLBcgeWtYv0ewJfcubfTp998fMOIT+pUutXXQqQ4iJd1hWMdVSFO2MlY7YFeMvl hfmUmx8MAdq54BYjPLgUyHUrs/Mz9OCgo/IssYX64kem238DIUFaWE5jqFw9MCteyz9l3y XlrEv9KyQZKkHRZ53cb6RbZOU0ZBWPTBCgqWRCbqXbjzEbsrNHQAhXppa30tiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732225853; a=rsa-sha256; cv=none; b=lpelXtYk5VqzNX3+40YhT8axJrm+wQtJWVwbQRDe7PBoIQoconv4mGCpuO45Iz/aiQJ9oA mh97F05Q6YRWolyMLaZraA/doJxnnotCZpsctBmQ6ka3TWU67V+sapMmZVJKJvribavxli Cuuiz95v6kocNadNRGApleuZa0g9gPV4Bn+G02oka2cmzrVIbct9rapsMqJqdb+nJ7ZfjA 5M+26c36MT8CGiCNOLAnTkxQVPAMaGaZ3aA5ErpbG1cliCRJ3fmWfzKJIlEWw+QJZLfFhX LGpCc9Yw8UiuwbOt+PZI73dNejXxI26vj9JcmChHEJaywXTIXIG63A0Pxtt7hA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvX3d43SDzx8x; Thu, 21 Nov 2024 21:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALLorCj045512; Thu, 21 Nov 2024 21:50:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALLorXW045509; Thu, 21 Nov 2024 21:50:53 GMT (envelope-from git) Date: Thu, 21 Nov 2024 21:50:53 GMT Message-Id: <202411212150.4ALLorXW045509@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: 38e3125d6df9 - main - device_pager: user iterators to free device pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 38e3125d6df98919983ed800471673ff0e5c2337 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=38e3125d6df98919983ed800471673ff0e5c2337 commit 38e3125d6df98919983ed800471673ff0e5c2337 Author: Doug Moore AuthorDate: 2024-11-21 21:49:30 +0000 Commit: Doug Moore CommitDate: 2024-11-21 21:49:30 +0000 device_pager: user iterators to free device pages Change cdev_mgtdev_page_free_page to take an iterator, rather than an object and page, so that removing the page from the object radix tree can take advantage of locality with iterators. Define a general-purpose function to free all pages, which can be used in several places. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D47692 --- sys/arm/nvidia/drm2/tegra_bo.c | 6 +++-- sys/compat/linuxkpi/common/src/linux_page.c | 18 ++----------- sys/dev/drm2/ttm/ttm_bo_vm.c | 20 +++------------ sys/dev/xen/gntdev/gntdev.c | 13 +--------- sys/dev/xen/privcmd/privcmd.c | 14 +--------- sys/vm/device_pager.c | 40 +++++++++++++++++++++-------- sys/vm/vm_pager.h | 3 ++- 7 files changed, 43 insertions(+), 71 deletions(-) diff --git a/sys/arm/nvidia/drm2/tegra_bo.c b/sys/arm/nvidia/drm2/tegra_bo.c index 346118b78c2b..e1a6a425be4d 100644 --- a/sys/arm/nvidia/drm2/tegra_bo.c +++ b/sys/arm/nvidia/drm2/tegra_bo.c @@ -47,6 +47,7 @@ static void tegra_bo_destruct(struct tegra_bo *bo) { + struct pctrie_iter pages; vm_page_t m; size_t size; int i; @@ -58,11 +59,12 @@ tegra_bo_destruct(struct tegra_bo *bo) if (bo->vbase != 0) pmap_qremove(bo->vbase, bo->npages); + vm_page_iter_init(&pages, bo->cdev_pager); VM_OBJECT_WLOCK(bo->cdev_pager); for (i = 0; i < bo->npages; i++) { - m = bo->m[i]; + m = vm_page_iter_lookup(&pages, i); vm_page_busy_acquire(m, 0); - cdev_mgtdev_pager_free_page(bo->cdev_pager, m); + cdev_mgtdev_pager_free_page(&pages); m->flags &= ~PG_FICTITIOUS; vm_page_unwire_noq(m); vm_page_free(m); diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 25243382f9ea..6ca926e89174 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -418,27 +418,13 @@ lkpi_io_mapping_map_user(struct io_mapping *iomap, */ void lkpi_unmap_mapping_range(void *obj, loff_t const holebegin __unused, - loff_t const holelen, int even_cows __unused) + loff_t const holelen __unused, int even_cows __unused) { vm_object_t devobj; - vm_page_t page; - int i, page_count; devobj = cdev_pager_lookup(obj); if (devobj != NULL) { - page_count = OFF_TO_IDX(holelen); - - VM_OBJECT_WLOCK(devobj); -retry: - for (i = 0; i < page_count; i++) { - page = vm_page_lookup(devobj, i); - if (page == NULL) - continue; - if (!vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL)) - goto retry; - cdev_mgtdev_pager_free_page(devobj, page); - } - VM_OBJECT_WUNLOCK(devobj); + cdev_mgtdev_pager_free_pages(devobj); vm_object_deallocate(devobj); } } diff --git a/sys/dev/drm2/ttm/ttm_bo_vm.c b/sys/dev/drm2/ttm/ttm_bo_vm.c index e543b8dfb993..38575fc8a74b 100644 --- a/sys/dev/drm2/ttm/ttm_bo_vm.c +++ b/sys/dev/drm2/ttm/ttm_bo_vm.c @@ -361,26 +361,12 @@ void ttm_bo_release_mmap(struct ttm_buffer_object *bo) { vm_object_t vm_obj; - vm_page_t m; - int i; vm_obj = cdev_pager_lookup(bo); - if (vm_obj == NULL) - return; - - VM_OBJECT_WLOCK(vm_obj); -retry: - for (i = 0; i < bo->num_pages; i++) { - m = vm_page_lookup(vm_obj, i); - if (m == NULL) - continue; - if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0) - goto retry; - cdev_mgtdev_pager_free_page(vm_obj, m); + if (vm_obj != NULL) { + cdev_mgtdev_pager_free_pages(vm_obj); + vm_object_deallocate(vm_obj); } - VM_OBJECT_WUNLOCK(vm_obj); - - vm_object_deallocate(vm_obj); } #if 0 diff --git a/sys/dev/xen/gntdev/gntdev.c b/sys/dev/xen/gntdev/gntdev.c index 49f8aefad62e..e3bc1ecf35ab 100644 --- a/sys/dev/xen/gntdev/gntdev.c +++ b/sys/dev/xen/gntdev/gntdev.c @@ -563,7 +563,6 @@ notify_unmap_cleanup(struct gntdev_gmap *gmap) { uint32_t i; int error, count; - vm_page_t m; struct gnttab_unmap_grant_ref *unmap_ops; unmap_ops = malloc(sizeof(struct gnttab_unmap_grant_ref) * gmap->count, @@ -592,17 +591,7 @@ notify_unmap_cleanup(struct gntdev_gmap *gmap) } /* Free the pages. */ - VM_OBJECT_WLOCK(gmap->map->mem); -retry: - for (i = 0; i < gmap->count; i++) { - m = vm_page_lookup(gmap->map->mem, i); - if (m == NULL) - continue; - if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0) - goto retry; - cdev_mgtdev_pager_free_page(gmap->map->mem, m); - } - VM_OBJECT_WUNLOCK(gmap->map->mem); + cdev_mgtdev_pager_free_pages(gmap->map->mem); /* Perform unmap hypercall. */ error = HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index c04ac287183b..922d24b39432 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -120,25 +120,13 @@ privcmd_pg_dtor(void *handle) struct privcmd_map *map = handle; int error __diagused; vm_size_t i; - vm_page_t m; /* * Remove the mappings from the used pages. This will remove the * underlying p2m bindings in Xen second stage translation. */ if (map->mapped == true) { - VM_OBJECT_WLOCK(map->mem); -retry: - for (i = 0; i < map->size; i++) { - m = vm_page_lookup(map->mem, i); - if (m == NULL) - continue; - if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0) - goto retry; - cdev_mgtdev_pager_free_page(map->mem, m); - } - VM_OBJECT_WUNLOCK(map->mem); - + cdev_mgtdev_pager_free_pages(map->mem); for (i = 0; i < map->size; i++) { rm.gpfn = atop(map->phys_base_addr) + i; HYPERVISOR_memory_op(XENMEM_remove_from_physmap, &rm); diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index a5fffbf629bd..55bc948a4c44 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -52,6 +52,7 @@ #include #include #include +#include #include static void dev_pager_init(void); @@ -262,9 +263,13 @@ void cdev_pager_free_page(vm_object_t object, vm_page_t m) { - if (object->type == OBJT_MGTDEVICE) - cdev_mgtdev_pager_free_page(object, m); - else if (object->type == OBJT_DEVICE) + if (object->type == OBJT_MGTDEVICE) { + struct pctrie_iter pages; + + vm_page_iter_init(&pages, object); + vm_page_iter_lookup(&pages, m->pindex); + cdev_mgtdev_pager_free_page(&pages); + } else if (object->type == OBJT_DEVICE) dev_pager_free_page(object, m); else KASSERT(false, @@ -272,15 +277,30 @@ cdev_pager_free_page(vm_object_t object, vm_page_t m) } void -cdev_mgtdev_pager_free_page(vm_object_t object, vm_page_t m) +cdev_mgtdev_pager_free_page(struct pctrie_iter *pages) { + pmap_remove_all(vm_radix_iter_page(pages)); + vm_page_iter_remove(pages); +} - VM_OBJECT_ASSERT_WLOCKED(object); - KASSERT((object->type == OBJT_MGTDEVICE && - (m->oflags & VPO_UNMANAGED) == 0), - ("Unmanaged device or page obj %p m %p", object, m)); - pmap_remove_all(m); - (void)vm_page_remove(m); +void +cdev_mgtdev_pager_free_pages(vm_object_t object) +{ + struct pctrie_iter pages; + vm_page_t m; + + vm_page_iter_init(&pages, object); + VM_OBJECT_WLOCK(object); +retry: + for (m = vm_page_iter_lookup_ge(&pages, 0); m != NULL; + m = vm_radix_iter_step(&pages)) { + if (!vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL)) { + pctrie_iter_reset(&pages); + goto retry; + } + cdev_mgtdev_pager_free_page(&pages); + } + VM_OBJECT_WUNLOCK(object); } static void diff --git a/sys/vm/vm_pager.h b/sys/vm/vm_pager.h index d30bf349e411..0958d82d6968 100644 --- a/sys/vm/vm_pager.h +++ b/sys/vm/vm_pager.h @@ -300,7 +300,8 @@ vm_object_t cdev_pager_allocate(void *handle, enum obj_type tp, vm_ooffset_t foff, struct ucred *cred); vm_object_t cdev_pager_lookup(void *handle); void cdev_pager_free_page(vm_object_t object, vm_page_t m); -void cdev_mgtdev_pager_free_page(vm_object_t object, vm_page_t m); +void cdev_mgtdev_pager_free_page(struct pctrie_iter *pages); +void cdev_mgtdev_pager_free_pages(vm_object_t object); struct phys_pager_ops { int (*phys_pg_getpages)(vm_object_t vm_obj, vm_page_t *m, int count, From nobody Thu Nov 21 22:05:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvXP22NHTz5dfgQ; Thu, 21 Nov 2024 22:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvXP21gdDz4Gwn; Thu, 21 Nov 2024 22:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732226758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVMfhSnJgWmIWUf8R6ItoiPHFlJFAxUbrINiK+zgGHM=; b=sdmaT/xjpczHcmkps5whLFAOKHXuq3PvXB7TuZ9eWtJICAQjl6Pa+wv1ls7IrUdBsXNDx0 X/5ak7Tcp4M2AES1clNqX5XaWIbDkM3z6bXZc+W0tqyFolp0fY8gso/4hBHsArSlnouO8l 6Ksqc0Ir7Yge6uTh4McGArgu4KfcNeac3rv/J8Be9YybbUBAcsz/41cvupjoc6h4o3/uWg +kTXlUQcN/CJqIEizk5DdR67Ckd27vO5hpPmGNAkzcoMluf6CX2TlFp1WuteiqK4BViXyD AI1lnYL2uBDlJQ0uY9JaHDQm2GRLn8MX9rPf36nVpZnpyEr7Dv2eIKL4QFaW5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732226758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVMfhSnJgWmIWUf8R6ItoiPHFlJFAxUbrINiK+zgGHM=; b=qQa9Cxkt52d0BGmBhWNdCaXO0Gae+K7i/RkSeHSgswnl5haAkvp5Z5Je9mHpIUKdHjyict OQzuxS2aO9Rn4a9zBGazy0Jds9dsXoCQ97c5L0whibyLfctqLIovYyJae5ZE12fEkFKJct ZAJPQu4Ajlacjf1Nau4KlTxR+HTtfhkNcMZ4S957kMQ5nXLd1vXc8Ux2/QgzDr6pgb019E F3Hos+IJQyPrxZ1nLsJQHctdBIq5UFj4u4P6Ie55V9bYSyKsPmgI9izcJqqYqn/Pqeu+k4 ApA9lVzdjygc00ek+2rXECuNavOy6uA77/ofFZAw9gJcAWfnSzlaNd/bNdm2GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732226758; a=rsa-sha256; cv=none; b=v9BQBnedj59RT6wrPcWkvflWkiZ4QXkxgnAdnFtymL/0Qwl35I2L+PnlcLCwKTX5gzgBdv frCFhL6pNTJ8Sye3K3nx+G3U+IlzxW5YpJ6uU7ar20pXx3aN/RbVkb9Uh1ntgHO7pl9OTq GSBwnUilNA3WzUBUk4BEZAJTePYzv4MCPHKc03uuY+FzzRfgYS7/ZMN7X7a1RrsNDGJX2Y OcIs1cHib9XtYLE8+bN3cVdZG8SbKsfLyGrRL4jYVqRNQ4uLKLMZT3Mb3htkbpfeLG5bcy aZZ9ByicHFYpmWElOy/da3J+wngjw5lJoSbV+vud9/kl83xgRMRjjBv0sdWcpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvXP21H4Wzxxr; Thu, 21 Nov 2024 22:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALM5w7U072329; Thu, 21 Nov 2024 22:05:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALM5wuA072326; Thu, 21 Nov 2024 22:05:58 GMT (envelope-from git) Date: Thu, 21 Nov 2024 22:05:58 GMT Message-Id: <202411212205.4ALM5wuA072326@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: a03957a706a0 - main - efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a03957a706a05bb0c2f627183b19d84f6d96dbb7 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a03957a706a05bb0c2f627183b19d84f6d96dbb7 commit a03957a706a05bb0c2f627183b19d84f6d96dbb7 Author: Konstantin Belousov AuthorDate: 2024-11-21 19:40:18 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-21 22:05:28 +0000 efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47694 --- sys/dev/efidev/efirt.c | 8 +++++++- sys/sys/proc.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index 2d45b4d6ac66..37b46ec38dad 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -309,6 +309,9 @@ efi_enter(void) fpu_kern_leave(td, NULL); mtx_unlock(&efi_lock); PMAP_UNLOCK(curpmap); + } else { + MPASS((td->td_pflags & TDP_EFIRT) == 0); + td->td_pflags |= TDP_EFIRT; } return (error); } @@ -319,10 +322,13 @@ efi_leave(void) struct thread *td; pmap_t curpmap; + td = curthread; + MPASS((td->td_pflags & TDP_EFIRT) == 0); + td->td_pflags &= ~TDP_EFIRT; + efi_arch_leave(); curpmap = &curproc->p_vmspace->vm_pmap; - td = curthread; fpu_kern_leave(td, NULL); mtx_unlock(&efi_lock); PMAP_UNLOCK(curpmap); diff --git a/sys/sys/proc.h b/sys/sys/proc.h index a69eecbb4661..69b6c7a61da0 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -560,7 +560,7 @@ enum { #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ -#define TDP_UNUSED0 0x20000000 /* UNUSED */ +#define TDP_EFIRT 0x20000000 /* In firmware (EFI RT) call */ #define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ #define TDP_SIGFASTPENDING 0x80000000 /* Pending signal due to sigfastblock */ From nobody Thu Nov 21 22:05:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvXP34vhXz5dftS; Thu, 21 Nov 2024 22:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvXP32QCXz4H04; Thu, 21 Nov 2024 22:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732226759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hhZsa1BpnZArkc2tS/hdDPTWjPZRalXEp4Ujr/MhXuM=; b=PgwbcbOo6M1rX/TJkstUM+6vDiMniUJRsvQfbQ4gJXzGUG9PFSRH4R19m26KQuaUk1byd9 HX7AGRlgvTEELWKftG4pX9elDjron3xYRPL9z5Fkg5h1z6Ctwe0wce+oimWWLnWkcVZizH hvm7CzzppnIUw3h4B5CDEY3woPZRouoNYmRvJsbvpS8iY3vyIoXr50U5DO558/MRYGJYt3 mhrP7BFJ6pWis1bZkrh5wE+F8vLK595BF7GnL9dtgrDQWiVX0bKRKw/3NLZSSC0m7uYhHR dk3BpuajuFZznd6rdro7+XWiLQx/Nbo/wWZll4YMe0iA8QKsbEcFk0tIMLbLpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732226759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hhZsa1BpnZArkc2tS/hdDPTWjPZRalXEp4Ujr/MhXuM=; b=Cy5K3g42usu7CJ1gMxl1YtH8q5v2g5PyU5qqyE5AJ+AahhpFPezU1boGZhR/+91eUbrZI8 c6j6xGGybo3fv86/g+A/9vkTvohsQ+9fYFCFamK4XRYKH3qH6KBC1upa5GKlhkxR8a7c7t LCL4LwSQP3mkPFaYeqPPJa0k/wt/qvyeFmPYt7gXIu+YRdz20gh2c6DJA4RHADKQsRw+w+ V0hSoDaZMVwAadTvgOIMjGOM7JWEwFHiw/0jCpxs6ffQ8j83XCmToIx/W2W/cTJYJsLRdS rDjF1SF7uTNQUqmvY2iONeqThSW/Bk/qH1/8Z9X7uu71lNZIXYca0Ygr97amkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732226759; a=rsa-sha256; cv=none; b=ZwmDjiSw2zqBPFnDubBNVn2UHIEZj+VrXpsLpE2/Yys7EhizhBfXY53jcDfoCiJiK3KrVs wjv4dqz5fwHYR/MAdsX8d1CcVijHBZlr99jfbSQq78ZTQxedBX2NDBRwjLw6VjETQrn2F1 ElV/uzTEaXlL7LFT2dwa2aAoDcYFx0QjQh6RyjYwDIP1dumH3PbCdiXEdE2mdcaDibfI3/ e7ZoFTZnTM/LRUal43hvjR6X+gRVato9PAtRyEzGNomT8uZ4ztL2LzxHdidt1P752fSymz +l6M6JiAcsrwVfhqdybAHqYjW5DyTf20lhYmP+rx/GNx6pVJ4eUeNNbELIPrYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvXP3226Qzxl1; Thu, 21 Nov 2024 22:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALM5xPQ072388; Thu, 21 Nov 2024 22:05:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALM5x9F072385; Thu, 21 Nov 2024 22:05:59 GMT (envelope-from git) Date: Thu, 21 Nov 2024 22:05:59 GMT Message-Id: <202411212205.4ALM5x9F072385@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: e6ec41fa86d8 - main - amd64 efi rt: handle #BP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e6ec41fa86d88f80bd663e55455a6844619a9b24 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e6ec41fa86d88f80bd663e55455a6844619a9b24 commit e6ec41fa86d88f80bd663e55455a6844619a9b24 Author: Konstantin Belousov AuthorDate: 2024-11-21 04:57:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-21 22:05:28 +0000 amd64 efi rt: handle #BP PR: 282860 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47694 --- sys/amd64/amd64/trap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index a6d6c792ee92..6ceeea41ea91 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -598,6 +598,18 @@ trap(struct trapframe *frame) * FALLTHROUGH (TRCTRAP kernel mode, kernel address) */ case T_BPTFLT: + /* + * Most likely, EFI RT hitting INT3. This + * check prevents kdb from handling + * breakpoints set on the BIOS text, if such + * option is ever needed. + */ + if ((td->td_pflags & TDP_EFIRT) != 0 && + curpcb->pcb_onfault != NULL) { + frame->tf_rip = (long)curpcb->pcb_onfault; + return; + } + /* * If KDB is enabled, let it handle the debugger trap. * Otherwise, debugger traps "can't happen". From nobody Thu Nov 21 23:26:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvZ9s34CGz5dl9X; Thu, 21 Nov 2024 23:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvZ9s2XX9z4RCl; Thu, 21 Nov 2024 23:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QQSlfAPaL2EMqt2F5FqeiL8ZBJpuFQ9nj/Pp5ryjz14=; b=LlpPQVsiRvM8WLG98yEl767VmNfhcX5EqvfaJ1vv6k9kN666S/epgPeidy/IxtqFKv5qc2 o/vC0OY980B8UP4eyL6uqcUao1jgsNEnHn7IsxU3yB3IXDZxtDcciJISk/7Jvq2CWZ+5mU M1n4BBLvUgSHAAoMd9mA8dv0sNqyyG7IeWjKyzdCDp526yC5UFVKBgnE8m0nW8bYVWHmq/ MyWuIq0XyhZvwzDjGz7B+GEFhiNj+eRYefdbw6+I1KQ+yMk/yM7QliCXWp69kqC2S4Q0/f RCYZvNjvC65Y5yxocKMBlIH9lpvxwBSgu6+Q7bN0S1cqM6raFkuqYwzgKM4dYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QQSlfAPaL2EMqt2F5FqeiL8ZBJpuFQ9nj/Pp5ryjz14=; b=YvDPpBhKMGPt6eykgO82QreEOcgWPI2keU54nNUsp/ex4ToxlqoLv4SKV/hDm4KGyjLGkx hBAKvj2Pd8gg6NhOyVL30pFTWJ+AJv6DxLJTMSkBaeyMai3xM4pf3KWW/WuMvNL6RKxKGk dV5i0ETmsw3dtybfvxogQs/Mz+cyXHOVNSmPlGIMolGw1OSJdSohvxOe2YUJ8GT1Hhwwj4 2PUlPzxX0LvSdf1QeW5XRCO1BHOeQnZyNdmWxJkaDMVaGuoYzFuytCOoXgvtrOPDSUotaE 4Qan2Hp2LGtoN+e+szqaWqIN9+nJoNnICi62q1RBvVRlKk87IqYxDcqxROUV8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732231585; a=rsa-sha256; cv=none; b=H/MAo+LuPv2QvQJgayH04DD8IoIKhoAoCgzlSh1/CzCsCQcnjMTxtc0bphhH0vyitbIsb1 LKfrF1CGEM4n2XF7mTDEyF1tOEXOgfr3A8p9ZZ+kt7J3blv11hJ6978THNDfMdpZxcvknW r41TjP+mMEerW3Ah/kKVVRsydbUybhDy34ide1OIO8JyVN+bDMO3dUpPOVuJT+AqJgm1GW KcVQ/92NfPfu4FuilnNQy9wrAZbjH1xUCKA5CPVhA62RLyhas9trdDGSmC/gYMK/xWYtKy j+y3hzhf0aGtSA0/0oyjT5qr4D3hUzXStnQ37trtTKtbMeNbQU9HfWFs9wxiwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvZ9s23f5z10lr; Thu, 21 Nov 2024 23:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALNQPrG021298; Thu, 21 Nov 2024 23:26:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNQPVm021295; Thu, 21 Nov 2024 23:26:25 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:26:25 GMT Message-Id: <202411212326.4ALNQPVm021295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 03c07bdc8b31 - releng/14.2 - bsdinstall: add menu to install firmware List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 03c07bdc8b31c97882e47b376cc48bfaa747c5cb Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=03c07bdc8b31c97882e47b376cc48bfaa747c5cb commit 03c07bdc8b31c97882e47b376cc48bfaa747c5cb Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 23:24:41 +0000 bsdinstall: add menu to install firmware Add a menu to the installer to run fwget(8) inside the newly installed system to install firmware known to be needed. This requires working netowrking. This is needed at least for wireless currently for when we entirely stop shipping new firmware in src.git to have working networking on the installed system (we already do need this for at least rtw89). Sponsored by: The FreeBSD Foundation Tested with: 4 different iwlwifi chipsets in a system (earlier version) Suggested improvments by: jrtc27 Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47491 (cherry picked from commit bbe2a1da2df639c616869aa838244c8094779bd4) (cherry picked from commit 15f6edf20e4e1542f2385a9cbd6e996e23252858) --- usr.sbin/bsdinstall/bsdinstall.8 | 19 +++++- usr.sbin/bsdinstall/scripts/Makefile | 1 + usr.sbin/bsdinstall/scripts/auto | 1 + usr.sbin/bsdinstall/scripts/firmware | 125 +++++++++++++++++++++++++++++++++++ 4 files changed, 145 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index c8bf143322ae..50c8948a7989 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -1,6 +1,10 @@ .\"- .\" Copyright (c) 2011-2013 Nathan Whitehorn All rights reserved. .\" Copyright (c) 2018 Roberto Fernandez Cueto +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Björn Zeeb +.\" 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 @@ -23,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 18, 2023 +.Dd November 4, 2024 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -240,6 +244,12 @@ Extracts the distributions listed in .Ev DISTRIBUTIONS into .Ev BSDINSTALL_CHROOT . +.It Cm firmware +executes +.Xr fwget 8 +inside the +.Ev BSDINSTALL_CHROOT +to install any needed and available firmware for the new system. .It Cm rootpass Interactively invokes .Xr passwd 1 @@ -323,6 +333,13 @@ Default: Path to a log file for the installation. Default: .Dq Pa $TMPDIR/bsdinstall_log +.It Ev BSDINSTALL_SKIP_FIRMWARE +If not empty, the +.Cm auto +target +will not invoke the +.Cm firmware +target. .It Ev BSDINSTALL_SKIP_HARDENING If not empty, the .Cm auto diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index 2d226f418783..cbe190d85f12 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -7,6 +7,7 @@ SCRIPTS=auto \ docsinstall \ entropy \ fetchmissingdists \ + firmware \ hardening \ hostname \ jail \ diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index fd5b634696ae..6a89b3dfdd81 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -364,6 +364,7 @@ fi [ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time [ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services [ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening +[ -z "$BSDINSTALL_SKIP_FIRMWARE" ] && bsdinstall firmware [ -z "$BSDINSTALL_SKIP_USERS" ] && dialog --backtitle "$OSNAME Installer" \ --title "Add User Accounts" --yesno \ diff --git a/usr.sbin/bsdinstall/scripts/firmware b/usr.sbin/bsdinstall/scripts/firmware new file mode 100644 index 000000000000..a563f0e578e4 --- /dev/null +++ b/usr.sbin/bsdinstall/scripts/firmware @@ -0,0 +1,125 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr + +msg_freebsd_firmware_installation="$OSNAME Firmware Installation" +msg_freebsd_installer="$OSNAME Installer" +msg_firmware_menu_text="This menu allows you to install firmware packages for your system" +hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" +hline_ok="Press OK to continue" + +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_firmware_menu_text" + local hline + local check_list= # Empty; filled below + local fwlist _fw + + fwlist=`chroot $BSDINSTALL_CHROOT fwget -q -n` + case "${fwlist}" in + "") # No firmware to install + # Print a dialog with OK and a 3 line timeout bar. + local height width rows msg + + msg="No firmware to install, continuing..." + hline="$hline_ok" + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$msg\" \ + \"-\" \ + \"n\" \ + \"-\" \ + \"\$hline\" + + ${DIALOG} --title "${title}" --backtitle "${btitle}" \ + --hline "${hline}" \ + --nocancel --pause "${msg}" $height $width 5 + f_dialog_menutag_store -s "" + return $DIALOG_OK + ;; + *) + local desc status height width rows selected retval + hline="$hline_arrows_space_tab_enter" + + for _fw in ${fwlist}; do + desc="${_fw}" + f_shell_escape "$desc" desc + # install each firmware package by default. + check_list="$check_list + '$_fw' '$desc' 'on' + " + done + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\$hline\" \ + $check_list + + selected=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --separate-output \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + retval=$? + f_dialog_menutag_store -s "$selected" + return $retval + ;; + esac +} + +# Initialize +f_dialog_title "$msg_freebsd_firmware_installation" +f_dialog_backtitle "$msg_freebsd_installer" + +# Gather the firmware files and present them to the user +dialog_menu_main || f_die +f_dialog_menutag_fetch selected + +# Nothing to install? +if [ "${selected}" == "" ]; then + exit 0 +fi + +f_mustberoot_init + +# pkg(8) needs name servers (unless we could use a local repo in the future). +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ + +${DIALOG} --title "$DIALOG_TITLE" --backtitle "$DIALOG_BACKTITLE" \ + --infobox "Installing firmware. This may take a moment." 0 0 + +# Install each of the selected firmware packages +for fw in ${selected}; do + # We install one at a time in case one is not avail. + # pkg-install.8 needs an option to skip unavail. + ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install -qy ${fw} +done + +# end From nobody Thu Nov 21 23:26:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvZ9t4LmXz5dkjB; Thu, 21 Nov 2024 23:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvZ9t3TLRz4RFh; Thu, 21 Nov 2024 23:26:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vFxnqI/gBe3J7kbFlSn7fQrn6HxNwJYIBlCOROToqC4=; b=XPXOLE0U+uZ3yciQjieWe69UInPcztChN8uLsu0GqiyLrCRbjNShqr+JOfNSPcZXm09Pw3 hVFOKlTPIWZyALFfFAC2Jf1dDqeMcGdWSqOlWFmOBRTT91I0rNAQLOUxU1Uuls+LRV1yn7 VlhNADqqD/oTF1FJUFqoZcjeR9MesHLP+uIvVMPFS82QKMKPKmmK1sYBAAms7xMik2fdUv 4E8dR6Hakq3vkYPMwcka4Aizowh403J3j2UD1NEplTd0GWcZYMTZco+UO4QDNM7X1jX/BL LrPsf6GXv3nulb0oX4N/KcFNe9S7AfKvL64UP2g2gP+YBj7rzVhaXeVXNLodlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vFxnqI/gBe3J7kbFlSn7fQrn6HxNwJYIBlCOROToqC4=; b=v70CmOsEsSdK966pbvXmjkg7J5FK9BSmqi9ZUvn8jwzwZ37AtCu9o8HklCfouCpjiE8BIO U5ShriNBDzA05cbpWCggsRCQpXk55ESGUwLyKd5P8dlcghjnso9gB88VLNi7fFsLJjdQU4 lXLLTQw9KkNJacGPK1hpSCEtCfuonW/Ay4n0qDVd0gdKcI/UlN4jkx0rheo5IDhGuQXvB5 VPIPNMY9C69/wUBh5cgg1DYSKyLadXLSPRB/Vy5ghDXl/2YdRbqvFWome+f7gQoJdH7LPN fjdCqADH4KekJV74fx7VyPK/P7FbSzRVH86JPBUkU707zJwqzlwROaAPOd7LbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732231586; a=rsa-sha256; cv=none; b=YWclNh7Bg+1zx4NNv2KvRyldtLLDDlvBFSWpEyakZWl+3W6PiFoxzXGF2gbNZMQOnUE0ik M709jTrIS9zTfYLDtu0rHBMjPNdNiy3I3LID3nEr7x17TyH132RUzKErOtzAAz9rNiMwHu /W3vMktELBHSjSegOmUjmDoRezEI4HkoP4DoTwrf6sxr7C67biEvYSeAgXmddMGMZ+6W8l u94ZbfD9UcK7tHUukinbtMtxGAx5HacifTYzPzj0sOX7Fa+Di1oMX/mD3cJAYONlTDOvq6 PWDwMv6Mkl3j5Est1CiR+U+M7/2tTAg9RcfqMW2Foo10GsvYMkU0KgGKlE5eAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvZ9t34Vyz10ls; Thu, 21 Nov 2024 23:26:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALNQQki021357; Thu, 21 Nov 2024 23:26:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNQQMb021354; Thu, 21 Nov 2024 23:26:26 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:26:26 GMT Message-Id: <202411212326.4ALNQQMb021354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: cce4df8b3cbc - releng/14.2 - bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: cce4df8b3cbcf4f58890048e608399471fc214f7 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cce4df8b3cbcf4f58890048e608399471fc214f7 commit cce4df8b3cbcf4f58890048e608399471fc214f7 Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 23:24:47 +0000 bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant Make sure an interface is back up before (re-)starting wpa_supplicant in wlanconfig not relying on wpa to UP the interface (though we fixed that). Sponsored by: The FreeBSD Foundation Reviewed by: emaste (in D47491) Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47491 (cherry picked from commit 5399052c63a7a3d2f54615d31bfd092ab887a600) (cherry picked from commit 7d0c12e1f907ddf9be6668449a966703c0f781d1) --- usr.sbin/bsdinstall/scripts/wlanconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 338e4f0a4109..728833f8d4a0 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -55,7 +55,8 @@ country_set() "$WLAN_IFACE" "$ifconfig_args" error_str="${error_str#ifconfig: }" # Restart wpa_supplicant(8) (should not fail). - [ "$iface_up" ] && f_eval_catch -d wlanconfig wpa_supplicant \ + [ "$iface_up" ] && ifconfig "$WLAN_IFACE" up && \ + f_eval_catch -d wlanconfig wpa_supplicant \ 'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \ "$WLAN_IFACE" "$BSDINSTALL_TMPETC" if [ "$error_str" ]; then From nobody Thu Nov 21 23:26:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvZ9w0bwrz5dl2w; Thu, 21 Nov 2024 23:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvZ9v4Qpzz4RQD; Thu, 21 Nov 2024 23:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rk4efzCRH/ebAqpX4y7E6/QpOULt/Js0GRdgaqTKu4E=; b=m7lp+oF8nKh7h1yBKlFfep1G4TZpwYpOuVAzN1CZfL6zYe8oNV6PkukACtlhIuPaPkat2E xHmc1EgRJ/CCjIOA/L6N1D+tY72Vurfv4vGjMWKaU71hfUEUA9tBiTW63nA6vizaaODEUq VsAuGl0SpRU9SRH5kaolB1U3LvFK9rgGl4ioktw0z6Jo04SyHlIl594iCysWKWv6QcJwlY Y6KPHDQq61NQnTWtfEWbnlUDGbConm88kq1RIVjrDt/7fE0o+ftYewRU3u6iPiXSWsksKj qFBsr2bNxAAOta7g80jrs1BFHAquN20MZS2/fsyRIziuEOYZ1/bA9b4dys0VRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rk4efzCRH/ebAqpX4y7E6/QpOULt/Js0GRdgaqTKu4E=; b=t7OKrGZ21q5/P62e9tbPI7TnUY/4TEFUlWFPjMF2+ipzMXyyswvjUy/4E0OfOv03vGAJT1 qa/73If6vLJfxcH4K59PsMRv5drylJvAtuaws/5TuVZavDHcdbBHVEESoSgOLttfPFPlkk 1RPVVS4sNH7rLLzjfGu8RyANPc90KPVpM2nBTVn4srqxVHunaa9xusi7I/aMvoZ+Q7s0FY e24MpMquZmUdwzwgwpY7nKhO4QrtISp9a/4h58QvFHhPzyU7hodCRM7wCLxAv50/B5xj0z yCe/34L/oRmzc7A2rAF0Q284g+ejeYa8c+yBx7CKHp4yAXygXdc/zsOggoGG3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732231587; a=rsa-sha256; cv=none; b=QzqKpX2C7pn5IgJeAGzm5U1BxVr/1XOtjaVVZLoUTLNOcYVv7pllBqXnHeESyojl09jtQR D2/xseOuQQAIqOVEFNNJD1/+8JeOo8GE3MqS+g/fYEou9hBaZh+5Iitn4dRvY3RLUsqOi9 EI0sCDB7K223uxWoGX8aIS0YxdUxypDByKFRJtWp5vPMkOc+qQXCpi5Krt8dK5iVG7umSW eNr9zpOh2StgtuWrVxMs5mLLbUZJoJLPLwjpHh6OOEm1kLVM9QXu1pYUXRGEb9AZT/v37L TFbr8vGpyI+Q0rhOgpl0hznn+gZYP0puiK3vEECORDzlgQeD98GgHrrsGr2kAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvZ9v3ggCz10lt; Thu, 21 Nov 2024 23:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALNQRF5021424; Thu, 21 Nov 2024 23:26:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNQR1e021421; Thu, 21 Nov 2024 23:26:27 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:26:27 GMT Message-Id: <202411212326.4ALNQR1e021421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c5b8ed13c9ef - releng/14.2 - release: install wireless firmware onto disc1 and dvd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: c5b8ed13c9ef52767b2c495b3f794ee238e183d7 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c5b8ed13c9ef52767b2c495b3f794ee238e183d7 commit c5b8ed13c9ef52767b2c495b3f794ee238e183d7 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 23:51:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 23:24:53 +0000 release: install wireless firmware onto disc1 and dvd Wireless driver firmware is no longer added to the src tree. In order to have wireless support in the installer for the new drivers we install the firmware packages onto disc1 (and memstick) and dvd if built on FreeBSD and NOPKG is not defined (to not break cross-builds from Linux or OSX and to allow people to opt-out). Sponsored by: The FreeBSD Foundation Submitted by: cperciva (the orig. commands and where to place them) Reviewed by: jrtc27 Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47407 (cherry picked from commit 7e2996c1f5b4e684cae40c2418b68061df9997d9) (cherry picked from commit b62012538e967b22736e8c2214b222f21146bddc) --- release/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/release/Makefile b/release/Makefile index 3d96880d1661..c5970b184b96 100644 --- a/release/Makefile +++ b/release/Makefile @@ -70,6 +70,17 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} .endfor .endif +.if ${.MAKE.OS} == "FreeBSD" +# For installing packages into the release media. +.if defined(NO_ROOT) +PKG_ENV+= INSTALL_AS_USER=yes +PKG_ARGS+= -o METALOG=METALOG +.endif +PKG_ENV+= ASSUME_ALWAYS_YES=yes +PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos +PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install +.endif + .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) VOLUME_LABEL= FreeBSD_Install .endif @@ -186,6 +197,10 @@ disc1: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf @@ -256,6 +271,10 @@ dvd: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf From nobody Thu Nov 21 23:26:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvZ9w6h58z5dklk; Thu, 21 Nov 2024 23:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvZ9w5zLbz4RGB; Thu, 21 Nov 2024 23:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NvqeWU4eSLJVDrV8WREt4XJWdxjqmP7jIqhk3k45dDk=; b=GPS62GaHpEG/MvYVe0TAlSVaN3g1v+uwlFwYuzlLa+dg1zfAuZ9gTtF27gtsT8n/WDSDP2 M96MCXJnusegMb0ae+id9IydJRTnctNJ9Z82XYFsIS2jUxvIilUdDQ/pFF84842StHusU6 ku4K3t3MK164H4KrPOK8s+8ZoXiGgQcr54o5N9NCzpOx+zHSIoiZzR8fJ5jw4m+RpkfZ7R YA4V6RUu8Plwb5rsnrX0hhLTXiInDXdnF26pjY8Be49PNE46J+0xWUSiRe2M/S6zQ1+T7B SBCgF8vacJWCYMKY9gFh6er3IDYzw4vJhziBvOVjqij0YL7RNruLtJFgNZtkDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NvqeWU4eSLJVDrV8WREt4XJWdxjqmP7jIqhk3k45dDk=; b=Vls+MQbXMu4gnQLOKnnXkB2gw5/yR3nvBX2vI9UXT2Fl2j5cHEvKFGvl2rVnbbJ8bQMYCb W8rg5sKuuxvhsK+NYyGSoB2b4iXeFYvL/tXE+qD4enjOMagwBPbi+gDjxI/EFKuR6yZOBA o8CUQPs0dWiwsgF5A20aSTWe50BW69btk2whxJfjt76hJkUGhQaIxUtyrKNGoXOiU8bag7 ahbg1rihoziyaOFKxzaZqvusaVwtKyFoJAzUzSzkTCMUKpqAFvriXPjOuZNBtqtLchZ1py Il+oUj+vicN1tZkD4f162vKz0roJgvo2vvieEZJY6aVT8CBYN0n4Ol5VVFteaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732231588; a=rsa-sha256; cv=none; b=f9j2Q8Xo8tJLmXA9FNmdk25+42zsoCnL5diMRnJGC0jJj2J9u5hzrrlh9sD0FOpJQoahIX VzXTsub+rLiiR11jP24jC19Iu4+4ctD+6GDOeSsnbzJ2kZVMMgf70ILSA9gSWx+JD/1IX8 LAo3WKgNzsUvo5XVbOlvT0b8+x+8R59YvrpsbYgPzFc67ePBwmigBdFk/haa02ubKknxkQ uwjgTEhwtsRKFhapsIYadtjLfRCTeTTNpRBud7JSA8eEffts6HtYFH43Nb9i4eCxgch4M8 CaTHqEa/3wpqQDd8Ns4NBbprdOaQyin2/j8UC9qEqfkE0//ly0YG940vsnVMrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvZ9w4qmMz10bD; Thu, 21 Nov 2024 23:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALNQSot021475; Thu, 21 Nov 2024 23:26:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNQS5v021472; Thu, 21 Nov 2024 23:26:28 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:26:28 GMT Message-Id: <202411212326.4ALNQS5v021472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 42d33f929925 - releng/14.2 - release: Don't break if firmware install fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 42d33f92992591cd86f66cc3fbc78e30b7f943fa Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=42d33f92992591cd86f66cc3fbc78e30b7f943fa commit 42d33f92992591cd86f66cc3fbc78e30b7f943fa Author: Colin Percival AuthorDate: 2024-11-21 06:10:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 23:24:58 +0000 release: Don't break if firmware install fails On some platforms (e.g. powerpc) we don't have packages, so we can't install them onto the ISOs. Proceed with building the images anyway. Reported by: Weekly snapshot builds Fixes: 7e2996c1f5b4 ("release: install wireless firmware onto disc1 and dvd") Approved by: re (cperciva) (cherry picked from commit e8263ace39c8ecf11233c0a10d0b1839e6813046) (cherry picked from commit 9431091ee021eca9eb4c768b566e623ba9333b41) --- release/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile b/release/Makefile index c5970b184b96..152c2edfcf06 100644 --- a/release/Makefile +++ b/release/Makefile @@ -199,7 +199,7 @@ disc1: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf @@ -273,7 +273,7 @@ dvd: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf From nobody Thu Nov 21 23:43:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvZY56fzHz5dm48; Thu, 21 Nov 2024 23:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvZY567G0z4Vjg; Thu, 21 Nov 2024 23:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732232585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=suJjTY7bQ9PU0R/F5+obU1FuJsPXVZOfnFktCtKHez8=; b=I6VVV0PIV/ZSXPj4+YawVesqTDQihHEW8twRVsSznEj+fWCBZdMEmGLwqLYAa489hV2iZS PBgllKdhzZ9sdQ3WNY4KGwKQyq9AaaaEuQbp/kJvt5OxuiZ0YZMmOGexkJrCbcmGcdt/H3 27lyzI47eRjIcugelnz6jfk261DG/tS7G3IoeXI+XCQzIZpxbT2trr1DdSw5NHO0ZWXd/i +wT2qokuKrbBMWEoio8TwtPSjSBMywuBSdAxXWYa/god+EQysBYntchdhMb9Jy84GeISEh ugstRwBXPlkKfC3WtAFP2K/3FGLliU5HhV3y6j9E5lVOSUMZGraLzV7IAcH62w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732232585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=suJjTY7bQ9PU0R/F5+obU1FuJsPXVZOfnFktCtKHez8=; b=jrMkZfPWogi3ZLtwrX6pUT/Qe5LU3cb0L94+SAKBc9jNWrxVHGUY/T3SlogUbYswCLoUgh kPobgMWMHkHFW1jowlDMRXvbFYsBxMdjXN5NMBzR25TON1vm9UKI6V0AMj4IVHDyaycGvL 6F83umc6heWSO1WQt36GxxQ7GGQaj5iH2QaXgwp2JQSN0O1MqM0vW2BcJzQht6zI9fKTe0 ImnTfMb9NtRYG239hiDhs6WzAVbFot67XcGCtjNYKfHJwszqmH68rzMnv5isVUmN7Wegky QUtZRMMmKcBCIKUivYGFAArApnG+cJIHbqdPBBUFikIjyJhV9WghQX7QpVMc8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732232585; a=rsa-sha256; cv=none; b=x50a6pdMbevLWFM3iTmz/ke3k1DZV0hxOmQFkhSPuXyHBSPbT7a9mCxCGsT9YrOhzTGUdM dOy13f9mnbmH+I4Ebr8fsuwDusmYJDUUGizEvYaUgCym0DvkLgUrbLK4FwLhBSwwVospj9 EmrSpxpjLO1hdvXfpKQ1vR9yQN/yqxxoOeu2avCC4VSJKW9Q/DA6FVvebNEIQpZ+QFv+wE 2+udVwcI1eeQbf9W82QHkILsycS9vzJQMQQDGFwVzR1yo8qpyNXhD+cz8He+xzPSraLSWf +y69T5Ekp8wDgn2J7TVAm5pxMlozRQURAQHCPw2rqb/E9PY1lIiN/+ywvQ6cMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvZY55cm9z11Db; Thu, 21 Nov 2024 23:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALNh5Tq057110; Thu, 21 Nov 2024 23:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNh5LL057107; Thu, 21 Nov 2024 23:43:05 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:43:05 GMT Message-Id: <202411212343.4ALNh5LL057107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: af96dc44e1cf - releng/14.2 - release: Add missing dependencies in the minimal OCI image List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: af96dc44e1cfa3d072beef070468509d68d91809 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=af96dc44e1cfa3d072beef070468509d68d91809 commit af96dc44e1cfa3d072beef070468509d68d91809 Author: Doug Rabson AuthorDate: 2024-11-18 10:05:29 +0000 Commit: Colin Percival CommitDate: 2024-11-21 23:42:53 +0000 release: Add missing dependencies in the minimal OCI image The pkg-bootstrap binary depends on fetch. Approved by: re Reviewed by: cperciva, emaste, bapt Differential Revision: https://reviews.freebsd.org/D47661 MFC after: 1 day (cherry picked from commit ca1f1d2c9419a5d66929ca6880b69901254645a6) (cherry picked from commit 4a768794b836f781ecf798949b60e5c5d305f136) --- release/tools/oci-image-minimal.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/tools/oci-image-minimal.conf b/release/tools/oci-image-minimal.conf index 122da1905436..82e2ce6a1bd3 100644 --- a/release/tools/oci-image-minimal.conf +++ b/release/tools/oci-image-minimal.conf @@ -12,7 +12,10 @@ oci_image_build() { FreeBSD-runtime \ FreeBSD-certctl \ FreeBSD-kerberos-lib \ + FreeBSD-libarchive \ FreeBSD-libexecinfo \ + FreeBSD-libucl \ + FreeBSD-fetch \ FreeBSD-rc \ FreeBSD-pkg-bootstrap \ FreeBSD-mtree From nobody Fri Nov 22 00:00:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvZxR1s95z5dmnS; Fri, 22 Nov 2024 00:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvZxR1CXRz4X07; Fri, 22 Nov 2024 00:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732233643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9GmE3k3mLCFJuJn4X5TykovmHn5Z3RSy8RcF7JHqICI=; b=mflEJ/Y0odTFoR88sIDT+8NVrInUaRtLbjXUVrAAnyfQmPm1QqtLkhtYARHcxGoS4D8odF 3YWXPZrbXWoSQvv6mdX7HSlgHQlJ+hBLohXhOlsgi/FYwx3juu1oBx8S1c+cpfRAaZ7ZwP RYYigvCIuMsxdVwBQ0iRaxq1hULNgClWJZBHxNwx84T1dC8PSQtTr7I7Zfad+3VXhe8FG0 BfqSd17VMrx/bBIdKfeORFFdmPSCW+vMXt86BOzsedvhW9RcFULhQ/OTlLpxLYOpnr+Lni b5KH1IhioUdM/WV00YJTrU+PbQEzrcptOGKA8wbBaDuoRL/IzYj/GfkbYHh+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732233643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9GmE3k3mLCFJuJn4X5TykovmHn5Z3RSy8RcF7JHqICI=; b=I8y+0K0v2fVTBG0iEMUhM8aXvdZatvibziGlFUOMZYwivAnfA6gsSzcvmr0ILPvdwlJmOC DPGAdYynO4BkPBNM8uCGHeMdbM8WnK075doUSnFBRYoTPv2P7YArQb1K9kHEahT6V8qTks kpcNxtu0wTLJyCN1Zyc8hhXBa7+suoPdmzRYs+d6rBKyn/HR3eYiE6IfbhqUOATtpZO5dC ExOa56H7Z3EDEX16+8nQG/sZnMSpT2wkcNnWuKLR9LNn/mf/BvNJDqzRfGYEfXBi8cQ21b CYumPv6eNJRD0wJ48eQnLLzaqwN3499jmM0xz4+yHNJKOlJmS0jo5iFHPZhOnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732233643; a=rsa-sha256; cv=none; b=rQ9DY0P4TQCdYXxPHzifFRfqaCIzFJ5d+tdTF5JBUvCJfrZbVH0oq+f2TNDABcBAfbEtGG MqxWg6oMWn3CaB8pJ338V9qpVGB6AH4NVEJhKi4q4WoEb2DAprU+mT0BqBxAgLLqOLgwz+ fD2sB1LjSe6RMXxYZQuyM0jX9L//nT23zaXDTYQlrenLqL8jJH+pBijL87x+I2reHFuvy2 HTPdkdv0tS3w/kDbnYtdH0jbfkoj61xvPQbvzs3NKzMTZxrN0KgnsEw6oS3wAhKn7cef3q j/DiMQM8S8sveqs7oSgJBXTxde9TaKNUzITVOsxaEI+ZCaSZFAJKAT+7p/EzvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvZxR0pTDz11Mj; Fri, 22 Nov 2024 00:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM00hni088180; Fri, 22 Nov 2024 00:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM00hHf088177; Fri, 22 Nov 2024 00:00:43 GMT (envelope-from git) Date: Fri, 22 Nov 2024 00:00:43 GMT Message-Id: <202411220000.4AM00hHf088177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 5395ddd7aa13 - releng/14.2 - 14.2: Update to RC1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 5395ddd7aa130a8d8063f6eccf893937cc8baf0f Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=5395ddd7aa130a8d8063f6eccf893937cc8baf0f commit 5395ddd7aa130a8d8063f6eccf893937cc8baf0f Author: Colin Percival AuthorDate: 2024-11-22 00:00:00 +0000 Commit: Colin Percival CommitDate: 2024-11-21 23:48:17 +0000 14.2: Update to RC1 Approved by: re (implicit) Sponsored by: Amazon --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 3da92b81939d..af5875c5c0b3 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.2" -BRANCH="BETA3" +BRANCH="RC1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Nov 22 00:30:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvbbS751yz5dnpH; Fri, 22 Nov 2024 00:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvbbS6Rn1z4Ykv; Fri, 22 Nov 2024 00:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732235412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uf0JGUA6h4kju5Y2SA3IXdy6ZnHUv3na6mYVteD4dJ0=; b=S4k5X8R3AIPAeO+OfrVoAHREnsyHLHx1+7nCwpIfG+zg2heUEC7icvGlu1JONiO6ub6sB+ IJyEIOx7pII618CskE5eKCa8/u6+SzLQL1B4LabN9lk2PFEltXcxkmk1Rer71oNF/szGg7 Wrh9rdGBZtAO+EDAksnl7qzUmbehdDa8eNzo54kQS4buWGPABiwj8ElxB8aM5yXpG8XiVI HivMQSqj/USyDB1w46sdcz+8DjPu6koial83x/x65lq+rYMCXQ0818jAu1wrWNaZVsE/Pw Q+Z6qe3DWk5+ItcR4kEOSIzHFw2zriLvlu7mZ8vF23vfvusTFvGsk74OR8fYlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732235412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uf0JGUA6h4kju5Y2SA3IXdy6ZnHUv3na6mYVteD4dJ0=; b=c2L1KuAMFRxdd7t9K5SZ1dvxoZX8ss+25xTT+R/s4XAzFzomy+ISVdaD6YmNv903fDhUTs X9/g9kViKaYdh0q7WQ2yI5DGZ756+Z0imasvKQlYzPE0q0hO6vrvf6TrL1JqfugNigb3SI l3efx0y+70JoSv65YdNg0QoRS5c8Vm/AjWqGOA9Kc2V807zTOUi334nhXD+fXL+7EOzkM9 UcYy8FCimSsV7CDKy+/xnTsPJbF8BHCqD10mIs9KVE8OwbSkH0mnbInPelpLfxZzaT8vjz XuNE0fbYlEKBrzjHmHENL9jXuoJ1Z5IgpNv+j8k/hSb7hFKbeSF3VuKJWsSU8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732235412; a=rsa-sha256; cv=none; b=jzhivR0tvJ2TPhOFbFdx4cAx6bZgdsqadDkukw/8TDHWVR4f3s8zfzA6+U1QjsFMX79QBT TckFlJhLdTqa4zhqT/42UPBXYjgpvsWiJaKJCJcQ4N1Rg/bhs2x6rhlahTYkBCNjBuy2Hl glgmwsLJJ2chdih+3yEFwmMNwBwSsEzRaCEIjUAvdtwMzUDeiuMPcNszsdRrVYWhDfMGou Q3AylX02RuPqS+PxrBlTq3zfP2+1aGGROJV6/AwOcrh1s6nASa1VQ4CfE5czQRP9WWRY82 j4jIRYZxQU60ohdVzX+S7EOLA8y6cI40LrjchbcdLY4bgt29mDiBu4E4j7aW1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvbbS63G0z12CF; Fri, 22 Nov 2024 00:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM0UCMG039598; Fri, 22 Nov 2024 00:30:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM0UCP5039586; Fri, 22 Nov 2024 00:30:12 GMT (envelope-from git) Date: Fri, 22 Nov 2024 00:30:12 GMT Message-Id: <202411220030.4AM0UCP5039586@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: 56043cbfddfd - main - gicv3: Use the correct 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 56043cbfddfd072988fafc88f38a1f3de7707f86 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=56043cbfddfd072988fafc88f38a1f3de7707f86 commit 56043cbfddfd072988fafc88f38a1f3de7707f86 Author: Warner Losh AuthorDate: 2024-11-22 00:04:00 +0000 Commit: Warner Losh CommitDate: 2024-11-22 00:04:00 +0000 gicv3: Use the correct mask Mask off the bits we'll be setting, rather than retaining only those bits. Sponsored by: Netflix --- sys/arm64/arm64/gicv3_its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 5ecd9b8c0e94..4b554f2dc30a 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -444,7 +444,7 @@ gicv3_its_table_page_size(struct gicv3_its_softc *sc, int table) reg = gic_its_read_8(sc, GITS_BASER(table)); while (1) { - reg &= GITS_BASER_PSZ_MASK; + reg &= ~GITS_BASER_PSZ_MASK; switch (page_size) { case PAGE_SIZE_4K: /* 4KB */ reg |= GITS_BASER_PSZ_4K << GITS_BASER_PSZ_SHIFT; From nobody Fri Nov 22 04:53:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjQq32TVz5dLw0; Fri, 22 Nov 2024 04:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjQq054Kz4t0m; Fri, 22 Nov 2024 04:53:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TvXX7T5Goir+Zl1TAfjecdXSfbpouajI1FyFwcUb6u0=; b=rGqpwFbdD+P7GphD0lid62ZSu1wdTunDkaCD2+FQIGqBfxx/7j0qhL9BhF+9Ss3WxXcJjK d89uV2bgvmGXqSyprliyYKF2ruj3YSLJMMiGPnx8cJA65p0LtTQ5wN80Qbcuvv2ZCKl67s IT659AfW4k4C7Kca9ErClj87QHrC+1lIMb+10Z9Mqp70xU+eSiMAl1ly64itlDstxgNs5V lmMgcnL+c+5vQM43tKvJjCT2aLDXK/eZfHQCWj2YpCcL86qbyDizsFNbc7zgjrckaVsQL6 VdguGKUBjfk/4mnVhskHYeJu2putW493kT0Jl2Z3eFRynKxM4tqxujFhrqN9Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TvXX7T5Goir+Zl1TAfjecdXSfbpouajI1FyFwcUb6u0=; b=JbH6JX5i1XTcnIliec4XrCEpp5wCkomwpcYEpLctA3lNpWZ8Gj/UcMyGHpQGHgr/4CuhbG F7baHmKqSnaYj3mK9K7cYgNnmy+T7xbQhfVspt+HBEK/mVxLUvpPEalv+WDagL1CfmFk8L 6itMTGQi8TPYKrFhjcjSj/DBw6SGlp/6t8KYQ9NDeI0GvBgnRy2FlMqsa+iGiDTfDZk3Xt UBmkMAM32Dm0yrcfn/wRZmjjlzBGqarcX5b02tpPOb9YVQU0l1T2u59EziZopLS75X5WcY QHEjmZi+4cLjdnu+4ho2DuclT/Vh/qvSAtk+T67xhdSltw+5PuFvpZbW9u4ZZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251187; a=rsa-sha256; cv=none; b=RXc3ilYULp7TQ+LefUC1oUupqcDAmCkQjb/InCJH7FBLpTgyRbAK6+iouH5EIsHJiGgizK bZkj8vYepZcGq5IjM6LvOyqzShrnH71aFVN5jgDBo1yRULwwUWWS+TgOr1w07jm1ci9K7n t5Xvnovxpj81xSaTkJX3J1ELnZ7nWVZT35BtBH1UrcOQ4erSr0H6JugOmj/6BvTnJ8mLZZ 0GNVT6mLCsVm3x7R3cKq/EHwrpGdEaQ9B6SKfA6GJpyC17Sd0SUUxDmpYpUps/hOKECGR3 voogNei+bJvkJ4bSGUd7Kslbi7F3E7Mc1cg2BoE/yQzVJHgr4tDsxQl5R8eMzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjQp6pTTz19HY; Fri, 22 Nov 2024 04:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4r6ag034373; Fri, 22 Nov 2024 04:53:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4r6ft034370; Fri, 22 Nov 2024 04:53:06 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:06 GMT Message-Id: <202411220453.4AM4r6ft034370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 3f309e953152 - stable/14 - sed: fix commandline-given expression when -e is not used List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f309e9531529aaee3b3da9aaff5582b565c75ac Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=3f309e9531529aaee3b3da9aaff5582b565c75ac commit 3f309e9531529aaee3b3da9aaff5582b565c75ac Author: Martin Cracauer AuthorDate: 2024-11-07 03:40:02 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:51:53 +0000 sed: fix commandline-given expression when -e is not used Make explicit sed commands (first on commandline) behave the same as those given with -e. Without this patch the following two commands behave differently, the second one being wrong: echo ab | sed -e $'1 i\\\n--' echo ab | sed $'1 i\\\n--' Reviewed by: 0mp, des, kevans Sponsored by: Klara, Inc. (cherry picked from commit 0552fdc62caf034397ffd5b07dfbad853aef5aa8) --- usr.bin/sed/main.c | 10 +++++----- usr.bin/sed/tests/sed2_test.sh | 13 +++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index efa28b5e7239..1632b823cc69 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -148,10 +148,8 @@ main(int argc, char *argv[]) break; case 'e': eflag = 1; - if ((temp_arg = malloc(strlen(optarg) + 2)) == NULL) - err(1, "malloc"); - strcpy(temp_arg, optarg); - strcat(temp_arg, "\n"); + if (asprintf(&temp_arg, "%s\n", optarg) == -1) + err(1, "asprintf"); add_compunit(CU_STRING, temp_arg); break; case 'f': @@ -184,7 +182,9 @@ main(int argc, char *argv[]) /* First usage case; script is the first arg */ if (!eflag && !fflag && *argv) { - add_compunit(CU_STRING, *argv); + if (asprintf(&temp_arg, "%s\n", *argv) == -1) + err(1, "asprintf"); + add_compunit(CU_STRING, temp_arg); argv++; } diff --git a/usr.bin/sed/tests/sed2_test.sh b/usr.bin/sed/tests/sed2_test.sh index a7408b2560a7..f50619612561 100755 --- a/usr.bin/sed/tests/sed2_test.sh +++ b/usr.bin/sed/tests/sed2_test.sh @@ -147,6 +147,18 @@ bracket_y_body() echo 'bra[ke]' | sed 'y[\[][ct[' } +atf_test_case minus_e +minus_e_head() +{ + atf_set "descr" "Verify that -e and implicit arg do the same thing" +} +minus_e_body() +{ + printf "ab\n" > a + atf_check -o 'inline:--\nab\n' sed -e $'1 i\\\n--' a + atf_check -o 'inline:--\nab\n' sed $'1 i\\\n--' a +} + atf_init_test_cases() { atf_add_test_case inplace_command_q @@ -156,4 +168,5 @@ atf_init_test_cases() atf_add_test_case commands_on_stdin atf_add_test_case hex_subst atf_add_test_case bracket_y + atf_add_test_case minus_e } From nobody Fri Nov 22 04:53:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjQr59xzz5dLw1; Fri, 22 Nov 2024 04:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjQr1dNRz4tDV; Fri, 22 Nov 2024 04:53:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7JVfIuWBQTVSf97gp4nM3ewtcKww3XB6zzz74d79PKk=; b=WkRut8XB3NaCgMCXLruPt2ZQinrMYhVnpxKO1WIqZHs2fFkO67PMa9aly+ZU5ZGmN/JpeU VLHfbkJ6mxT5QWaO5zaAONYY3zcNkSj92qA1FWzvahFODek/6SLZYELTuYrzgR9ezCbyOF lhbGMQT5thuHSq/oUkMnwcT2nMapxfwKVeDorIC7HafWq3yisCdOITjoa5R1s8HThxy88K 7rFPGwy6IboSZfevBe+kCSOMuAHjPsYphjIuSnUY76ZgFMUD63BHIEHeRhKorz0r3DXBFT 3TiY1mxMVikBQkjTh3PHIPpBZ9vbaNkOXmi0gfcT5YBLj9pktZ89Nxs0ggy6gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7JVfIuWBQTVSf97gp4nM3ewtcKww3XB6zzz74d79PKk=; b=KBZOeLloPp0QlMt6EKzryGVG7maoo20loEj0urjwBmJDTtO830REqw8xm8o0OEhTYedaKI 4Kr/dqVUk7zoNwX4aZmXBt5/G819LTpzOq7CuVMiEpNcG6o0oQZ96qiBVRS01E8vMU1RhN UlTa17FDbCHcDMME3X9iQITB7VFlXaar4tzIcJbxwGC9ExDWDyVqV6bwW5IUw11fT56VDT 0Bc5jFxCtlzgmA5tsrrwya4VnHT5/4ZQBZRWs13l9hxqFPSzK6lMawStdtgyguq54QPCgT 6TwZP82L3Wxf3wR/L9XAd25kfcDsq3BuYR7A2r31NVQWHdEgiy9eTCSgR8mzbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251188; a=rsa-sha256; cv=none; b=l4IdMSe6J8p3xWp14g/4MHM2Ln4V5T9DdKn9weL0WNd1WBO7UrNOQgKUZb0jdrQkTkEOEf F15rNOEHiI2wMyByeXuwlgPjaA02KtTasIZuEdyOynVXVR8wIISRlIGVIkQpfXYOjuhTtJ 1si63HGKf3a8MGLGf+WCcebiBERpjidIkZLnUzFP7OW8vbWW4uAxf2YxH8eQb3VddzJo+2 nzuvtxxse3K/MQa0VUNFJk1/4y76Ydeelv2bbH2yYg9Meqs5qLGfIia7MLK5nH47zzkts/ metPZddj+8waPrYV2QdRjhwoV0mPsLb0l0y/qcfNCivt/h0YRx83zdqvb1PxFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjQr1FHcz18pD; Fri, 22 Nov 2024 04:53:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4r8gv034426; Fri, 22 Nov 2024 04:53:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4r7i9034423; Fri, 22 Nov 2024 04:53:07 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:07 GMT Message-Id: <202411220453.4AM4r7i9034423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 0350ebae7eea - stable/14 - localedata: update widths.txt after recent Hangul exceptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0350ebae7eea7ac5333bf112d3c040313868135f Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0350ebae7eea7ac5333bf112d3c040313868135f commit 0350ebae7eea7ac5333bf112d3c040313868135f Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:51:59 +0000 localedata: update widths.txt after recent Hangul exceptions Sponsored by: Klara, Inc. (cherry picked from commit 0f30aed1056a2e12ca40095debff6735642c4ff4) --- tools/tools/locale/etc/final-maps/widths.txt | 160 +++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/tools/tools/locale/etc/final-maps/widths.txt b/tools/tools/locale/etc/final-maps/widths.txt index d8f0ab1888f0..4f91961334a1 100644 --- a/tools/tools/locale/etc/final-maps/widths.txt +++ b/tools/tools/locale/etc/final-maps/widths.txt @@ -859,6 +859,166 @@ WIDTH 2 2 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 From nobody Fri Nov 22 04:53:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjQs4wnhz5dLkG; Fri, 22 Nov 2024 04:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjQs2Tr7z4smG; Fri, 22 Nov 2024 04:53:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L7u3C3rSRq1rjy9RWKgquD6Bqu0nejhfHvLpnVoWDO4=; b=uNXUGbXAEff+RZqQ7jhR1XHhWdGfj3OuJONnZLOYY3jTlXxpmUGerApAqwk8cwULxBc2u/ 7hudbU3COYjSFaossd4oZ6OsjdmuQIrn0KGfA4fqtX9A9ADqsd7w/eeO4XIBIfTjmcWr2I 9QFdQGhWncKH+E0OIjPtKndGTK7HokWyhJN1PmNNLSwFrhuyh4AsMhcw9uBeUunWPx6ime OsfjhU3v/c3C+VYJVkLEx89xPa+eXetdaGYcKBP4H2U6sqMdCNLbUtm4AHo/cUMGSIQXGe 95LHIF92fbSJAN9pVLzlGJFcovT5DU+Vhil04giyErxsm+fWwQ79/cedxt0zbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L7u3C3rSRq1rjy9RWKgquD6Bqu0nejhfHvLpnVoWDO4=; b=czAggFGue783wxYdYVa7JbYF20vO2GLJmwv8BAre9PMx7VP9Qi1tTwB9zqgSTyzJZdAzE4 XNr8JeNgEl721U8VBIeDbVLVTlTnYjpRK/HMQ/VPsJPdCPrgpXdmKqUui2P5rnxPu1tT/3 nRhIaob5YsDyjS7eXGfMBk1Sl6u4+KQrubaLqyMUQVl0TwVbsTbPH3HQgxpiQnLoTFDfbd cFszhjTBVhAegpKhN+EQTxrN4gxI+V0p9Loyfvsp+Ytes0xQrVe8cmDgZFbwTOfPo3yQH+ emWa2iNIUfB9nb/t3NMIhPN9cG+VnsgZ9ocWuMsHCBtSRg8TK9zmMGRRtARZ2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251189; a=rsa-sha256; cv=none; b=MInUYxhleRXrIVZ9P3yOmwFvZz7HdQk+8IwvgfkVfDr3zm8CUrRPQt3s/SzEuStPmwfcJZ Z2VRsMswx7CqOgJM8+1sIq3ks+uRqSTAgKxt87bxgVkkDzquI0RiONSiiHd1ORGtdM50DE ys7qBdePxaxcX+PRgwGhrQXHiZP86waypoXRvQ4sGA1KBduWSgo4q+CHGvJ0OZqEmEz75c bEgJlwOLGkkz4dCCKHjpq1QFsk4nlERKn1lVIy1hOhl3UwMndZ5TPm7Hza3eCS/4QK97CV TOcdEfZ7TzNQG38cJA1gq3Qo+qDdwm9ZuFhTIebMe22Og061axRX9VdXFdHc/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 4XvjQs256tz19HZ; Fri, 22 Nov 2024 04:53:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4r9A2034474; Fri, 22 Nov 2024 04:53:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4r9t3034471; Fri, 22 Nov 2024 04:53:09 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:09 GMT Message-Id: <202411220453.4AM4r9t3034471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 8b30c13fd56d - stable/14 - localedata: add some exceptions to utf8proc widths List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b30c13fd56decc3a416e217349de3ecc95fe3db Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8b30c13fd56decc3a416e217349de3ecc95fe3db commit 8b30c13fd56decc3a416e217349de3ecc95fe3db Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:52:02 +0000 localedata: add some exceptions to utf8proc widths Hangul Jamo medial vowels and final consonants are reportedly combining characters that won't take up any columns on their own and should be reported as zero-width, so add an exception for these as well to reflect how they work in practice. This conforms to how other implementations (e.g., glibc) treat these characters. Reviewed by: bapt (earlier version), jkim Sponsored by: Klara, Inc. (cherry picked from commit 160c36eae41afa3c4944ed44778c2b48db8fbb77) --- tools/tools/locale/tools/getwidths.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/tools/locale/tools/getwidths.c b/tools/tools/locale/tools/getwidths.c index 2790b8031912..63c62791253f 100644 --- a/tools/tools/locale/tools/getwidths.c +++ b/tools/tools/locale/tools/getwidths.c @@ -28,6 +28,21 @@ #include +static int +width_of(int32_t wc) +{ + + /* + * Hangul Jamo medial vowels and final consonants are more of + * a combining character, and should be considered zero-width. + */ + if (wc >= 0x1160 && wc <= 0x11ff) + return (0); + + /* No override by default, trust utf8proc's width. */ + return (utf8proc_charwidth(wc)); +} + int main(void) { @@ -43,9 +58,10 @@ main(void) wcc = utf8proc_category(wc); if (wcc == UTF8PROC_CATEGORY_CC) continue; - wcw = utf8proc_charwidth(wc); + wcw = width_of(wc); if (wcw == 1) continue; + printf("%04X %d\n", wc, wcw); } From nobody Fri Nov 22 04:53:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjQt6g5Yz5dLw4; Fri, 22 Nov 2024 04:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjQt3VT4z4srl; Fri, 22 Nov 2024 04:53:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djmktuH/CALvw85IbUBZUURkFsTN4yA/IQYi+NCKgbo=; b=hLF2bTVN1kaPERQ5gWX17Yr9crj09wNUiACMcFHIiH0ertI2m+y6lkVgmqb7ovUXbQRZQR SKWavWXdAEAKULiKJuYYMlopqie1e2xSCF+qErRaj5ceS29ASSS+SP6dlbQF9kKJWhvTb0 n1o04/idS3+0w4qE3asLPIu3t5/HqzrQ06jt2M7agvnpEiupxty029XPuu8q1nwj1fagd5 CxLwrGOFdLKVvfmYzPKAakxfyzRiI6uvs2qCJpewHigMQWdf+9xow59/pbqo3FC0RSNBGI uPw/HCxtEuJh3HHPzvTTUqhkYJa01wP38s8Dv3YTRwziq0IZs1hr4OPtt0RNnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djmktuH/CALvw85IbUBZUURkFsTN4yA/IQYi+NCKgbo=; b=PSIhSRIGAIkwijDxMwTBjcs3ewL12/wKZSy7oey+K++9S2ubIqoc+5mZEOK6hKZoJ/gclj r14lOWFncy0AUeoRb3yD4AuOgWQ2a++ah73azONjtgOghvYRJRKHiV8dpXN5WxHc5GWIYq DWa0akhJoBkGbtSH5PZdVUmNrEQ5pjGwBXFVulVJ8QAf8bh6MVcdI8XYkM3z7ejSraE0AR R8yk2AtNwpr5BEJ1PJC8IckOH3ecanGPtmd49w7CoSLUGrltPZZ6c7gVTx6/vpEWT2QHaF e2j54XNC4UGQ1WboKSKh2tlxaUryIdvuhene/PlTqd0QH6c9AdfrIgyEJG+qfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251190; a=rsa-sha256; cv=none; b=Vmq1I3ji2UWD3E0FxBVvYTzZFXfTbNO0Xru+cCl2PMrvsLnFpeOTLbOfiH3uQjMw7OM192 kDRQpIwxDG3ow7BtoWEaM5jeCTsS0GNxRMv3QAOZhccyKETZ/Wx2Az1+zfNBpjeTlA8a87 kGY0sd91ZbZyeQLf95LvipvHSRzx12GJ7xZutMhX1EdKb14JbSDnt8zIgjoXHmpl0nLnJQ PVxChII91Gcuur30AIwkTMae7DJ11qtgqcPmFEj0+Ivy7KbhyUVQ0O/mT93mAhP61z0oFL zddVCjNqriqMjNeOJbeBaxZTAMWXzvanXQkiKUVnZBohXESUDw1NK6J5wNR9yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjQt35v3z19T5; Fri, 22 Nov 2024 04:53:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4rAoL034546; Fri, 22 Nov 2024 04:53:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rARm034543; Fri, 22 Nov 2024 04:53:10 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:10 GMT Message-Id: <202411220453.4AM4rARm034543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 8ded8a211de0 - stable/14 - timedef: remove redundancy in Catalan date_fmt definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8ded8a211de050b241b0c5bab6e5f319c4a4b03e Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8ded8a211de050b241b0c5bab6e5f319c4a4b03e commit 8ded8a211de050b241b0c5bab6e5f319c4a4b03e Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:52:06 +0000 timedef: remove redundancy in Catalan date_fmt definitions This is already factored into the month names, resulting in an awkward construction: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de de novembre de 2024, 21:21:18 CST This would now render as: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de novembre de 2024, 21:22:41 CST Reviewed by: bapt, royger Sponsored by: Klara, Inc. (cherry picked from commit a4b7367eb027a99b9eb48bf18951049434a9e189) --- share/timedef/ca_IT.ISO8859-15.src | 2 +- share/timedef/ca_IT.UTF-8.src | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/timedef/ca_IT.ISO8859-15.src b/share/timedef/ca_IT.ISO8859-15.src index 669fbab13074..7c625aad19b5 100644 --- a/share/timedef/ca_IT.ISO8859-15.src +++ b/share/timedef/ca_IT.ISO8859-15.src @@ -59,7 +59,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener diff --git a/share/timedef/ca_IT.UTF-8.src b/share/timedef/ca_IT.UTF-8.src index 5dfd3841d9af..a85dd8c4b942 100644 --- a/share/timedef/ca_IT.UTF-8.src +++ b/share/timedef/ca_IT.UTF-8.src @@ -63,7 +63,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener From nobody Fri Nov 22 04:53:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjQw0vbjz5dLLS; Fri, 22 Nov 2024 04:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjQv4kFVz4t0s; Fri, 22 Nov 2024 04:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2A1gND203Z+NtvOwRD7Bj5J6mmcBdyVteFhBk9gf8w=; b=n4moCLBM2L07ceZm/Wl5HFO+HkRyQ02KoMvQNU3vX/+prWvr1qxIbl3pEnpuN2f8zmCCx0 eLh+zneStjgLTDTVy7IgZDO2klqhb9thiGelkozA5cnU5u++avq3fgR2CAfQjpXOu+QIh9 4DEKa0DjlBpw7/oqdHEQzGI2DR6DRwTwc2q3GmiveBCPp2WzGEzq5/+xPZoij5E7X+KXbv b3wfe/MBjl62B9TG1XeYigB5dJJ+lCSTX2ZUQi6qVA6mxkRXk9J7XwwUxMVvPEnlHPwO7P Rz27X0kjMXjVomU71wpFpdVs4HtBOoNSz24zgZ//9fGFG1zG9fT6AodCG4/8AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2A1gND203Z+NtvOwRD7Bj5J6mmcBdyVteFhBk9gf8w=; b=duVEmz/utuMm3ajs/bfpy9hhKJdWEMMuS1WuF4NbaC7ZSPrHVydQ92wX4Eg2VyWShgfOIq sVLSU9deVzY2RHz6u7ID9EApAKRGBoWXDYM6LOXSrHbuYszRUXLCyyrjx25WOYArgaxfxL +qzOaP1DJEtvyJuzhsWDUM8cWY3/oZJTCslBEcnUn/deKuTMO3Nk8Xg/5thfaoyrLdUazN kECOsLhretBkwKEcgo2qS+fN8Dmo1Sgf90Fk12WRqWHvsFLypqZf/4JLDBw96LWrS+FzxV Fa6feEE/LmUDe+kO1ATZ/1SAltLzbFU4LYlNLb2Iham7D56UXaNj802YPtt5UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251191; a=rsa-sha256; cv=none; b=Mfsv3n5vm2cXEpfcRYtAaMqskNvxrmWScOE5hW/GfJlWVui7AK+a6u9t6jVjUb2Zzt9hJ+ szOz6d7GVS3r2iBfUDJlh7S1CnsTKNDfh432cPoEW6BEf8exqTUH2AyQHP8yotJ3b2uv94 CoEYnQiYI85LAiL//XrGjd8QJ836ieJYGW8uRLpGEFEUkaZ78d9WbRyCVo45+PncRmOXM7 21Fe3elhngwg2KnQndqAV7cGIS70XG/qcp9e2mos6BDFfZMVshaidpK3SucHbaadoQzrhm XHVQwh+hWmLtZOVuvySqTWnTQzlDPrCjJxSgAA5FG5kbd5HNsnwgGGgE+8fZHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjQv480dz19Cq; Fri, 22 Nov 2024 04:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4rBdE034591; Fri, 22 Nov 2024 04:53:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rB2X034588; Fri, 22 Nov 2024 04:53:11 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:11 GMT Message-Id: <202411220453.4AM4rB2X034588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 7c09acc76504 - stable/14 - _utmx_op: don't recurse on chain busy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7c09acc76504ba63305998a7abb8ece44a6b4ebe Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7c09acc76504ba63305998a7abb8ece44a6b4ebe commit 7c09acc76504ba63305998a7abb8ece44a6b4ebe Author: Kyle Evans AuthorDate: 2024-11-13 22:18:40 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:52:10 +0000 _utmx_op: don't recurse on chain busy In handling a PP mutex, we'll busy it as soon as we enter the loop and unbusy it either prior to sleeping or at exit time. In this particular case, if we fail to transition the mutex from OWNERDEAD -> owned because of casueword(9) failure and the suspend check fails, we'll start over and attempt to busy an already-busied chain and irrecoverably lock up both this thread and anything else that tries to busy the chain. Unbusy the chain prior to restarting because I couldn't decide if that was a better or worse idea than just keeping track of whether we dirtied it in do_lock_pp() and avoiding re-dirty. This is marginally easier to reason about as it returns us to expected state on entry to the loop. While we're here, simplify the code a bit as `error` will be clobbered right after the branch anyways. Reviewed by: kib, olce (both earlier version) (cherry picked from commit f660777865fcc28e147b51362412e0286e7df78e) --- sys/kern/kern_umtx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 2d54850da9c3..a900435e9d4e 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2604,11 +2604,9 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, */ if (error == 0) { error = thread_check_susp(td, false); - if (error == 0) { - if (try != 0) - error = EBUSY; - else - continue; + if (error == 0 && try == 0) { + umtxq_unbusy_unlocked(&uq->uq_key); + continue; } error = 0; } From nobody Fri Nov 22 04:53:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjRh0Kxxz5dLLX; Fri, 22 Nov 2024 04:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjRg6ngXz4vKb; Fri, 22 Nov 2024 04:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fToGjxDi+w2CCSvME5lIPe2aKAIzUOEjcQxen7kKE+I=; b=U5ObG0D89dD4wVLqUTfDNQRUfwHcqcrxYgzoc0mn3xWYjm/cu8YeBEmvGx/H+l4/kW0u3R Jj7/AHybX2vcZ4byXS3w5gUbqJF47Acllmm8ibU2FhfkadmPS/+VDPuXTSxoO8L4jOtZr3 WVhgHihgqD7476YTnHCJZO+dX5pzOE0C9GabSS1VPV0QJZSB7FTYHpZsCRZILjw/oVfx6e rG8ESG7QyLXCJ8oa3NuhjgtVIE2YgRuQOa1rYh7byt7auhMH8F32mnVrIO/mWboqR1Z/5Z jPVV85rG08CjN5G4stUndwHDXe8kXJhb7fPOpNEzNX4Rw+/qCoqt3022flsLTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fToGjxDi+w2CCSvME5lIPe2aKAIzUOEjcQxen7kKE+I=; b=WkjTgGdK87D+sgVB70VvhBgXNaVS/v82n6U1VI0P/xtjqmsdmZPU/f+KFY7w5aUAG0kCnD LekNWF48UnM97BMKqZdRwfMVvJhQA2poGodaRq/2F4SzK+xBKsma18toRUMXj5ZV8qyM2p 8oduXrkKJvf6kfJtYoGQE5MOIK2mgbqkNxPs9wPR0DAt/0Ukz4S5pQNsmmvRYa0RiYA/v9 jefamEbgr9vfX+ES0ekxHDdWB9CsqqDEqy//Bv+vTNRDn1ZJGMFe9vDM5lLuoIsvu4amxO hUui2UW1L/i/6zANnSRTJcJ74IGNh6W7xg4IVSziuzOwOx3WLFgH6HZ9N1/gSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251232; a=rsa-sha256; cv=none; b=HrOtaDG1tHip9b/2SlXVuKhSTnfAOmFpl/xW2o2EQhVMOXojpOb1r9qAIvqr6/SapBwMxc b3hyevYqIohiSmcgMckETGmyGu6zF+Qcahfzjnsx8Log7uGTkrjMxFP5llRH85upPqiVbA d1G6chSSLIHFe/OJANdAHXSrsfuuYDog3IcrfksuzY5DVJ3IhJzESAomSx+EOnOZhpe3bu d7qP+9SdMSqZpjjJX+hpW87UeVxapxXrPwf6bU9jnuDVyUiKYC4qaruLTxdmo3PnYfuabL 6EWM3uyiWwZWQxC7fULxnQFRx6ds2GE3gTLavQYy3+1iILV0+cOxvfNDoo7F/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 4XvjRg6P4Rz19Hb; Fri, 22 Nov 2024 04:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4rplE034956; Fri, 22 Nov 2024 04:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rpeu034953; Fri, 22 Nov 2024 04:53:51 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:51 GMT Message-Id: <202411220453.4AM4rpeu034953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 4e609121a764 - stable/13 - sed: fix commandline-given expression when -e is not used List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4e609121a764b103dd2d07630441d1c4cd76bbdd Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4e609121a764b103dd2d07630441d1c4cd76bbdd commit 4e609121a764b103dd2d07630441d1c4cd76bbdd Author: Martin Cracauer AuthorDate: 2024-11-07 03:40:02 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:43 +0000 sed: fix commandline-given expression when -e is not used Make explicit sed commands (first on commandline) behave the same as those given with -e. Without this patch the following two commands behave differently, the second one being wrong: echo ab | sed -e $'1 i\\\n--' echo ab | sed $'1 i\\\n--' Reviewed by: 0mp, des, kevans Sponsored by: Klara, Inc. (cherry picked from commit 0552fdc62caf034397ffd5b07dfbad853aef5aa8) --- usr.bin/sed/main.c | 10 +++++----- usr.bin/sed/tests/sed2_test.sh | 13 +++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index efa28b5e7239..1632b823cc69 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -148,10 +148,8 @@ main(int argc, char *argv[]) break; case 'e': eflag = 1; - if ((temp_arg = malloc(strlen(optarg) + 2)) == NULL) - err(1, "malloc"); - strcpy(temp_arg, optarg); - strcat(temp_arg, "\n"); + if (asprintf(&temp_arg, "%s\n", optarg) == -1) + err(1, "asprintf"); add_compunit(CU_STRING, temp_arg); break; case 'f': @@ -184,7 +182,9 @@ main(int argc, char *argv[]) /* First usage case; script is the first arg */ if (!eflag && !fflag && *argv) { - add_compunit(CU_STRING, *argv); + if (asprintf(&temp_arg, "%s\n", *argv) == -1) + err(1, "asprintf"); + add_compunit(CU_STRING, temp_arg); argv++; } diff --git a/usr.bin/sed/tests/sed2_test.sh b/usr.bin/sed/tests/sed2_test.sh index a7408b2560a7..f50619612561 100755 --- a/usr.bin/sed/tests/sed2_test.sh +++ b/usr.bin/sed/tests/sed2_test.sh @@ -147,6 +147,18 @@ bracket_y_body() echo 'bra[ke]' | sed 'y[\[][ct[' } +atf_test_case minus_e +minus_e_head() +{ + atf_set "descr" "Verify that -e and implicit arg do the same thing" +} +minus_e_body() +{ + printf "ab\n" > a + atf_check -o 'inline:--\nab\n' sed -e $'1 i\\\n--' a + atf_check -o 'inline:--\nab\n' sed $'1 i\\\n--' a +} + atf_init_test_cases() { atf_add_test_case inplace_command_q @@ -156,4 +168,5 @@ atf_init_test_cases() atf_add_test_case commands_on_stdin atf_add_test_case hex_subst atf_add_test_case bracket_y + atf_add_test_case minus_e } From nobody Fri Nov 22 04:53:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjRj1ZNQz5dLpF; Fri, 22 Nov 2024 04:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjRj15NGz4vPw; Fri, 22 Nov 2024 04:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hBH2nTrsLuMy07A5nm3k08H3uoTEF81fMRepjtfVYg=; b=KbctcYyRbmZcaqly1W6AMpiJNtxWDysN+04BXRIakqqtiDpsQhbnaez0erZztdio4ZeFgN zGNvM39rSaJLLNpi2oujjCwwy1D8uG6Zp2pBTT1VBcDTPtvaJj9TCL5W1DtSFDkHVUkmQQ iQBOGNe1fwXWRsj9pvdjNU1b3lTv5ylnx9ecBGVtg2c5OUNN29ryr/21QMudxBtTMeljtc pbSyyEpBRsCGhW7TniSMnB88noNrf1W/rVUZdCgNsk6Nc74HTQyNlyC0YZL4UTfj8QWtpJ J1ss1YtM9KNX435R6BQZ3yj4rMTp0zzOUhqrJkQddrvkoxeIM4k6b7H5wWgYnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hBH2nTrsLuMy07A5nm3k08H3uoTEF81fMRepjtfVYg=; b=PUnb7FJRTcWR23Ii56q6SyljSPWj5HHEmoi0eiZcsN0QBP8aOalRcJ6oXEF42XVkC2CB/h xSc2AQHSpWXmZZ7MjC0Y3QxiKpaKUEiLm4oU83ZN94G3t6UtQEu9/wklWKM91XTzXdHEOZ tTMT7bMqTlaElInlJlXewW5Up25ab6zbBbdu+27gKbc14B/kzOnjDLGMnlnG3lwKJ5k7sY aIkl0gzbcZ7SULuAYCkQZWYHRQUgwyBF45dMy7jZUJbAf+tUGVAWMxiLbJk8eyKn48HDfY jBEGXW8/6+DcvfrgU4MCraKQ0OAgAvV8ZphqjA4Z8wF3vIMMOPhIgG4frBHFdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251233; a=rsa-sha256; cv=none; b=T6gDarQuv1KvlwiSOTukEs4PR8EKZW+zDKIClnFbyCNw5bIZmI4FVnGHun0tC/Al14nz+i lA7odArquDaFiNlgyhXNdqpGEHxG/1JVMEFICIcIQQ4SSLmFr8g1VhdT0s50t/TLY6UWp+ nVYbpNiQm5/8+7MMFoVzh2WBYCbavAEmBbcpPzL4KtVs+9Oe06Zelgsu1Zp7eVv+nZRfdD UI38XS/CHTMLUnxb/oRbKbS5w9s+vL4aEKjJbOvcIHuwyb+AFhtJ9DNFDCUDgib/TCTTY4 ZX8IgIBdYPZl6xwGZQVXV0Us+mKZZYOovlKLzJ9LsMjeM0z7sdHfTh2gXQXnSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjRj0hyHz19WR; Fri, 22 Nov 2024 04:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4rr3u035004; Fri, 22 Nov 2024 04:53:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rq3I035001; Fri, 22 Nov 2024 04:53:52 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:52 GMT Message-Id: <202411220453.4AM4rq3I035001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: a85a7f2ae112 - stable/13 - localedata: update widths.txt after recent Hangul exceptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a85a7f2ae112f751fd7c0f9c4afc2a24bd473069 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a85a7f2ae112f751fd7c0f9c4afc2a24bd473069 commit a85a7f2ae112f751fd7c0f9c4afc2a24bd473069 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:43 +0000 localedata: update widths.txt after recent Hangul exceptions Sponsored by: Klara, Inc. (cherry picked from commit 0f30aed1056a2e12ca40095debff6735642c4ff4) --- tools/tools/locale/etc/final-maps/widths.txt | 160 +++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/tools/tools/locale/etc/final-maps/widths.txt b/tools/tools/locale/etc/final-maps/widths.txt index 74c28ac58463..fe168ebbe201 100644 --- a/tools/tools/locale/etc/final-maps/widths.txt +++ b/tools/tools/locale/etc/final-maps/widths.txt @@ -835,6 +835,166 @@ WIDTH 2 2 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 From nobody Fri Nov 22 04:53:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjRl1ZdNz5dM8V; Fri, 22 Nov 2024 04:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjRk1jmFz4vQ2; Fri, 22 Nov 2024 04:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N5NrUyqntvHlGrb9CNl41f14teELHvaHJiqr4M6Ar4U=; b=dZYSa60u5eaYATJK1YaEok2aKmskmq3PmxE7+iLlwPATjkn8RNmv+9iDPxOCXoD/8OkP0/ 35PTvvl7Vyp2720uj3ZkZFzR10KcuDiOK65Ml2G1MRkEt1UJB5CfR1vM/zuQ56kOTbCKr8 s150InlN4Z1z1HV606U349BQMhpQQYHw1kCTd3JFVPRHPLiO2/KA5xBfnBN+SxWD51enw5 fpwVz8uL1IG7+Zk0pwfdcjSeh5t5iRKz68Iuc+4FXqm4R+QZj3SV6QKHOqlYZUEjqWKozW zcxb6yuX9Y+5zJlCnaEozQbhy5qjxED43CGJmfStu4Ii9HfCHpp7/2PIFkG5Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N5NrUyqntvHlGrb9CNl41f14teELHvaHJiqr4M6Ar4U=; b=X5sN8C4AEVR/xt5d2TXxzro/zqWvV1M0+STgBLUMPEKx62D4iK4NnKtd1zNuCVnPpLrc8E asag44YhXVbAt3KoqX4XJIoe//vcGnCtE1C8zF/yrU5xYPGuSgnbw9XCSMe7am18PX0srb aj68PLObEX4k2gd0chSPPikcik8hUXJykpkrb4DdR27RgdNxUWMPf1uPT5VzLPxbkrSYTM N5x2RDawlFpXZWtGgrFpC1HUu9/aRGdjMxhUKGmRNrfVQF7UHLgLT+Z1tQBAM4nMx7eS5J 48kGOMcLCZo2bBYUbdpZU+lGSOf4j+DsXyV0PAn127fuoB0GDBwrWuL27Dxxkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251234; a=rsa-sha256; cv=none; b=wMIPBa+HMop8wr/3z7ENJDNPl3fTeZO4tdA2mCCrIUzbUtsWmmdF3PKB4Q4qpyhODjVckz 0STw1Ef/Z5hWyQDQNhfXjDrv6YDCemgoL2oYV+TiQP9cAa7Pp/Xxa82aWrqg2niztSJeqw qgpjQoPhtgu46rbZT1VqBwpC1SImk1Dt2FGLRTBhiE3G7WmwyeMZeROvB8K0cFovfFseEb Vjr+03ey9o/u5hnkkxWZvUtWRHFCqDghx6cxBE+t8JiDMvDAlTKR1TJu1WFTXhDEuBTa+i ZKr5kYb5/XyseG/i9+dVTacYCOMXYNOleOaq+lwFEAPbBTSyxtEjTD48WRVEMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjRk1HwNz19WS; Fri, 22 Nov 2024 04:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4rsn1035052; Fri, 22 Nov 2024 04:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rssf035049; Fri, 22 Nov 2024 04:53:54 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:54 GMT Message-Id: <202411220453.4AM4rssf035049@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: f4f4fa8d04df - stable/13 - localedata: add some exceptions to utf8proc widths List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4f4fa8d04dfb1e27c4b3a82c1b032545e74e2e4 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f4fa8d04dfb1e27c4b3a82c1b032545e74e2e4 commit f4f4fa8d04dfb1e27c4b3a82c1b032545e74e2e4 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:43 +0000 localedata: add some exceptions to utf8proc widths Hangul Jamo medial vowels and final consonants are reportedly combining characters that won't take up any columns on their own and should be reported as zero-width, so add an exception for these as well to reflect how they work in practice. This conforms to how other implementations (e.g., glibc) treat these characters. Reviewed by: bapt (earlier version), jkim Sponsored by: Klara, Inc. (cherry picked from commit 160c36eae41afa3c4944ed44778c2b48db8fbb77) --- tools/tools/locale/tools/getwidths.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/tools/locale/tools/getwidths.c b/tools/tools/locale/tools/getwidths.c index 2790b8031912..63c62791253f 100644 --- a/tools/tools/locale/tools/getwidths.c +++ b/tools/tools/locale/tools/getwidths.c @@ -28,6 +28,21 @@ #include +static int +width_of(int32_t wc) +{ + + /* + * Hangul Jamo medial vowels and final consonants are more of + * a combining character, and should be considered zero-width. + */ + if (wc >= 0x1160 && wc <= 0x11ff) + return (0); + + /* No override by default, trust utf8proc's width. */ + return (utf8proc_charwidth(wc)); +} + int main(void) { @@ -43,9 +58,10 @@ main(void) wcc = utf8proc_category(wc); if (wcc == UTF8PROC_CATEGORY_CC) continue; - wcw = utf8proc_charwidth(wc); + wcw = width_of(wc); if (wcw == 1) continue; + printf("%04X %d\n", wc, wcw); } From nobody Fri Nov 22 04:53:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjRl6Hl0z5dLkk; Fri, 22 Nov 2024 04:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjRl2rZXz4v91; Fri, 22 Nov 2024 04:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LovNMgcpH8pqaaQgRbuWaIvM+VoKOYnXDOIcX5PgUMA=; b=Vcvj2OW5xmEJ3sY9+BmV2et7y47vK73+KrLK9Nd5gMKVoWDe5jFTx8foDbV9zc6UmSHIUI QTZNP3YK4d8SYAT+Bhh2oGhQfh26mn/mdog6O8tQ9M4AcLT3UFnrWgsCRPWpsSOaqH6m2O Zq2YcdsQadjsiCrUI55DtxYpKAE3RrHBksoXJLLkFZtRXZCqyQIA7DsexdbUraAQvTOchj hwK6zKEYCgVrZ0istEtAS67cD9lJ1U3rnei/En+5RK/w2WF1R0Br7i5JUZhvriCHOxCQN5 LwikuwBUl62GjZ6cDrhVnpBRoGxxg/cq3ifYHMHqClWHJVFJAOsY2mXa6NvXyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LovNMgcpH8pqaaQgRbuWaIvM+VoKOYnXDOIcX5PgUMA=; b=SS4MXnIrLN171Rslb0sY0hrvXZyybfqKGkBuLzTEx+5tub7qDDYBpMCVxK3kOh7Xwym/qF 7NPsrdSmbhSeRhTcrcx80xidWMkZGwzMlP5JSJ0PeK14lVBVdlVvUF9NM2oeFLtsuojgG+ YfTi/cMi/g0Fs2ecJJkFRxI1eIiZcqnPU3W+gJ3f/uIUvA6GhcEXrzENHs5U2FRYbNJor5 Z8ZX6gtwI6YBM4FTyMvK5Zw9fzqkNzLDUKKRHW4B9sdjqolwVDUb36UR6s7z6c4HmgzWLV CPXeHLlEPBvwr/kvrYw70Akyg21x2VmWz6PwpHsYsgjsFEILLaqedsl6NYtQ0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251235; a=rsa-sha256; cv=none; b=gl/RLRuH9oQr7vMJiCEwMfs2458MVxttriQT/mfnb2BXybbbZQGBOltC+54Cehz6kqIGGk I+qmLyYWlbRctYQGzPuPhdXJUIbiAJER1eWoO7dLym7fDtv1UNIVfYKr+2Gh3SBN4bh5Ny IvT/iw3D8fkc/yXYVH94nGNTVMxw+eE7MXd4rmMO4c86QADi+B1r0Adqh5hzgWaj5N8S3/ xSOs3SsKpsggWF1JKRdyHHPoFXSUzN86/ghwsfJQeBwxqanfbTDIPEQ4IpQMR9O+fWznVU pOEfFMTv2FcQdkLoCS5rrFs/LFB8r6FbcW7fxtUC8G288fxx08Gvs+1XeQuW8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjRl2LH9z19Hc; Fri, 22 Nov 2024 04:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4rtCa035104; Fri, 22 Nov 2024 04:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rtP5035101; Fri, 22 Nov 2024 04:53:55 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:55 GMT Message-Id: <202411220453.4AM4rtP5035101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 4729bb364293 - stable/13 - timedef: remove redundancy in Catalan date_fmt definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4729bb364293fd11a160d2e86bf86563e79c1030 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4729bb364293fd11a160d2e86bf86563e79c1030 commit 4729bb364293fd11a160d2e86bf86563e79c1030 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:44 +0000 timedef: remove redundancy in Catalan date_fmt definitions This is already factored into the month names, resulting in an awkward construction: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de de novembre de 2024, 21:21:18 CST This would now render as: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de novembre de 2024, 21:22:41 CST Reviewed by: bapt, royger Sponsored by: Klara, Inc. (cherry picked from commit a4b7367eb027a99b9eb48bf18951049434a9e189) --- share/timedef/ca_IT.ISO8859-15.src | 2 +- share/timedef/ca_IT.UTF-8.src | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/timedef/ca_IT.ISO8859-15.src b/share/timedef/ca_IT.ISO8859-15.src index 669fbab13074..7c625aad19b5 100644 --- a/share/timedef/ca_IT.ISO8859-15.src +++ b/share/timedef/ca_IT.ISO8859-15.src @@ -59,7 +59,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener diff --git a/share/timedef/ca_IT.UTF-8.src b/share/timedef/ca_IT.UTF-8.src index 5dfd3841d9af..a85dd8c4b942 100644 --- a/share/timedef/ca_IT.UTF-8.src +++ b/share/timedef/ca_IT.UTF-8.src @@ -63,7 +63,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener From nobody Fri Nov 22 04:53:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjRm740zz5dM8b; Fri, 22 Nov 2024 04:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjRm4KwXz4vSx; Fri, 22 Nov 2024 04:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DqqUxqhXhfr+qFH3VruGzHIrWHTRZ6AdWsYUKlLXQ4w=; b=cbA5sFE7MQyqqrA6lX8hV8mZG9dgX3VMHqxzl2fKsmf8+FftdmCdPglL74Sv42aDVD/4oJ nQuUni3Wn5MrjYJk7b8WzuVs/vvolIKJSKvqxqWjutuz5BBvKThMLBnLmhX7VQX/XMFBgM w0fDK7eFpeXpIju6cG0KEmy1aLKqqXtwCq+8NFWaSGaSEc/QFdiEb+2cuTCcCzq9u7aS+H qW/lA2Dg+5AYELnuDd2QpbY1oTwp8g1eit9SHyVuWWL0eVR4YZ8BWA9CNobRVl4A6maboY rFZPECcZErfvNgLQv20AoxNT7EMvTWmf60mwJ0VyLblf78nTQEtAhAB5mBiJog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DqqUxqhXhfr+qFH3VruGzHIrWHTRZ6AdWsYUKlLXQ4w=; b=DG7ozNOytCE+0NLcrXKbI7newTbVP9sgkApnMuSiVM2zYrAn5xdb0wxgK31RtFR6Txs4om xUhSF8dOrK2MoWtyb026f3RyXk2LIbipEH7TvXIQ8TAtXvHGYaPhdczF7bcpQbD3qhNra7 8R1Fbr2DgoOozDz0C08tXJ6JTrV5lR/0XDm6FINajfsf1v/AMrmtG8ekXqMZ7DXLLCREm+ kDO8HWMvUqRYfS/qM9l1kKHNoDSNwksYwne61+qp6UNFWcA/8SqVjWUdxF62/17A4qbeVP CUI788JbjUUJfosYUtH19Y9wmts52TMTeB6AN7YJEWQHgp64oKE1OYaksRWJ2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251236; a=rsa-sha256; cv=none; b=l30sjRPHfwBR2qJs3jCybP/9MF+idn3M2Kif/eC71sKtA3o3E0J+o/aE9tCHR1oP7p1S8J 6oaowlt7sWnrzM2R4dgsJBtYcQe26iI5vF2BoQzNIq6sLXyGyIj8MFIyTbF14Gx43bZ2XL ia4hMVQO5/LdkLscdijbXxj4f/qwgH1Vn74Wy+U5utLayft0yliAZs+aHwDljO4i0bg39T DuEBu7hWBNWtqIE5BAFuD3EpHXAGh6KO0g9g8tw9rxTkz4tiXgLUACQmzjLKfc8jR5mKwL Yqfd2UH3Ztd2+8AVe4oWvj1NVwMo2UOfsR65mY11kF7oGtprU6xzeLiNcmVmFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjRm3KMyz193j; Fri, 22 Nov 2024 04:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4ruJx035165; Fri, 22 Nov 2024 04:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rurP035162; Fri, 22 Nov 2024 04:53:56 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:56 GMT Message-Id: <202411220453.4AM4rurP035162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 7951b4f4f99c - stable/13 - _utmx_op: don't recurse on chain busy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7951b4f4f99cc6e2cbd51c516dc083e031c3babf Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7951b4f4f99cc6e2cbd51c516dc083e031c3babf commit 7951b4f4f99cc6e2cbd51c516dc083e031c3babf Author: Kyle Evans AuthorDate: 2024-11-13 22:18:40 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:44 +0000 _utmx_op: don't recurse on chain busy In handling a PP mutex, we'll busy it as soon as we enter the loop and unbusy it either prior to sleeping or at exit time. In this particular case, if we fail to transition the mutex from OWNERDEAD -> owned because of casueword(9) failure and the suspend check fails, we'll start over and attempt to busy an already-busied chain and irrecoverably lock up both this thread and anything else that tries to busy the chain. Unbusy the chain prior to restarting because I couldn't decide if that was a better or worse idea than just keeping track of whether we dirtied it in do_lock_pp() and avoiding re-dirty. This is marginally easier to reason about as it returns us to expected state on entry to the loop. While we're here, simplify the code a bit as `error` will be clobbered right after the branch anyways. Reviewed by: kib, olce (both earlier version) (cherry picked from commit f660777865fcc28e147b51362412e0286e7df78e) --- sys/kern/kern_umtx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 23087cf4269e..61b86d0b62b1 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2605,11 +2605,9 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, */ if (error == 0) { error = thread_check_susp(td, false); - if (error == 0) { - if (try != 0) - error = EBUSY; - else - continue; + if (error == 0 && try == 0) { + umtxq_unbusy_unlocked(&uq->uq_key); + continue; } error = 0; } From nobody Fri Nov 22 04:55:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjTS5gQPz5dM94; Fri, 22 Nov 2024 04:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjTS56dcz3x9b; Fri, 22 Nov 2024 04:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jAzNpD4mEMtkuvzRuk0xGTKbcDigfNwxjGldXCBZ7H8=; b=l/16QeSjXLtWfBPYKZGnPRJQKP9GPTpjkRSdz70eho0m6722GcF+nOPG6v1Z6Hxxh9MT/R /9Y0aXvsUbpl7e69U6CUPjIYOF0E65hsr/gwESRsUb3VLVOneMhyi6jASg/feUvJpzwUvq kz99Cdt81oDBeWzpsMRoPRlQxl6twwmaLzMwsTcX609GgBAxzQJEX8L1u1XLE+9uBnmWRh CHUxiBYM1KdKRhZ1rZDucJvQorJuLhkHTuTtWIwjaOcBDHl3i8pLYezwRFIUvaIc3t+6Es QcvS4eNsEp7lbuot80hsIgywwavbt8FLG6BiEaMz0qyTeH8HPjsL7+/kK37nKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jAzNpD4mEMtkuvzRuk0xGTKbcDigfNwxjGldXCBZ7H8=; b=FptWShGwOgb+o8L55gb7e8yKZPgoM2uzrDf1OrHIJUgxc8XqmaFKFU9f2I7a1LHJxkNcvv yiOMET0gnbHLwtMGWofOflDzjjdVdnnA+Dv9CMMXfxHkv0DED4G7wNhEaoGXKMHa6en7Zy e5KS9tj0dBYq6/7fG3+F1CxWmPHYkVO2JsH73M3OdUb/BsOpCb+EDOElAFQ61SGn+kDpbB UNwpXYL75UO0OJitXj8gEXn/5SCHgTGRnK2N9dyu0FczfXVL67Qsn+civIPm16noDfj1m7 1MEOXe3batE1GIUUVFAdXwzp99ETg6MCjn9M73dOE4aZYtkwbAOd0IN5NqoVpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251324; a=rsa-sha256; cv=none; b=yAxhLpcOgH284/nOKVxLeMbQy7gJ5aIcc4hro3uRDokQVJpKdxVv6R7GN7Guv9EdB7/2YW 59wgy8nCOPts+ktt/PWVXt0oq3GM4g07lQ9mbgWxCQfMtX3ZhDyDVliD1+FOQkcteYkM7C s1OMBNpgSWvdV+0J8KgSDzqSjuuGjRFHY4qcsQtuDdREkpZR4kdP0+Pkz0h6lOzWWBNWc7 bP5bt78OAzL9+btHnpO8kLrCvU7s/PiSR+HJV70RSPB9uzP0SSmtxVb1yphGQsztfxDgcs oiplQVBAHDLtELUzfskj/G9CbcTcQe+Zp7RaHBPI6FcGhFqn0a1214H+blk1Nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjTS42Y6z19Cr; Fri, 22 Nov 2024 04:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4tOl9035771; Fri, 22 Nov 2024 04:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4tOHP035768; Fri, 22 Nov 2024 04:55:24 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:55:24 GMT Message-Id: <202411220455.4AM4tOHP035768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 654292c0d683 - stable/14 - libthr: add some tests for pthread_atfork() handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 654292c0d683fb7805df7f876693e125250024bb Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=654292c0d683fb7805df7f876693e125250024bb commit 654292c0d683fb7805df7f876693e125250024bb Author: Kyle Evans AuthorDate: 2024-11-14 01:33:36 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:54:52 +0000 libthr: add some tests for pthread_atfork() handling Test that it generally functions, and also that registering multiple times calls each handler in the order that it's documented to call them in. Reviewed by: kib, markj (cherry picked from commit 7e6ac503ffeb81733272d54af367db58e45e57ca) --- lib/libthr/tests/Makefile | 1 + lib/libthr/tests/atfork_test.c | 227 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+) diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile index d882ccfd877c..34e48c63d197 100644 --- a/lib/libthr/tests/Makefile +++ b/lib/libthr/tests/Makefile @@ -34,6 +34,7 @@ NETBSD_ATF_TESTS_SH+= cancel_test NETBSD_ATF_TESTS_SH+= exit_test NETBSD_ATF_TESTS_SH+= resolv_test +ATF_TESTS_C+= atfork_test ATF_TESTS_C+= umtx_op_test ATF_TESTS_C+= pthread_sigqueue_test diff --git a/lib/libthr/tests/atfork_test.c b/lib/libthr/tests/atfork_test.c new file mode 100644 index 000000000000..5133330b1247 --- /dev/null +++ b/lib/libthr/tests/atfork_test.c @@ -0,0 +1,227 @@ +/*- + * + * Copyright (C) 2024 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define EXIT_NOPREPARE 1 +#define EXIT_CALLEDPARENT 2 +#define EXIT_NOCHILD 3 +#define EXIT_BADORDER 4 + +static int child; +static int forked; +static int parent; + +static void +basic_prepare(void) +{ + ATF_REQUIRE(parent == 0); + forked++; +} + +static void +basic_parent(void) +{ + ATF_REQUIRE(forked != 0); + parent++; +} + +static void +basic_child(void) +{ + if (!forked) + _exit(EXIT_NOPREPARE); + if (parent != 0) + _exit(EXIT_CALLEDPARENT); + child++; +} + +/* + * In the basic test, we'll register just once and set some globals to confirm + * that the prepare/parent callbacks were executed as expected. The child will + * use its exit status to communicate to us if the callback was not executed + * properly since we cannot assert there. This is a subset of the + * multi-callback test, but separated out so that it's more obvious from running + * the atfork_test if pthread_atfork() is completely broken or just + * out-of-order. + */ +ATF_TC(basic_atfork); +ATF_TC_HEAD(basic_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks invocation of all three atfork callbacks"); +} +ATF_TC_BODY(basic_atfork, tc) +{ + pid_t p, wpid; + int status; + + pthread_atfork(basic_prepare, basic_parent, basic_child); + + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(child != 0 ? 0 : EXIT_NOCHILD); + + /* + * The child can't use any of our standard atf-c(3) macros, so we have + * to rely on the exit status to convey any shenanigans. + */ + while ((wpid = waitpid(p, &status, 0)) != p) { + ATF_REQUIRE_ERRNO(EINTR, wpid == -1); + if (wpid == -1) + continue; + } + + ATF_REQUIRE_MSG(WIFEXITED(status), + "child did not exit cleanly, status %x", status); + + status = WEXITSTATUS(status); + ATF_REQUIRE_MSG(status == 0, "atfork in child %s", + status == EXIT_NOPREPARE ? "did not see `prepare` execute" : + (status == EXIT_CALLEDPARENT ? "observed `parent` executing" : + (status == EXIT_NOCHILD ? "did not see `child` execute" : + "mystery"))); + + ATF_REQUIRE(forked != 0); + ATF_REQUIRE(parent != 0); + ATF_REQUIRE(child == 0); +} + +static void +multi_assert(bool cond, bool can_assert) +{ + if (can_assert) + ATF_REQUIRE((cond)); + else if (!(cond)) + _exit(EXIT_BADORDER); +} + +static void +multi_bump(int *var, int bit, bool can_assert) +{ + int mask, val; + + mask = (1 << (bit - 1)); + val = *var; + + /* + * Every bit below this one must be set, and none of the upper bits + * should be set. + */ + multi_assert((val & mask) == 0, can_assert); + if (bit == 1) + multi_assert(val == 0, can_assert); + else + multi_assert((val & ~mask) == (mask - 1), can_assert); + + *var |= mask; +} + +static void +multi_prepare1(void) +{ + /* + * The bits are flipped for prepare because it's supposed to be called + * in the reverse order of registration. + */ + multi_bump(&forked, 2, true); +} +static void +multi_prepare2(void) +{ + multi_bump(&forked, 1, true); +} + +static void +multi_parent1(void) +{ + multi_bump(&parent, 1, true); +} +static void +multi_parent2(void) +{ + multi_bump(&parent, 2, true); +} + +static void +multi_child1(void) +{ + multi_bump(&child, 1, false); +} +static void +multi_child2(void) +{ + multi_bump(&child, 2, false); +} + +/* + * The multi-atfork test works much like the basic one, but it registers + * multiple times and enforces an order. The child still does just as strict + * of tests as the parent and continues to communicate the results of those + * tests back via its exit status. + */ +ATF_TC(multi_atfork); +ATF_TC_HEAD(multi_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks that multiple callbacks are called in the documented order"); +} +ATF_TC_BODY(multi_atfork, tc) +{ + pid_t p, wpid; + int status; + + pthread_atfork(multi_prepare1, multi_parent1, multi_child1); + pthread_atfork(multi_prepare2, multi_parent2, multi_child2); + + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(child != 0 ? 0 : EXIT_NOCHILD); + + /* + * The child can't use any of our standard atf-c(3) macros, so we have + * to rely on the exit status to convey any shenanigans. + */ + while ((wpid = waitpid(p, &status, 0)) != p) { + ATF_REQUIRE_ERRNO(EINTR, wpid == -1); + if (wpid == -1) + continue; + } + + ATF_REQUIRE_MSG(WIFEXITED(status), + "child did not exit cleanly, status %x", status); + + status = WEXITSTATUS(status); + ATF_REQUIRE_MSG(status == 0, "atfork in child %s", + status == EXIT_BADORDER ? "called in wrong order" : + (status == EXIT_NOCHILD ? "did not see `child` execute" : + "mystery")); + + ATF_REQUIRE(forked != 0); + ATF_REQUIRE(parent != 0); + ATF_REQUIRE(child == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, basic_atfork); + ATF_TP_ADD_TC(tp, multi_atfork); + return (atf_no_error()); +} From nobody Fri Nov 22 04:55:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvjTV0q0kz5dLq2; Fri, 22 Nov 2024 04:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjTT6PNcz3xCk; Fri, 22 Nov 2024 04:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ipqirr36YpVFfsK2gnDrYDuCuHMjmM89NeNCpMIzRSc=; b=UzXJ7ov30mu9O8SkyVy+edF5vetFnl5Yt5V7rC1+EQMWtHEx6OxWoXEW+nnvjP2l1WBuev 5XtlmkA5jQJRmNWyjedkIbtcfglVw1SgwhbPaPgAg1mKIrLKDdYrktzN4WM8HUGKp9UG2p j2TS9mgLk84jYn4rXFQsIo+ytR6lhkgES0beqBBz089bstsG3AoBr0oRikAhwl9VXbmfL0 uEH09F1f4CyxyyoVTaU2oAm+XEeLGIQUjTgVLG1fpnjHzQPe97bY3IWPDGYUoDNjtXXe/U umoKfcUY+Qih2NVgsRWmjvk5GpBC2HSD4ckSl5AqmDfhoeTi04wgTMO5jld8bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ipqirr36YpVFfsK2gnDrYDuCuHMjmM89NeNCpMIzRSc=; b=flc522COV/sN9fkepRly89FQz5MnVMRO79ltdFcOEoO1FHZPx6h652CShz+pKGGGeR0JmM 9z2iba8RGZPFhLHhWSzaPaS/w6/48OMPhqwBnf/+kIgtKFGw1kPIJtr02vv+N1QDt8ey4y o8/6zci/IL1dN8RqAqvxdiwFbi2r7VnE+O1Sa7doyBjI4glaxIksCTlhEvv+WiGd7CwB8B 4rBA1CFpJ8OBwys0Wl5xE+I+DKD/hQNU/3LJy+iVGiRtnTV2KYlJswkqsfov+juSczXZsU /gS02ZcV+qFB1a+yAxjAuShnNasZeQ5OsrcJjWD8M7UGwcUUqalYjAj3utw6Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251325; a=rsa-sha256; cv=none; b=g6puHfV7lvkOBRivD1bNHq+VmcfzWym5Ct0pUxlATEjd8lRhgVWaFm6gs/aWU2VOiAinGj dMTFh2GRfI8uEzk49MDlVL7w/GJ+emiiUusw6LixI3EEKQYvRDegIqRb/5JMWEbf1yMzLP MWnSJfXc1k6yo7bU/7fCljyCBegYbt0H92gBrBsYLJAw35Hp8aiEzXbrEd2FR5dxKlMXTz p+VeYfSr0T/DfS8yikPdVn8BFnQsTflDtxBxGh2IUP1NeceNnNNjwObCRCWRVF1AUOMQaG qN5jxi8xylkKsqg9VjbvLb+U5UO5AOUnbXIC4NpVx0a5dh65PbuDHuofVjAhDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvjTT52J5z19Hd; Fri, 22 Nov 2024 04:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AM4tP64035817; Fri, 22 Nov 2024 04:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4tPqg035814; Fri, 22 Nov 2024 04:55:25 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:55:25 GMT Message-Id: <202411220455.4AM4tPqg035814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: c5a7b5882ae2 - stable/14 - libthr: allow very early atfork registration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c5a7b5882ae28932f79c29678fae36498467e8ea Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c5a7b5882ae28932f79c29678fae36498467e8ea commit c5a7b5882ae28932f79c29678fae36498467e8ea Author: Kyle Evans AuthorDate: 2024-11-14 01:33:44 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:54:55 +0000 libthr: allow very early atfork registration LSan wants to be able to register atfork handlers at __lsan_init time, which can happen either at the first intercepted function call or in a .preinit_array function. Both of these end up being very early in rtld and executed with the bind lock held, which ends up causing problems when we go to _libpthread_init(). Instead of requiring libpthread to be initialized, just insert the new atfork handler straight into the list if it's not ready yet. The critical section and locking should not be necessary if we're really executing this early, as there won't be any threads to contend with. Reviewed by: kib (earlier version), markj (cherry picked from commit 4b202f4faf40fd7af8b84491360186aed8ce5733) --- lib/libthr/tests/atfork_test.c | 53 ++++++++++++++++++++++++++++++++++++++++++ lib/libthr/thread/thr_fork.c | 20 +++++++++------- lib/libthr/thread/thr_init.c | 1 - 3 files changed, 65 insertions(+), 9 deletions(-) diff --git a/lib/libthr/tests/atfork_test.c b/lib/libthr/tests/atfork_test.c index 5133330b1247..cb0fcb7e62db 100644 --- a/lib/libthr/tests/atfork_test.c +++ b/lib/libthr/tests/atfork_test.c @@ -25,6 +25,58 @@ static int child; static int forked; static int parent; +/* + * We'll disable prefork unless we're specifically running the preinit test to + * be sure that we don't mess up any other tests' results. + */ +static bool prefork_enabled; + +static void +prefork(void) +{ + if (prefork_enabled) + forked++; +} + +static void +registrar(void) +{ + pthread_atfork(prefork, NULL, NULL); +} + +static __attribute__((section(".preinit_array"), used)) +void (*preinitfn)(void) = ®istrar; + +/* + * preinit_atfork() just enables the prepare handler that we registered in a + * .preinit_array entry and checks that forking actually invoked that callback. + * We don't bother testing all three callbacks here because the implementation + * doesn't really lend itself to the kind of error where we only have a partial + * set of callbacks registered. + */ +ATF_TC(preinit_atfork); +ATF_TC_HEAD(preinit_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks that atfork callbacks may be registered in .preinit_array functions"); +} +ATF_TC_BODY(preinit_atfork, tc) +{ + pid_t p; + + (void)signal(SIGCHLD, SIG_IGN); + prefork_enabled = true; + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(0); + + prefork_enabled = false; + + ATF_REQUIRE(forked != 0); +} + static void basic_prepare(void) { @@ -221,6 +273,7 @@ ATF_TC_BODY(multi_atfork, tc) ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, preinit_atfork); ATF_TP_ADD_TC(tp, basic_atfork); ATF_TP_ADD_TC(tp, multi_atfork); return (atf_no_error()); diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index 614841cc314f..aa54b0444cf4 100644 --- a/lib/libthr/thread/thr_fork.c +++ b/lib/libthr/thread/thr_fork.c @@ -84,20 +84,24 @@ _thr_atfork(void (*prepare)(void), void (*parent)(void), struct pthread *curthread; struct pthread_atfork *af; - _thr_check_init(); - if ((af = malloc(sizeof(struct pthread_atfork))) == NULL) return (ENOMEM); - curthread = _get_curthread(); af->prepare = prepare; af->parent = parent; af->child = child; - THR_CRITICAL_ENTER(curthread); - _thr_rwl_wrlock(&_thr_atfork_lock); - TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); - _thr_rwl_unlock(&_thr_atfork_lock); - THR_CRITICAL_LEAVE(curthread); + + if (_thr_initial != NULL) { + curthread = _get_curthread(); + THR_CRITICAL_ENTER(curthread); + _thr_rwl_wrlock(&_thr_atfork_lock); + TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); + _thr_rwl_unlock(&_thr_atfork_lock); + THR_CRITICAL_LEAVE(curthread); + } else { + TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); + } + return (0); } diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 007cf5be81c9..ff59288d919e 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -519,7 +519,6 @@ init_private(void) env = getenv("LIBPTHREAD_QUEUE_FIFO"); if (env) _thr_queuefifo = atoi(env); - TAILQ_INIT(&_thr_atfork_list); env = getenv("LIBPTHREAD_UMTX_MIN_TIMEOUT"); if (env) { char *endptr; From nobody Fri Nov 22 12:26:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvvV15ry5z5dqlG; Fri, 22 Nov 2024 12:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvvV14zMCz4jbN; Fri, 22 Nov 2024 12:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732278393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XML9SVvVUAevNZUonRVliVPMnQmYCFIWdOUwG8qdE6w=; b=lpT6gHDb878e/68Ih/Ust06/bzYeK+jnoUuv72CAjnOSj/Ten9KQ5sMGtAkTEDbdYOpTYJ Bk2WtbZcutwFPyEjqMaksNFDYoiaw2Ll1Iw/mtPRhZzq/e2B9kZZOKSAtOast8kjTyHD42 oae0cjZF+RfcsHd5d1paXagNwmhO8QKkFUoGHeYjcZl42zLswK6imNaiP2ogDstoZy10cj NXicYy5oKBnGXv0GEtneFTs9oP4WyegN6YFt52XwcT55JmecZgC4x9FqHg6D/yNQAQa02d 6cuEreIqR1oaRhEjSoMZuP5SRyObLizqTbBnqTrWLGEpNFpgRFet5h4Xc9l8yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732278393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XML9SVvVUAevNZUonRVliVPMnQmYCFIWdOUwG8qdE6w=; b=mOJe/FWbjP3BmtZH2f+lF1eGyMxLi0CuV4BMlS0O/FacMWLPItnB40JLWWum/v+rbQQLFf STL0bVMEzyGn/BUYlFT9q8lL38ThOZztz0msGxLZteDSMOybScoh8FCD9SpUAX3BUipHYD IINomNVDU+sp4mMyGb31u7N8Ny7eRIRRg/P4me3wkTLekzqfjY678KclNJk+Y3YI7zaF+g 1tFvkCvaoxOyjIE9gny2Rpip+YV2oQkVE9WWUBlAk7uE/J/pLpqJzr6Td8ieXmoMBiuubt J7KDvQJQZRvw1zP9cPWL6WUV5cym2YLLsXkps7h++AAhnl8NzuvTmd9RJx2eSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732278393; a=rsa-sha256; cv=none; b=QOwfesBzD1RekLIHThJ2f56avUrR/g2186JhgZS+fHi/Xd//GRmdhse+mHZnch22K9b12L FKzUBnIPgm5ewQlQyr8Aihwt9bReujlMdUiGqEQdlG7gjCYLSXeFX5U1hiv2DrPgypc1g+ dRhZfhJBzyyz5TfilYGmieHuwjbSMlVDn9hnuKdodJoLBt8mITj242MMYpUzFPHShgMAH5 xq08Ay9ijL9sfgnGc6oeSpwVR8FYn2w4ciP4XsXiPUfkGiCVNc0IQmKj9t9cciRGSvavb6 elGEDpUwBqBmSmNTPNMyuNtM30rjzGb4bi9t16MnPD/nB5X21cDl3ojgy67ZGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvvV14SYkzPVx; Fri, 22 Nov 2024 12:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMCQX1s078168; Fri, 22 Nov 2024 12:26:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMCQXdN078165; Fri, 22 Nov 2024 12:26:33 GMT (envelope-from git) Date: Fri, 22 Nov 2024 12:26:33 GMT Message-Id: <202411221226.4AMCQXdN078165@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: 6463b6b59152 - main - pfctl: clear statistic for specified addresses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 6463b6b59152fb1695bbe0de78f6e2675c5a765a Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6463b6b59152fb1695bbe0de78f6e2675c5a765a commit 6463b6b59152fb1695bbe0de78f6e2675c5a765a Author: Kristof Provost AuthorDate: 2024-11-21 20:33:41 +0000 Commit: Kristof Provost CommitDate: 2024-11-22 11:22:16 +0000 pfctl: clear statistic for specified addresses The ioctl DIOCRCLRASTATS provides the functionality of clearing stats not only for the whole table for for addresses stored in that table. The functionality was missing from pfctl, though. Add it now. PR: 282877 Obtained from: OpenBSD, kirill , e496dff3a7 MFC after: 3 weeks --- sbin/pfctl/pfctl.8 | 6 ++--- sbin/pfctl/pfctl.h | 1 + sbin/pfctl/pfctl_radix.c | 23 +++++++++++++++++ sbin/pfctl/pfctl_table.c | 17 +++++++++++-- tests/sys/netpfil/pf/table.sh | 57 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 5 deletions(-) diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8 index 80fdc394a568..45a6ea525694 100644 --- a/sbin/pfctl/pfctl.8 +++ b/sbin/pfctl/pfctl.8 @@ -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 July 23, 2024 +.Dd November 20, 2024 .Dt PFCTL 8 .Os .Sh NAME @@ -506,8 +506,8 @@ Automatically create a nonexisting table. Show the content (addresses) of a table. .It Fl T Cm test Test if the given addresses match a table. -.It Fl T Cm zero -Clear all the statistics of a table. +.It Fl T Cm zero Op Ar address ... +Clear all the statistics of a table, or only for specified addresses. .It Fl T Cm load Load only the table definitions from .Xr pf.conf 5 . diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index cf198d557299..b4aba3beb4a6 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -60,6 +60,7 @@ int pfr_del_tables(struct pfr_table *, int, int *, int); int pfr_get_tables(struct pfr_table *, struct pfr_table *, int *, int); int pfr_get_tstats(struct pfr_table *, struct pfr_tstats *, int *, int); int pfr_clr_tstats(struct pfr_table *, int, int *, int); +int pfr_clr_astats(struct pfr_table *, struct pfr_addr *, int, int *, int); int pfr_clr_addrs(struct pfr_table *, int *, int); int pfr_add_addrs(struct pfr_table *, struct pfr_addr *, int, int *, int); int pfr_del_addrs(struct pfr_table *, struct pfr_addr *, int, int *, int); diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c index cfe982a84e95..749e8b4affc9 100644 --- a/sbin/pfctl/pfctl_radix.c +++ b/sbin/pfctl/pfctl_radix.c @@ -286,6 +286,29 @@ pfr_get_astats(struct pfr_table *tbl, struct pfr_astats *addr, int *size, return (0); } +int +pfr_clr_astats(struct pfr_table *tbl, struct pfr_addr *addr, int size, + int *nzero, int flags) +{ + struct pfioc_table io; + + if (size < 0 || (size && !tbl) || addr == NULL) { + errno = EINVAL; + return (-1); + } + bzero(&io, sizeof io); + io.pfrio_flags = flags; + io.pfrio_table = *tbl; + io.pfrio_buffer = addr; + io.pfrio_esize = sizeof(*addr); + io.pfrio_size = size; + if (ioctl(dev, DIOCRCLRASTATS, &io) == -1) + return (-1); + if (nzero) + *nzero = io.pfrio_nzero; + return (0); +} + int pfr_clr_tstats(struct pfr_table *tbl, int size, int *nzero, int flags) { diff --git a/sbin/pfctl/pfctl_table.c b/sbin/pfctl/pfctl_table.c index 6085722f9306..25d9b87d8718 100644 --- a/sbin/pfctl/pfctl_table.c +++ b/sbin/pfctl/pfctl_table.c @@ -344,9 +344,22 @@ pfctl_table(int argc, char *argv[], char *tname, const char *command, } if (nmatch < b.pfrb_size) rv = 2; + } else if (!strcmp(command, "zero") && (argc || file != NULL)) { + b.pfrb_type = PFRB_ADDRS; + if (load_addr(&b, argc, argv, file, 0)) + goto _error; + if (opts & PF_OPT_VERBOSE) + flags |= PFR_FLAG_FEEDBACK; + RVTEST(pfr_clr_astats(&table, b.pfrb_caddr, b.pfrb_size, + &nzero, flags)); + xprintf(opts, "%d/%d addresses cleared", nzero, b.pfrb_size); + if (opts & PF_OPT_VERBOSE) + PFRB_FOREACH(a, &b) + if (opts & PF_OPT_VERBOSE2 || + a->pfra_fback != PFR_FB_NONE) + print_addrx(a, NULL, + opts & PF_OPT_USEDNS); } else if (!strcmp(command, "zero")) { - if (argc || file != NULL) - usage(); flags |= PFR_FLAG_ADDRSTOO; RVTEST(pfr_clr_tstats(&table, 1, &nzero, flags)); xprintf(opts, "%d table/stats cleared", nzero); diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index 32943e659bd0..828d76a998be 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -109,6 +109,62 @@ v6_counters_cleanup() pft_cleanup } +atf_test_case "zero_one" "cleanup" +zero_one_head() +{ + atf_set descr 'Test zeroing a single address in a table' + atf_set require.user root +} + +zero_one_body() +{ + epair_send=$(vnet_mkepair) + ifconfig ${epair_send}a 192.0.2.1/24 up + ifconfig ${epair_send}a inet alias 192.0.2.3/24 + + vnet_mkjail alcatraz ${epair_send}b + jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "table counters { 192.0.2.1, 192.0.2.3 }" \ + "block all" \ + "pass in from to any" \ + "pass out from any to " \ + "set skip on lo" + + atf_check -s exit:0 -o ignore ping -c 3 -S 192.0.2.1 192.0.2.2 + atf_check -s exit:0 -o ignore ping -c 3 -S 192.0.2.3 192.0.2.2 + + jexec alcatraz pfctl -t foo -T show -vv + + atf_check -s exit:0 -e ignore \ + -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \ + -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \ + -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \ + -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \ + jexec alcatraz pfctl -t foo -T show -vv + + atf_check -s exit:0 -e ignore \ + jexec alcatraz pfctl -t foo -T zero 192.0.2.3 + + # We now have a zeroed and a non-zeroed counter, so both patterns + # should match + atf_check -s exit:0 -e ignore \ + -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \ + -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \ + jexec alcatraz pfctl -t foo -T show -vv + atf_check -s exit:0 -e ignore \ + -o match:'In/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \ + -o match:'Out/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \ + jexec alcatraz pfctl -t foo -T show -vv +} + +zero_one_cleanup() +{ + pft_cleanup +} + atf_test_case "pr251414" "cleanup" pr251414_head() { @@ -324,6 +380,7 @@ atf_init_test_cases() { atf_add_test_case "v4_counters" atf_add_test_case "v6_counters" + atf_add_test_case "zero_one" atf_add_test_case "pr251414" atf_add_test_case "automatic" atf_add_test_case "network" From nobody Fri Nov 22 13:01:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvwGr2K74z5dsL8; Fri, 22 Nov 2024 13:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvwGr1gKjz4nJn; Fri, 22 Nov 2024 13:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732280516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IY+FV8yJ3fI+0qVac3FwHRhILHVvXAOqEKHWohGMdao=; b=bjwU8dmBCDZrHANuu61hRmFkkaP2oGGeWD2jgNZrLDovp38dZTGAssu7y7ZgahgRQZTJjS d3hMSt7mDymFx0r4YVUA1GqBd09KqGcn2O+dimrxhNLpR5tDf7lRmEdws3lUKE5Ijey+yz D2CmccZfrD8VzuxcFUEqsX7Nf92CtUyPpc5XXmF8CmTjbGZUtCvh5z+uKPCy/b5Lp9iS9z 4KKsrJ454BoI3aPgvDgqrTWYBGytKX/qhz15NsCGG3JpKOCUN9iH3n3kjmcJi0ohUfzqOk q4uLZzzKF9lCXMmvwVtTMONCjCiDoY3oh0e3gXdvKpHjHkcsYZ/zzC4gJUIYFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732280516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IY+FV8yJ3fI+0qVac3FwHRhILHVvXAOqEKHWohGMdao=; b=POPytbD+965CukC1T8aXRTqVRzgDfpXrzZMKEcUzJ1mtZMMxbgmIvtzpdqkqTv16j+snF5 YPNyJ+I3i8nh39nQ4WbqOybDm0Rzg7jULZrCd49Xtz2v3R6mi/TVOV5862lPZ716bBwNIQ G+TEmzl1weQILvhGQ6Wwzgp8uGI0OA9oPb9B6OcVs4HErFAC+HP07ULFQZb9HW75PQjWaQ QRbP3XwE9cqagoIMsTzX3UD2m+kBZhvKkW4fk5g14WdtfmFPD8/NRZsz21fZBlzU86qUCI CG/BluNLCfVdGvO0byLhZfN57s4IsIuxfTCbj4Itg7UDMzONLss1lZSFrQGJBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732280516; a=rsa-sha256; cv=none; b=MQJU8DyHmhpeUpV76ERyikrF+W6bhydrZXWzJVyZLsWtFoYdntJ6nndNn56+xSxk4hz191 mnytajNcPbECY9R5cMNd069/e2dNdnSh4+/d5mDWYyGUbGlaavaBBHtcgqhxSVxo/XDvT2 Lo3lTlRlDGU+a4ye4Hq1Weg3ikLeJ23xt1uSEVcJ/PN0VnYKej0LqTz9Nqxk29yuBzjA43 5uapcDs1dhJ1KOx0OZaKy2R7ekuuXFNkfk/OIQ7+sFyuiifTrqvBAc+ZP2ikhj7txXRR7n lw1tqBLwUgaHX9WGZq29VaSST6dSaCrgYqL32XpaO7k72CtpPB5AXgwSZHE5FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvwGr1G6pzQ4k; Fri, 22 Nov 2024 13:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMD1uD9047421; Fri, 22 Nov 2024 13:01:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMD1uJv047418; Fri, 22 Nov 2024 13:01:56 GMT (envelope-from git) Date: Fri, 22 Nov 2024 13:01:56 GMT Message-Id: <202411221301.4AMD1uJv047418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f85dd3f546ba - main - src.conf.5: Regen after MK_PROFILE removal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f85dd3f546ba97c22918a9d16b2539978539532c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f85dd3f546ba97c22918a9d16b2539978539532c commit f85dd3f546ba97c22918a9d16b2539978539532c Author: Ed Maste AuthorDate: 2024-11-22 13:01:11 +0000 Commit: Ed Maste CommitDate: 2024-11-22 13:01:11 +0000 src.conf.5: Regen after MK_PROFILE removal Fixes: 3750ccefb862 ("Retire MK_PROFILE infrastructure") Sponsored by: The FreeBSD Foundation --- share/man/man5/src.conf.5 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index e8cbd30892d3..a1465b0729a3 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 30, 2024 +.Dd November 22, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1510,11 +1510,6 @@ and related programs. Do not build .Xr ppp 8 and related programs. -.It Va WITH_PROFILE -Build profiled libraries for use with -.Xr gprof 8 . -This option is deprecated and may not be present in a future version of -.Fx . .It Va WITHOUT_PTHREADS_ASSERTIONS Disable debugging assertions in pthreads library. .It Va WITHOUT_QUOTAS From nobody Fri Nov 22 14:05:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvxgn4Y9Dz5dwx9; Fri, 22 Nov 2024 14:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvxgn3rMqz4xFF; Fri, 22 Nov 2024 14:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WmckdWA3Ijae6H8OZrIX1mpOh4IKTqUEkPs8RQSaZ/k=; b=PmAZT4YknG7WIWOxUG48ieuxoiWNEA08kUeB8NOLO2qw+ZHQFXFrMER1cdCeS1/C8WUBAm PVDxWQwcmnVvuWZStcSxQ28DY1g1Au8LlhQHQvrO/CdPvcsP5y1Nlso7ah3xdm1IanB61C 9WXV2qJ9SBwpbUA/7rhjFrperM5nCGJ+Kw3gq7QFoaEZt43Eamc/uTLJsWdhPbrpPhMJ/L 8PHoMfv2FsR/EvAf2YMMMzYIIOxU9pS0aRENWERE3tcka7DdXqqqpM1wcYI40MP/OjoVKn O4V9RH5KWfoAnILmu1Q23AhNqELMv/LZdZPIuikj5L85A1dCrVSRZT9ZX4+XzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WmckdWA3Ijae6H8OZrIX1mpOh4IKTqUEkPs8RQSaZ/k=; b=myPKqbN+hgVI6AuZ5sLgO5N68+Lex04tyyMWY8dLIIdSGFEtAwpjqsUQtR9Ix/iVVIQblf YFx7DeWPRsm4h4VJ97NjF397KvpD2YLJ5HnKMxc7nucQGN3hUVguIuIZqaQQh1QlyAK5RR 2RX9/3ygodUmadIus2IGK6BHlIthUmloYu6PEaLSnyj+FPk/0owZ85LaU1wI/HfS1Fe4rV o3vRFs27il/V0i0lVuULCJHIht05a9edgOu1gV8Wxsj019f7pPG+rKXVCsDzJouwe9TRgp lG1YMqWA6ml9az5+qyMH3sVg4RG2fo4C9RV0v6QMDTBoIMdI1cJNJTySSi0ZuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732284309; a=rsa-sha256; cv=none; b=D/FTtT4oE2D4suDc5md2z+b/MCT1H5bXM8cBF9PWlEHnnj4QvqQEFXcHbXJ1Y5FikPM8+A xYTXmuUTczlCqZDeYHa8SQEYuUUcZySqxRJgieevWDAHlBoxHKqSvfbQOQRYZ0HI4eX6pV fyFIzw4x96XkFp890Y+F/gRZkGQFFMtKo/j+2edvWRGJSZx5//4Cm3ls1BuvUIjO2yhSfI nYuDy1SNz7yUzNieuGvMnctAKlcaargSZXY6FG6Fz/MscI7fKeIPLcpREBTUNpJbiAZ7nA a0IXv0hNOzKWtm5RXKmWx9z6ChQV2iKimeuYlj4r9sU66k0WNHJUj9pVuo9gqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvxgn3S1LzQjV; Fri, 22 Nov 2024 14:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AME597b065072; Fri, 22 Nov 2024 14:05:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AME59VH065069; Fri, 22 Nov 2024 14:05:09 GMT (envelope-from git) Date: Fri, 22 Nov 2024 14:05:09 GMT Message-Id: <202411221405.4AME59VH065069@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: 418d8f0dc269 - main - dtrace: Address KMSAN warnings in dtrace_disx86 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 418d8f0dc269b314bba51de63869b20da1d9a76e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=418d8f0dc269b314bba51de63869b20da1d9a76e commit 418d8f0dc269b314bba51de63869b20da1d9a76e Author: Mark Johnston AuthorDate: 2024-11-22 13:50:26 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 14:03:40 +0000 dtrace: Address KMSAN warnings in dtrace_disx86 wbit was not being initialized in a couple of cases. Reported by: asomers MFC after: 2 weeks --- sys/cddl/dev/dtrace/x86/dis_tables.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/cddl/dev/dtrace/x86/dis_tables.c b/sys/cddl/dev/dtrace/x86/dis_tables.c index 1afadc94afc2..44c96437055b 100644 --- a/sys/cddl/dev/dtrace/x86/dis_tables.c +++ b/sys/cddl/dev/dtrace/x86/dis_tables.c @@ -3720,8 +3720,8 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mode) x->d86_len = 0; x->d86_rmindex = -1; x->d86_error = 0; -#ifdef DIS_TEXT x->d86_numopnds = 0; +#ifdef DIS_TEXT x->d86_seg_prefix = NULL; x->d86_mnem[0] = 0; for (i = 0; i < 4; ++i) { @@ -4860,6 +4860,7 @@ mm_shift: dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m); dtrace_get_operand(x, mode, r_m, LONG_OPND, vbit); dtrace_get_operand(x, REG_ONLY, reg, SEG_OPND, 1 - vbit); + wbit = SEG_OPND; break; /* @@ -5787,6 +5788,7 @@ xmmprm: #endif dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); dtrace_get_operand(x, mode, r_m, BYTE_OPND, 0); + wbit = LONG_OPND; } break; @@ -6442,7 +6444,7 @@ done: else x->d86_memsize = dp->it_size; - } else if (wbit == 0) { + } else if (wbit == BYTE_OPND) { x->d86_memsize = 1; } else if (wbit == LONG_OPND) { From nobody Fri Nov 22 14:05:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvxgp6KLxz5dwyq; Fri, 22 Nov 2024 14:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvxgp4qgYz4x9h; Fri, 22 Nov 2024 14:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rh1kFPKVTKPpakge8A9oxgx7BMfe8XMt7gBmP2AZYB4=; b=e0etBCSnFr5DUomOVOcjsVUtdO7Ew+24WcHALiQ+6qCFYVkzeLEzklLqR4ek4BgAjYog3C BORX0B7DyMk1H2g7TNVF/T/RO4kdHJMFvcz6Gc4gkFO+9UJaReX4VYgLks6b9MIwjs/G1Q r9gjtu4X6RobH2eTjyNPaDmNI273e3TqzFDFKDJOwkL0YrgHHMXOwv45LhY0owBKkK10b0 YFUYzn2dffpm2SJDO5BOTEOVsJaGU3heycfJ+Q7U3hzoJBR5I2WQEKwsAKFtpFgrHRdqjw mF3MVb7aF45OKpZMMrInHDRUcO7Y7uGKjo3SS6xkaqTE8vB+Uc1t3wTSRmyGTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rh1kFPKVTKPpakge8A9oxgx7BMfe8XMt7gBmP2AZYB4=; b=Do9KEhipbgNJeH+V18ZTbaVGSQwIuoUhna3r9rvrLGB91JJzVXoxEH1XRgw2wxZTj2dsYa LRa104ZHfFwrANvayeNrz8GprJWQJejqG1AGawMk330x41vkp98Oo+BIO31SKwuMHWH8td ewTtmj3GCnoc1ZaPOPLf5o25OOKfJ/BXLwcghBKMviPXY54PB7n+WyML2kMTGNN3r+/dSN VRP9vvYMvUYbaDlCevMG8jbEdKGpJuwFwDZyq2WDLBbhsuf1OYrAnXT87iKQNljAZNJsBQ JrUOt7ChhNdV0AoPu07Lb9K6wFT3bYz2sVYpSrScQiMxaYjIxX1Oo8oeEt8iHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732284310; a=rsa-sha256; cv=none; b=G8Jbjv9cYRsVBCRiDFF7Eut7dmUazQjSoPc/u9w+Ovp+xCP7T0VA4roB+gnwu/jHz0fb4w IWk+s5f3zP8nCxtjeY3Uu3kK+Tg+1qUNnqAs1ghi3mewiEUwG07+jrfzkXnph5f6wGLVzJ qTBxMrHORnNK0o80ZPziz7KVWhclFXvCEIUlCbaPHHtKuN3kuw+kR6fRRIpUR08ykReH4+ pTL3gK1cEN+p9ctxr2O6ykzSe6tQuNUoYPWmNtVA0Fh46a3WgQjLe0GrgRfZ0Gncd7J3PE X7LkQoefsftRIvikYqg3Svj7scyfAmaN73WQQ9rzItrH33dFj5oW9EXnV+/Uzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvxgp4RH6zS1Q; Fri, 22 Nov 2024 14:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AME5AUD065123; Fri, 22 Nov 2024 14:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AME5A52065120; Fri, 22 Nov 2024 14:05:10 GMT (envelope-from git) Date: Fri, 22 Nov 2024 14:05:10 GMT Message-Id: <202411221405.4AME5A52065120@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: cc3da1955c16 - main - dtrace/amd64: Make invop providers usable with KMSAN enabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: cc3da1955c16df5eb0019e0fef810696b035b7cf Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cc3da1955c16df5eb0019e0fef810696b035b7cf commit cc3da1955c16df5eb0019e0fef810696b035b7cf Author: Mark Johnston AuthorDate: 2024-11-22 13:51:37 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 14:03:40 +0000 dtrace/amd64: Make invop providers usable with KMSAN enabled - Use a fresh context when entering dtrace_invop() via a breakpoint exception. - Mark the #BP trapframe as initialized. MFC after: 2 weeks --- sys/cddl/dev/dtrace/amd64/dtrace_asm.S | 8 ++++++++ sys/cddl/dev/dtrace/amd64/dtrace_subr.c | 3 +++ 2 files changed, 11 insertions(+) diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_asm.S b/sys/cddl/dev/dtrace/amd64/dtrace_asm.S index 4c18fbf08220..217d8c2936eb 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_asm.S +++ b/sys/cddl/dev/dtrace/amd64/dtrace_asm.S @@ -58,6 +58,8 @@ ENTRY(dtrace_invop_start) + KMSAN_ENTER + /* * #BP traps with %rip set to the next address. We need to decrement * the value to indicate the address of the int3 (0xcc) instruction @@ -77,6 +79,12 @@ call dtrace_invop addq $16, %rsp +#ifdef KMSAN + movq %rax, %r12 + KMSAN_LEAVE + movq %r12, %rax +#endif + cmpl $DTRACE_INVOP_PUSHL_EBP, %eax je bp_push cmpl $DTRACE_INVOP_CALL, %eax diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c index 09b820241e50..81aa53d00bd8 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -68,6 +69,8 @@ dtrace_invop(uintptr_t addr, struct trapframe *frame, void **scratch) dtrace_invop_hdlr_t *hdlr; int rval; + kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED); + td = curthread; td->t_dtrace_trapframe = frame; rval = 0; From nobody Fri Nov 22 14:05:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvxgr0Wgfz5dwdg; Fri, 22 Nov 2024 14:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvxgq6j4Fz4x6g; Fri, 22 Nov 2024 14:05:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3bBXueLzijA1KINZ6ZJFc76BmcsrttUXBn2SjLepJI=; b=vr0IN+xyrPE80yFctOee4qpub+Lwx2PDCER4Bf/NNMFcBF+tdq05WN9ZTBfO+IC8y6rD29 nQZTy/65Cv5GnjLHESDxb/cZw4WmFXoMqHhot3bOamBzzWeg1swk+gpfzHwaak/WMYK4NP Vju5ln27J1d9c7ko5pHdXPn+KSQ0fUp56hoWBw5tU1PkAcNGDqQ4XuJoNCe3E3HHXSs0i4 O/do+cXowNtVTEubI7GW93AoHWq9TOXbM6yGqrzGthHqcX9TVVQRpngy2240YJ+W6ZYlYA ixOonQEyrdXGhEAOtxJYmnP4A1PE9T95ZRWtEH1usTExxZIPYSiooTv8pTYZGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3bBXueLzijA1KINZ6ZJFc76BmcsrttUXBn2SjLepJI=; b=vJlwKrv9AXhanFyAMTFjvIxns7deXIJYbyD/bHiHqnxteb+XiZDL4prEWLrH532WqQ3PCe Cfy5UesR7+BTVUEsp5VIXZGwe+Q/rZLGzS8R8CLmSgZEoRp+w6iqp8cXGZErQYRHfj1tMr CKweVvv5oWRRe6KDGE/OCt1kCfrb3NSh4mmzlpNREmCi2acSg57SgWAzy7qX24jFt7HHP1 X8IrZScQxgORuJ9nNrvvevbtzettoV+KSPsugzXqhTocve2VdbWVta/7dKmucJaP1kJVjV D9S2Xo/uEEByz2hm5ZQVQmkDl3iRCMjLB5Tk5G2yFl2Xpk3eNSxg6BWyhPHcRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732284311; a=rsa-sha256; cv=none; b=f46SPU4huqnged0UZGWaYB4r5IBNvsZXsfFXmi5DBtIryelbcXU3fi7OB3o1y/xDneTx/E FmWmMMy3E0RoctmRasenip2RTmxTXDeCHfOrCdrvin8SsY63phzMgvJrrSHjV3lXXXoy3y DnqJpb91DbDWyUL3fP60HiXvJhDjZ3MyFQj40ZHFHmlobALEpbMs29Z9+XfTFrX85sqY51 wrJbSgmUrhZ3pOifzfSzmwXmESTovT8rKZrbxVOpPVGQ3ceL1oOScKQVgNNPvcJbXcGKOp T5SOhGPt902Pv+Dx5j+mlk4ELDAnS+OaS62wrWurTFbgzkvRtL1QnOLcHzlilQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvxgq5RkhzRkP; Fri, 22 Nov 2024 14:05:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AME5Brf065177; Fri, 22 Nov 2024 14:05:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AME5Bgm065174; Fri, 22 Nov 2024 14:05:11 GMT (envelope-from git) Date: Fri, 22 Nov 2024 14:05:11 GMT Message-Id: <202411221405.4AME5Bgm065174@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: 0289db325953 - main - netlink/route: Fix the argument list for rtnl_handle_iflink() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0289db3259532d51ebe58bc0b2647a0d9e6cae66 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0289db3259532d51ebe58bc0b2647a0d9e6cae66 commit 0289db3259532d51ebe58bc0b2647a0d9e6cae66 Author: Mark Johnston AuthorDate: 2024-11-22 13:52:57 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 14:03:40 +0000 netlink/route: Fix the argument list for rtnl_handle_iflink() This function is registered as a ifnet_link_event and so should have the corresponding argument list. PR: 282870 Reported by: nakayamakenjiro@gmail.com MFC after: 1 week --- sys/netlink/route/iface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 48fdab6a8475..e6a3d7d00a8f 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -1429,7 +1429,7 @@ rtnl_handle_ifdetach(void *arg, if_t ifp) } static void -rtnl_handle_iflink(void *arg, if_t ifp) +rtnl_handle_iflink(void *arg, if_t ifp, int link_state __unused) { NL_LOG(LOG_DEBUG2, "ifnet %s", if_name(ifp)); rtnl_handle_ifevent(ifp, NL_RTM_NEWLINK, 0); From nobody Fri Nov 22 14:05:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvxgs2hg9z5dwkW; Fri, 22 Nov 2024 14:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvxgs03PZz4xcb; Fri, 22 Nov 2024 14:05:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uXagd7qmvBijmT+0MhVve843tRFvwSXXcCvvxmGTWCw=; b=GceoqHJ4P7ZBldkaL6dsPTBcp/5a3bXM/xsw9H8a2hEE27DvNgxrqzGA7O/LPjPQMsrocf wUKBRGxLyef+tkHGtXAyDPJHu37qwAT1zpQknWctKtVJlFgvf5vVExwmPJuMV+5G5EPRMM xNN8gICipE/EUaotgomLsp43g3vBWGki9NQviV/fiDyqixSf1EEDn0/eyOegSchxWnyzRv ta8h31CLvaN96sRIFlZMZmYXf2gCFzaliavJl+XdphewvaFzM02PzcbptBMHVMRh6JSGVY nHKvCSrZvDY6Wsh1oFVJWV9c3uBYHJWUL61+UMgodAYbJGMKJRecdrADRCngqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uXagd7qmvBijmT+0MhVve843tRFvwSXXcCvvxmGTWCw=; b=HagTx7NeuhnuYXQu4B3dvQpLgFWo24lbRKF3hRsBl4JWufeQ1RHXGJ8zut/UvwdCpy5Fcv g+OlwcFYWvmYOHEfclO3Z3J7c4NW+HKJZbcln/NVQXkzjHmRYA3KQWr03zRUsI8FrfotJ6 2obJRQfWAcozSVE0kXbCEMh0DZ6kxoRKVQ+/rn/gnVzMh8Qfdwpa2KvcjI3x1RN3vTQOmd KBvZmBsXVx8OwscxTYeomAGEb3gZMAhlqiFOd/vm+Z+Y43vkzjiv6LfmHwGEV+LFz9jeju lnG/yHWkj9NInGC39Q144hHJflHYivtxnnJTkz2hZewpCxEAyvgiY5KUM4XiGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732284313; a=rsa-sha256; cv=none; b=OnYeVRKW+Y6ZD4Gl059wrUsdS6mxYIB8mTOnY1VqR83cigSsRM+RSVfMtJQyTB8N1bBC3o D0w8T4yR4JBgJ5ZsxM7jNK56ahrrW+IRFKmY7lQeWt62EDJXtxHzVO2j6/mMyYxa0m1CRk GYqRe5h7TyVDLKjMLA5Vfe5ewgUvXcsmLmaWMPv5dYKX9QiZazx4LWKt9bq6CZl+R/mZxH cNCSt40J4GtDWmCdfpQbflHk2+s6QjcaXojCooCNr2SaA5/0Ow81xfioHQvPzYotQz5hgS VIT7atuIwWVWNRQsUC81Bfukj7NdWMbOyBj0eM3Kxv6bVpdoCUBx4JLQpoyGcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvxgr6WqszS4W; Fri, 22 Nov 2024 14:05:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AME5CaD065224; Fri, 22 Nov 2024 14:05:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AME5CsL065221; Fri, 22 Nov 2024 14:05:12 GMT (envelope-from git) Date: Fri, 22 Nov 2024 14:05:12 GMT Message-Id: <202411221405.4AME5CsL065221@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: 4efe531c9d50 - main - buf: Add a runningbufclaim() helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4efe531c9d50a803a28d001fab9cc3011eb1f587 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4efe531c9d50a803a28d001fab9cc3011eb1f587 commit 4efe531c9d50a803a28d001fab9cc3011eb1f587 Author: Mark Johnston AuthorDate: 2024-11-22 13:54:08 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 14:03:40 +0000 buf: Add a runningbufclaim() helper No functional change intended. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47696 --- sys/kern/vfs_bio.c | 15 ++++++++++++--- sys/sys/buf.h | 2 +- sys/ufs/ffs/ffs_snapshot.c | 11 ++++------- sys/ufs/ffs/ffs_vfsops.c | 4 +--- sys/vm/vnode_pager.c | 8 ++++---- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 10ee88328875..d6392c025a94 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -206,7 +206,7 @@ static int sysctl_bufspace(SYSCTL_HANDLER_ARGS); int vmiodirenable = TRUE; SYSCTL_INT(_vfs, OID_AUTO, vmiodirenable, CTLFLAG_RW, &vmiodirenable, 0, "Use the VM system for directory writes"); -long runningbufspace; +static long runningbufspace; SYSCTL_LONG(_vfs, OID_AUTO, runningbufspace, CTLFLAG_RD, &runningbufspace, 0, "Amount of presently outstanding async buffer io"); SYSCTL_PROC(_vfs, OID_AUTO, bufspace, CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RD, @@ -941,6 +941,16 @@ runningbufwakeup(struct buf *bp) runningwakeup(); } +long +runningbufclaim(struct buf *bp, int space) +{ + long old; + + old = atomic_fetchadd_long(&runningbufspace, space); + bp->b_runningbufspace = space; + return (old); +} + /* * waitrunningbufspace() * @@ -2352,8 +2362,7 @@ bufwrite(struct buf *bp) /* * Normal bwrites pipeline writes */ - bp->b_runningbufspace = bp->b_bufsize; - space = atomic_fetchadd_long(&runningbufspace, bp->b_runningbufspace); + space = runningbufclaim(bp, bp->b_bufsize); #ifdef RACCT if (racct_enable) { diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 832cfaa617a5..9d916faef4b1 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -519,7 +519,6 @@ extern int nbuf; /* The number of buffer headers */ extern u_long maxswzone; /* Max KVA for swap structures */ extern u_long maxbcache; /* Max KVA for buffer cache */ extern int maxbcachebuf; /* Max buffer cache block size */ -extern long runningbufspace; extern long hibufspace; extern int dirtybufthresh; extern int bdwriteskip; @@ -536,6 +535,7 @@ buf_mapped(struct buf *bp) return (bp->b_data != unmapped_buf); } +long runningbufclaim(struct buf *, int); void runningbufwakeup(struct buf *); void waitrunningbufspace(void); caddr_t kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est); diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index b0adb6c033c7..f4eed782f7bc 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -2343,9 +2343,8 @@ ffs_copyonwrite(struct vnode *devvp, struct buf *bp) TAILQ_EMPTY(&sn->sn_head)) { VI_UNLOCK(devvp); if (saved_runningbufspace != 0) { - bp->b_runningbufspace = saved_runningbufspace; - atomic_add_long(&runningbufspace, - bp->b_runningbufspace); + (void)runningbufclaim(bp, + saved_runningbufspace); } return (0); /* Snapshot gone */ } @@ -2479,10 +2478,8 @@ ffs_copyonwrite(struct vnode *devvp, struct buf *bp) /* * I/O on bp will now be started, so count it in runningbufspace. */ - if (saved_runningbufspace != 0) { - bp->b_runningbufspace = saved_runningbufspace; - atomic_add_long(&runningbufspace, bp->b_runningbufspace); - } + if (saved_runningbufspace != 0) + (void)runningbufclaim(bp, saved_runningbufspace); return (error); } diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index bcf7f0f05a7b..2bfee6a6145d 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -2517,9 +2517,7 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp) return; } } - bp->b_runningbufspace = bp->b_bufsize; - atomic_add_long(&runningbufspace, - bp->b_runningbufspace); + (void)runningbufclaim(bp, bp->b_bufsize); } else { error = ffs_copyonwrite(vp, bp); if (error != 0 && error != EOPNOTSUPP) { diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 98b905f27c4a..842d4ab89b90 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -717,8 +717,7 @@ vnode_pager_input_smlfs(vm_object_t object, vm_page_t m) bp->b_vp = vp; bp->b_bcount = bsize; bp->b_bufsize = bsize; - bp->b_runningbufspace = bp->b_bufsize; - atomic_add_long(&runningbufspace, bp->b_runningbufspace); + (void)runningbufclaim(bp, bp->b_bufsize); /* do the input */ bp->b_iooffset = dbtob(bp->b_blkno); @@ -1160,7 +1159,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, bp->b_wcred = crhold(curthread->td_ucred); pbgetbo(bo, bp); bp->b_vp = vp; - bp->b_bcount = bp->b_bufsize = bp->b_runningbufspace = bytecount; + bp->b_bcount = bp->b_bufsize = bytecount; bp->b_iooffset = dbtob(bp->b_blkno); KASSERT(IDX_TO_OFF(m[0]->pindex - bp->b_pages[0]->pindex) == (blkno0 - bp->b_blkno) * DEV_BSIZE + @@ -1170,7 +1169,8 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, (uintmax_t)m[0]->pindex, (uintmax_t)bp->b_pages[0]->pindex, (uintmax_t)blkno0, (uintmax_t)bp->b_blkno)); - atomic_add_long(&runningbufspace, bp->b_runningbufspace); + (void)runningbufclaim(bp, bp->b_bufsize); + VM_CNT_INC(v_vnodein); VM_CNT_ADD(v_vnodepgsin, bp->b_npages); From nobody Fri Nov 22 14:05:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvxgt4VcTz5dwb5; Fri, 22 Nov 2024 14:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvxgt2lLQz4xJm; Fri, 22 Nov 2024 14:05:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ATWFr7jgaKSUq2XfigXyvZHUJWuCNnajfL+PeMg2l3A=; b=B7J5vLhl0306yTQQLNzKIdA4wzJAINpjaBiE4E36BL59bWc2Nirq0/xYI5AnFAMPYV50Za O5941lfXOXZ0h/i+IpFXhZqnfczn2kVAPwTEGh/JifuyVwxFKNnl1ZIYXS3hNTrlDc7q5F eHi0NcArw0TbnXRsZvP2phWZY73SCcFLrSWu47KCidg/cF+0nwna+BRe6LWuPLM88hqlLu 05Q1Xkgos/GaKkD/RtAqxUONQP6g2ruYjw2if+WarhjU276+42fd0jOedr9gVP6iY1rPop WQZFrhEvJlqE4XkmUuoEVzV3Ivyd9KaHEOGj8nbOUay1/Lo+NAarYSbua0RK3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732284314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ATWFr7jgaKSUq2XfigXyvZHUJWuCNnajfL+PeMg2l3A=; b=hQ1QDmu+nxu3Ev51k3MN1qaOYzFe8ouPgSTtYDhtQFPe1fxdq/B9RpuaMZSJXoDkdq3DX/ b3+SRE1pqfSciAAUmCK+HFqsLNHJKL6zpNM8UWI3T8uFKpimpa/tXCHYjBRifS8xuckEA4 r32Wkt3Z57iTcI0IQ9wVQnCCHdhNbYS3qiPUMpEilCnQcg5tR28rD1XHKGpB1te89AcHX1 0ZEjj5eJn07HMo728zr0aii3pm2VSSji16U2qGHqSYwOgXGVMMlAHdlXewjzgcgU8J1HJw rXZEdu4yEhHwhi+w+9DQ0CniRyt7bxvmbKDH2OuMEqU0+SU2yxtxirh9NOYHgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732284314; a=rsa-sha256; cv=none; b=a10og8J9L4bUTiIwV1yvbks/KwZzuWjVuHNhE+hxQneebVadRlRcDPdiPmGaRAsriiz04W 0t9FAfHS3P5c4UYtmQXuOgWQQ8BX67C22EM+OqMtxAPS5MG6JRftCTbfjrfBAGF1s+m0A5 3dlAkCZ9V2jtuWnYrABtavorIoCU0i0Jc1FshP8AshAuLn1EaLTA50ZWgiEKCZJ7oYxDWe CDOnQr+J0FMiySo9+dBtWzG7j+XuVwiU8lqo6Bjo05Povof65h+nY21y2UV7AIwmIHBMQ/ MG3b64muTsbPQ7mDzt5Whqwi9l71kr2d737Jcg6NRicjSO+dYHh1eF2VtCLAJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvxgt05VMzS4X; Fri, 22 Nov 2024 14:05:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AME5Dae065270; Fri, 22 Nov 2024 14:05:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AME5Ddk065267; Fri, 22 Nov 2024 14:05:13 GMT (envelope-from git) Date: Fri, 22 Nov 2024 14:05:13 GMT Message-Id: <202411221405.4AME5Ddk065267@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: 5d12db2dafec - main - dtrace: Avoid excessive pcpu allocations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5d12db2dafece9f6a0453c4a45c4abed6b1e15ec Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5d12db2dafece9f6a0453c4a45c4abed6b1e15ec commit 5d12db2dafece9f6a0453c4a45c4abed6b1e15ec Author: Mark Johnston AuthorDate: 2024-11-22 13:55:20 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 14:04:12 +0000 dtrace: Avoid excessive pcpu allocations We were previously allocating MAXCPU structures for several purposes, but this is generally unnecessary and is quite excessive, especially after MAXCPU was bumped to 1024 on amd64 and arm64. We already are careful to allocate only as many per-CPU tracing buffers as are needed; extend this to other allocations. For example, in a 2-vCPU VM, the size of a consumer state structure drops from 64KB to 128B. The size of the per-consumer `dts_buffer` and `dts_aggbuffer` arrays shrink similarly. Ditto for pre-allocations of local and global D variable storage space. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47667 --- .../contrib/opensolaris/uts/common/dtrace/dtrace.c | 66 ++++++++++------------ sys/cddl/dev/dtrace/dtrace_ioctl.c | 2 +- sys/cddl/dev/dtrace/dtrace_load.c | 4 +- 3 files changed, 33 insertions(+), 39 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index d3e40e96e897..5f635cc088d7 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -741,7 +741,7 @@ dtrace_canstore_statvar(uint64_t addr, size_t sz, size_t *remain, return (0); maxglobalsize = dtrace_statvar_maxsize + sizeof (uint64_t); - maxlocalsize = maxglobalsize * NCPU; + maxlocalsize = maxglobalsize * (mp_maxid + 1); for (i = 0; i < nsvars; i++) { dtrace_statvar_t *svar = svars[i]; @@ -1744,7 +1744,7 @@ dtrace_dynvar_clean(dtrace_dstate_t *dstate) dtrace_dynvar_t **rinsep; int i, j, work = 0; - for (i = 0; i < NCPU; i++) { + CPU_FOREACH(i) { dcpu = &dstate->dtds_percpu[i]; rinsep = &dcpu->dtdsc_rinsing; @@ -1782,7 +1782,7 @@ dtrace_dynvar_clean(dtrace_dstate_t *dstate) * rinsing list -- and then we borrow this CPU to * rinse our dirty list. */ - for (j = 0; j < NCPU; j++) { + CPU_FOREACH(j) { dtrace_dstate_percpu_t *rinser; rinser = &dstate->dtds_percpu[j]; @@ -1800,7 +1800,7 @@ dtrace_dynvar_clean(dtrace_dstate_t *dstate) break; } - if (j == NCPU) { + if (j > mp_maxid) { /* * We were unable to find another CPU that * could accept this dirty list -- we are @@ -1841,7 +1841,7 @@ dtrace_dynvar_clean(dtrace_dstate_t *dstate) dtrace_sync(); - for (i = 0; i < NCPU; i++) { + CPU_FOREACH(i) { dcpu = &dstate->dtds_percpu[i]; if (dcpu->dtdsc_rinsing == NULL) @@ -2190,7 +2190,7 @@ retry: case DTRACE_DSTATE_CLEAN: { void *sp = &dstate->dtds_state; - if (++cpu >= NCPU) + if (++cpu > mp_maxid) cpu = 0; if (dcpu->dtdsc_dirty != NULL && @@ -6504,7 +6504,7 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate, size_t lim; sz += sizeof (uint64_t); - ASSERT(svar->dtsv_size == NCPU * sz); + ASSERT(svar->dtsv_size == (mp_maxid + 1) * sz); a += curcpu * sz; if (*(uint8_t *)a == UINT8_MAX) { @@ -6521,7 +6521,8 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate, break; } - ASSERT(svar->dtsv_size == NCPU * sizeof (uint64_t)); + ASSERT(svar->dtsv_size == + (mp_maxid + 1) * sizeof (uint64_t)); tmp = (uint64_t *)(uintptr_t)svar->dtsv_data; regs[rd] = tmp[curcpu]; break; @@ -6544,7 +6545,7 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate, size_t lim; sz += sizeof (uint64_t); - ASSERT(svar->dtsv_size == NCPU * sz); + ASSERT(svar->dtsv_size == (mp_maxid + 1) * sz); a += curcpu * sz; if (regs[rd] == 0) { @@ -6565,7 +6566,8 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate, break; } - ASSERT(svar->dtsv_size == NCPU * sizeof (uint64_t)); + ASSERT(svar->dtsv_size == + (mp_maxid + 1) * sizeof (uint64_t)); tmp = (uint64_t *)(uintptr_t)svar->dtsv_data; tmp[curcpu] = regs[rd]; break; @@ -10678,10 +10680,11 @@ dtrace_difo_init(dtrace_difo_t *dp, dtrace_vstate_t *vstate) svarp = &vstate->dtvs_locals; if (v->dtdv_type.dtdt_flags & DIF_TF_BYREF) - dsize = NCPU * (v->dtdv_type.dtdt_size + + dsize = (mp_maxid + 1) * + (v->dtdv_type.dtdt_size + sizeof (uint64_t)); else - dsize = NCPU * sizeof (uint64_t); + dsize = (mp_maxid + 1) * sizeof (uint64_t); break; @@ -12603,7 +12606,7 @@ dtrace_buffer_consumed(dtrace_buffer_t *bufs, hrtime_t when) { int i; - for (i = 0; i < NCPU; i++) { + CPU_FOREACH(i) { dtrace_buffer_t *buf = &bufs[i]; if (buf->dtb_size == 0) @@ -12627,7 +12630,7 @@ dtrace_buffer_free(dtrace_buffer_t *bufs) { int i; - for (i = 0; i < NCPU; i++) { + CPU_FOREACH(i) { dtrace_buffer_t *buf = &bufs[i]; if (buf->dtb_tomax == NULL) { @@ -14379,7 +14382,8 @@ dtrace_dstate_init(dtrace_dstate_t *dstate, size_t size) dstate->dtds_size = size; dstate->dtds_base = base; dstate->dtds_percpu = kmem_cache_alloc(dtrace_state_cache, KM_SLEEP); - bzero(dstate->dtds_percpu, NCPU * sizeof (dtrace_dstate_percpu_t)); + bzero(dstate->dtds_percpu, + (mp_maxid + 1) * sizeof (dtrace_dstate_percpu_t)); hashsize = size / (dstate->dtds_chunksize + sizeof (dtrace_dynhash_t)); @@ -14413,14 +14417,10 @@ dtrace_dstate_init(dtrace_dstate_t *dstate, size_t size) VERIFY((uintptr_t)start < limit); VERIFY((uintptr_t)start >= (uintptr_t)base); - maxper = (limit - (uintptr_t)start) / NCPU; + maxper = (limit - (uintptr_t)start) / (mp_maxid + 1); maxper = (maxper / dstate->dtds_chunksize) * dstate->dtds_chunksize; -#ifndef illumos CPU_FOREACH(i) { -#else - for (i = 0; i < NCPU; i++) { -#endif dstate->dtds_percpu[i].dtdsc_free = dvar = start; /* @@ -14430,7 +14430,7 @@ dtrace_dstate_init(dtrace_dstate_t *dstate, size_t size) * whatever is left over. In either case, we set the limit to * be the limit of the dynamic variable space. */ - if (maxper == 0 || i == NCPU - 1) { + if (maxper == 0 || i == mp_maxid) { limit = (uintptr_t)base + size; start = NULL; } else { @@ -14603,7 +14603,7 @@ dtrace_state_create(struct cdev *dev, struct ucred *cred __unused) char c[30]; dtrace_state_t *state; dtrace_optval_t *opt; - int bufsize = NCPU * sizeof (dtrace_buffer_t), i; + int bufsize = (mp_maxid + 1) * sizeof (dtrace_buffer_t), i; int cpu_it; ASSERT(MUTEX_HELD(&dtrace_lock)); @@ -14651,12 +14651,6 @@ dtrace_state_create(struct cdev *dev, struct ucred *cred __unused) state->dts_dev = dev; #endif - /* - * We allocate NCPU buffers. On the one hand, this can be quite - * a bit of memory per instance (nearly 36K on a Starcat). On the - * other hand, it saves an additional memory reference in the probe - * path. - */ state->dts_buffer = kmem_zalloc(bufsize, KM_SLEEP); state->dts_aggbuffer = kmem_zalloc(bufsize, KM_SLEEP); @@ -14666,12 +14660,12 @@ dtrace_state_create(struct cdev *dev, struct ucred *cred __unused) * assumed to be seeded at this point (if from Fortuna seed file). */ arc4random_buf(&state->dts_rstate[0], 2 * sizeof(uint64_t)); - for (cpu_it = 1; cpu_it < NCPU; cpu_it++) { + for (cpu_it = 1; cpu_it <= mp_maxid; cpu_it++) { /* * Each CPU is assigned a 2^64 period, non-overlapping * subsequence. */ - dtrace_xoroshiro128_plus_jump(state->dts_rstate[cpu_it-1], + dtrace_xoroshiro128_plus_jump(state->dts_rstate[cpu_it - 1], state->dts_rstate[cpu_it]); } @@ -14970,7 +14964,7 @@ dtrace_state_go(dtrace_state_t *state, processorid_t *cpu) cyc_handler_t hdlr; cyc_time_t when; #endif - int rval = 0, i, bufsize = NCPU * sizeof (dtrace_buffer_t); + int rval = 0, i, bufsize = (mp_maxid + 1) * sizeof (dtrace_buffer_t); dtrace_icookie_t cookie; mutex_enter(&cpu_lock); @@ -15224,10 +15218,10 @@ dtrace_state_go(dtrace_state_t *state, processorid_t *cpu) * We enable anonymous tracing before APs are started, so we must * activate buffers using the current CPU. */ - if (state == dtrace_anon.dta_state) - for (int i = 0; i < NCPU; i++) + if (state == dtrace_anon.dta_state) { + CPU_FOREACH(i) dtrace_buffer_activate_cpu(state, i); - else + } else dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_buffer_activate, state); #else @@ -15410,7 +15404,7 @@ dtrace_state_destroy(dtrace_state_t *state) #ifdef illumos minor_t minor = getminor(state->dts_dev); #endif - int i, bufsize = NCPU * sizeof (dtrace_buffer_t); + int i, bufsize = (mp_maxid + 1) * sizeof (dtrace_buffer_t); dtrace_speculation_t *spec = state->dts_speculations; int nspec = state->dts_nspeculations; uint32_t match; @@ -15724,7 +15718,7 @@ dtrace_helper_trace(dtrace_helper_action_t *helper, if ((svar = vstate->dtvs_locals[i]) == NULL) continue; - ASSERT(svar->dtsv_size >= NCPU * sizeof (uint64_t)); + ASSERT(svar->dtsv_size >= (mp_maxid + 1) * sizeof (uint64_t)); ent->dtht_locals[i] = ((uint64_t *)(uintptr_t)svar->dtsv_data)[curcpu]; } diff --git a/sys/cddl/dev/dtrace/dtrace_ioctl.c b/sys/cddl/dev/dtrace/dtrace_ioctl.c index be7fff170166..01d51197fde8 100644 --- a/sys/cddl/dev/dtrace/dtrace_ioctl.c +++ b/sys/cddl/dev/dtrace/dtrace_ioctl.c @@ -229,7 +229,7 @@ dtrace_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, "DTRACEIOC_AGGSNAP":"DTRACEIOC_BUFSNAP", curcpu, desc.dtbd_cpu); - if (desc.dtbd_cpu >= MAXCPU || CPU_ABSENT(desc.dtbd_cpu)) + if (desc.dtbd_cpu > mp_maxid || CPU_ABSENT(desc.dtbd_cpu)) return (ENOENT); mutex_enter(&dtrace_lock); diff --git a/sys/cddl/dev/dtrace/dtrace_load.c b/sys/cddl/dev/dtrace/dtrace_load.c index ef2d29e143f8..115e6d0a8ed7 100644 --- a/sys/cddl/dev/dtrace/dtrace_load.c +++ b/sys/cddl/dev/dtrace/dtrace_load.c @@ -100,8 +100,8 @@ dtrace_load(void *dummy) mutex_enter(&dtrace_lock); dtrace_state_cache = kmem_cache_create("dtrace_state_cache", - sizeof (dtrace_dstate_percpu_t) * NCPU, DTRACE_STATE_ALIGN, - NULL, NULL, NULL, NULL, NULL, 0); + sizeof (dtrace_dstate_percpu_t) * (mp_maxid + 1), + DTRACE_STATE_ALIGN, NULL, NULL, NULL, NULL, NULL, 0); ASSERT(MUTEX_HELD(&cpu_lock)); dtrace_bymod = dtrace_hash_create(offsetof(dtrace_probe_t, dtpr_mod), From nobody Fri Nov 22 14:20:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvy1V0Xklz5dxbv; Fri, 22 Nov 2024 14:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvy1T6dTRz51Zv; Fri, 22 Nov 2024 14:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732285229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvTHBAeZHoboaAHnKNs1xdZEMYo/+M2VE/9Q/hoXg1c=; b=Ihbmjab2pJwer/cjlvHWpuqg8A+m8+sjl03HrBKt6C6HkO8FpnQlovgnzdNXQEO3e0ir4/ Ud4StQhJyFts6EZ+hmmxTcyW4El0Jhs4JxnzpvaxeUiq9Qw9x0ngsPQ5aVFTW0kkUrGvqG XJy+aHxlYNJFVUfIRQTfV2nT/hfdNOmzmAMzzExVkMtonmZKeWOLaNdGh6aIar3rCyYwIl t8whRaHtJ6Xmm9U5PMO1T95xu3hyCIpDKFhdSjgD82OsNToOSEhS8yl3dgsHcvZoXDzzdH l9vVgT0CYitU+/j/6j2tMvq8Sxe6kZhSYKIENtGkLBM4aSkuV/iw8o4Nh7Q/mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732285229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvTHBAeZHoboaAHnKNs1xdZEMYo/+M2VE/9Q/hoXg1c=; b=buGBLlltkuQdPX6SH+lierApxH2Hdb2YP3XULq+vpgT+Css5XT98AOanabNFtTP16etrmm nhAnFEMsIfEdVQgTTLGAu4Tm4IwAE/LOGS/HoNlCSRfETfBMgmNY20qYfkLDn5U0tDUOuM S/NogEcAGG9bpdLK9HNK9P0AneubmX2bMWWQFepmkaouWE/U9IQCVtwcImQdhl2ABFbaoA oCNLrA+o2sNt+AP65d2juM0ZJ9AdDkR4jCZHqyHHc1qmqg9H+ckL8mthh+uwLQ5boKb4Ex hbmmhDoIvhQnRbMXZBMK4imomRUc5bSRuXCZsCXys1Wk7RpPGrFylR8qPQsIlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732285229; a=rsa-sha256; cv=none; b=cIF2CdaYOFqjkvcbAf76IpB9iY9dsKA5N2QFWaA4A9YnOT0sBFu+4ZmOIhrB6S/wZkdqJV enNs2/cK3dsBEtRrx7VM7l6RIXOdGR2tzuXX/8Ixe0ki4lHXW/YgtHO3wHJggvJwztL2gK KygszbFojB7qfW4Gyan4mFJvvVry2stM3vmS3GNzGray5KEBmIBSDTZQSyoKkILEGfZKM/ c287XVGEnOIFjHKuUXcFBQFTu8ghjs9uxAQ4Mj+c3HWWr0fXAhlyjlYPE1/rHp+pnQe+W/ GRR1ap4KhXaZcnUkZL1qsLHgVwRl3zWqXHYxOII9NayIxAjzgjJiE+qFa/WFgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvy1T5QT8zSSQ; Fri, 22 Nov 2024 14:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMEKTk6094340; Fri, 22 Nov 2024 14:20:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMEKTwB094337; Fri, 22 Nov 2024 14:20:29 GMT (envelope-from git) Date: Fri, 22 Nov 2024 14:20:29 GMT Message-Id: <202411221420.4AMEKTwB094337@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: 07593d13fa2a - main - efirt: Fix the TDP_EFIRT assertion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 07593d13fa2ad6fe4d962b7473c6020aef2a0414 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=07593d13fa2ad6fe4d962b7473c6020aef2a0414 commit 07593d13fa2ad6fe4d962b7473c6020aef2a0414 Author: Mark Johnston AuthorDate: 2024-11-22 14:19:37 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 14:19:37 +0000 efirt: Fix the TDP_EFIRT assertion Fixes: a03957a706a0 ("efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag") --- sys/dev/efidev/efirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index 37b46ec38dad..8cada0d5061b 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -323,7 +323,7 @@ efi_leave(void) pmap_t curpmap; td = curthread; - MPASS((td->td_pflags & TDP_EFIRT) == 0); + MPASS((td->td_pflags & TDP_EFIRT) != 0); td->td_pflags &= ~TDP_EFIRT; efi_arch_leave(); From nobody Fri Nov 22 15:38:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvzl2662Nz5f2dY; Fri, 22 Nov 2024 15:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvzl25b0Lz3x7x; Fri, 22 Nov 2024 15:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732289886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwtp0PXRvxMR+acIooIIwuWGH86blRZLdREZKI8/PNg=; b=xXNIBxKMVN4vmOr92Nzy1AccpkmlKcfDNpl7S8Zaz/3EveAnts9DOb6V7PpolWtay3uyOo PZh4Ry1e48zWin17yj60QZOYjjLfBOppN3jcvstUvD5uMxcdXnlZeZzN4fL3UQm8xC1dPV Pg7P6UbZw13HyapNUGsADtVthPEYyT6hu3nT5LW3wcJEtELRFE66g7iZoJQ7LEPvWfowN7 5obEuekq2WVRevOkMUkPk5teUp5pcfl4KnLzU2xRNUCfAfmJJLbnaUESPzeoCpDKkB/L67 J+R1V4BZVGhLbn1KZoPyiKZj+FTs1v8PwsI9O/d3usGC6AOPYXQ9yXVA7nwAOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732289886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwtp0PXRvxMR+acIooIIwuWGH86blRZLdREZKI8/PNg=; b=n5ty648iCkEFFmGJoyJHa1h5+eOHuLm/jnKmqLlhM92gPsgXiTUVk20x4NPrppERixubvV H1GpokecPS1Bur6Gr6vGuFzmelMewYaqgXZm0Zmpq0Ts1iFepG6rx2fDJoJhR736REd61u rMx2X4eHCpn8Nm1Ez/tZ41w6Kb3qPiwiViCfRyoRnXaB1LRx8KFD+k0r91+LCFM3scNbi0 q2FQAm+riG6a1vomnJF3ABqwfWybF65GOqpRH71q24bsL1UKi/Ba6uubvTXIVAJrM14UQo jDwoFUzg289XofQrbmMuVgW/LHR4eI7RJyqzTwUaMLBMS88JS0YEoHz7SX7TiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732289886; a=rsa-sha256; cv=none; b=CEzQZmlKup5tgqSP8sN4v2wLCepC3ES0VhyaJoWI9wh03WRYPw+AsovS8LB6TXUxG/qdfp Mxvfg5+y9Wbjq90746yKv+SNWIDvMhsPJruH1K87IGTgiQdVgIwLKU6SN6Y6hLIecaoPa2 ACt2ZCosVlUUo0PFDLzAwkunKBrlL9wgQIKDXUkFg3tBGj6wvXpPnfyAelcNpSe89oK6dn FUwCf7BfBcvAms71BdM7K1DDSV2EKkbDXy60jcn7skUb/yQ9hmFAwf1+kSD8HgvXPXDMDJ fRf/eDzvMiRI+nZNbEcBe4nFGZ79xoAmaR2p1owB/IXzeEdGq9WiBbnYt+LoUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvzl24nH2zW3p; Fri, 22 Nov 2024 15:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMFc6Ef035992; Fri, 22 Nov 2024 15:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMFc6Cf035989; Fri, 22 Nov 2024 15:38:06 GMT (envelope-from git) Date: Fri, 22 Nov 2024 15:38:06 GMT Message-Id: <202411221538.4AMFc6Cf035989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "R. Christian McDonald" Subject: git: d39e0bdc6b76 - stable/14 - rtld/arm: fix initial-exec (IE) thread-local storage relocation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d39e0bdc6b765f9b2fca24fb67951b12ec47348e Auto-Submitted: auto-generated The branch stable/14 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=d39e0bdc6b765f9b2fca24fb67951b12ec47348e commit d39e0bdc6b765f9b2fca24fb67951b12ec47348e Author: R. Christian McDonald AuthorDate: 2023-11-03 12:56:58 +0000 Commit: R. Christian McDonald CommitDate: 2024-11-22 15:35:06 +0000 rtld/arm: fix initial-exec (IE) thread-local storage relocation net/frr[89] revealed an interesting edge-case on arm when dynamically linking a shared library that declares more than one static TLS variable with at least one using the "initial-exec" TLS model. In the case of frr[89], this library was libfrr.so which essentially does the following: #include #include "lib.h" static __thread int *a __attribute__((tls_model("initial-exec"))); void lib_test() { static __thread int b = -1; printf("&a = %p\n", &a); printf(" a = %p\n", a); printf("\n"); printf("&b = %p\n", &b); printf(" b = %d\n", b); } Allocates a file scoped `static __thread` pointer with tls_model("initial-exec") and later a block scoped TLS int. Notice in the above minimal reproducer, `b == -1`. The relocation process does the wrong thing and ends up pointing both `a` and `b` at the same place in memory. The output of the above in the broken state is: &a = 0x4009c018 a = 0xffffffff &b = 0x4009c018 b = -1 With the patch applied, the output becomes: &a = 0x4009c01c a = 0x0 &b = 0x4009c018 b = -1 Reviewed by: kib Approved by: kp (mentor) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42415/ (cherry picked from commit 98fd69f0090da73d9d0451bd769d7752468284c6) --- libexec/rtld-elf/arm/reloc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index c3e95940be74..6efc9f499761 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -280,10 +280,13 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, return -1; tmp = (Elf_Addr)def->st_value + defobj->tlsoffset; - if (__predict_true(RELOC_ALIGNED_P(where))) + if (__predict_true(RELOC_ALIGNED_P(where))) { + tmp += *where; *where = tmp; - else + } else { + tmp += load_ptr(where); store_ptr(where, tmp); + } dbg("TLS_TPOFF32 %s in %s --> %p", obj->strtab + obj->symtab[symnum].st_name, obj->path, (void *)tmp); From nobody Fri Nov 22 15:38:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvzl36xW7z5f2H6; Fri, 22 Nov 2024 15:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvzl35fsnz3x4v; Fri, 22 Nov 2024 15:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732289887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dHa4CeLbg10cfwQBGq5ey1i6i10etQfPDIb9L+vw2LI=; b=yxK3BxLco33sBGJDnp2ZSFy1LOiqqx0hSlpCTELpSm/E4NuUhFY+iXXJeqaEHHRgrTbFF4 Z6fkAtyVCc7M1aFyGV+KOcotDvKTzv7F+dfsIrm2GND6F4z++AXl6QzQCe1y1oouXfM7+C i8znbJW7/u0DbfdwoM0tjCLdEwhMUdZqIaTfzm8RsB845PLU1ZZusLJ1itVvjRfEOgBfzr ze9eydU0kmL7wjf/7imivEqxadNdbLsBpRmIJLUBDlVgTcYSj9hL05MhRVZ79WXKtShM6Z JiYgkHHE6LL1eCMYX8jQl+uA6YLKko3bhqgKQudJZt4Tem+2wU/G0OwadZIxGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732289887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dHa4CeLbg10cfwQBGq5ey1i6i10etQfPDIb9L+vw2LI=; b=npm27ZVIPhYZqiZMyCcYJ+E5YMca3XqfoMs+gVIZTPaVKpLd10Fqzz+/cBFnV3RJPty9pv j4oEM+P2wEBxrvOXbJ84+VL+3Rm9Gu+Wl8+AIYqCYLObezleByoId7L/Shsq3NIrT6J8Yu aMkMxcbvCwsd0hebTHUnv/Jn0XdrcThOOcZ2cFt5DOUaYc/xQtTF9oPUWvS2iLqTSeA8Xq rCc9ZmfFao0VH+tiFHXsWEg6zrKfgpR16hxQzrjyVw//Fr6DfixfmAqvUcsfshHZV2585m 8EVbUp6zIhP7did7LX2WgcdCyF8bW1N30ry52/ih3qqgjhitkRim+RvCmg4o7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732289887; a=rsa-sha256; cv=none; b=r6p2yiRQUDtPdMsGMNgZbPpJUJVZe0NbJnK0v4QyFkrWLlpZcwlQNA7RRDFl2o41lBmo0i c+MJ50eKp8ca2Te2L7JswZG33KkCClY62g1fnltHxIaPsv+773QzJZ47WSFoBLAcThaT0K 9oQQ14mWi3Ig6IAdpKJ6H5p13Su/JXMGbHxiq6hKiTJ305ui+WMIrkEaRYLBcUu8W6Ipz0 TBxaBxCdpo09imzD4EAjmhLOEotUJlYZyReInHqd7ZC7zDon1Ai4UUpkFS9nl5QENqzbTc rwg51vj9MX+JtEVngCWN8gJf1jPL+OUSkedw4Qa/DV5WizdO927PdswCgfwrGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvzl35GL2zWPt; Fri, 22 Nov 2024 15:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMFc7uo036085; Fri, 22 Nov 2024 15:38:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMFc755036082; Fri, 22 Nov 2024 15:38:07 GMT (envelope-from git) Date: Fri, 22 Nov 2024 15:38:07 GMT Message-Id: <202411221538.4AMFc755036082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "R. Christian McDonald" Subject: git: f424c4a907e1 - stable/14 - libc: enable initial-exec (IE) as default thread-local storage model on arm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f424c4a907e12259fbc148d1dd0be13cf4025916 Auto-Submitted: auto-generated The branch stable/14 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=f424c4a907e12259fbc148d1dd0be13cf4025916 commit f424c4a907e12259fbc148d1dd0be13cf4025916 Author: R. Christian McDonald AuthorDate: 2023-11-09 20:22:21 +0000 Commit: R. Christian McDonald CommitDate: 2024-11-22 15:36:32 +0000 libc: enable initial-exec (IE) as default thread-local storage model on arm As suggested by jrtc27@ in https://reviews.freebsd.org/D42415, this patch enables IE as default thread-local storage model in libc on arm. Reviewed by: kib Approved by: kp (mentor) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42445 (cherry picked from commit 6e5b1ff71e01bd48172483cb6df921f84300ea3a) --- lib/libc/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index fbfd6619784d..d887e0808ceb 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -54,11 +54,7 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # Use a more efficient TLS model for libc since we can reasonably assume that # it will be loaded during program startup. -.if ${LIBC_ARCH} == "aarch64" || ${LIBC_ARCH} == "amd64" || \ - ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" || \ - ${LIBC_ARCH:Mpowerpc*} != "" CFLAGS+= -ftls-model=initial-exec -.endif # # Link with static libcompiler_rt.a. From nobody Fri Nov 22 15:42:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvzqp72lSz5f2SV; Fri, 22 Nov 2024 15:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvzqp6V24z3y5s; Fri, 22 Nov 2024 15:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732290134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+r9di2uGoX99aJmsL/QeLbG6+1mOewfDaWtb2m+2FC8=; b=czjRDtgYD1HGoQ4MFd/chYjawyjAl8pzQTCkc35A6+6avQzrRp5nAZ7B3TS5E38K7vVaqO sWVZ4l0fVNrNhIc1IJ8F/BDNARSLWrLqdwaGd5K9NFnkQvAcMbgqaX8X/gOZeP3yDdq/NH ojQmWfnYCbv9Ti14cWOZuxXO0Mg0KN2GNooXxIkPtXVAz0ozU9PZUX68XynuLX966Q4S+B 92zP2T+CC2mTiLJby73UuYkmtpj6yS6wgSxrkAniqyttV7FTNKCsAjcYp1GBXIABZsiNZO HD6OQLAunKrGauB7ADDJyUfo1K6hteeN5mqBO+5BQFGz6o5QMoJxVszU/HzM6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732290134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+r9di2uGoX99aJmsL/QeLbG6+1mOewfDaWtb2m+2FC8=; b=XA1sn9coZokFXTnU3t27t1Zut+tX11JWeYpfOkXloh4+yaixbId9WIDT+VIh/kvyj4HqCJ E2G7e735Cw/NWOTUYUsH3vOS5/LNaumw0tuip0Y4aai5I4xMzmY+KoZ5LWUdNeSYym6Yhh Bl0QbrHsjD9DGA1LX0/Uu2syrPHEiBithJgYtbka1E2P5PTnJcA0+qUFrSXUB8cZW3TXhI a3MKw+cRWKhbhhwYscjD1h+rmilkIpzOz6tzc4Xisflx3S64/mLnyG/qWRoxoaglhgUpAw toZu9xuez0XElmgLi32zBiZZCjutEkN56BFCh7Z6ELqFdnZBD8T2G0yDzWZsCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732290134; a=rsa-sha256; cv=none; b=qdmWBXV4FDi54kuzeM5LPJ4HqsjXw7NaZccyOLBylZ4M8+A37WyVds1MnrmEq2/gkiKZy8 hJj+kbfrQVF3yzyHuk0BAdptYsLkiatF1g4rJcAERPUlsUModPqR3Y6UV+so4qOaK+yAx5 MyLAAe2XM8yLWj/AFz/zKHG5QIf0rISkMCBjTbLTZrUzmkNfC+7lJ9S1BoUUz6zlbx91ss 0ui2BWEzozhjHfOITIZhfLeg4MLLEAA+dKaGun6LgPOVeamcCypVjDp3EZEZ05ATWwUlCy cbY7XJ7dwgjZiRfg0GHeQa19hjNonPdX0fOK1OcBWmat4S7hj+L518737rpYog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvzqp5pFszWZ7; Fri, 22 Nov 2024 15:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMFgEUl052384; Fri, 22 Nov 2024 15:42:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMFgEl9052381; Fri, 22 Nov 2024 15:42:14 GMT (envelope-from git) Date: Fri, 22 Nov 2024 15:42:14 GMT Message-Id: <202411221542.4AMFgEl9052381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "R. Christian McDonald" Subject: git: e10cca68cf34 - stable/13 - rtld/arm: fix initial-exec (IE) thread-local storage relocation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e10cca68cf349d11bc5c6474b792529bffc789cf Auto-Submitted: auto-generated The branch stable/13 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=e10cca68cf349d11bc5c6474b792529bffc789cf commit e10cca68cf349d11bc5c6474b792529bffc789cf Author: R. Christian McDonald AuthorDate: 2023-11-03 12:56:58 +0000 Commit: R. Christian McDonald CommitDate: 2024-11-22 15:41:10 +0000 rtld/arm: fix initial-exec (IE) thread-local storage relocation net/frr[89] revealed an interesting edge-case on arm when dynamically linking a shared library that declares more than one static TLS variable with at least one using the "initial-exec" TLS model. In the case of frr[89], this library was libfrr.so which essentially does the following: #include #include "lib.h" static __thread int *a __attribute__((tls_model("initial-exec"))); void lib_test() { static __thread int b = -1; printf("&a = %p\n", &a); printf(" a = %p\n", a); printf("\n"); printf("&b = %p\n", &b); printf(" b = %d\n", b); } Allocates a file scoped `static __thread` pointer with tls_model("initial-exec") and later a block scoped TLS int. Notice in the above minimal reproducer, `b == -1`. The relocation process does the wrong thing and ends up pointing both `a` and `b` at the same place in memory. The output of the above in the broken state is: &a = 0x4009c018 a = 0xffffffff &b = 0x4009c018 b = -1 With the patch applied, the output becomes: &a = 0x4009c01c a = 0x0 &b = 0x4009c018 b = -1 Reviewed by: kib Approved by: kp (mentor) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42415/ (cherry picked from commit 98fd69f0090da73d9d0451bd769d7752468284c6) --- libexec/rtld-elf/arm/reloc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index e2dc7f8c9eb9..b62a62c5b116 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -322,10 +322,13 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, return -1; tmp = (Elf_Addr)def->st_value + defobj->tlsoffset; - if (__predict_true(RELOC_ALIGNED_P(where))) + if (__predict_true(RELOC_ALIGNED_P(where))) { + tmp += *where; *where = tmp; - else + } else { + tmp += load_ptr(where); store_ptr(where, tmp); + } dbg("TLS_TPOFF32 %s in %s --> %p", obj->strtab + obj->symtab[symnum].st_name, obj->path, (void *)tmp); From nobody Fri Nov 22 15:42:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvzqr20sPz5f2kn; Fri, 22 Nov 2024 15:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvzqr0R64z3yhj; Fri, 22 Nov 2024 15:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732290136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=69BRMs9Se7gNilHyaupdLZA1MjAiBx5Y1VwZEz9oz+I=; b=yaHd9wSEPI81XJV7jru6/1oEctwlxfqmDF8fRedB7L1VUndaHCtmG6e2XmaASw9SK99vLH wEMB1e7BGGw2DTaf6XxDCaG5QvwBD2m7AT/EyI71XQx2oIJLFizG8KUhV0hcHdxAjAetuz 9uoN7dNJwUS8WlzJQVNqbbR4nP2C45A5Qa4gdcZHFGpByFGQ2EAbIWoEVSfj9lznfXvQyQ Qpskn1JcQHDieuwdSM64mFFKAy6sgORryPaUN1AticEN+jYAzo+U/b+L+LB6jSSKCJJgM4 5Pg3R7eCE2NC14QMqFSveV2f7S39+kg/ZG0WZ70cpY/EJppXSIO68M3V8+92WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732290136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=69BRMs9Se7gNilHyaupdLZA1MjAiBx5Y1VwZEz9oz+I=; b=U4cHNhi4RZ/hDYxTAppjhR0A1jl/vuvnaF2l06qb15ILVG9mw2HUw5/avnc1Y69J1pc2Lx 7V7LVrQVDdsg39KbTQ1YJdSldxr+Jy3iRqXKkkt+5aU/83cUxgUo9tPSyUd+ppn02EG8eE YYFq6BNaX3JrME1ImevvURxfbi+D6bGW4t2XSiferWX0CYQKi2Dk2LxKSrtoDVFmGgGn7L xc/S8H7rIqwO4/iQvBrQnRZEIwbV0PG4EgSCd4KA4Jw+iEFCUt2wbRUS17Mmsn5OQlyR1X TS2WxT4wDOYB9SZ3oX2/XDfUM9aFj0qEZGmsnvEPdb+5P2Bc4H1b6dpuvk+h9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732290136; a=rsa-sha256; cv=none; b=ha2GDsKkJZOyY66D4bzZMkhDEpkYiUFDaHfnL4yaIGJAk9Q/v6c8wymQaG3BZdKHi2ePPd 2DMTY/6hFRhdk9mvOvL60zEZDmHj9DIHH420CwiPPwixbwd7GKgWX+gdfQn6ey78vYV/UY gBTPG17jB6/jJ/BuLNllE4sOHh8355rOHzDSB7Tx/jaKpa68yx3RXMtZa7z8GD7RzSZXWt Zoh0/E+defCUs/GrMix5UWbqYdHNZcFst4WjYco9cX1FxAovNJLMHLg0wKkSjGDtFSYIdG s5qWgpjuShmz09YrvcOcsLeTSNQhxEEy0qCR+S8aXhohLO3nsHbwVfiCxIS/VA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvzqr03B0zWv4; Fri, 22 Nov 2024 15:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMFgFoV052447; Fri, 22 Nov 2024 15:42:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMFgF4o052444; Fri, 22 Nov 2024 15:42:15 GMT (envelope-from git) Date: Fri, 22 Nov 2024 15:42:15 GMT Message-Id: <202411221542.4AMFgF4o052444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "R. Christian McDonald" Subject: git: c364608261d1 - stable/13 - libc: enable initial-exec (IE) as default thread-local storage model on arm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c364608261d17d2d6aa0ff64085bcf908b8fb5a0 Auto-Submitted: auto-generated The branch stable/13 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=c364608261d17d2d6aa0ff64085bcf908b8fb5a0 commit c364608261d17d2d6aa0ff64085bcf908b8fb5a0 Author: R. Christian McDonald AuthorDate: 2023-11-09 20:22:21 +0000 Commit: R. Christian McDonald CommitDate: 2024-11-22 15:41:47 +0000 libc: enable initial-exec (IE) as default thread-local storage model on arm As suggested by jrtc27@ in https://reviews.freebsd.org/D42415, this patch enables IE as default thread-local storage model in libc on arm. Reviewed by: kib Approved by: kp (mentor) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42445 (cherry picked from commit 6e5b1ff71e01bd48172483cb6df921f84300ea3a) --- lib/libc/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 9ea1f38d4076..5601b5432592 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -55,11 +55,7 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # Use a more efficient TLS model for libc since we can reasonably assume that # it will be loaded during program startup. -.if ${LIBC_ARCH} == "aarch64" || ${LIBC_ARCH} == "amd64" || \ - ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" || \ - ${LIBC_ARCH:Mpowerpc*} != "" CFLAGS+= -ftls-model=initial-exec -.endif # # Link with static libcompiler_rt.a. From nobody Fri Nov 22 18:08:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xw35164rBz5f9qr; Fri, 22 Nov 2024 18:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xw3515Mshz4Fj2; Fri, 22 Nov 2024 18:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732298933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNJoa+3TQTZHPkzHXZ1m6Br7a27sDv8fv+4wrKOVr+U=; b=BlXN4CsGKkW46DIx19bsHEgW01XnE8HEplWFYyntoIK6Wy3GrkupNW7B7bI6kWleuMifGE V5yDGiCX6IRYJ+h3u3p9zRs7R4qKmjSeYbt4G6w0+t/3OKzLEeVxTP/b5Vp4xOHZ5yB4o1 iv4ApzccklUHWgGwEt5gBtZ+eWft3jBCU7XcVc0V1uwuBtPRkEiH5nw8Kt7OD8FjLFxkdY lN6mdgse0zwDNgXhHWij6BYn58eADCymFKHI033mdDcCwhpHQl4zyb1zRX2D8P3x72+0t/ uDBoeYkxJtjAW/vKbPF61X+/fg/F7e1MXzVHmZxDRggMNK5y0mBOnHTuxzaPqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732298933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNJoa+3TQTZHPkzHXZ1m6Br7a27sDv8fv+4wrKOVr+U=; b=hVF5Ll2NqdOPFFpzpQTAeW+kk9nvQ8XSUu6kG3p+sEwjTBzSoFKQtcHLfyi1N6krak6U+U NrCk18Uw7thrnj+6Wrk4B6ac02cPjsaFa3UNgOXHF0Oedqo/gOO3/lw08U8eNyS1HaL1NO a8vz0cPhRXYDLzepmOsTbQIKqlPdB6DLI5x88zIQgK2zoZzsDecHX2kZfivZUJFZCNaKoV DbTFmwvUc7m+MlExLowmq5WXBYrb5vAJf7rgTEu4gn1F1Gd34EfYqIf/Mc7GAk50qUmN6z ALUjo+bGZRaUREK8ZoiLwtjCv0CyQ4nknQrL77mC2l9AtAhYVjRMfSho4HrpGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732298933; a=rsa-sha256; cv=none; b=gvJWurfZFsX1gCqctdTCyOcvDv/uQBkjN/BMLDT0bF1eSXxofavZD11IKcnyKF4ZlHoVB9 ky5F24s/8/7IqAANLjRCIdxT+/8zHHPnZdjd0V87TzuYkwnWxL0RsNaQYC3YVb4M01uiRo ysdpSxAyMD0AQ2wGBkvC5sAieDUhoj2dap+j60DTEP9gUF3KbRR214nLqgPaqc5Hbk/KkN gbM5jra359lJ36y22OuXTE1QZs17FPNMx5RLL1l+Gay1XC0zu5jK7PsA8gYypi41l72Eu+ SluSWC081KHpOMIQMCK0vDFosgtDmDGbiF+hCeU437thxn9WZ1C0UtRHLdt8bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xw3514r2Wzb8T; Fri, 22 Nov 2024 18:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMI8rWg016968; Fri, 22 Nov 2024 18:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMI8r9P016965; Fri, 22 Nov 2024 18:08:53 GMT (envelope-from git) Date: Fri, 22 Nov 2024 18:08:53 GMT Message-Id: <202411221808.4AMI8r9P016965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 66439659982c - main - getentropy: restore unistd.h include List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66439659982c00f66d0fe002820eaa6610f69ff1 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=66439659982c00f66d0fe002820eaa6610f69ff1 commit 66439659982c00f66d0fe002820eaa6610f69ff1 Author: Ed Maste AuthorDate: 2024-11-22 18:06:09 +0000 Commit: Ed Maste CommitDate: 2024-11-22 18:08:41 +0000 getentropy: restore unistd.h include It is needed for SSP support. Reported by: netchild, Shawn Webb Fixes: 62dab3d016ab ("getentropy: Remove fallback code") Sponsored by: The FreeBSD Foundation --- lib/libc/gen/getentropy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/gen/getentropy.c b/lib/libc/gen/getentropy.c index e87796ace58c..ff5475f9fdb0 100644 --- a/lib/libc/gen/getentropy.c +++ b/lib/libc/gen/getentropy.c @@ -31,6 +31,7 @@ #include #include +#include #include #include "libc_private.h" From nobody Fri Nov 22 19:37:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xw53N4FCmz5dH7X; Fri, 22 Nov 2024 19:37: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xw53N3Xg2z4RVM; Fri, 22 Nov 2024 19:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732304256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bbbo8OJaC4PnBwRidh049rNiaiOG2aCYjOqWbwfj+ec=; b=GRGwPd688MhxpXds4Hb8VfS5NTivFKwp1pz9ka5paBnr5/sEj2MLm0s6gsrcszntXxJgQX 0v5iXcOAMhQZgQf+PIz2ii2Ir2bum5NhCSMjvMmmCGn8OlGsHqmEYjqhSvjVuc+7rOJSVU A2hZNf0J5VZIb6rJjWluwW0EMYN2z0JWmrsyG5AvgVPqnZzuH+Dj42wySrO+4VI6BDXiPW 7KMFl+m1ZVLSQZOqX5eUd+Oodw7PGBYeJtJMr3pJqTzt3NDuny1jJUCt52vSiDYifTBAGq z1tuiGr6CJR7KAJZiZvwxtyrqU5aedJimcPvAMgctWPDM2nTgKHKBy3W7D/YFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732304256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bbbo8OJaC4PnBwRidh049rNiaiOG2aCYjOqWbwfj+ec=; b=CEhSWKbPDHixYEUq5pbKSuC9tmQW4xaZDE7ZOIBtOKnhwU2GGKcZDy5RQ2uT1T2yZ0tOW5 LNx4D7QgDyxw0mvL7Vh4ZzPS2hdV+4ZcZuQMzIYT6/SlNBjR9eY+1XE0TW24W619IHdxs9 JIezzw1pTQ4lUJ0J5FFvJj1KqdC0UXS+OfW1oQKDHVDK0s6XtEQKvppYrEvrClD/4a88CS gx0vfg4h47pDEBGz99Fb73qUDWTIIGCzv03WbBArZmBVL0i2KoTM68FOuMsa0Oq+u5n2dA 5Zb+eXbb27Uyj3gnXOGgdWZeVsDilWWvn/C17ccRgttwRLA97ZYQ/KDBT+JwnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732304256; a=rsa-sha256; cv=none; b=sREtnSUedTrUXp1KFk+ZZ7joiA4pftqzGvDHNiZiAYEkxKIGKtD2rj+5UF9lkM1NY38TNZ YA6e2nuYsyHtJ6I0nR50W3+/3BJv7qjRX62fQU5CnhBTUA10zOgeBhNfJYLgz9nQ6n9QNR rp2nOyw8FOufZlWecVjGgE6c4R+wZVpYeDOdk+kGvxnYA9Df0YEhwefm88GmCsxMpK+oSc bqmiDN4mFBAODtaMKa2f8ZvjTCH9IepNzLcVl7QdI01O5GaaTEy5eR8o9RwCm/DLEIUNm1 F1eMJb2LskYN0q3FK4Gd4yb9nqpgpWIfICNQAx85JFJnp2liCNRX6GI8K380EA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xw53N31r0zdQJ; Fri, 22 Nov 2024 19:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMJbavE084562; Fri, 22 Nov 2024 19:37:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMJbab7084559; Fri, 22 Nov 2024 19:37:36 GMT (envelope-from git) Date: Fri, 22 Nov 2024 19:37:36 GMT Message-Id: <202411221937.4AMJbab7084559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c769f45a5709 - stable/14 - gvinum: Postpone removal to FreeBSD 15 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c769f45a57094a73931dbfd1f845ee473603e61e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c769f45a57094a73931dbfd1f845ee473603e61e commit c769f45a57094a73931dbfd1f845ee473603e61e Author: Ed Maste AuthorDate: 2022-12-12 16:57:12 +0000 Commit: Ed Maste CommitDate: 2024-11-22 19:37:18 +0000 gvinum: Postpone removal to FreeBSD 15 It was not removed for FreeBSD 14. Sponsored by: The FreeBSD Foundation (cherry picked from commit a5f7047f28654aa297c57a9d24f6d1408641b975) --- sbin/gvinum/gvinum.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/gvinum/gvinum.8 b/sbin/gvinum/gvinum.8 index 8bf2fcc92b8e..4176e6274a37 100644 --- a/sbin/gvinum/gvinum.8 +++ b/sbin/gvinum/gvinum.8 @@ -37,7 +37,7 @@ and associated .Xr geom 4 kernel support is deprecated, and may not be available in -.Fx 14.0 +.Fx 15.0 and later. Users are advised to migrate to .Xr gconcat 8 , From nobody Fri Nov 22 21:24:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xw7QN4kNfz5dPMB; Fri, 22 Nov 2024 21:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xw7QN46PXz4cpl; Fri, 22 Nov 2024 21:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z9sCAUyLyJEyVfzwGupVp2nk08vWcBLm8zUsibJhNQ8=; b=UZHnfwcKXFbYz9OWPwKweYgjLkRSMNmib3skOskLNPJT0Pmjgyzz2GmudfFRTksyjdxdvj rpt7O8TWCBC/+YoYGBhVpbVpKibycVu42tA5Nt7xTOXsr2lsOHl5Alpyd+w8XezHS1y/AK G5gbUhyRIGcagTwNVZyAb+/jmsH6Jhdubh7DGt84yx7A6fmJ7I8QtyaKRjrVRMGIaVOiQn HX+w3uCTHw+xq759ulSBQxFSIOK7YLJuyX3aMGr3J7BJMO+rI1Cw8BPtLMhUJgX5LB7AeL LOzE05rWk9vc7ZXbHVXqCLwOu/RhEi2QLQ/uu8MEjwJPx8Md131Wkp2c9YGb6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z9sCAUyLyJEyVfzwGupVp2nk08vWcBLm8zUsibJhNQ8=; b=ioeP5cG1bIDqrN+QAezpNzZay1eme/4VVQwjNO4235ApyEieYrFWSORZkR+jOgYA1AB4b6 pabmzL87fQ7wBHf+vNKqWKV5omFYZTFkR3gZ5vs46D3Nj1s/Z58rGqoeYZ7MeE3BaVizjR DOY8hhottsc/iI8bMYNyeYWACH5AgvUyHbrftAUKboCUz7OJGfeiKjQYtKfFs3ZqXMmF6g K2av8hWZlpHkLKRyBEUtuUX998WkFMFUnsJpx7hFYsfDzHfE7hN3OqU2cwC7j6MtzRW62I ubg21s+lx0k7idTCUyBvoS38DozuhUrm3j2/kvox5Hy+iIwZvTCGtddKfebaKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310652; a=rsa-sha256; cv=none; b=ul/ekRQKcd+me53VZpBQTbOnnnk7yU5CYeUh/vnAQCbkNrk+BfHh75xZyXjVimMZG3LQre 4V7x896wFv24CoYJRH541YlgyzV0m5mxoF2sEv6gBS3dsMyzXBHKvv4FMrE8bKuXU6KLEH 8+9D7O/WnLA981zjhV+YrKFsgpHy35eAgfsbtNapF2feUgycvOjE3Oy6dwTPM7mTcE9WO/ QhL4L2WnuVQNwX7p6Az/Uxab1jxgDeL7ikxaFaWWaUrQIXUgktjwltqlD2TaSeNHHlV0S5 wvuhgXpz6KQWjpBigex/H2iIzJk9oJo2lxkyYe6dszUnMuZYpfDzmBzEmtKO4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xw7QN3jmrzhJm; Fri, 22 Nov 2024 21:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMLOCxS088327; Fri, 22 Nov 2024 21:24:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOCYi088324; Fri, 22 Nov 2024 21:24:12 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:12 GMT Message-Id: <202411222124.4AMLOCYi088324@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: 9e67981e7855 - stable/14 - in6: Constify some sockaddr conversion functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9e67981e7855bcaf50717491287b0ba8ea23495e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9e67981e7855bcaf50717491287b0ba8ea23495e commit 9e67981e7855bcaf50717491287b0ba8ea23495e Author: Mark Johnston AuthorDate: 2024-11-14 19:20:21 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 in6: Constify some sockaddr conversion functions No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit 3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3) --- sys/netinet6/in6.c | 4 ++-- sys/netinet6/in6.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index e9f16dcf5c54..54b9d598b961 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2655,7 +2655,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) * v4 mapped addr or v4 compat addr */ void -in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) +in6_sin6_2_sin(struct sockaddr_in *sin, const struct sockaddr_in6 *sin6) { bzero(sin, sizeof(*sin)); @@ -2667,7 +2667,7 @@ in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) /* Convert sockaddr_in to sockaddr_in6 in v4 mapped addr format. */ void -in6_sin_2_v4mapsin6(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) +in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, struct sockaddr_in6 *sin6) { bzero(sin6, sizeof(*sin6)); sin6->sin6_len = sizeof(struct sockaddr_in6); diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index ce3bbea6b8e6..0a4377638de1 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -679,9 +679,9 @@ extern void in6_if_up(struct ifnet *); struct sockaddr; void in6_sin6_2_sin(struct sockaddr_in *sin, - struct sockaddr_in6 *sin6); -void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, - struct sockaddr_in6 *sin6); + const struct sockaddr_in6 *sin6); +void in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, + struct sockaddr_in6 *sin6); void in6_sin6_2_sin_in_sock(struct sockaddr *nam); void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); extern void addrsel_policy_init(void); From nobody Fri Nov 22 21:24:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xw7QP6R4Xz5dP3X; Fri, 22 Nov 2024 21:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xw7QP567Bz4cpm; Fri, 22 Nov 2024 21:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OOAe2+4E9iXezJNGt9QC6p/APKMa3OXF8b5u9sTuKKM=; b=AMwIjl6ZZlqXJVWeGqiQUfTZoFOH0oi83hXLCk4g5YYBSviQqo4KLmerzdEHhAkVF7jjN0 jUb0dahnwJsoQKkYIxqw9Y5lkTEZYB0Rl9OQA6JfWKu86vOJdIq4LBEO7BT6RdLk5RCFHL P/4EdZV099kzdXZaVRJkqvUm+EBMA0X1gourWj4++a47uRAwbJjaTKO2zr2RvQRubdOzXn zYxOYFtnNDCjv8ZhFTD8V6WLw0OXSrsJlHbv8oX3CGfMLgYkjLOHZjfrqUbpGHTsLQzIvG voxFx6fPKlxV+HjZUEHe42qgI6AzNCsaCZBMiHgwR1ir1lCuno3A0RftwAzYiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OOAe2+4E9iXezJNGt9QC6p/APKMa3OXF8b5u9sTuKKM=; b=Ag+Ii0XI76KFQrFx4UqmtNL8ptH5fbtauDqeDuJafIfcjjbXRB6kyHfaicD4uc4vqME+Ue 4JwSH5Zjv0TfL7fZQAKVP+WjvzutQ4MQuH942DM9fnHA7M3eIsSBrOfONPDh1bv5yQl0wF iixqYxqoW2Fv1TLWEn7Kdi0jYG8pj4q+0irs0ozbuN7fJRBUhvT8lJOQGI61RSWrojuIBu Q/JKfdSgC557FTd6S2wMnbbVyr4qJXyXRhMTdPfXfDZz6BgVa//c0zGpWZsaKIFAFuoPFK T1pkaZnrzNt2kWztZVBhK5fl9p0QNUmgP66ZoTKtL0jJDlUILGUCN8uhvlcn6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310653; a=rsa-sha256; cv=none; b=cv+zx+g5BFG7trQCyFLJOv7nskB8dd3adEwfuRfuYNuJqqkVd7ivebs+ZQC60jFr9mZ8kP xr8W5an72nnlRtRFYFZnHqzOQFUJbf0pdxpJkG00Qcrjndic0TdV1kaRfn+d9YAGX4CEOh NNgATSTHILuIVEvS3ifHe8nFhnQYH4ed1vTPkwt3n+QFvEHxwchUQ4eeAUtCxJ6KiVpZgH ikjONKc2a/ICizfTUebwrG8A/pDefJdSoL76IJ/oZA/r199x4753S0t4k2EWyhWLnfnEex 1dz4L+dWoFlq3abUcr1mZwVhkbDx1c3he8sB43zZvjl+5Vt8hchVWo1QZErcrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xw7QP4jr2zgmm; Fri, 22 Nov 2024 21:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMLODIi088385; Fri, 22 Nov 2024 21:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOD7M088382; Fri, 22 Nov 2024 21:24:13 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:13 GMT Message-Id: <202411222124.4AMLOD7M088382@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: a525cdc39039 - stable/14 - inpcb: Constify address parameters to in6 pcb lookup routines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a525cdc39039f64687bcf2da3819ffd0f85e5e9e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a525cdc39039f64687bcf2da3819ffd0f85e5e9e commit a525cdc39039f64687bcf2da3819ffd0f85e5e9e Author: Mark Johnston AuthorDate: 2024-11-14 19:28:03 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 inpcb: Constify address parameters to in6 pcb lookup routines No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit 52ef944b0f6f1df8eebe1cb877c6aadb1c247da0) --- sys/netinet6/in6_pcb.c | 16 ++++++++-------- sys/netinet6/in6_pcb.h | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index f7f2ea0b8699..4c2c25bf691e 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -721,7 +721,7 @@ in6_pcbnotify(struct inpcbinfo *pcbinfo, struct sockaddr_in6 *sa6_dst, * hash lock. No inpcb locks or references are acquired. */ struct inpcb * -in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct in6_addr *laddr, +in6_pcblookup_local(struct inpcbinfo *pcbinfo, const struct in6_addr *laddr, u_short lport, int lookupflags, struct ucred *cred) { struct inpcb *inp; @@ -1184,9 +1184,9 @@ in6_pcblookup_hash(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, } static struct inpcb * -in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int lookupflags, - uint8_t numa_domain) +in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport_arg, const struct in6_addr *laddr, u_int lport_arg, + int lookupflags, uint8_t numa_domain) { struct inpcb *inp; const inp_lookup_t lockflags = lookupflags & INPLOOKUP_LOCKMASK; @@ -1246,8 +1246,8 @@ in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, * from which a pre-calculated hash value may be extracted. */ struct inpcb * -in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, - struct in6_addr *laddr, u_int lport, int lookupflags, +in6_pcblookup(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, struct ifnet *ifp __unused) { return (in6_pcblookup_hash_smr(pcbinfo, faddr, fport, laddr, lport, @@ -1255,8 +1255,8 @@ in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, } struct inpcb * -in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport, struct in6_addr *laddr, u_int lport, int lookupflags, +in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, struct ifnet *ifp __unused, struct mbuf *m) { return (in6_pcblookup_hash_smr(pcbinfo, faddr, fport, laddr, lport, diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index a11dbdb8c4d2..edf7023747bb 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -76,23 +76,17 @@ int in6_pcbbind(struct inpcb *, struct sockaddr_in6 *, struct ucred *); int in6_pcbconnect(struct inpcb *, struct sockaddr_in6 *, struct ucred *, bool); void in6_pcbdisconnect(struct inpcb *); -struct inpcb * - in6_pcblookup_local(struct inpcbinfo *, - struct in6_addr *, u_short, int, - struct ucred *); -struct inpcb * - in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, +struct inpcb *in6_pcblookup_local(struct inpcbinfo *, const struct in6_addr *, + u_short, int, struct ucred *); +struct inpcb *in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, u_int fport_arg, const struct in6_addr *laddr, u_int lport_arg, int lookupflags, uint8_t); -struct inpcb * - in6_pcblookup(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *); -struct inpcb * - in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *ifp, struct mbuf *); +struct inpcb *in6_pcblookup(struct inpcbinfo *, const struct in6_addr *, u_int, + const struct in6_addr *, u_int, int, struct ifnet *); +struct inpcb *in6_pcblookup_mbuf(struct inpcbinfo *, const struct in6_addr *, + u_int, const struct in6_addr *, u_int, int, struct ifnet *ifp, + struct mbuf *); void in6_pcbnotify(struct inpcbinfo *, struct sockaddr_in6 *, u_int, const struct sockaddr_in6 *, u_int, int, void *, struct inpcb *(*)(struct inpcb *, int)); From nobody Fri Nov 22 21:24:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xw7QR1GHCz5dP5Q; Fri, 22 Nov 2024 21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xw7QQ6Vk7z4cn2; Fri, 22 Nov 2024 21:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p0XLCyFjMOg/KOOaCIlN+nS7h5ZA3OX8+k+6yqCr4jM=; b=Ea1fmBuTPs3qa4zwBlBVxlcP/QmKq1KDpX6nFVLQL6EhYzfMpiJwGIfalQl8l+gaD/F88+ sbKDBp+JfoIHMuMqBSAzg/Y+3WYKgFWnQvh28YZ/W1I8vTtnlPXfDtf8VQN/U3XFApGKp6 /sgl9fKtDfRBjCl/fKYNlp8xLtXEBAljnXX2E2CpG4o8lqieSvS/WfKmKySzrNpQHanvzR MqWcCANIlSK6Wlej4zdk9fwTVTrsCHmD+Zyo+H+zPUmiCO5LnDww0s/whRcKg3iUvrUb+0 IaV8XeQICUMu2tF2XFZuQ3+mC3xlMFWNxsL1U7vGEExasZ6O244T0213jODVKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p0XLCyFjMOg/KOOaCIlN+nS7h5ZA3OX8+k+6yqCr4jM=; b=MjUT+MfShMHwkMCAYzue+8gBmqJ+qkusOzHPlOYgpKdYPDdGOR1u0Nov80G9JvavFzzrdw YbUoI0+KlLk2AK6HQI8ld0WwaDialM0M6xIqZz8ueXNMG4QOQ3LtD42Mn6XGrRtae97hRB ckamBpkk6mYkWCth2smwzFiUeokTT8W7ZPiX735mTdl7xcAwDBH7OaKvkTq+3CiwrjowoK 4tuMvVBsdlHUwjJ+2o+VDNczsvYGZpEvkXvJqzbQnBgnKCGr2XZNDzlbc6AJySDvCQaFoU V3H4AFnH7PfUr3DUmtN7WoxrCTuUV8usoXeylon996HE2/fPq88krGr8tQtC2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310654; a=rsa-sha256; cv=none; b=YSOXfCGnB6hwkc5Q+8Lajk+juSuSEtX/elnyQY9TJCo70VWn15nM4jtaYKOXyOhwmWWX83 f/aFeij8wRq0x48cFcwJ6vF4wKuPriCYOaTYol+5xRLA16dExita0GJjHjJngmYip9CDF7 OPVlSPuCDeI1zqseEQP2djYMKOdc9w1zMdtXDk4mE9wm3mN/YCDkIyfbvW8QznSPVBbok1 mF6YPI1RyWmvOjIjx62Do2eX2qTSHOecxikJ2hn55ok+daF2uuktEuAQ6IIYmSOrQtIcTx l2dPfJkW1bsWhCn/x2a968CCnf2QeKW4DkVJ/AblZLX/PU+RjZ021AqmyxWmkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xw7QQ5qFzzhX3; Fri, 22 Nov 2024 21:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMLOE6q088440; Fri, 22 Nov 2024 21:24:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOE5e088437; Fri, 22 Nov 2024 21:24:14 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:14 GMT Message-Id: <202411222124.4AMLOE5e088437@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: 3126ebadf9e2 - stable/14 - ukbd: Enable ukbd_apple_swap for all Apple ISO keyboards List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3126ebadf9e203ee3e7d7dd5bac0c48d74007c16 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3126ebadf9e203ee3e7d7dd5bac0c48d74007c16 commit 3126ebadf9e203ee3e7d7dd5bac0c48d74007c16 Author: Frank Hilgendorf AuthorDate: 2024-11-01 19:37:38 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 ukbd: Enable ukbd_apple_swap for all Apple ISO keyboards Key code swapping between [<>] and [^°] key is enabled for all Apple ISO type keyboards. Before, swapping was enabled when the Eject key was detected in HID usage. This did not correlate well with the swapped keys presence. usbdevs file is extended by several Apple keyboard models to support ISO model identification. Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1506 (cherry picked from commit 541e7a98b762916cd951a64dd7e77efd51dfa8dc) --- sys/dev/usb/input/ukbd.c | 72 ++++++++++++++++++++++++++++++++++++++++++++---- sys/dev/usb/usbdevs | 42 ++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 6 deletions(-) diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index f33ae6e8a620..9ff093628312 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -72,6 +72,8 @@ #include +#include "usbdevs.h" + #ifdef EVDEV_SUPPORT #include #include @@ -173,13 +175,19 @@ struct ukbd_softc { #define UKBD_FLAG_ATTACHED 0x00000010 #define UKBD_FLAG_GONE 0x00000020 -#define UKBD_FLAG_HID_MASK 0x003fffc0 -#define UKBD_FLAG_APPLE_EJECT 0x00000040 -#define UKBD_FLAG_APPLE_FN 0x00000080 -#define UKBD_FLAG_APPLE_SWAP 0x00000100 +/* set in ukbd_attach */ +#define UKBD_FLAG_APPLE_SWAP 0x00000040 +/* set in ukbd_parse_hid */ +#define UKBD_FLAG_APPLE_EJECT 0x00000080 +#define UKBD_FLAG_APPLE_FN 0x00000100 #define UKBD_FLAG_NUMLOCK 0x00080000 #define UKBD_FLAG_CAPSLOCK 0x00100000 #define UKBD_FLAG_SCROLLLOCK 0x00200000 +#define UKBD_FLAG_HID_MASK UKBD_FLAG_APPLE_EJECT | \ + UKBD_FLAG_APPLE_FN | \ + UKBD_FLAG_NUMLOCK | \ + UKBD_FLAG_CAPSLOCK | \ + UKBD_FLAG_SCROLLLOCK int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ int sc_state; /* shift/lock key state */ @@ -296,6 +304,48 @@ static const uint8_t ukbd_boot_desc[] = { 0xff, 0x00, 0x81, 0x00, 0xc0 }; +static const STRUCT_USB_HOST_ID ukbd_apple_iso_models[] = { + /* PowerBooks Feb 2005, iBooks G4 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_FOUNTAIN_ISO) }, + /* PowerBooks Oct 2005 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER_ISO) }, + /* Core Duo MacBook & MacBook Pro */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER3_ISO) }, + /* Core2 Duo MacBook & MacBook Pro */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER4_ISO) }, + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER4_HF_ISO) }, + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_ALU_MINI_ISO) }, + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_ALU_ISO) }, + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_ALU_REVB_ISO) }, + /* MacbookAir, aka wellspring */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING_ISO) }, + /* MacbookProPenryn, aka wellspring2 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING2_ISO) }, + /* Macbook5,1 (unibody), aka wellspring3 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING3_ISO) }, + /* MacbookAir3,2 (unibody), aka wellspring4 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING4_ISO) }, + /* MacbookAir3,1 (unibody), aka wellspring4 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING4A_ISO) }, + /* Macbook8 (unibody, March 2011) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING5_ISO) }, + /* Macbook8,2 (unibody) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING5A_ISO) }, + /* MacbookAir4,2 (unibody, July 2011) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING6_ISO) }, + /* MacbookAir4,1 (unibody, July 2011) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING6A_ISO) }, + /* MacbookPro10,1 (unibody, June 2012) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING7_ISO) }, + /* MacbookPro10,2 (unibody, October 2012) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING7A_ISO) }, + /* MacbookAir6,2 (unibody, June 2013) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING8_ISO) }, + /* MacbookPro12,1 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING9_ISO) }, +}; + + /* prototypes */ static void ukbd_timeout(void *); static void ukbd_set_leds(struct ukbd_softc *, uint8_t); @@ -1001,8 +1051,7 @@ ukbd_parse_hid(struct ukbd_softc *sc, const uint8_t *ptr, uint32_t len) hid_input, 0, &sc->sc_loc_apple_eject, &flags, &sc->sc_id_apple_eject)) { if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_EJECT | - UKBD_FLAG_APPLE_SWAP; + sc->sc_flags |= UKBD_FLAG_APPLE_EJECT; DPRINTFN(1, "Found Apple eject-key\n"); } if (hid_locate(ptr, len, @@ -1138,6 +1187,17 @@ ukbd_attach(device_t dev) sc->sc_fkeymap[n] = fkey_tab[n]; } + /* check if this is an Apple keyboard with swapped key codes + * apparently, these are the ISO layout models + */ + DPRINTF("uaa vendor: 0x%04x, uaa product 0x%04x\n", uaa->info.idVendor, uaa->info.idProduct ); + if (usbd_lookup_id_by_uaa(ukbd_apple_iso_models, sizeof(ukbd_apple_iso_models), uaa) == 0) { + sc->sc_flags |= UKBD_FLAG_APPLE_SWAP; + DPRINTF("UKBD_FLAG_APPLE_SWAP set\n"); + } else { + DPRINTF("UKBD_FLAG_APPLE_SWAP not set\n"); + } + kbd_set_maps(kbd, &sc->sc_keymap, &sc->sc_accmap, sc->sc_fkeymap, UKBD_NFKEY); diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 18176fa516a9..af33b2cdec07 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1142,10 +1142,38 @@ product APPLE DUMMY 0x0000 Dummy product product APPLE IMAC_KBD 0x0201 USB iMac Keyboard product APPLE KBD 0x0202 USB Keyboard M2452 product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard +/* PowerBooks Feb 2005, iBooks G4 */ +product APPLE FOUNTAIN_ANSI 0x020e Apple Internal Keyboard/Trackpad +product APPLE FOUNTAIN_ISO 0x020f Apple Internal Keyboard/Trackpad +/* 17 inch PowerBook */ +product APPLE GEYSER_17 0x020d Apple Internal Keyboard/Trackpad +/* PowerBooks Oct 2005 */ +product APPLE GEYSER_ANSI 0x0214 Apple Internal Keyboard/Trackpad +product APPLE GEYSER_ISO 0x0215 Apple Internal Keyboard/Trackpad +product APPLE GEYSER_JIS 0x0216 Apple Internal Keyboard/Trackpad +/* Core Duo MacBook & MacBook Pro */ +product APPLE GEYSER3_ANSI 0x0217 Apple Internal Keyboard/Trackpad +product APPLE GEYSER3_ISO 0x0218 Apple Internal Keyboard/Trackpad +product APPLE GEYSER3_JIS 0x0219 Apple Internal Keyboard/Trackpad +/* Core2 Duo MacBook & MacBook Pro */ +product APPLE GEYSER4_ANSI 0x021a Apple Internal Keyboard/Trackpad +product APPLE GEYSER4_ISO 0x021b Apple Internal Keyboard/Trackpad +product APPLE GEYSER4_JIS 0x021c Apple Internal Keyboard/Trackpad +/* External */ +product APPLE ALU_MINI_ANSI 0x021d Apple Keyboard/Trackpad +product APPLE ALU_MINI_ISO 0x021e Apple Keyboard/Trackpad +product APPLE ALU_MINI_JIS 0x021f Apple Keyboard/Trackpad +product APPLE ALU_ANSI 0x0220 Apple Keyboard/Trackpad +product APPLE ALU_ISO 0x0221 Apple Keyboard/Trackpad +product APPLE ALU_JIS 0x0222 Apple Keyboard/Trackpad /* MacbookAir, aka wellspring */ product APPLE WELLSPRING_ANSI 0x0223 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING_ISO 0x0224 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING_JIS 0x0225 Apple Internal Keyboard/Trackpad +/* Core2 Duo MacBook3,1 */ +product APPLE GEYSER4_HF_ANSI 0x0229 Apple Internal Keyboard/Trackpad +product APPLE GEYSER4_HF_ISO 0x022a Apple Internal Keyboard/Trackpad +product APPLE GEYSER4_HF_JIS 0x022b Apple Internal Keyboard/Trackpad /* MacbookProPenryn, aka wellspring2 */ product APPLE WELLSPRING2_ANSI 0x0230 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING2_ISO 0x0231 Apple Internal Keyboard/Trackpad @@ -1174,6 +1202,10 @@ product APPLE WELLSPRING6A_JIS 0x024b Apple Internal Keyboard/Trackpad product APPLE WELLSPRING6_ANSI 0x024c Apple Internal Keyboard/Trackpad product APPLE WELLSPRING6_ISO 0x024d Apple Internal Keyboard/Trackpad product APPLE WELLSPRING6_JIS 0x024e Apple Internal Keyboard/Trackpad +/* External */ +product APPLE ALU_REVB_ANSI 0x024f Apple Keyboard/Trackpad +product APPLE ALU_REVB_ISO 0x0250 Apple Keyboard/Trackpad +product APPLE ALU_REVB_JIS 0x0251 Apple Keyboard/Trackpad /* Macbook8,2 (unibody) */ product APPLE WELLSPRING5A_ANSI 0x0252 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING5A_ISO 0x0253 Apple Internal Keyboard/Trackpad @@ -1194,6 +1226,16 @@ product APPLE WELLSPRING8_JIS 0x0292 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_ANSI 0x0272 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_ISO 0x0273 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_JIS 0x0274 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J140K 0x027a Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J132 0x027b Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J680 0x027c Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J213 0x027d Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J214K 0x027e Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J223 0x027f Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J230K 0x0280 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J152F 0x0340 Apple Internal Keyboard/Trackpad +product APPLE MAGIC_KEYBOARD_2021 0x029c Apple Internal Keyboard/Trackpad +product APPLE MAGIC_KEYBOARD_FINGERPRINT_2021 0x029a Apple Keyboard/Trackpad product APPLE MAGIC_TRACKPAD2 0x0265 Apple Magic Trackpad 2 product APPLE MOUSE 0x0301 Mouse M4848 product APPLE OPTMOUSE 0x0302 Optical mouse From nobody Fri Nov 22 21:24:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xw7QS3llYz5dPPQ; Fri, 22 Nov 2024 21:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xw7QS05FDz4cdN; Fri, 22 Nov 2024 21:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/llLCUscYs5bmPcTq5repbrkai6MZwYAZb7ni5r8dg=; b=Tq+d/a+xmYEiWYIjlXqOqlHfuiG42PJGRRZi1clo2GXruefxd4BzxLf9CXcF34R1Ylpphl skrdFoEZDrmWVybhGCIJzzOKrSBauNoMF2x8huyP4WXaxf9n2LV4z5j0Sur/1JVaNpf5Mw MYOmb7nNY2G/ek/EjATjz+HvHTlslb/qU90kKjI1JcmiVDluTG7srGtfPB9uvC/30Ill8I yXgA39UbAk/pF1B5GMm3bnDOfTihG05WLTr2+bRw30mlVp81KJQfthZHOQNt6vZ37hnnUe Y2kHGQ1upq3v0EyMCh25b5hw7MdiPqdXSBXon59xYldDo0xV0KU5ieor56clhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/llLCUscYs5bmPcTq5repbrkai6MZwYAZb7ni5r8dg=; b=gexted1sA5sPZccjSmECl9/r7lYJthuwumbqhB0YQZ/+Bk1gGV6HcfASxmWrX4smE8zTfj LjKNYbu6nvZQ5NRS+RqsoX5l4LzIHwG3oTI//mzYcCGk6iRCYGjvH5epzpWpJbRJtXRWml es0t8Heo+CLgD9LT3vBxwYDEcUCcFeJ3cHJRUFJDpGR/k/mnfKr/Ul44TF+Ly/ZpcYrm3Z eaEPJMEp0dIMteh6wwYtfrWWUEqRcXBgZt43sV28i8idGf+keywblJa+mXoqT0jg7m2PTQ wkGGCR2C0l3GaPiLjWYhBFTLQPDnV5BX0by+d+orgcMfjGr+dmIo0IThVkKbSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310656; a=rsa-sha256; cv=none; b=WU5c69IfzcYcW5NVP5asefVm6DS7Zv9uJYZZPeQGYZn6xK+izO0k0jrnWvN353ArA0+zIA 4Tqjr1wNPec61QfFvHV0QLI3kEq1tojLzHIO5gUaOiXa5EReAI6yczuXrUxnB6KkoOKY+P 0XFNlspoX67eIIAFHl/KanA3Hf6Bas1+TutjbNwqfHQQOVbWk/RI80UGLnBU4ut1E4O0t6 vI4Pw8GP9DFix3K2SmsgQbVdazlFqljdBgRe3GPGgF2/sqJqpqbV4vG94zCtJMHuiZI2tW lq0xVtH4DKdjdGguHc/8aYUSFlXre2AI0YLUXDt5vvUgDICOUXymmWdeGa8zyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xw7QR6qDVzh0H; Fri, 22 Nov 2024 21:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMLOFpG088497; Fri, 22 Nov 2024 21:24:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOFiM088494; Fri, 22 Nov 2024 21:24:15 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:15 GMT Message-Id: <202411222124.4AMLOFiM088494@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: 1538da10be00 - stable/14 - makefs.8: Remove a warning about makefs -t zfs being experimental List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 1538da10be0058d8362ff3f8d87a68dddacb1473 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1538da10be0058d8362ff3f8d87a68dddacb1473 commit 1538da10be0058d8362ff3f8d87a68dddacb1473 Author: Mark Johnston AuthorDate: 2024-11-19 21:07:39 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 makefs.8: Remove a warning about makefs -t zfs being experimental This should have been done with commit d9fe71828797 but was missed. Fixes: d9fe71828797 ("makefs: Remove the warning printed when makefs -t zfs is used") MFC after: 3 days (cherry picked from commit e19c607ff9b2b5d55664fd13e5fd9814e3279ffd) --- usr.sbin/makefs/makefs.8 | 3 --- 1 file changed, 3 deletions(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index 0cc2619e6c89..c87df98d24d5 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -503,9 +503,6 @@ Volume ID. Volume Label. .El .Ss zfs-specific options -Note: ZFS support is currently considered experimental. -Do not use it for anything critical. -.Pp The image created by .Nm contains a ZFS pool with a single vdev of type From nobody Fri Nov 22 21:24:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xw7QT2hwRz5dP5T; Fri, 22 Nov 2024 21:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xw7QT1HxPz4d5g; Fri, 22 Nov 2024 21:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GoYgRYMGJoZNqNTr2JE0aaI7Wn2KB8WuOg0fQqkL4Dg=; b=JsZLOo/hOhSi0EuBbG5Lo93LcIWB/kTZO1i2xN7vA3bK8d0ycgmxxpl2blN3K7/DOEFaTa jTgKZ4imuY11DZFmwPhx/Xv1oWtG4qc6GSjWemYXNSLGanY8/AlDfYJPlAMeb2dTgiXXFf rDMWN61I+Y5k7FWwdlbvfpYXDiZtU56OmrhXxq1X2e0kUUV/lp/+QWEtKYiAWLSS0b2F8H zkCrNGY7uX6t8l+s/HSJFAM1F1SWD+b+UXaKZMbkGcI9VIscqQmpkMy7P8999hmd9PDF7k Yecm/DaqVP8rFssC3GKnDaFJyZ2/Wz0FRIptdzSPIBo+qNCENZp8OyQ/sArrqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GoYgRYMGJoZNqNTr2JE0aaI7Wn2KB8WuOg0fQqkL4Dg=; b=MoAn7GQBdlvv1yGjOCl2j9U9mjXhszaQYlLYAhNz7BC0UtBHZQkoUVv47M+azSlr62e4vH FEDwPW4YAdc1eUeLjeLNE9TmCn0Wm0PYYjOfZgskwfv3+QoaI9UyAEn6sZHSRJ1haGwHDg NFPmg8p7G/vV84TbISjrymy1kdcuBkLGTsQnEnX21Sw/QAUiEm8DcvAveVwIgMn7DcP8ul DFZNbYe37fvvNNM3990UwaBQZaZjnKl1U3PVbiPKoQDTDtEK8dfVXWy52ttOvlwaaiXkK5 /ldgn2SO+1lEWwNdc5hpWAdrhEoYg0rbuH1zGqF93VPTaRDz7oDl3vDDRIjpNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310657; a=rsa-sha256; cv=none; b=BG2StyXMJCVtr5ko+GCfnzt4ZqNF03loIfKd+Mf5wBB+R9DU67h8UWG9Qm6Fvzf2E2gQX6 s8vefprbqZHzaSUpYkeU3M3rlEDcZJ9T/yskroWFe0r5JuCnwvNyCTtCr8TU2NZC6IeabI H+0DrdC8mX5UzTy+gF7hmMuxOKXWQwOX9JxhYgmwIwHLrTyhimjYrZiTJGfMAOZ793hccy b6FybMl64Goosjbg+rr/g4fbeVw0Z+WmZDbWBy/ZWaYq01tHVL4lydkjikn1m5O6MgYubn Zknoi47JlSq6bXAv/WTqhIiQLfSv9yg91CUSknL0rt3wq6lHjViYGabcaU6wgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xw7QT0t1nzgmn; Fri, 22 Nov 2024 21:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMLOHWx088563; Fri, 22 Nov 2024 21:24:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOHV5088560; Fri, 22 Nov 2024 21:24:17 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:17 GMT Message-Id: <202411222124.4AMLOHV5088560@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: 0e290388cb17 - stable/14 - pf: Add a sysctl to limit work done for rdr source port rewriting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0e290388cb17b76d3e79ee5f405405bf0a1169ee Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0e290388cb17b76d3e79ee5f405405bf0a1169ee commit 0e290388cb17b76d3e79ee5f405405bf0a1169ee Author: Mark Johnston AuthorDate: 2024-09-10 14:33:47 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 pf: Add a sysctl to limit work done for rdr source port rewriting It was pointed out that the current approach of exhaustively searching for a free source port might be very time consuming. Limit the amount of work that we might do before giving up. Reviewed by: kp Reported by: Eirik Øverby MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D46495 (cherry picked from commit 339a1977c32414f3d23733504955245ca6f3802d) --- share/man/man4/pf.4 | 5 +++++ share/man/man5/pf.conf.5 | 6 +++++- sys/netpfil/pf/pf_lb.c | 18 ++++++++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index b757376e0183..4938e719b17e 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -87,6 +87,11 @@ Default value is 131072. Size of hash table that store source nodes. Should be power of 2. Default value is 32768. +.It Va net.pf.rdr_srcport_rewrite_tries +The maximum number of times to try and find a free source port when handling +redirects. +Such rules are typically applied to external traffic, so an exhaustive search +may be too expensive. .El .Pp Read only diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index d9e9127f8a84..935a70301d88 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -1410,7 +1410,11 @@ A .Ar rdr rule may cause the source port to be modified if doing so avoids a conflict with an existing connection. -A random source port in the range 50001-65535 is chosen in this case. +A random source port in the range 50001-65535 is chosen in this case; to +avoid excessive CPU consumption, the number of searches for a free port is +limited by the +.Va net.pf.rdr_srcport_rewrite_tries +sysctl. Port numbers are never translated with a .Ar binat rule. diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 3f5b3f90a4e4..2623a22db86b 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -52,6 +52,13 @@ #include #include +/* + * Limit the amount of work we do to find a free source port for redirects that + * introduce a state conflict. + */ +#define V_pf_rdr_srcport_rewrite_tries VNET(pf_rdr_srcport_rewrite_tries) +VNET_DEFINE_STATIC(int, pf_rdr_srcport_rewrite_tries) = 16; + #define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x static void pf_hash(struct pf_addr *, struct pf_addr *, @@ -756,6 +763,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, break; case PF_RDR: { struct pf_state_key_cmp key; + int tries; uint16_t cut, low, high, nport; reason = pf_map_addr(pd->af, r, saddr, naddr, NULL, NULL, sn); @@ -807,11 +815,15 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, if (!pf_find_state_all_exists(&key, PF_OUT)) break; + tries = 0; + low = 50001; /* XXX-MJ PF_NAT_PROXY_PORT_LOW/HIGH */ high = 65535; cut = arc4random() % (1 + high - low) + low; for (uint32_t tmp = cut; - tmp <= high && tmp <= UINT16_MAX; tmp++) { + tmp <= high && tmp <= UINT16_MAX && + tries < V_pf_rdr_srcport_rewrite_tries; + tmp++, tries++) { key.port[0] = htons(tmp); if (!pf_find_state_all_exists(&key, PF_OUT)) { /* Update the source port. */ @@ -819,7 +831,9 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, goto out; } } - for (uint32_t tmp = cut - 1; tmp >= low; tmp--) { + for (uint32_t tmp = cut - 1; + tmp >= low && tries < V_pf_rdr_srcport_rewrite_tries; + tmp--, tries++) { key.port[0] = htons(tmp); if (!pf_find_state_all_exists(&key, PF_OUT)) { /* Update the source port. */ From nobody Fri Nov 22 23:33:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwBHw1PgQz5dXhj; Fri, 22 Nov 2024 23:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwBHw0sJTz4ppX; Fri, 22 Nov 2024 23:33:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732318428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t+ZvKc6OB7/VcHB/zv7fbBgOTO7YIVWBQ60K4LmC9V8=; b=Cj1RAw6PmkN1OGAA3ZA5XlIqjDE8JLMD/QklJGTc0fhZmx6IYEn798Rkf1t+aUnMw5+aGv LuXDBEWElmzqG1tY1tqHW3Wu5jUS2n/pwVw2aKJSKwK6g8MmuFnCTwMFAPMuFctc2i/KlE YmXiucNpSvnR3oO59m5m4l75zBqlEMJNxb7MEFYlJh3lD7H7A05LalqX36UxN6vjnmHsGY B9XSClqkLUW61cokwRwO3VLV+TGruKCxK4uFbJZpkrclxKIZ3+NDrSrZaPfbbx4f8TJZsM IpPS2BV2PDsTTD0/j5Df+h6BHW78nbA0pSREY4E/rPNWiWT/9LTgnyt4P/sz2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732318428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t+ZvKc6OB7/VcHB/zv7fbBgOTO7YIVWBQ60K4LmC9V8=; b=PQsvT6cbvbBqn/5o+bzc83lzb4DtptYFT+moTKUbIMpl4MsqmBiCovpW/ckYgvTbenR9Um NfKRAKjbzF1f7phhJQ6m3sHGNNpszhcufIplZ5XVo9xHqDVJ6HOgI9Pp6bTanU1ijWPKDO NOOm4KezWN9YkcfthGNbkfF7upvDAFI24R1lznujnXQ46rZHmpD3JIu77Z7zuiG3ZLuxiW sGZX8PTH8HbkOTXmMPF6pTWUeLxwosjUHNcSzpUsm5NYtegrgGqD0TjZGWPjS8msnMw0P2 C3/Y7qLA50FPcFQkz1LA15iad2KSlO3aRmRB0V3RZ3u/LUYalpch/V72OaxT7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732318428; a=rsa-sha256; cv=none; b=MoWgUBjRLf0uC1jRbL7bo4nktz4a7zV37QcyMimn2H2ZUgejfs7nFZQpMUqA1j0BUmNkws DyLl36rPligI7mnN5ziP/Ev3eFuDNs/XxCUYFaReNvmgMdYCN4kyajRCp2UIc6HpLcSytS p80IEG5L1J/s6XK3QEL4m0B9iSyqupePsumIj0WiVSNBLgangwX/2orHVX2WiJWKLBBQ2L hozZgxZVzNWG97+K/Ymq8SzSz4+vUSP/T5iB22ZsuZOzw0ZRfWmeE+F0kcZoT9bck0szaE h8eSbn2qUnhxhwqhTsjucgAH9mP2Q6fZy7Qkhm72HA1RCspEyH/fbksAm+jvhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwBHv73kfzlYV; Fri, 22 Nov 2024 23:33:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMNXlgb029478; Fri, 22 Nov 2024 23:33:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMNXl5i029475; Fri, 22 Nov 2024 23:33:47 GMT (envelope-from git) Date: Fri, 22 Nov 2024 23:33:47 GMT Message-Id: <202411222333.4AMNXl5i029475@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: e0bf7bc3b2ba - main - pf: reduce indentation level in pf_dummynet_route() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e0bf7bc3b2ba1b2d8a746311471611210ba6fc89 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e0bf7bc3b2ba1b2d8a746311471611210ba6fc89 commit e0bf7bc3b2ba1b2d8a746311471611210ba6fc89 Author: Kristof Provost AuthorDate: 2024-11-22 12:35:02 +0000 Commit: Kristof Provost CommitDate: 2024-11-22 23:32:04 +0000 pf: reduce indentation level in pf_dummynet_route() Reverse the first if() in pf_dummynet_route() to avoid an unneeded level of indendation. No functional change. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 98 +++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 99d30c1acf72..5a0cad132340 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8383,66 +8383,68 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s, struct pf_krule *r, struct ifnet *ifp, struct sockaddr *sa, struct mbuf **m0) { + struct ip_fw_args dnflow; + NET_EPOCH_ASSERT(); - if (pd->act.dnpipe || pd->act.dnrpipe) { - struct ip_fw_args dnflow; - if (ip_dn_io_ptr == NULL) { - m_freem(*m0); - *m0 = NULL; - return (ENOMEM); - } + if (pd->act.dnpipe == 0 && pd->act.dnrpipe == 0) + return (0); - if (pd->pf_mtag == NULL && - ((pd->pf_mtag = pf_get_mtag(*m0)) == NULL)) { - m_freem(*m0); - *m0 = NULL; - return (ENOMEM); - } + if (ip_dn_io_ptr == NULL) { + m_freem(*m0); + *m0 = NULL; + return (ENOMEM); + } - if (ifp != NULL) { - pd->pf_mtag->flags |= PF_MTAG_FLAG_ROUTE_TO; + if (pd->pf_mtag == NULL && + ((pd->pf_mtag = pf_get_mtag(*m0)) == NULL)) { + m_freem(*m0); + *m0 = NULL; + return (ENOMEM); + } - pd->pf_mtag->if_index = ifp->if_index; - pd->pf_mtag->if_idxgen = ifp->if_idxgen; + if (ifp != NULL) { + pd->pf_mtag->flags |= PF_MTAG_FLAG_ROUTE_TO; - MPASS(sa != NULL); + pd->pf_mtag->if_index = ifp->if_index; + pd->pf_mtag->if_idxgen = ifp->if_idxgen; - switch (pd->af) { - case AF_INET: - memcpy(&pd->pf_mtag->dst, sa, - sizeof(struct sockaddr_in)); - break; - case AF_INET6: - memcpy(&pd->pf_mtag->dst, sa, - sizeof(struct sockaddr_in6)); - break; - } + MPASS(sa != NULL); + + switch (pd->af) { + case AF_INET: + memcpy(&pd->pf_mtag->dst, sa, + sizeof(struct sockaddr_in)); + break; + case AF_INET6: + memcpy(&pd->pf_mtag->dst, sa, + sizeof(struct sockaddr_in6)); + break; } + } - if (s != NULL && s->nat_rule != NULL && - s->nat_rule->action == PF_RDR && - ( + if (s != NULL && s->nat_rule != NULL && + s->nat_rule->action == PF_RDR && + ( #ifdef INET - (pd->af == AF_INET && IN_LOOPBACK(ntohl(pd->dst->v4.s_addr))) || + (pd->af == AF_INET && IN_LOOPBACK(ntohl(pd->dst->v4.s_addr))) || #endif - (pd->af == AF_INET6 && IN6_IS_ADDR_LOOPBACK(&pd->dst->v6)))) { - /* - * If we're redirecting to loopback mark this packet - * as being local. Otherwise it might get dropped - * if dummynet re-injects. - */ - (*m0)->m_pkthdr.rcvif = V_loif; - } + (pd->af == AF_INET6 && IN6_IS_ADDR_LOOPBACK(&pd->dst->v6)))) { + /* + * If we're redirecting to loopback mark this packet + * as being local. Otherwise it might get dropped + * if dummynet re-injects. + */ + (*m0)->m_pkthdr.rcvif = V_loif; + } - if (pf_pdesc_to_dnflow(pd, r, s, &dnflow)) { - pd->pf_mtag->flags |= PF_MTAG_FLAG_DUMMYNET; - pd->pf_mtag->flags |= PF_MTAG_FLAG_DUMMYNETED; - ip_dn_io_ptr(m0, &dnflow); - if (*m0 != NULL) { - pd->pf_mtag->flags &= ~PF_MTAG_FLAG_ROUTE_TO; - pf_dummynet_flag_remove(*m0, pd->pf_mtag); - } + if (pf_pdesc_to_dnflow(pd, r, s, &dnflow)) { + pd->pf_mtag->flags |= PF_MTAG_FLAG_DUMMYNET; + pd->pf_mtag->flags |= PF_MTAG_FLAG_DUMMYNETED; + ip_dn_io_ptr(m0, &dnflow); + if (*m0 != NULL) { + pd->pf_mtag->flags &= ~PF_MTAG_FLAG_ROUTE_TO; + pf_dummynet_flag_remove(*m0, pd->pf_mtag); } } From nobody Sat Nov 23 02:36:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwGM05NH9z5dmPc; Sat, 23 Nov 2024 02:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwGM044ysz45km; Sat, 23 Nov 2024 02:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732329404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8g/yJcpzltwiKzbyr/rwC7nh7D6KwsbwTImZwTfEurM=; b=dUiLWMjypo8sNdGUcF8qbKuKFR5ozBLFiQiH5/8jJB94lV47fAt75DQLSoSqtDDaQMqmJB Om0/XHRoyU7x1GxzNyKTtGbKPaCVv+TH/rSUsqJkqug/7KsEbBHCj2JsxudZW9g0bW3eqa cyd467U85vErjqbaZXTqT8l8lzeQvCiaJ2XPnZhbIFnu0mr9lzY6Q348/ro0FcegwJiI8t v3JywHVQhquQfe1oMf5vBMky7TX1ELJnjdjopUHCb6Usx5jXdDsBFHKRk0NVJQZglDRA2F Bh8EELOjsdm8NNYxGrvOpsMaAjJ5Qr4geJBTr4fqrcn/Ga8kdPIEM2FJ5nu0Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732329404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8g/yJcpzltwiKzbyr/rwC7nh7D6KwsbwTImZwTfEurM=; b=S0DAKgnhfk9CCyJTeOCsyTu0GDVKepmzetkQw1SxxtuaD/H/yvY0M4kU1wC8SfovCab4w3 o2DiOx1adznsrU0cGzV81Y0deJUf8VraRfP3W5whbIp40X8/OiaXq4ogU3oIM0HaLlbz4h 1Gtj8CtaqDW+7MPLP2ss+q+w7YYIbhSfpRKNlHQZ1hkDfX60u/KHypKKqrcznjqlwN1Tas Rr2UkjkAOS9BP7jFe6LSilZutHRjG7zij4R/b+3X2EVJN2bYi+5JAGMAC7RbqWblHzxUUl oLKrDXAumUWb4B3WNaXGVxr2wncp4V7fP7STOafmK0kVzO2pOZuWUMQydnHK4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732329404; a=rsa-sha256; cv=none; b=J3ajG2c8i9DpMHF3+UEOBwDRyxfRDlMVFPzbK4U2TbyZACopmJariMpw3ofqs/zE2nCfi5 93qsR68Gd929Z3+Ycgoil0nNAtyk0QXCvuVbp9+O9CeDcahrQTyRBIAH+fc1ChXjwPdYbY La03eFzj08/d5BvFNijrqvjnT43nyDc9HnbKmWcOKVyeEmnrcIfvm49fDVsm9riCznYzHg rBemONtf8WpSeavY1KGyaV7N1wfCRvn0kGHw6MhJKdB27Lht+6LsPZ95+arjSsqnTYry0T OBHTDYMAVICEHX0GflfHIFdqmLmMATdVY510fxzzGkNeWyw0gVADpK+gY+ylsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwGM03ZcKzrNF; Sat, 23 Nov 2024 02:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AN2aiDa065098; Sat, 23 Nov 2024 02:36:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN2aiZN065095; Sat, 23 Nov 2024 02:36:44 GMT (envelope-from git) Date: Sat, 23 Nov 2024 02:36:44 GMT Message-Id: <202411230236.4AN2aiZN065095@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: 1905ce3a6bef - main - dtrace: Remove an unused typedef List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 1905ce3a6bef5652ad36ced7df9da6d2acb96b69 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1905ce3a6bef5652ad36ced7df9da6d2acb96b69 commit 1905ce3a6bef5652ad36ced7df9da6d2acb96b69 Author: Mark Johnston AuthorDate: 2024-11-23 01:40:53 +0000 Commit: Mark Johnston CommitDate: 2024-11-23 02:36:08 +0000 dtrace: Remove an unused typedef No functional change intended. MFC after: 1 week --- sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h index cdd4cf21a2f9..45201447024e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h @@ -51,11 +51,7 @@ extern "C" { #include #ifndef illumos -#ifdef __sparcv9 -typedef uint32_t pc_t; -#else typedef uintptr_t pc_t; -#endif typedef u_long greg_t; #endif From nobody Sat Nov 23 02:36:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwGM16mQzz5dmJr; Sat, 23 Nov 2024 02:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwGM14n1Bz45f9; Sat, 23 Nov 2024 02:36:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732329405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uU5vk22tNUDP8W+mzXM1+i9pts0735umcTdbBFXWGh0=; b=AGXTjwnhc8GAUGPnZ8kTYBuJGQBqkfwpPqYnmnKX+SwDvKjFCJnSgfF3iTKb8PmrCARkzQ WL2rEKdVivwEMiTlhfORxGjnwLhkUl+iOjxxg2bb+QADU5AE9+1sDAnqDiDf8/5pizJ9IT QTBCxoJxPw4ONVxSm72zjA+1ezCVNEKczYq6z6/13hlr3XOVlPyZAYt/shy0/EMt9h9+S1 yHXkN04JwYIquGP6StfTj/K7fTuXjTsXDKfM0RX/dWNpjnZfdmWDxjm0SPtT0lWpj6Cx2l U6N/fmRtnLvHTYsf+FiPisR5K3kNhui00Y+1N8JaeIU+l2ojhei7sPb1duzA5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732329405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uU5vk22tNUDP8W+mzXM1+i9pts0735umcTdbBFXWGh0=; b=oEicN10bLULCug1krxpc4FCp2+zN6TCv6deQkyed9+sobG/kSNtbuJLTlpS7ewxIB68y9J b2H/73bpv0E1S6XFTdCPTQ2cRnLJa9a9yEuaprnEbUpVelo7DBDhcseOXXBeVfDWPmrkpH 3Ml1d/edrICBZuSx3emVkZGBct9L4ozP05Ga0YCY8XyO0h90Fu/8XY7E0l2g7xRQXiWeJe rZ9T65ZV8Kgmhxk5ei9uRlOf2T6f9cijOKUF7nfVAoDFbddatY00SgxTvtyFovu4Eit1xi 83S9XLWkhFqjNoe28Z03H9a/o/S5LHSnmknUkmSep1FTVUGBC2Ntwg+QkhqNhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732329405; a=rsa-sha256; cv=none; b=Sx/x5hyh8FT9p6dZy5cPoF/Z6pz1wZyS+nUxgRbSd7CqfyNriicASgcM4RMM5ZusVNrrYq 9SThWnl3MH4YPuwhznYVQmuYCQHe92CtbKxlHtn6hT0agJI5g3wYzJjQ2AP3HL3z44Tzcf oA6ufO+0O2TWe//kQkCADcd6UFUipd2HP9Ac2MIzhLWI7qPa2p3bM/biCLCRl3cVa4wMJh Ev/1KXYGtpgGsuOinQyOICs22WvbEMQSCL12Wl6GQMNkDa4P0uJcgPWSi0YFpFV0GexZjY shHfVH0C3B2/YRGPHDoTjWfSGlBFk/L0/WRml/uHp6O33A0P86oXaXwd35QRcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwGM14LL9zrCD; Sat, 23 Nov 2024 02:36:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AN2ajca065148; Sat, 23 Nov 2024 02:36:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN2ajeb065145; Sat, 23 Nov 2024 02:36:45 GMT (envelope-from git) Date: Sat, 23 Nov 2024 02:36:45 GMT Message-Id: <202411230236.4AN2ajeb065145@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: fdeb273d49bf - main - dtrace: Add some more annotations for KMSAN List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: fdeb273d49bf2fa2544d3c98114859db10385550 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fdeb273d49bf2fa2544d3c98114859db10385550 commit fdeb273d49bf2fa2544d3c98114859db10385550 Author: Mark Johnston AuthorDate: 2024-11-23 02:32:36 +0000 Commit: Mark Johnston CommitDate: 2024-11-23 02:36:08 +0000 dtrace: Add some more annotations for KMSAN - Don't allow FBT and kinst to instrument the KMSAN runtime. - When fetching data from the traced thread's stack, mark it as initialized. It may well be uninitialized, but as dtrace permits arbitrary inspection of kernel memory, it isn't very useful to raise KMSAN reports. - Mark data copied in from userspace as initialized, as we do for copyin() etc. using interceptors. MFC after: 2 weeks --- sys/cddl/dev/dtrace/amd64/dtrace_isa.c | 55 +++++++++++++++++++++++++++------- sys/cddl/dev/fbt/fbt.c | 7 +++++ sys/cddl/dev/kinst/kinst.c | 7 +++++ 3 files changed, 59 insertions(+), 10 deletions(-) diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c index 83d34abbd270..f14e90d974bc 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -73,6 +74,8 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, frame = (struct amd64_frame *)rbp; td = curthread; while (depth < pcstack_limit) { + kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED); + if (!kstack_contains(curthread, (vm_offset_t)frame, sizeof(*frame))) break; @@ -99,6 +102,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, for (; depth < pcstack_limit; depth++) { pcstack[depth] = 0; } + kmsan_check(pcstack, pcstack_limit * sizeof(*pcstack), "dtrace"); } static int @@ -399,8 +403,10 @@ dtrace_getarg(int arg, int aframes) goto load; } - for (i = 1; i <= aframes; i++) + for (i = 1; i <= aframes; i++) { + kmsan_mark(fp, sizeof(*fp), KMSAN_STATE_INITED); fp = fp->f_frame; + } /* * We know that we did not come through a trap to get into @@ -430,6 +436,8 @@ load: val = stack[arg]; DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); + kmsan_mark(&val, sizeof(val), KMSAN_STATE_INITED); + return (val); } @@ -444,10 +452,13 @@ dtrace_getstackdepth(int aframes) rbp = dtrace_getfp(); frame = (struct amd64_frame *)rbp; depth++; - for(;;) { + for (;;) { + kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED); + if (!kstack_contains(curthread, (vm_offset_t)frame, sizeof(*frame))) break; + depth++; if (frame->f_frame <= frame) break; @@ -574,76 +585,100 @@ void dtrace_copyin(uintptr_t uaddr, uintptr_t kaddr, size_t size, volatile uint16_t *flags) { - if (dtrace_copycheck(uaddr, kaddr, size)) + if (dtrace_copycheck(uaddr, kaddr, size)) { dtrace_copy(uaddr, kaddr, size); + kmsan_mark((void *)kaddr, size, KMSAN_STATE_INITED); + } } void dtrace_copyout(uintptr_t kaddr, uintptr_t uaddr, size_t size, volatile uint16_t *flags) { - if (dtrace_copycheck(uaddr, kaddr, size)) + if (dtrace_copycheck(uaddr, kaddr, size)) { + kmsan_check((void *)kaddr, size, "dtrace_copyout"); dtrace_copy(kaddr, uaddr, size); + } } void dtrace_copyinstr(uintptr_t uaddr, uintptr_t kaddr, size_t size, volatile uint16_t *flags) { - if (dtrace_copycheck(uaddr, kaddr, size)) + if (dtrace_copycheck(uaddr, kaddr, size)) { dtrace_copystr(uaddr, kaddr, size, flags); + kmsan_mark((void *)kaddr, size, KMSAN_STATE_INITED); + } } void dtrace_copyoutstr(uintptr_t kaddr, uintptr_t uaddr, size_t size, volatile uint16_t *flags) { - if (dtrace_copycheck(uaddr, kaddr, size)) + if (dtrace_copycheck(uaddr, kaddr, size)) { + kmsan_check((void *)kaddr, size, "dtrace_copyoutstr"); dtrace_copystr(kaddr, uaddr, size, flags); + } } uint8_t dtrace_fuword8(void *uaddr) { + uint8_t val; + if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr; return (0); } - return (dtrace_fuword8_nocheck(uaddr)); + val = dtrace_fuword8_nocheck(uaddr); + kmsan_mark(&val, sizeof(val), KMSAN_STATE_INITED); + return (val); } uint16_t dtrace_fuword16(void *uaddr) { + uint16_t val; + if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr; return (0); } - return (dtrace_fuword16_nocheck(uaddr)); + val = dtrace_fuword16_nocheck(uaddr); + kmsan_mark(&val, sizeof(val), KMSAN_STATE_INITED); + return (val); } uint32_t dtrace_fuword32(void *uaddr) { + uint32_t val; + if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr; return (0); } - return (dtrace_fuword32_nocheck(uaddr)); + val = dtrace_fuword32_nocheck(uaddr); + kmsan_mark(&val, sizeof(val), KMSAN_STATE_INITED); + return (val); } uint64_t dtrace_fuword64(void *uaddr) { + uint64_t val; + if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr; return (0); } - return (dtrace_fuword64_nocheck(uaddr)); + val = dtrace_fuword64_nocheck(uaddr); + kmsan_mark(&val, sizeof(val), KMSAN_STATE_INITED); + return (val); } /* diff --git a/sys/cddl/dev/fbt/fbt.c b/sys/cddl/dev/fbt/fbt.c index 481c896e9775..99a77ba65eb8 100644 --- a/sys/cddl/dev/fbt/fbt.c +++ b/sys/cddl/dev/fbt/fbt.c @@ -136,6 +136,13 @@ fbt_excluded(const char *name) strcmp(name, "owner_sx") == 0) return (1); + /* + * The KMSAN runtime can't be instrumented safely. + */ + if (strncmp(name, "__msan", 6) == 0 || + strncmp(name, "kmsan_", 6) == 0) + return (1); + /* * Stack unwinders may be called from probe context on some * platforms. diff --git a/sys/cddl/dev/kinst/kinst.c b/sys/cddl/dev/kinst/kinst.c index 60400a452b95..82b78d98987c 100644 --- a/sys/cddl/dev/kinst/kinst.c +++ b/sys/cddl/dev/kinst/kinst.c @@ -132,6 +132,13 @@ kinst_excluded(const char *name) strcmp(name, "owner_sx") == 0) return (true); + /* + * The KMSAN runtime can't be instrumented safely. + */ + if (strncmp(name, "__msan", 6) == 0 || + strncmp(name, "kmsan_", 6) == 0) + return (1); + /* * When DTrace is built into the kernel we need to exclude the kinst * functions from instrumentation. From nobody Sat Nov 23 06:19:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwMJV3XQJz5f1gV; Sat, 23 Nov 2024 06:19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwMJV2zLYz4Q7H; Sat, 23 Nov 2024 06:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OB23N18dB4Pl+vWqqd1TM8NLbhFOrg/+wcUorLTlkyk=; b=vteIsXZHMT1LrbZguGFAIPIj1NjvZt1uDDnDOynWZHR/UKb1nSumcoPVZsO/3JgSZ+fNUd Pr0uPJ0dC53Zj0IHLdLRhmaurBNrSXrQr8wgRmy+aD5/Qsm1Urro7Dapn/YU94XfRGl3du uphtiRTIu7i61I36LHo8wGLrG8mBj8syvlQK9LaWn/NtOXFMPsuxSZIK1tbhYg+YYtWQhu svfddNRXzICGzdIHtZrPKhcjEE+86kzVky7qo/zWDyUbSo4TD/u1SWa+TChHmY/oRMG2bc rh5HpHq3T6oUCsmt00xF684zD2AKM5YI0s2jwaI9nC9mSbtcIENG/iPfUMeIZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OB23N18dB4Pl+vWqqd1TM8NLbhFOrg/+wcUorLTlkyk=; b=uHMPlYwUzuZ0bEWJsfuLQggHlRjUhGfQW1P7/fB/6ERhEiFmAY6Q0PfvJDv97StpQKxcS1 dx6X7b39TLdVM15tV7/bFEgDrIWG4d8SpNqPq5eIF78BIRTPOjDcvNx6Dk6D/fB0jEOrFW /ngX3pO9JTF83chjXKlr/kwJfdhZ6fcvwHaW4HlrEdsX3ayhrYCw73+Oz6dyQl4OhJm+d7 NqZhVxsX2ASKL+dQspucXKo8rQfz7K2vl753ydXsbVQ7XjNp0FJm0dcinesF+7Pu1+M9nX iHHWXWhYc4zkmXh/lv5p685T9HaCf4X65cyt+8aFEJnDdoMf4F/NzgJ078ecbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732342794; a=rsa-sha256; cv=none; b=vvSTl1aghedQFVLTML8KdW/CschE2hrIBpoOzOI5rW+58LD6qafrv/GScFxVLZ1cLqcOJ4 m9opL1MtiI7CVpjXlgM73prPVjpFNYGfFjqSiRB0Mij1xyd41WM820kIsMv9eLbOKaDzez rCVXkszNa6a6sryexxTnw7P2d1olmxbUhHMBBAbbLWwy1V4mX+Ez1AzWyyyL0HwekqEyxG WT+PkDpC/vDNOhu2UNMe7KFY8i70GKmJFUAXsJTfCpH9M7bBKbJgan6BIBQAJrh2CMKX3v JB4/wDWQzcmOyyRLGyFQJeUA84VrMKycw2+mcg1/ynZN4kWGHvQGvDDR9cQCjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwMJV2BJ3zxrV; Sat, 23 Nov 2024 06:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AN6JsGa077879; Sat, 23 Nov 2024 06:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN6Js3b077876; Sat, 23 Nov 2024 06:19:54 GMT (envelope-from git) Date: Sat, 23 Nov 2024 06:19:54 GMT Message-Id: <202411230619.4AN6Js3b077876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 6739fd94aaf1 - stable/14 - ixgbe: Add support for 1Gbit Active DAC links List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6739fd94aaf19640b0efaecc3ed7a3989601ba77 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6739fd94aaf19640b0efaecc3ed7a3989601ba77 commit 6739fd94aaf19640b0efaecc3ed7a3989601ba77 Author: Kevin Bowling AuthorDate: 2024-11-20 00:24:55 +0000 Commit: Kevin Bowling CommitDate: 2024-11-23 06:19:44 +0000 ixgbe: Add support for 1Gbit Active DAC links 1Gbit also emperically works on Active DACs. Sponsored by: BBOX.io (cherry picked from commit e38f9257c3fac5cb5a62f62c424a976446ae1220) --- sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index 218a9dac3b78..ea815c6c88e5 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1437,7 +1437,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || - (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) || + (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Sat Nov 23 06:20:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwMJp636mz5f1r0; Sat, 23 Nov 2024 06:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwMJp5H48z4QS6; Sat, 23 Nov 2024 06:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OhMIzCAem9CEyj4AVEXUUXqX5ugYYWQyHPd8fn6sYtM=; b=huuNYI+NnrjBJJp8IROHAWpZeUzYkJUpfYvl+CxCzC/FpwjLVAQHPMnHlZMNXRBo6xYNYx NB0vH1CetI4aMNJsIEk7eSYnpC8kWUnwVl5xZqFmlT2RA2HD/wNya4dnK01rB9sDI/J758 U7J2LLvPzxxhxJSX6RRV1kiQ6Dk8yEJNm3E+mL8WicT0/KKWbVXA/NviR+VSftqRcWq9jX dbMszts3+PiW/Tz2JZdt9SnrOzVc7x0cHqYSWzgFE4m7bTz0BWl5PD0cVEXqVGOrlY1YO7 qpQ4wfAn+YWHPVzME2ORzm8kCwzUBY9PV0drQSUx0N6ohLsDhkRXCuDi1Iymaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OhMIzCAem9CEyj4AVEXUUXqX5ugYYWQyHPd8fn6sYtM=; b=smMvhAr8UeJzeVwuHJtE0shffS4pWqXN1IQeqSUw5dcVh9HdAULUneD7iKBxBPCBdFQ4Q0 ViKTDM1qYpLr/pxK8zuuDGt7Ntr02+LUqTnyjnlyDHDriOzGwd9GISqDnsHgpgLBM/lUlG 4kDESWhpgN3nRRVlnuYLfwd4g97RpQBPLhzPScLF5RcQrwacF9dyD5Bc9SXvkR7yqz7Yuz dsl9ye9i/GDOUtttWf2ScjsYM7VGT2qIUHZkZds2mLyrBJ0tGlPE4CesQEVdCZGeZGiYB3 rNXRwbnMcCsgGf8NvWdRVzdx10b8vtNCKBIeP9Tp/Kk1XONfpDnU1K4hUrXaLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732342810; a=rsa-sha256; cv=none; b=QfxOuIvN/Dz0s2+WbBVmn/O3bC3YJaM4P6m07Q0w10EQID30IQ40y5SUrQHCEmriTEY1mc qlf88GiT0icAphy4Vsizqf/pLaKJ4dVcT8tNaGTAxsSfE2JBf8gXRLrkZN9FldnwKpsgpu i0kJQlXkOgGvjd+RzWicquYhSGVMZH3OY8EKSHkCgUReeZpJ8pzc9a1idCDFvIRkLHM46R 6V4fsoby/OikS2dV940Dn9OMmkX/kYqSLgQ5BOo34hEVL1JhbAdvw+mqmvcNayp4whbCaX EjGjyZTfJBUDl7iAvGeVmOqEHde3x+wcisxDKcPvYv3nobOLSdJ0Va5uz7Vlgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwMJp4ptTzxBF; Sat, 23 Nov 2024 06:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AN6KAQh082602; Sat, 23 Nov 2024 06:20:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN6KAdh082594; Sat, 23 Nov 2024 06:20:10 GMT (envelope-from git) Date: Sat, 23 Nov 2024 06:20:10 GMT Message-Id: <202411230620.4AN6KAdh082594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: cb8d81a2315f - stable/14 - igc.4: Remove non-existent timer tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cb8d81a2315f04c46eef276d63db6ea679e18660 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cb8d81a2315f04c46eef276d63db6ea679e18660 commit cb8d81a2315f04c46eef276d63db6ea679e18660 Author: Kevin Bowling AuthorDate: 2024-11-20 23:55:45 +0000 Commit: Kevin Bowling CommitDate: 2024-11-23 06:20:01 +0000 igc.4: Remove non-existent timer tunables These were removed in a40ecb6f7405 because they do not apply to igc hardware which uses EITR for interval timing. Sponsored by: BBOX.io (cherry picked from commit 8de007ad19dcda5bea9bac9fb2c140e4ed62ba78) --- share/man/man4/igc.4 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index cf36e584a679..f9bca716f7fe 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -100,21 +100,6 @@ Disable or enable hardware stripping of CRC field. This is mostly useful on BMC/IPMI shared interfaces where stripping the CRC causes remote access over IPMI to fail. Default 0 (enabled). -.It Va hw.igc.rx_int_delay -This value delays the generation of receive interrupts in units -of 1.024 microseconds. -The default value is 0, since adapters may hang with this feature being -enabled. -.It Va hw.igc.rx_abs_int_delay -If hw.igc.rx_int_delay is non-zero, this tunable limits the -maximum delay in which a receive interrupt is generated. -.It Va hw.igc.tx_int_delay -This value delays the generation of transmit interrupts in units -of 1.024 microseconds. -The default value is 64. -.It Va hw.igc.tx_abs_int_delay -If hw.igc.tx_int_delay is non-zero, this tunable limits the -maximum delay in which a transmit interrupt is generated. .It Va hw.igc.sbp Show bad packets when in promiscuous mode. Default is false. From nobody Sat Nov 23 06:20:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwMKj6glRz5f220; Sat, 23 Nov 2024 06:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwMKj69Jnz4R4q; Sat, 23 Nov 2024 06:20:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=otZ17zMKtbUmmz5t+U+uzoEUWERc14zM5yYPRjB4xlE=; b=POFT4jurkRnFDq5KAxyLXnd4IJbGUbaA2rU8+JzMuKRH8+L0MI3qJx3hWirRHrYaQelidC hLf4SftPXbQmvBgqizRvI+W86uv/KVf8kS5CgUVfyZVdwHBYvhjj7fN4ZzRIYD228uRDYP hsYubbXxJvastlQE1GAMI5GJVY9hde5fyMXj94tieVTY+TH3Hf9m0nO/vS8Lox9LK6CT9u lfoFiLtTkEwdkObb6Tin2t87urH3wVo0ZTVAoKEkzQB85lK19PtQLGNUadUCsvAf7Xj6MU LGwpOaVLd1Fh2ZiqJSONT3tWDNIXYsCbsxkf2+FMh42QoyrPjjSWMKmbIkR1uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=otZ17zMKtbUmmz5t+U+uzoEUWERc14zM5yYPRjB4xlE=; b=l6bbIv6SyPbc2A/IyfjVuwGFTlzSQEqvbDfqCCZwB4hlLnmwcVzfyi172vy2SNysaLPSXW 8nX1Sfl3RxcRbfTJam0yWSMylTN1N6b6VQtjEq20ybnGaZc3Vgco0/Wca1GDC6AHHILMR/ AfxD0eET7k+kDt/T8GncHrW5CEZUWuwzRdTfL/77mH6K3c0VfCdsxjl0xww1LJRph19t5a iiBaL/Ojiwecq06wEZVwVXrYMBFeViDIQUfr+vdKqmDdUOWNPCmiagHcDeTtZxqUMVTB2K gpyaODNkYwqTeDT2SCttuw04Za3EyilCWxsD59FGLmGYBEf05k89wDei5J/oZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732342857; a=rsa-sha256; cv=none; b=VG4XRV8ZyWwEl24JBIzvMoTGfXDMfnbxP/z8mjPHLE1gLgbR3g/aiPaGRboB0g1PHWjeyU wCjn4OqzjGCEPh+0N2+BfZGz+R0pxlv/pYaiJ4EZi1Vll4vwuEFM7qk+IDQFsQvDvpNfMv 9fb6N7QjtB0Uxn7uhNxOKWqbw9I7sdl0w/9FaAwI2BMbb0SUDTQhcMArITMnZZs/TVDQ+T 6M/BcuQNiPRYITuBGcmoEseajgbHWOwaVz5ZooQkFVuORxzWn0qFqmu8zE5YqlmokDMJSp glJob1ZdnMKAvyUXHg+r2SYT+2ltmSYY6brdBaEZ1eS/P8nM4NwHo+j3QSXTXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwMKj5fbFzy31; Sat, 23 Nov 2024 06:20:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AN6KvZX087032; Sat, 23 Nov 2024 06:20:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN6Kvq2087029; Sat, 23 Nov 2024 06:20:57 GMT (envelope-from git) Date: Sat, 23 Nov 2024 06:20:57 GMT Message-Id: <202411230620.4AN6Kvq2087029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 974d9c5a8750 - stable/13 - ixgbe: Add support for 1Gbit Active DAC links List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 974d9c5a875044810557f96264f23ecfc106f13d Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=974d9c5a875044810557f96264f23ecfc106f13d commit 974d9c5a875044810557f96264f23ecfc106f13d Author: Kevin Bowling AuthorDate: 2024-11-20 00:24:55 +0000 Commit: Kevin Bowling CommitDate: 2024-11-23 06:20:31 +0000 ixgbe: Add support for 1Gbit Active DAC links 1Gbit also emperically works on Active DACs. Sponsored by: BBOX.io (cherry picked from commit e38f9257c3fac5cb5a62f62c424a976446ae1220) --- sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index 218a9dac3b78..ea815c6c88e5 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1437,7 +1437,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || - (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) || + (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Sat Nov 23 06:20:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwMKl3JRYz5f23G; Sat, 23 Nov 2024 06:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwMKl0QMRz4R7C; Sat, 23 Nov 2024 06:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dbnpQPZfZ27bk4mM9yj6sqcZSEZ2NUk34bA3pGE9aMg=; b=ya/h3KkL6oRNVzUE6HetrGYE9AQh2PlVaLxbzdiDMf+u4hQ+TyE16D6nJhwZzuNeZshJmr 5Wo4uQWfTajiHxE5k1e7/tKYyHZKr6ISuHwnxOXEa7pemzpHx7mPzLokuOoyVcwSNDf7VW WgTH1KaUgS73QNqs852JmPBm7jNfMKx2K9y5pZedmbHSaRsc6t67QnbBghIjGng3fFvR2E nsX66Pq45cDoZ6DC9w9qN23c+P1MEIcX1SvoEV1WNoPvKYIJmUqCy+GGrDHTgjvaZX30du 2vurNv3CwNh//sOn/1oLvJvQI+1e7OS6sitBFtE043N1f1Q8gtXVNeC+HLpnAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dbnpQPZfZ27bk4mM9yj6sqcZSEZ2NUk34bA3pGE9aMg=; b=duHr7BDBlnvyI9BioNMHDbQI16u7wFlZXG4xXu0sw1un1Jtd8RH/kgEcZ2zCWuzhppOCS8 BbDdIwRoaLa0l8zms3WxI4NivCGM+hhwqHrorO3mQPC//a8VckyBBhLxSrG0SOdiwIMAVZ 0tusPFAlm01PAnFiKTvdIx7JqPq9uExd3hU0wyyTcgAZX1KzXkRZnFQv9K6uTg4A0oxvwY SaQF0OwkqTMB6QUN5f160tnocXk6ItSFoX2kRQrILjhvdhIwOgBUUaF5nvteLxdLaXy47I gJyAFTByLCuZvTQ/3k0QOR5B6UpZS6a0gZgiWpXXF6BLTWusTPCP3KCdyuXLUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732342859; a=rsa-sha256; cv=none; b=stPCp0b7oGNrjrVaQzpOb51Wr+2uAfpH4k+X0I5jlpxHjqAO6gOpPpxIWQGFKm5a1kmb/S qTMhNj+B7InMJFPDzgCjzKhIBkTA6UbiDXKFjZAUSvuEnxB6Smjf5SMnzTKdsl0De3iADs /eAccCPt5Y2THTinRq2SjgoXc/BdNkPDrF2lotYM8NQIxk7g3jwbPZ+3/ql++JmGuPNcqx iJkGZyzq13KTxVtauTxULASSnko9vYom7CZAi97Rus0NaCpTdb42QF4VpX7SjxiMDvWzUx qNKtRFD1EepnG2EseBR+f3blRU4W0EvaWiY9lxqvRyOBa5SRAkg1sNAhFInBbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwMKk6yC2zy32; Sat, 23 Nov 2024 06:20:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AN6KwXV087080; Sat, 23 Nov 2024 06:20:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN6Kw5C087077; Sat, 23 Nov 2024 06:20:58 GMT (envelope-from git) Date: Sat, 23 Nov 2024 06:20:58 GMT Message-Id: <202411230620.4AN6Kw5C087077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 33c11ce8a352 - stable/13 - igc.4: Remove non-existent timer tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33c11ce8a352fc59f1c8f1c0dd8022df92c1bd9d Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=33c11ce8a352fc59f1c8f1c0dd8022df92c1bd9d commit 33c11ce8a352fc59f1c8f1c0dd8022df92c1bd9d Author: Kevin Bowling AuthorDate: 2024-11-20 23:55:45 +0000 Commit: Kevin Bowling CommitDate: 2024-11-23 06:20:43 +0000 igc.4: Remove non-existent timer tunables These were removed in a40ecb6f7405 because they do not apply to igc hardware which uses EITR for interval timing. Sponsored by: BBOX.io (cherry picked from commit 8de007ad19dcda5bea9bac9fb2c140e4ed62ba78) --- share/man/man4/igc.4 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index e3dc7da65713..12e252030f97 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -101,21 +101,6 @@ Disable or enable hardware stripping of CRC field. This is mostly useful on BMC/IPMI shared interfaces where stripping the CRC causes remote access over IPMI to fail. Default 0 (enabled). -.It Va hw.igc.rx_int_delay -This value delays the generation of receive interrupts in units -of 1.024 microseconds. -The default value is 0, since adapters may hang with this feature being -enabled. -.It Va hw.igc.rx_abs_int_delay -If hw.igc.rx_int_delay is non-zero, this tunable limits the -maximum delay in which a receive interrupt is generated. -.It Va hw.igc.tx_int_delay -This value delays the generation of transmit interrupts in units -of 1.024 microseconds. -The default value is 64. -.It Va hw.igc.tx_abs_int_delay -If hw.igc.tx_int_delay is non-zero, this tunable limits the -maximum delay in which a transmit interrupt is generated. .It Va hw.igc.sbp Show bad packets when in promiscuous mode. Default is false. From nobody Sat Nov 23 10:05:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwSJM2sSDz5fGTN; Sat, 23 Nov 2024 10:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwSJM21R4z4kKL; Sat, 23 Nov 2024 10:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732356307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7OiozdZYa5StLFxGxoncMPIyu3aPdqBXjwcEG4qxxE4=; b=QpeHuj15jyZ4gDDXhFyIw85yppgJ9Lmc7M+NaXXSByB6f4kDFnRKJULSldy7jb21BiESK+ FcwNykhq/zQnzLNsaNeUoCcBipV38gCg3LIxLjk2rzroTyU1iW0KJL0O0Lsz2DH4aLjqXZ QD6vGhfinr/VqdPfIuiI1O4UjwKJuTY5w+pgnVk5ED/TgbrSfGVhywKjRRKwgN8gOg2U/O W1sekijIGUJpn0p/b4balKdeV34TwI/PbaoX0z+olhle6EvzoXwhZDnXSBDPTR4lgcuuCE s8PInjfyH+sIhwjPXyE0couAkzX6EJ3EMpdWafnrLwAb0dgK4iWY6szDV87OlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732356307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7OiozdZYa5StLFxGxoncMPIyu3aPdqBXjwcEG4qxxE4=; b=AD5do5Tm2rHMUxLs0lkh71/YilxGWpmDggzsamVge74k8FIgQn9lyfDqbUv7LXg8PTmoed d9bR44b1e4RZia/msr6f5gmJD8xvzvqr7DAKeVb6CJZ//qKsi+Pk8yI2elk1PsXg4I+WPK HxJ2K/MSr279QGySa8mmhOh0UAmYJN1MUbagwtVgrOgtlsKqEL7RZwVFBxSFvMuFaOWcdP pJu38SblVKn9RtyxKYRkoSoGQ9QUaZUcJLQ854MA8A9pKx07BztF05hmnhiLP1/B+JIiol JK8XW6OaLNlv8avVAjRMR9PoalZswtsVc1tmUUwR0E9LVsd9ztX1QKlQckAt6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732356307; a=rsa-sha256; cv=none; b=yq/X9w8uSsW18fUQBEwCL+0njhH9srTw5BiT+iQbA4otaXIjGaEyZdhTW6Nstie9edNgv7 3YwBNaHpAEDzyei/sInEvAmuaL3ZIzTdfwzrxsRuZbBhcHUV1QqpKvHDJaOdbn8xcOEB8q otvUCm0s+Y2IDFOOuai3zVyTDpnOAkyIkgNR0cyyjqE+cZ2/ztfmbumADjKoAEn2j05xv+ 02SmeX1xbyq0fpweMskXh1ALYVuN30RxPMeNkSnTXp3H7Jf/qQCmFsf3q1Hqu58N9AhT8F VrJwSbg2l+/FlcdFAGxz9lGi+ujPUR/+DKyClNlt6/U+/rfqoIR4wrv46wP2kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwSJM1W5mz14cw; Sat, 23 Nov 2024 10:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANA57s8005631; Sat, 23 Nov 2024 10:05:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANA57MO005628; Sat, 23 Nov 2024 10:05:07 GMT (envelope-from git) Date: Sat, 23 Nov 2024 10:05:07 GMT Message-Id: <202411231005.4ANA57MO005628@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: 81b38bce0794 - main - mlx5e tls: Ensure all allocated tags have a hw context associated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 81b38bce07940b7a4001dfeb8cd63774229ca950 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=81b38bce07940b7a4001dfeb8cd63774229ca950 commit 81b38bce07940b7a4001dfeb8cd63774229ca950 Author: Andrew Gallatin AuthorDate: 2024-11-23 09:43:17 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-23 10:01:50 +0000 mlx5e tls: Ensure all allocated tags have a hw context associated Ensure all allocated tags have a hardware context associated. The hardware context allocation is moved into the zone import routine, as suggested by kib. This is safe because these zone allocations are always done in a sleepable context. I have removed the now pointless num_resources tracking, and added sysctls / tunables to control UMA zone limits for these tls tags, as well as a tunable to let the driver pre-allocate tags at boot. MFC after: 2 weeks --- sys/dev/mlx5/mlx5_en/en_hw_tls.h | 2 +- sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c | 132 ++++++++++++++++++++++++---------- 2 files changed, 95 insertions(+), 39 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/en_hw_tls.h b/sys/dev/mlx5/mlx5_en/en_hw_tls.h index 2018198e5e52..d637314e040e 100644 --- a/sys/dev/mlx5/mlx5_en/en_hw_tls.h +++ b/sys/dev/mlx5/mlx5_en/en_hw_tls.h @@ -84,7 +84,7 @@ struct mlx5e_tls { struct workqueue_struct *wq; uma_zone_t zone; uint32_t max_resources; /* max number of resources */ - volatile uint32_t num_resources; /* current number of resources */ + int zone_max; int init; /* set when ready */ char zname[32]; }; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c index b5caa3ba53dd..8b5121066bdf 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c @@ -81,17 +81,57 @@ static const char *mlx5e_tls_stats_desc[] = { static void mlx5e_tls_work(struct work_struct *); +/* + * Expand the tls tag UMA zone in a sleepable context + */ + +static void +mlx5e_prealloc_tags(struct mlx5e_priv *priv, int nitems) +{ + struct mlx5e_tls_tag **tags; + int i; + + tags = malloc(sizeof(tags[0]) * nitems, + M_MLX5E_TLS, M_WAITOK); + for (i = 0; i < nitems; i++) + tags[i] = uma_zalloc(priv->tls.zone, M_WAITOK); + __compiler_membar(); + for (i = 0; i < nitems; i++) + uma_zfree(priv->tls.zone, tags[i]); + free(tags, M_MLX5E_TLS); +} + static int mlx5e_tls_tag_import(void *arg, void **store, int cnt, int domain, int flags) { struct mlx5e_tls_tag *ptag; - int i; + struct mlx5e_priv *priv = arg; + int err, i; + + /* + * mlx5_tls_open_tis() sleeps on a firmware command, so + * zone allocations must be done from a sleepable context. + * Note that the uma_zalloc() in mlx5e_tls_snd_tag_alloc() + * is done with M_NOWAIT so that hitting the zone limit does + * not cause the allocation to pause forever. + */ for (i = 0; i != cnt; i++) { ptag = malloc_domainset(sizeof(*ptag), M_MLX5E_TLS, mlx5_dev_domainset(arg), flags | M_ZERO); + if (ptag == NULL) + return (i); + ptag->tls = &priv->tls; mtx_init(&ptag->mtx, "mlx5-tls-tag-mtx", NULL, MTX_DEF); INIT_WORK(&ptag->work, mlx5e_tls_work); + err = mlx5_tls_open_tis(priv->mdev, 0, priv->tdn, + priv->pdn, &ptag->tisn); + if (err) { + MLX5E_TLS_STAT_INC(ptag, tx_error, 1); + free(ptag, M_MLX5E_TLS); + return (i); + } + store[i] = ptag; } return (i); @@ -114,7 +154,6 @@ mlx5e_tls_tag_release(void *arg, void **store, int cnt) if (ptag->tisn != 0) { mlx5_tls_close_tis(priv->mdev, ptag->tisn); - atomic_add_32(&ptls->num_resources, -1U); } mtx_destroy(&ptag->mtx); @@ -136,20 +175,38 @@ mlx5e_tls_tag_zfree(struct mlx5e_tls_tag *ptag) /* avoid leaking keys */ memset(ptag->crypto_params, 0, sizeof(ptag->crypto_params)); - /* update number of TIS contexts */ - if (ptag->tisn == 0) - atomic_add_32(&ptag->tls->num_resources, -1U); - /* return tag to UMA */ uma_zfree(ptag->tls->zone, ptag); } +static int +mlx5e_max_tag_proc(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = (struct mlx5e_priv *)arg1; + struct mlx5e_tls *ptls = &priv->tls; + int err; + unsigned int max_tags; + + max_tags = ptls->zone_max; + err = sysctl_handle_int(oidp, &max_tags, arg2, req); + if (err != 0 || req->newptr == NULL ) + return err; + if (max_tags == ptls->zone_max) + return 0; + if (max_tags > priv->tls.max_resources || max_tags == 0) + return (EINVAL); + ptls->zone_max = max_tags; + uma_zone_set_max(ptls->zone, ptls->zone_max); + return 0; +} + int mlx5e_tls_init(struct mlx5e_priv *priv) { struct mlx5e_tls *ptls = &priv->tls; struct sysctl_oid *node; - uint32_t x; + uint32_t max_dek, max_tis, x; + int zone_max = 0, prealloc_tags = 0; if (MLX5_CAP_GEN(priv->mdev, tls_tx) == 0 || MLX5_CAP_GEN(priv->mdev, log_max_dek) == 0) @@ -164,13 +221,31 @@ mlx5e_tls_init(struct mlx5e_priv *priv) snprintf(ptls->zname, sizeof(ptls->zname), "mlx5_%u_tls", device_get_unit(priv->mdev->pdev->dev.bsddev)); + + TUNABLE_INT_FETCH("hw.mlx5.tls_max_tags", &zone_max); + TUNABLE_INT_FETCH("hw.mlx5.tls_prealloc_tags", &prealloc_tags); + ptls->zone = uma_zcache_create(ptls->zname, sizeof(struct mlx5e_tls_tag), NULL, NULL, NULL, NULL, - mlx5e_tls_tag_import, mlx5e_tls_tag_release, priv->mdev, - UMA_ZONE_UNMANAGED); + mlx5e_tls_tag_import, mlx5e_tls_tag_release, priv, + UMA_ZONE_UNMANAGED | (prealloc_tags ? UMA_ZONE_NOFREE : 0)); /* shared between RX and TX TLS */ - ptls->max_resources = 1U << (MLX5_CAP_GEN(priv->mdev, log_max_dek) - 1); + max_dek = 1U << (MLX5_CAP_GEN(priv->mdev, log_max_dek) - 1); + max_tis = 1U << (MLX5_CAP_GEN(priv->mdev, log_max_tis) - 1); + ptls->max_resources = MIN(max_dek, max_tis); + + if (zone_max != 0) { + ptls->zone_max = zone_max; + if (ptls->zone_max > priv->tls.max_resources) + ptls->zone_max = priv->tls.max_resources; + } else { + ptls->zone_max = priv->tls.max_resources; + } + + uma_zone_set_max(ptls->zone, ptls->zone_max); + if (prealloc_tags != 0) + mlx5e_prealloc_tags(priv, ptls->zone_max); for (x = 0; x != MLX5E_TLS_STATS_NUM; x++) ptls->stats.arg[x] = counter_u64_alloc(M_WAITOK); @@ -183,6 +258,10 @@ mlx5e_tls_init(struct mlx5e_priv *priv) if (node == NULL) return (0); + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(node), OID_AUTO, "tls_max_tag", + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, priv, 0, mlx5e_max_tag_proc, + "IU", "Max number of TLS offload session tags"); + mlx5e_create_counter_stats(&ptls->ctx, SYSCTL_CHILDREN(node), "stats", mlx5e_tls_stats_desc, MLX5E_TLS_STATS_NUM, @@ -206,9 +285,6 @@ mlx5e_tls_cleanup(struct mlx5e_priv *priv) uma_zdestroy(ptls->zone); destroy_workqueue(ptls->wq); - /* check if all resources are freed */ - MPASS(priv->tls.num_resources == 0); - for (x = 0; x != MLX5E_TLS_STATS_NUM; x++) counter_u64_free(ptls->stats.arg[x]); } @@ -334,28 +410,16 @@ mlx5e_tls_snd_tag_alloc(if_t ifp, if (priv->gone != 0 || priv->tls.init == 0) return (EOPNOTSUPP); - /* allocate new tag from zone, if any */ ptag = uma_zalloc(priv->tls.zone, M_WAITOK); + if (ptag == NULL) + return (ENOMEM); /* sanity check default values */ MPASS(ptag->dek_index == 0); MPASS(ptag->dek_index_ok == 0); - /* setup TLS tag */ - ptag->tls = &priv->tls; - /* check if there is no TIS context */ - if (ptag->tisn == 0) { - uint32_t value; - - value = atomic_fetchadd_32(&priv->tls.num_resources, 1U); - - /* check resource limits */ - if (value >= priv->tls.max_resources) { - error = ENOMEM; - goto failure; - } - } + KASSERT(ptag->tisn != 0, ("ptag %p w/0 tisn", ptag)); en = ¶ms->tls.tls->params; @@ -448,17 +512,9 @@ mlx5e_tls_snd_tag_alloc(if_t ifp, /* reset state */ ptag->state = MLX5E_TLS_ST_INIT; - /* - * Try to immediately init the tag. We may fail if the NIC's - * resources are tied up with send tags that are in the work - * queue, waiting to be freed. So if we fail, put ourselves - * on the queue so as to try again after resouces have been freed. - */ error = mlx5e_tls_st_init(priv, ptag); - if (error != 0) { - queue_work(priv->tls.wq, &ptag->work); - flush_work(&ptag->work); - } + if (error != 0) + goto failure; return (0); From nobody Sat Nov 23 10:05:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwSJN56mCz5fGNf; Sat, 23 Nov 2024 10:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwSJN4Hsjz4kPp; Sat, 23 Nov 2024 10:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732356308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7tH4xCkSaKyLUkx+AT99gWxlkZmNZe/NHsthiN1In0=; b=pLuVsmH8RWiayDBbklaDCWFikn6iNrHgYPkPZ2BByum5GnJGQXpo+wnYeU/qTty/5VN/cp Wi6mZj/MDuA0/k0meMQqkApyHDlhkZyhUTzllKzW+SATZ2X/8LESkLxxtkosk1cTNL2sZf MFrsnC6D6KIV55y04FLp0tnqvu27k/p7tQMRKILdwCAWsd8OHRZRBT4ZHcuWFKnXREqdU8 xlkATE5kHRH+myqu1iT4ocEdNo3nPE97wJlZwU3g2Ym5NzqKxyOcB2QPlF3Tdk7Z7fO+50 PUy1ZWtisYe06sO1bBmlo0VTYqrZ4+c9oW6ApIe/gD6xcNOX28XIE7kPxPdGeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732356308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7tH4xCkSaKyLUkx+AT99gWxlkZmNZe/NHsthiN1In0=; b=pTHJ6O3/xSCMVQ927gQD4MWzqc2F8xAmgVS76ncKvTX7k45atSzscJgOdJUlxpulE7P69M 4BxFp+jqNf+ub1UV8DO6RPmf9+RMlOcwgRcepsp3zzklQee1n9G47EuoDtt3ZsAqVEH5m0 P259IfXsO7suyYhBhwnOFy0h+MeoJlQ7izXK3XqLN9JrwBjDtpEUJ9GYKuueFDmRQAZWyG WiqaNhSXU87MQLXLRjiBPoP1+njzoBoBf3h98H6z94c8e4XPX/IX20VZRnx/GMBi2Fyjdv TqlNrLALNvRrxYkOxtSuG72w157YKO7Ok2nrCBrXWOWpdT9tTRwR3u5WPJPEmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732356308; a=rsa-sha256; cv=none; b=pwtvvNR6/D5L03JTMD2Wl1HH/V1IbB95GhfFwIWOPcdgnKYmPpGw0+xvBiTnT09BNIALP7 IIjVzZvWU4DAzWz3lYE6UaaJPZ1vV0Ey6AG4nC4uRU4fc6rI8AfX4JEs7Jh/8N35JpC4GA 8d2eW5iQ7JdJPLCKWahsO5AvhWhpuz9FNKpJd0ItrsNg6eKRsUAuWjMRKOKrWTkj0B6hQb O0KfpuOh9QDSbq44ZvWFPTljYZwJ6my6IL/0wpfNrhQ+gdxduEwBZUqwtrY5ZtQdvgBhTG fDTwE856kTrA4pd2VIBXWfQgCzal/Q67zPThCkGnjlLFqhkjSVQ+yrEKxFTMFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwSJN2VYPz14cx; Sat, 23 Nov 2024 10:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANA58Sb005699; Sat, 23 Nov 2024 10:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANA58d4005696; Sat, 23 Nov 2024 10:05:08 GMT (envelope-from git) Date: Sat, 23 Nov 2024 10:05:08 GMT Message-Id: <202411231005.4ANA58d4005696@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: 64bf5a431cbe - main - mlx5_en: style function prototype List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 64bf5a431cbe1842db6f54993d6d426484012a5a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=64bf5a431cbe1842db6f54993d6d426484012a5a commit 64bf5a431cbe1842db6f54993d6d426484012a5a Author: Konstantin Belousov AuthorDate: 2024-11-23 10:01:12 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-23 10:01:50 +0000 mlx5_en: style function prototype Sponsored by: NVidia networking MFC after: 2 weeks --- sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c index 8b5121066bdf..56c7c3c5631f 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c @@ -394,8 +394,7 @@ mlx5e_tls_set_params(void *ctx, const struct tls_session_params *en) CTASSERT(MLX5E_TLS_ST_INIT == 0); int -mlx5e_tls_snd_tag_alloc(if_t ifp, - union if_snd_tag_alloc_params *params, +mlx5e_tls_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { union if_snd_tag_alloc_params rl_params; From nobody Sat Nov 23 10:05:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwSJQ2g94z5fGqk; Sat, 23 Nov 2024 10:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwSJP4DmRz4kMg; Sat, 23 Nov 2024 10:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732356309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfVLlUA54FJPyjmVLTGhgSwItS0ZDSZIfA1PcaAdjN4=; b=mDerVJD3P8SwZlwOXZaw5rAMv0Jtd0CKSkUzMJnGs9CfFKV5qgqP9RV7I3aQL3kf72m6lz OxhvK+uVwTB4sBsAFT+uivhA5MyPS4W86mrZEeIlwMghP7yHVrW20WIuyXLgj89qgjlqvq K/YAGc7EbsFVE9KD/alTBBhJe/tHFS2XpTaDrmY5lXz3MUMPI5anRGr8iTQHxneT2Pk0rb m7axfVK5hwQyCWgqkjCyk9b3M8MgU6JHpRaPB1dUpQpjSrD5SOrHeDsHzFcvmBn2MgLLL5 r03pz6YZDPpFtpl17Z6B8+g7bRVIOSxAf8Gc74dppPRVQ6J/0I7Qt6J9U2l9XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732356309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfVLlUA54FJPyjmVLTGhgSwItS0ZDSZIfA1PcaAdjN4=; b=LdRHIvgrBFnCoaUTTjJVx+PnqcmFvPYLVcuZRq2hjlZVTuGzdCjrpNXWuZxdUJXQexHWhM 4U9zNOPzYZr4h3oumXbs/+zXsJsRbJc2ud76cPTbDyaDq6Qhc+733qYTMV4x9LTXWLQ97Y WdTaKjPEUMiYm2Q5/oUb4tS7SvCpV4Ch3A27H8QYO+GqfepdU41EA98Q1u1lp9VKTJ9yoh lZEVySJ7tdXu2DAW/wDhv50nosxC54hKJQbFfCKUAM4dpzTd+t6CrkvW4zJTnC3Ryw4ch8 m3/v3rTbeCdxMLOHi3ppPBJejVaZOBiPhlPxB0fEw10oif44D4R2zKfC1DVQrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732356309; a=rsa-sha256; cv=none; b=C0lS9luf/5JZDFzX+3TG3V/WaQwu/YR4Sd+1S38y26HMT9GsaEN40fbSILahsOhpGC7Pxi xBhqGN51RuWNXXBlcBqhN2zuE8PhjC8Nt4jc/GfbPmJzhkqYlHNpH/TAa5Fwi7ofXmIU0D N9qk9+IBKOqXdhAUtRnzkzIm7ly7tASnH9Dn5eKXKzD1d5tSWzKDrq9yi0fOWI1u5hCg85 /I5RThMSA/S0sXJkBW65ThlwrfQF8LGi7GySHUadr8Btmu5qxNOjMHMaN4IqAgQyb5DCf/ vaEMRPCiE4gPnVUfxWq7kIKfsIWpuXGmjSAiENuxHE73NC3121qI3+EWaE13eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwSJP3XTYz14pD; Sat, 23 Nov 2024 10:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANA59Nn005752; Sat, 23 Nov 2024 10:05:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANA59Yv005749; Sat, 23 Nov 2024 10:05:09 GMT (envelope-from git) Date: Sat, 23 Nov 2024 10:05:09 GMT Message-Id: <202411231005.4ANA59Yv005749@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: 7fbc896e28e4 - main - vm_page.c: remove transiently defined vm_page_free_toq_impl() prototype List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 7fbc896e28e4eb895bd299da40dbdbc32509376b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7fbc896e28e4eb895bd299da40dbdbc32509376b commit 7fbc896e28e4eb895bd299da40dbdbc32509376b Author: Konstantin Belousov AuthorDate: 2024-11-23 09:45:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-23 10:02:00 +0000 vm_page.c: remove transiently defined vm_page_free_toq_impl() prototype Sponsored by: The FreeBSD Foundation --- sys/vm/vm_page.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 296d803ca0f0..f82ca5e16c98 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -172,7 +172,6 @@ static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(vm_page_t m, uint8_t queue); static bool vm_page_free_prep(vm_page_t m); static void vm_page_free_toq(vm_page_t m); -static void vm_page_free_toq_impl(vm_page_t m, bool do_remove); static void vm_page_init(void *dummy); static int vm_page_insert_after(vm_page_t m, vm_object_t object, vm_pindex_t pindex, vm_page_t mpred); From nobody Sat Nov 23 10:21:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwSgJ59dSz5fHPq; Sat, 23 Nov 2024 10:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwSgJ4gx6z4lqq; Sat, 23 Nov 2024 10:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732357292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d7SAoHWeu3/pm2+XO37hHGxM/74dh8XrM8EMzk080O4=; b=wKlGQK8DC6Pt7ZC484pkngNcvmTrV0rsVsj14lG81HMYO1BSrjC3+wYEBP4Um1YIgfPa5q EPKE4aZ7E3rXuBl9VavxpCYhNQkVitn53bVulqz/cmRxYySJBVe3ebplYSNpal2nB7NS84 2T7n8GzhrJB2NCl4r3vXLqmVQscPovB2339CIRYJla5abaPXqjbQma6hR8k2khoKiaukx+ WAcMaGSkojYvnD5SqzdCDUGaZ/FCzR60MuFviB1x+09j7V7/b+wdAkKUnw8eKag24Hkmsw kcUlZDlGFIDcIR6wUtXNQHR+7nN4ZQVzZfDxBEaPHwt/XYRV3QufPsTGqz+T2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732357292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d7SAoHWeu3/pm2+XO37hHGxM/74dh8XrM8EMzk080O4=; b=pPdl6JtDazJUJc8L1AoY02VGSNr6rjlTuZJRnq+wg22Fst7jTs5fPkFKPEpPj+DIqsSmp7 5gQjNJ90oBYVJd5nk2OpgKwksUnWUzfIOsMbdIWuUKpZWgkkFLOOlVe5XdyuxtZmzHQjUr 5yF+a1pkZqaNsl3HB+ee1ier8aI1Ur4xs+UPvtpGpz0UzxLiD6je1w0gkf2RFumrtpOz9M DNN5Hi3W4JWE+aLD9hxqPePNDxh3jU6wP98PKzlMXjbknjs2oI0xF51F2SefbETV16zx7/ rcUq4gEkf3lzqcltuU/hfZYZo2DE6d6ECSeHHTV3ZJk70b4xXuh/Yiplbp1FBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732357292; a=rsa-sha256; cv=none; b=q/QxNlWvXp452eQbhKdyZB6qUTXnER4lPVmwkC9YgWSwn4zscRAS5/EaW56T2CvFudemU5 yTi+eDBWhkfmb4wU9XSlBkbVODy4wIr33+x7Sm/jCuMxPZMF9oNkhgno1bMAe28KyLox7x OOeDTneS53PkXItdR2irpe4WKAHXnRRwaQ8JKeiRkFBml4HP9ZrmPi3idE3lrK8KUZmLY7 28WhZVyFJQDFanfHzoZYkd7PAnI+vcQFbdg2tNr31dK5itm9qZ9W16vZyaR2+T9BGy5TcM 2c2A8bQIQbakEgNOLFNtwZjNFYrEdCOAAC1fdreUmSjr+R/caUjTHT9xFbIY2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwSgJ4HZKz15FJ; Sat, 23 Nov 2024 10:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANALWuE039275; Sat, 23 Nov 2024 10:21:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANALWSQ039272; Sat, 23 Nov 2024 10:21:32 GMT (envelope-from git) Date: Sat, 23 Nov 2024 10:21:32 GMT Message-Id: <202411231021.4ANALWSQ039272@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: 0d38b0bc8fbc - main - mlx5en: fix the sign of mlx5e_tls_st_init() error, convert from Linux to BSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0d38b0bc8fbc82e3b4664d34d30d9e0091b277b9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0d38b0bc8fbc82e3b4664d34d30d9e0091b277b9 commit 0d38b0bc8fbc82e3b4664d34d30d9e0091b277b9 Author: Konstantin Belousov AuthorDate: 2024-11-20 13:00:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-23 10:09:50 +0000 mlx5en: fix the sign of mlx5e_tls_st_init() error, convert from Linux to BSD Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c index 56c7c3c5631f..dce16f8df96d 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c @@ -301,7 +301,7 @@ mlx5e_tls_st_init(struct mlx5e_priv *priv, struct mlx5e_tls_tag *ptag) priv->pdn, &ptag->tisn); if (err) { MLX5E_TLS_STAT_INC(ptag, tx_error, 1); - return (err); + return (-err); } } MLX5_SET(sw_tls_cntx, ptag->crypto_params, progress.pd, ptag->tisn); @@ -314,7 +314,7 @@ mlx5e_tls_st_init(struct mlx5e_priv *priv, struct mlx5e_tls_tag *ptag) &ptag->dek_index); if (err) { MLX5E_TLS_STAT_INC(ptag, tx_error, 1); - return (err); + return (-err); } MLX5_SET(sw_tls_cntx, ptag->crypto_params, param.dek_index, ptag->dek_index); From nobody Sat Nov 23 11:00:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwTXp1Pyhz5fKty; Sat, 23 Nov 2024 11:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwTXp0tpRz4pkd; Sat, 23 Nov 2024 11:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732359658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5DBGOKIN5x6sWT0e6rSNmU/ns4K0kdnDOWYdal15XT8=; b=VgLyYSLfIA9WadwDMm0TY+e8R0glQV0ffLrWNdEcGLE87U07nNMinEOO+C56uSZAikYFAz ru82UXG6F6C0Oq0uL3LbWZquwRukxRoJnYpZpR0JHzIFS3stnqFsq+u3AIU1qEC1LzCxlS uIae6NPKj5WtXs8kqtUKPuIYPNBnCvOOA/LMAhHsIpeSjKPnJnQKy1wrzCrpVBJscTGJYG SQP9nxmGrwtX97vG2V3UmJk7ougtrYQDQ0T3/GFWKtow5r8m5QVhs53p6vyhFjxhP2gif5 wm6q3McUe6zGfBx8aCrEUw0OmDeVvn+3OXQL2nUeRqMhE1RXuO9wK2s9rZHMWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732359658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5DBGOKIN5x6sWT0e6rSNmU/ns4K0kdnDOWYdal15XT8=; b=m8Fa14kivlbNNNzUNiVtUfqEnPJVeS8nwZE8DXFszsJQlVsUt+XatPt+FHmR+Ki5bXGUEN ucdwXtbJcdqi3BWW/iI7cb1wLRFSHwdOCGphsoWwgaONNNh7HfEpja97ptnPCPgDtoCuTz rcDgjQRTpM5zuta/0Pxg3MUn+2V5PaALBwQ3ecyEWBrmmHRPy6OR0D+I/ZXmM5/KIaQb3y GOzjVquEUm43ipzkNVW7nlVIwBzfRQ+y2vH4bYRxgKz7BmpubjRR4tpGPyk3P4IIBca2V6 RE6sLeeMacRoaP+ZbZtAS85drDK0ELkP4f2Mb7qgqwDB9H9todKiwUw2sKW3EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732359658; a=rsa-sha256; cv=none; b=JP0mwG4SEJB4y55rzaUsmFmhF1ain7Q/3jIY/pDMIv5DmXCc/sqANhcHw0qqYHJpoQJQXe 7Wee6nm+29gvOsfEzEqCW/QuXcqb6x5TPeqluKpHF0AjjmNdijwTQ00twgYB6OFPkjXzlq ElW3WBvTdvHhH4gPLXqrmGB/Nd+x0bDooKuV0slqwClWptYSwzJW9eN8clMtVhZtF2tLR3 Sb+PKqdKdnhpnAsEcSk2LVfdbFvkYMy5Ud99PeIPPMlgXTp37EriSR8VXGJhA8buntzkH2 LTqq8hZ9r2wgwpfB6H7RiuKlMWsQ0/pQcSwlHClHxs9mHZwQZ1xlVsBHH08B4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwTXp0NqCz167p; Sat, 23 Nov 2024 11:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANB0vNs011993; Sat, 23 Nov 2024 11:00:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANB0vBo011990; Sat, 23 Nov 2024 11:00:57 GMT (envelope-from git) Date: Sat, 23 Nov 2024 11:00:57 GMT Message-Id: <202411231100.4ANB0vBo011990@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: 253a1fa16b98 - main - mlx5: Fix handling of port_module_event List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 253a1fa16b98ac5f73f0820cfdd4f5ad7378757a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=253a1fa16b98ac5f73f0820cfdd4f5ad7378757a commit 253a1fa16b98ac5f73f0820cfdd4f5ad7378757a Author: Ariel Ehrenberg AuthorDate: 2024-10-31 09:18:26 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-23 10:59:26 +0000 mlx5: Fix handling of port_module_event Remove the array of port module status and instead save module status and module number. At boot, for each PCI function driver get event from fw about module status. The event contains module number and module status. Driver stores module number and module status.. When user (ifconfig) ask for modules information, for each pci function driver first queries fw to get module number of current pci function, then driver compares the module number to the module number it stored before and if it matches and module status is "plugged and enabled" then driver queries fw for the eprom information of that module number and return it to the caller. In fact fw could have concluded that required module number of the current pci function, but fw is not implemented this way. current design of PRM/FW is that MCIA register handling is only aware of modules, not the pci function->module connections. FW is designed to take the module number written to MCIA and write/read the content to/from the associated module's EPROM. So, based on current FW design, we must supply the module num so fw can find the corresponding I2C interface of the module to write/read. Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/driver.h | 3 ++- sys/dev/mlx5/mlx5_core/mlx5_eq.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index db1c9f0bb46c..cdefe7e013f6 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -723,7 +723,8 @@ struct mlx5_core_dev { u32 vsc_addr; u32 issi; struct mlx5_special_contexts special_contexts; - unsigned int module_status[MLX5_MAX_PORTS]; + unsigned int module_status; + unsigned int module_num; struct mlx5_flow_root_namespace *root_ns; struct mlx5_flow_root_namespace *fdb_root_ns; struct mlx5_flow_root_namespace *esw_egress_root_ns; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eq.c b/sys/dev/mlx5/mlx5_core/mlx5_eq.c index 29c12e41650e..1090f8638171 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eq.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eq.c @@ -690,9 +690,9 @@ static const char *mlx5_port_module_event_error_type_to_string(u8 error_type) unsigned int mlx5_query_module_status(struct mlx5_core_dev *dev, int module_num) { - if (module_num < 0 || module_num >= MLX5_MAX_PORTS) - return 0; /* undefined */ - return dev->module_status[module_num]; + if (module_num != dev->module_num) + return 0; /* module num doesn't equal to what FW reported */ + return dev->module_status; } static void mlx5_port_module_event(struct mlx5_core_dev *dev, @@ -740,8 +740,8 @@ static void mlx5_port_module_event(struct mlx5_core_dev *dev, "Module %u, unknown status %d\n", module_num, module_status); } /* store module status */ - if (module_num < MLX5_MAX_PORTS) - dev->module_status[module_num] = module_status; + dev->module_status = module_status; + dev->module_num = module_num; } static void mlx5_port_general_notification_event(struct mlx5_core_dev *dev, From nobody Sat Nov 23 12:57:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwX7C4nCKz5fSt4; Sat, 23 Nov 2024 12:57: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwX7C2v3Fz3xhs; Sat, 23 Nov 2024 12:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732366647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vnpEJEYIJSmd2deJNDjUX9Zo9PtnKKBfjAp9lqTkMc=; b=pMGFRo8SPb951IGMUJG1INvZWqc8RJGcHYlOTKFixI5HAf/665iuzj07/Esboczl7yHb01 5EIxU8d/Q9NLbGUDy+anufvVAB/LUSqKYMbZDloBbC1rxoFlf90tQT+YO4PVcH1CoYczmh 76hHRguil4j5rlz+RyViHeOcPUUNsJxlM2GnUHJHbQCXJSpFsjzzVhN18u+w2Dc8dhAQ+A F4f0TS/6Oj8zD52TV1k78ApK5L3j6MDLWW0yc7kYRdJs4TWe0kxj9blUq7PMXxpO3/gTk8 MEG9gc9kVeaNWI+eEsvJdu+fc3sV+r9/+mASZ+UmYj5tejq+iTLrNi00NAEMnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732366647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vnpEJEYIJSmd2deJNDjUX9Zo9PtnKKBfjAp9lqTkMc=; b=sDpfv/t6DnXz5AfS6t3urJOZx3RP+vJCnSL8amplrX7NPZjee8suligMAjdcxcRJ4OzyqO yicJLSq4a1m8wCOLU6vqvml1n8SBjWHqckQPCAT5szQsLo9gPeqU80CMhmNA6qvY0jtJ91 Y6HG7yUcvD94v+V5BgNuq0gJRKLlVasfqGVWReXvu/zkO+41fprcprR/T2lZtpcElBB3LL zk/xJBWp4dUjbNRwMh+zClhu1m7fZNRI0PlHmIieb0lkaKNYbHHjQPX1M31txsBdOUNoi1 svHAoiZaLuplRFkMjj2Dd6q2PmPK3qX0pGeZ7ehUAyeaq1YOaarz93JDq2+OVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732366647; a=rsa-sha256; cv=none; b=oqbjDV8mrpyUaiznOBQ98wxT5J+zCWOcm/f23bkGX7hWklgTR4xGMX9mXdm4ESqbXAlB8V pRTybeHz0v9IA+XT1sbN8bHYQyFCuTFyRUn4qhFauXtEnu5ACGFKYHBaE/XJX1sqIqH3dn 8iGodH5GjiWhxvppELqlPTlysl+y19zi7fWCyK0PAN4+zEb4wrDKQx9sFYMEpRybYPLttv TisVzunCix/Zs/ab+ukp9pNTdFFZdGL0+igNJRJDuzIpxFnpn8Co88+ivqobWzYz96Tu7J bbbKg5PcRuM2Ys+RapZpRpczTTcQu2qurMUnPu1QAWEwL73ssx5DeI5fjQ9LMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwX7C0xDKz18Gd; Sat, 23 Nov 2024 12:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANCvQJ5023218; Sat, 23 Nov 2024 12:57:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANCvQqo023215; Sat, 23 Nov 2024 12:57:26 GMT (envelope-from git) Date: Sat, 23 Nov 2024 12:57:26 GMT Message-Id: <202411231257.4ANCvQqo023215@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: e012d79c9c73 - main - ipfw: fix order of memcpy arguments. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e012d79c9c732a6aef21066feba2e5e48833cca4 Auto-Submitted: auto-generated The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=e012d79c9c732a6aef21066feba2e5e48833cca4 commit e012d79c9c732a6aef21066feba2e5e48833cca4 Author: Andrey V. Elsukov AuthorDate: 2024-11-23 12:52:43 +0000 Commit: Andrey V. Elsukov CommitDate: 2024-11-23 12:52:43 +0000 ipfw: fix order of memcpy arguments. This fixes `ipfw table N lookup addr` command for MAC tables. MFC after: 1 week --- 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 89e6b69bc3ad..ccc1a8098585 100644 --- a/sys/netpfil/ipfw/ip_fw_table_algo.c +++ b/sys/netpfil/ipfw/ip_fw_table_algo.c @@ -4306,7 +4306,7 @@ ta_find_mac_radix_tentry(void *ta_state, struct table_info *ti, if (tent->subtype == AF_LINK) { struct sa_mac sa; KEY_LEN(sa) = KEY_LEN_MAC; - memcpy(tent->k.mac, sa.mac_addr.octet, ETHER_ADDR_LEN); + memcpy(sa.mac_addr.octet, tent->k.mac, ETHER_ADDR_LEN); rnh = (struct radix_node_head *)ti->state; e = rnh->rnh_matchaddr(&sa, &rnh->rh); } From nobody Sat Nov 23 15:03:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwZx76vWgz5dPGj; Sat, 23 Nov 2024 15:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwZx75hPjz4HRl; Sat, 23 Nov 2024 15:03:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732374235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gYn7tDhZFI7bfVkvgNz+q5x57bMhzMKqFFYVcUBb3E0=; b=nGooek2iVmeR+wtcEUDrR4xbTqihNWIjRAggczPtwSclPu4M+sDsHJJ6Z//nwbfwMhpZp9 szpYfj5tEDtmEwYcmyltAXCRqO05u+Ce/IYRk3j0cIWrXFTQkWMjuj7i3orZFaZAOAj0w+ gJ2pVAMOWlQgMR9LGacRYHHiZC57OMi5OyM0QIxCtitWHpDKY12G9R/UK6qKxKNYbqWxfe YO43VW9GGpmD/Km2p0rzCJGx0fkK8qiTVKOQvPcAqULPMuQKShZVDHx7tz5y+dGMVWGWSU rlKkDJ0Q4fSlz9e/a4PnfX4MYLFh1aH8flQXY28fmqFgsnAEXmJ3kfaCBp4Bng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732374235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gYn7tDhZFI7bfVkvgNz+q5x57bMhzMKqFFYVcUBb3E0=; b=PK8+IMB/dZv7eSPV+LhDIQ1U+9Mrk/STDcFob0iL1UL7aNL8En9lcbWwjDYNNI/dXI/gRE mEj4ilVDkwkp+nGUTE+0aqdOD1Oc0kfLu98/gy1bhKYaWbxrS+bELCxFAO2gAWxq5Uy+/Y UcmkFRZQaAHd73EQ0zeAh5ZJS12yf/v7T+kOrfPw+VDGOArOqDV1z8EuhaoRKvH4kUVcr0 /EYrP/CMUeJhxXK9gFS8kRQyOm1Mb37+Neqsiw0iEiRxbwpWVGhXXoebCtOuCCC85QzkVh uljbzcihV0LC7ndH2iRdtVUs+HmpEieToZ7iE+sQQD9uAnT0tRSJ4cqdP3fhhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732374235; a=rsa-sha256; cv=none; b=H9dnw/weC4bqXTsxNpXRQgjH4B6FiHvpuSAIIHE4koBf43xOLrGT7SqV0zIPutS4Vc/4+o jXWHblTEyLaKK4AnsoksqLNdiPFpoGmhYyRBy0X8juk5GJIS7rkyF8Q71uEe5IuAv6hJp+ 1ZAD/xOWtndEISOwK7juDjSfavkAk3uca37q7CzH281FqZluUPsCko4r3s7YajUL6lgZPH sjFduP79hBOFJANYK5Zw9B7WRm5UwI49PVhG/qM/IA1aRQgWgV1d/ypG6uQ132YQUG8BUO x5iImUs0xncc+hbD9UxVJGP8MxpuCwiLxvjzKx556AWjQq53fCZU2IiYhgN66g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwZx74MMszFDY; Sat, 23 Nov 2024 15:03:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANF3tCP067725; Sat, 23 Nov 2024 15:03:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANF3tJZ067722; Sat, 23 Nov 2024 15:03:55 GMT (envelope-from git) Date: Sat, 23 Nov 2024 15:03:55 GMT Message-Id: <202411231503.4ANF3tJZ067722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 7749de244014 - main - Add new kern.vt.slow_down 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7749de244014a057b55552ea9d68fd8aeb262ea0 Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=7749de244014a057b55552ea9d68fd8aeb262ea0 commit 7749de244014a057b55552ea9d68fd8aeb262ea0 Author: Poul-Henning Kamp AuthorDate: 2024-11-23 15:01:09 +0000 Commit: Poul-Henning Kamp CommitDate: 2024-11-23 15:01:09 +0000 Add new kern.vt.slow_down tunable. On a laptop with no other console devices than the screen, things scroll of the screen faster than eye or camera can capture it. This tunable slows the console down and makes it update synchronously, so console output continues when timers or interrupts do not. Differential Revision: https://reviews.freebsd.org/D47710 --- share/man/man4/vt.4 | 11 +++++++++++ sys/dev/vt/vt_core.c | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index 4c115b68a80d..d3d3c4b38013 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -50,6 +50,7 @@ In .Cd kern.vt.color..rgb="" .Cd kern.vt.fb.default_mode="x" .Cd kern.vt.fb.modes.="x" +.Cd kern.vt.slow_down=" .Cd screen.font="x" .Pp In @@ -266,6 +267,16 @@ It will contain a list of connectors and their associated tunables. This is currently only supported by the .Cm vt_fb backend when it is paired with a KMS video driver. +.It Va kern.vt.slow_down +When debugging the kernel on modern laptops, the screen is often +the only available console, and relevant information will scroll +out of view before it can be captured by eye or camera. +.Pp +Setting +.Va kern.vt.slow_down +to a non-zero number will make console output synchronous (ie: +not dependent on timers and interrupts) and slow it down in proportion +to the number. .It Va screen.font Set this value to the base name of the desired font file located in .Pa /boot/fonts . diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 87020b6e6f19..1be98466112e 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -132,6 +132,9 @@ static VT_SYSCTL_INT(debug, 0, "vt(9) debug level"); static VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode"); static VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend"); +/* Slow down and dont rely on timers and interrupts */ +static VT_SYSCTL_INT(slow_down, 0, "Non-zero make console slower and synchronous."); + /* Allow to disable some keyboard combinations. */ static VT_SYSCTL_INT(kbd_halt, 1, "Enable halt keyboard combination. " "See kbdmap(5) to configure."); @@ -1657,6 +1660,12 @@ vtterm_done(struct terminal *tm) } vd->vd_flags &= ~VDF_SPLASH; vt_flush(vd); + } else if (vt_slow_down > 0) { + int i, j; + for (i = 0; i < vt_slow_down; i++) { + for (j = 0; j < 1000; j++) + vt_flush(vd); + } } else if (!(vd->vd_flags & VDF_ASYNC)) { vt_flush(vd); } From nobody Sat Nov 23 16:35:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwcyR541Cz5dWFK; Sat, 23 Nov 2024 16:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwcyR4Nvfz4Ps6; Sat, 23 Nov 2024 16:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732379711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SuVJTV0VKXCg6paA0QhfLndDsIMoGbjT5XAqMaiCfvY=; b=EVptiZcA3QRGAC5abqGGEC82SWZsByB3ty5Vjb/tTYWQWkryCebO+GGYjY023FM9O6Hpoz 4MOTYMpJbqn7xuiQcLpONsGFEeMPF60tzIefiQ1KbdPjI6v2EJ6zvfMkM+s9Jc+VG9Gktm dHW56w1YGRNg/N1LxG8G8hBjQUsWB2CNzai6+rulj0++qcvJEZZ4wDgouo9NRNrBk1vfin IkC+ghegWSMr5sNgFdIxwYs6FpewEesdoJn8avgVD0JxSfh7Ggf5aMPRDUXgE+SNpYhkA3 eqmcgoi03fHD6/9dK+s7Ay76L8YgIVDAj0BWQoJGFYZivcwZON3BRbRUUqrpgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732379711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SuVJTV0VKXCg6paA0QhfLndDsIMoGbjT5XAqMaiCfvY=; b=lIHonGVhN2ZQfx62oZwLkOAiAjc/Tewq/jCcoThO/WM+qKZPikZU9ONWXMiJethCAdWuD3 nUd+8pSkBO5no4fj3W1WQLzDgK/uYYqdwzAz6rDCNuGsTfIXkCP3uwtN3qgYP3iM67oIWP 2M/8fs/VgvBnZ6RjRVbH2MeE5NNsWysAfXtptrc+ma6StFn9OkmHyYzvf07AfBn9l1sNmh IOX4j8mUXwWW66gPqfo3ftQK4810vJzc5xKX0XZv3Ld3QvGhdwf4NFfolau9o7qHtM6OPw KC694M4t+Tqc/GYVpQSdVJnFgvhQ+4Tkk9HCtYXz4PYO3UalZIE7MMgTNN9FZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732379711; a=rsa-sha256; cv=none; b=ZibTbyfPh0jWJmev3gT1m1h/w98tn6lWLm13gncORQngivi8tfemJkm8YkXlS+Gm2NdCVZ UUPdigAfC8Y6yWzSGObWM/buX8y/umpxRh+Nnu3jdbyD7kfXV6ri4tos6axgRmtj7UuzlK 6FtjQ3XWXZHG246/NpgahyzFbxcZntgYGzyKuOvgJklkgo+RYuEK3RgLHwPKLqe9sOmKBZ 6zOeLOmpeP+GG6++SFOEsVriaNxCxfEmhuDTtPxy89eVi1vZnbPZH+KsxJkPFQ3EnTWI2C /h6uIpT/5QGwPGLYwhvqvFJ0cv8t1sqY7q6IIUckGxcGzKOpLXjmh0IsD45PhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwcyR3wLVzHM3; Sat, 23 Nov 2024 16:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANGZBHd034825; Sat, 23 Nov 2024 16:35:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANGZBO0034822; Sat, 23 Nov 2024 16:35:11 GMT (envelope-from git) Date: Sat, 23 Nov 2024 16:35:11 GMT Message-Id: <202411231635.4ANGZBO0034822@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: 9ad8116b5461 - main - kerneldump: fix incorrect SETSIZE to BIT_COPY_STORE_REL when livedump List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9ad8116b54616a5e8cbcdd2e1432893dce0c608c Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=9ad8116b54616a5e8cbcdd2e1432893dce0c608c commit 9ad8116b54616a5e8cbcdd2e1432893dce0c608c Author: Ka Ho Ng AuthorDate: 2024-11-23 16:35:07 +0000 Commit: Ka Ho Ng CommitDate: 2024-11-23 16:35:07 +0000 kerneldump: fix incorrect SETSIZE to BIT_COPY_STORE_REL when livedump Also replace malloc/free with BITSET_ALLOC/BITSET_FREE macros. Sponsored by: Juniper Networks, Inc. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47708 --- sys/kern/kern_dump.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_dump.c b/sys/kern/kern_dump.c index 40355c14ba0f..67c5844013be 100644 --- a/sys/kern/kern_dump.c +++ b/sys/kern/kern_dump.c @@ -465,7 +465,6 @@ minidumpsys(struct dumperinfo *di, bool livedump) struct minidumpstate state; struct msgbuf mb_copy; char *msg_ptr; - size_t sz; int error; if (livedump) { @@ -510,9 +509,10 @@ minidumpsys(struct dumperinfo *di, bool livedump) msgbuf_duplicate(msgbufp, &mb_copy, msg_ptr); state.msgbufp = &mb_copy; - sz = BITSET_SIZE(vm_page_dump_pages); - state.dump_bitset = malloc(sz, M_TEMP, M_WAITOK); - BIT_COPY_STORE_REL(sz, vm_page_dump, state.dump_bitset); + state.dump_bitset = BITSET_ALLOC(vm_page_dump_pages, M_TEMP, + M_WAITOK); + BIT_COPY_STORE_REL(vm_page_dump_pages, vm_page_dump, + state.dump_bitset); } else { KASSERT(dumping, ("minidump invoked outside of doadump()")); @@ -524,7 +524,7 @@ minidumpsys(struct dumperinfo *di, bool livedump) error = cpu_minidumpsys(di, &state); if (livedump) { free(msg_ptr, M_TEMP); - free(state.dump_bitset, M_TEMP); + BITSET_FREE(state.dump_bitset, M_TEMP); } return (error); From nobody Sat Nov 23 16:39:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xwd3Y6mHQz5dWNf; Sat, 23 Nov 2024 16:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xwd3Y69FKz4QCR; Sat, 23 Nov 2024 16:39:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732379977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g25o6RjvJ+2vUqd6cBG8DbU+BiZbBgwPNa8Nythqp94=; b=pWaJp2ILujPvr9ZRwfbQGTbQDVSVq1+ixfR+Eu+piGeUy114+b76RFh6dahLvpOKkwjp0f Yeq/nxaPXxJ1Dvv69c0az993B9r/t95ECVQH34HYS2cN//iX72idaVTYDZnmwtlFAog784 +VTWTpq3qbN7krrrbKk5pjj+mUsHEVo9UT6swyl2KxJzKr72NN5yikn0ZN4rgZjQFboArM Aox0Bi7NFY09FGu73aZzHtKnmRWUztzFrEF8razEEMWbKOl1Szbar2XmbswIm19H62xi8X P+Mfcy6bNeR3YHEapTEW4uZ76PKbztY7vhUnzj+bX7k1ZG0mFqYNUTR73Qg41w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732379977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g25o6RjvJ+2vUqd6cBG8DbU+BiZbBgwPNa8Nythqp94=; b=AiiWCIfzHXTQ9AvUJT4St3lYL3RG8JNx3wzWhfiam+fBrwykCUDMx0xIdx2j40lBUKz5o0 M2fpfy/3J+Me/l5RlfosSW3aVSmQhzJ83l/UPoZG2OBuhv+BcFkLt8OKFvyfmQizsrMV7d pyHLpNNIt6StqO1L9OUpL5VLu2rr5cI7AQoCJqpLRMRgx+hS0WdkwSMtddVxseLFdo9Lfx mPmAsF268ajg4eRjhEnf3Jp6NbGqkzjWCUqWZBIHARGMVrgzuzbvxO3v2T6prPg8vwwOck gxbcF0D2b4bPWSe0303AfoKdFS7a9HEHTdeQbW2a36Wc7H6woMzXc1aIn38+Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732379977; a=rsa-sha256; cv=none; b=xrDANou/JYMFBXQQQQY0HcVFXshja6+SmYw97WJuavt3iPGCG/puzPd/iRnMnbph0geUIf puJ2CnNsXrugh82GEcfiVeHS/1P0r0Y+wZylX1PEGagnOjVqaDetsxnBum8vGtyrX/kjfa h74d9rlJmvGJnzd5tBRWOmXs7Ti1LueD7x2rDqoV12xdKRXy9RnrdT28odWeDGMMV4NFXg NykN0qTZmxez5Z5XJTgTyGZGIwTODiRsb4KhW6c3ADyAR7GOgU15WOKNdiJP31Gqrd8lVb ottnoaYzEwzuTDphBrCV3m9AfjkPWwG4dl319EtqQNP3WVywoylClrqqdVTiuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xwd3Y5dh8zH4j; Sat, 23 Nov 2024 16:39:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANGdbNh036173; Sat, 23 Nov 2024 16:39:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANGdbK1036170; Sat, 23 Nov 2024 16:39:37 GMT (envelope-from git) Date: Sat, 23 Nov 2024 16:39:37 GMT Message-Id: <202411231639.4ANGdbK1036170@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: b4c700fa7cca - main - new-bus: Fix some shortcomings in disabling devices via hints List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b4c700fa7cca7d3e4da84dd417fc3efc42788a52 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b4c700fa7cca7d3e4da84dd417fc3efc42788a52 commit b4c700fa7cca7d3e4da84dd417fc3efc42788a52 Author: John Baldwin AuthorDate: 2024-11-23 16:39:02 +0000 Commit: John Baldwin CommitDate: 2024-11-23 16:39:02 +0000 new-bus: Fix some shortcomings in disabling devices via hints A device can be disabled via a hint after it is probed (but before it is attached). The initial version of this marked the device disabled, but left the device "alive" meaning that dev->driver and dev->desc were untouched and still pointed into the driver that probed the device. If that driver lives in a kernel module that is later unloaded, device_detach() called from devclass_delete_driver() doesn't do anything (the device's state is DS_ALIVE). In particular, it doesn't call device_set_driver(dev, NULL) to disassociate the device from the driver that is being unloaded. There are several places where these stale pointers can be tripped over. After kldunload, invoking the sysctl to fetch device info can dereference dev->desc and dev->driver causing panics. Even without kldunload, a system suspend request will call the device_suspend and device_resume DEVMETHODs of the driver in question even though the device is not attached which can cause some excitement. To clean this up, more fully detach a device that is disabled by a hint by clearing the driver and setting the state to DS_NOTPRESENT. However, to keep the device name+unit combination reserved, leave the device attached to its devclass. This requires a change to 'devctl enable' handling to deal with this updated state. It now checks for a non-NULL devclass to determine if a disabled device is in this state and if so it clears the hint. However, it also now clears the devclass before attaching the device. This gives all drivers an opportunity to attach to the now-enabled device. Reported by: adrian Discussed with: imp Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47691 --- sys/kern/subr_bus.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 2dbe1072aa83..32ddcaa9f643 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2591,7 +2591,13 @@ device_attach(device_t dev) int error; if (resource_disabled(dev->driver->name, dev->unit)) { + /* + * Mostly detach the device, but leave it attached to + * the devclass to reserve the name and unit. + */ device_disable(dev); + (void)device_set_driver(dev, NULL); + dev->state = DS_NOTPRESENT; if (bootverbose) device_printf(dev, "disabled via hints entry\n"); return (ENXIO); @@ -5759,17 +5765,20 @@ devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, * attach the device rather than doing a full probe. */ device_enable(dev); - if (device_is_alive(dev)) { + if (dev->devclass != NULL) { /* * If the device was disabled via a hint, clear * the hint. */ - if (resource_disabled(dev->driver->name, dev->unit)) - resource_unset_value(dev->driver->name, + if (resource_disabled(dev->devclass->name, dev->unit)) + resource_unset_value(dev->devclass->name, dev->unit, "disabled"); - error = device_attach(dev); - } else - error = device_probe_and_attach(dev); + + /* Allow any drivers to rebid. */ + if (!(dev->flags & DF_FIXEDCLASS)) + devclass_delete_device(dev->devclass, dev); + } + error = device_probe_and_attach(dev); break; case DEV_DISABLE: if (!device_is_enabled(dev)) { From nobody Sat Nov 23 16:55:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwdQ25nQlz5dXSf; Sat, 23 Nov 2024 16:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwdQ24zGsz4Rv7; Sat, 23 Nov 2024 16:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732380938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sapNxzLEalnC19N40yNPdWTzfqfqjLxiT610ur58qi8=; b=yKNE8sT3a7m+sPG9lVuVkKQTViapjaPVZuk9GB77PQ3C3h7ZIFLVC7w+hSsGN32hIIkOiS lCEaGMdJScv95ZDfFsK/gSjlIAFt6YP+tWvBS13heip5pLtIXNLS8tP9aoZrZEN4ZPUSnn 61cc0bZbMA3kRH+CXtCSI7bTJ7VQZmFqZT2twGgq7Wej4ANcE+VIaJjFFXDJktA3WXpUVb 66HaIiwgXY7/vW78SrTMO37lRkqTMs3edkow+h6VzC/+wQw8tfqav27okp8xVq6vj4BCKw bnpiV7ilst9UhB6jgLnjavq9RdTwSM9QKwFxrgRCKa7GFLkeGryRwGxJcWNCkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732380938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sapNxzLEalnC19N40yNPdWTzfqfqjLxiT610ur58qi8=; b=fF2arY1NdLuXBL9/nni+nKyLaubyzZ5n3//Cdo7lT4xo8F1bRIuLFVKyvKxYGeOtWpWTjo SGkrLXXZGwAHPLAFDlI5BBqporwmCuZ2bJ7qQA1m+0Nx5wna9zq8MutFAdpXYtEwwygAOp N9Rz79XFqw46BCc2SnDt4AYvXUOyFNKUrAfrV7E89gMYnQkKojbqe+xDVlQ487T2JnXtbl 394wkP5rETgoD7pg3YFKVRGdfBsxIzy6oq9KN3KRm5U+CDGNQpr+g7uha22StczxU+VTN3 xlm0759EBQeVp6cUJtfPu4Dt4KK5nQj2nH9Zh/VlgaaHiJBdm/RqFm9O+3B6aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732380938; a=rsa-sha256; cv=none; b=TY3LbXk+tGO1NJVW6XZMjcligutJYdZPE+2SH1w4Nw7dcK0DfB9jrEG7h5Ggk/xvPp4CIS zB/UUeBef3hZva4KX08fztmZPpEAEzTzjecNjOBdJo7Bs7vDHerUJ265X70F53gJbmY1za XvmGugfM8DdN9fV00q548g8fRjpeRHgMKnq6qVDFywl/0ZFk+HJVA0EI92b372/cY2kxfB FBqDvfwFJcuaRa/QNWQ3IzjA/b4sBYduqFDY0uue977Qm1Gajy8yBhUYjczOO2N7WexcLK NY1FUzUV9eE+mXQ/wHXAH9kEpcFVejwewdkiP4fo0W8v4KSDez7VsZK6Uf6gqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwdQ243PPzHK2; Sat, 23 Nov 2024 16:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ANGtcQn072104; Sat, 23 Nov 2024 16:55:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ANGtcGL072101; Sat, 23 Nov 2024 16:55:38 GMT (envelope-from git) Date: Sat, 23 Nov 2024 16:55:38 GMT Message-Id: <202411231655.4ANGtcGL072101@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: b4ede68c21c6 - main - find: Correct ls(1) equivalent command for -ls primary List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b4ede68c21c6c0277bc283c2bda35f3136e836b6 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b4ede68c21c6c0277bc283c2bda35f3136e836b6 commit b4ede68c21c6c0277bc283c2bda35f3136e836b6 Author: Thomas Eberhardt AuthorDate: 2024-11-23 16:45:27 +0000 Commit: John Baldwin CommitDate: 2024-11-23 16:45:27 +0000 find: Correct ls(1) equivalent command for -ls primary After commit 3bfbb521fef5, -g stopped being a no-op. The -g hasn't been required for equivalent output since 4.4BSD. PR: 282901 Fixes: 3bfbb521 ls: Improve POSIX compatibility for -g and -n. --- usr.bin/find/find.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 635d42656bad..eb3fd4d0dbde 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 21, 2024 +.Dd November 23, 2024 .Dt FIND 1 .Os .Sh NAME @@ -600,7 +600,7 @@ displayed preceded by .Dq Li -> . The format is identical to that produced by .Bk -words -.Dq Nm ls Fl dgils . +.Dq Nm ls Fl dils . .Ek .It Ic -maxdepth Ar n Always true; descend at most From nobody Sun Nov 24 00:22:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwqKy56FVz5f5YX; Sun, 24 Nov 2024 00:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwqKy4clZz43SV; Sun, 24 Nov 2024 00:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732407766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ezc98Ekc6Yg0f1y1325SnfueMNWuhpwYWbDvcAfC4A4=; b=nFwBOGS2byzMZjtrUXMUP6AES6OJkzVDxVEbnQC3JZEgws3xF9/TjpbK72ZwzqqONO8OCC LOM1mV1yUYRXeVI2WaRfwYws1aCeb8Y72+NUswkqmtTSs8VdhVCFEdy4pneMS8xJUxG6DV adtypLTb/opk1CaWp2GC9jATkqQuJhmqb2vz9aMlnpsKGjt9nSOxLAThY9xql+IqPsWI/R M5AfOuvNaDITYJCglZLxlK8knH8MamNaSmr0+4wiJaD832Hle+8oBxdiNJOd4Kxh2efAgn fdIjN/w13/2mshrPUd7mGwkzeUxl7EmV+eUN3YrhzVhgO138H69+3dJUsKf/Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732407766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ezc98Ekc6Yg0f1y1325SnfueMNWuhpwYWbDvcAfC4A4=; b=oIw9n9CHfIOwKDYk1RB7Y+RcEqV22B4aSr0GH5tYJvnTpQnKaU3ciHmSjXRKO16vyC1kZH t7LUP1+Hnqk8lLID+nH42lN+AGeInIIo7dnBMrV1kGyGa8ksilWV4SewFQrxSo5oSpQBmr M8j8UWVzAp8q+hALb70Avgl1lU454Tvsg5Jeplx1iVi5UsdyzgptCKU5/tfqNjt/nOPqSR 3gKSW37/99fRB7TlZnz0xOP6goQkYcidQbzvxFFCOvZuTaQyRxRNgSuZPt8mPfDvBB/fsW tY6T/RjzF8KFslEaCc2mcbIYH8U87Zsgidru4ICk8yJxdTeYLiteWqbHC1mEKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732407766; a=rsa-sha256; cv=none; b=cYq0M+M9f/Msg7QG67zVLwXJINZMeTthCvE5TsqZmoO3cyw9b9J97OEzlWX7vA12n24CFl Dst2Qa5+NQFRBEwbFVhgLHBvaS2cWIi0Jo6677jURKBvGZsepWH71u6UA+Lau5UG8XRAbw ImSntdj3WPW+b7I1cSFTzRpwXcoLMI1Lcm4RvXg/+mlGO7qm+NnDZ9OKm775ssOxUTuPjs 9CJD9ROId3js0U47UVwd6wb6ItlvfMWJ8vmsAAXVRc0krRZzgCElwRSrGM1FAQ3eaLdfcA QJnDmxpiuzA/0SrDNfLwP+EOKXhp6/6VuPYB2Te1dkI4SHAp4XV6OacecKl73Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwqKy4D0gzXFx; Sun, 24 Nov 2024 00:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO0Mkj4005768; Sun, 24 Nov 2024 00:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO0MkNq005765; Sun, 24 Nov 2024 00:22:46 GMT (envelope-from git) Date: Sun, 24 Nov 2024 00:22:46 GMT Message-Id: <202411240022.4AO0MkNq005765@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: bceec3d80a3c - main - e1000: Try auto-negotiation for fixed 100 or 10 configuration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bceec3d80a3caf9249e24247fb937674bf5b46b5 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=bceec3d80a3caf9249e24247fb937674bf5b46b5 commit bceec3d80a3caf9249e24247fb937674bf5b46b5 Author: Kevin Bowling AuthorDate: 2024-11-23 12:27:44 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 00:18:37 +0000 e1000: Try auto-negotiation for fixed 100 or 10 configuration This is a retread of https://reviews.freebsd.org/D34449 which I think will fix the issue for the remote side not supporting autoneg. We now attempt an autoneg, and if that fails fall back to the current code that forces the link speed/duplex. The original intent of this patch is to inform the remote switch of duplex settings when we (the client) are specifying a fixed 10 or 100 speed. Otherwise it may get the duplex setting wrong. The tricky case is when the remote (switch) side is fixing its speed AND duplex while disabling autoneg and we (client) need to do the same, which still seems to be common enough at some ISPs. Original commit message follows: Currently if an e1000 interface is set to a fixed media configuration, for gigabit, it will participate in auto-negotiation as required by IEEE 802.3-2018 Clause 37. However, if set to fixed media configuration for 100 or 10, it does NOT participate in auto-negotiation. By my reading of Clauses 28 and 37, while auto-negotiation is optional for 100 and 10, it is not prohibited and is, in fact, "highly recommended". This patch enables auto-negotiation for fixed 100 and 10 media configuration, in a similar manner to that already performed for 1000. I.e., the patch enables advertising of just the manually configured settings with the goal of allowing the remote end to match the manually configured settings if it has them available. To be clear, this patch does NOT allow an em(4) interface that has been manually configured with specific media settings to respond to auto-negotiation by then configuring different parameters to those that were manually configured. The intent of this patch is to fully comply with the requirements of Clause 37, but for 100 and 10. The need for this has arisen on an em(4) link where the other end is under a different administrative control and is set to full auto-negotiation. Due to the cable length GigE is not working well. It is desired to set the em(4) end to "media 100baseTX mediatype full-duplex" which does work when both ends are configured that way. Currently, because em(4) does not participate in autoneg for this setting, the remote defaults to half-duplex - i.e., there's a duplex mismatch and things don't work. With this patch, em(4) would inform the remote that it has only 100baseTX full, the remote would match that and it will work. Tested by: Natalino Picone Tested by: Franco Fichtner Tested by: J.R. Oldroyd (previous version) Sponsored by: Nozomi Networks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47336 --- sys/dev/e1000/e1000_phy.c | 5 +++-- sys/dev/e1000/if_em.c | 44 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c index 634f48171c3e..c34897e3b31a 100644 --- a/sys/dev/e1000/e1000_phy.c +++ b/sys/dev/e1000/e1000_phy.c @@ -1707,9 +1707,10 @@ s32 e1000_setup_copper_link_generic(struct e1000_hw *hw) * autonegotiation. */ ret_val = e1000_copper_link_autoneg(hw); - if (ret_val) + if (ret_val && !hw->mac.forced_speed_duplex) return ret_val; - } else { + } + if (!hw->mac.autoneg || (ret_val && hw->mac.forced_speed_duplex)) { /* PHY will be set to 10H, 10F, 100H or 100F * depending on user settings. */ diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 98521e6e6ee9..4b29f44032a5 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1835,7 +1835,18 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) (sc->hw.phy.media_type == e1000_media_type_internal_serdes)) { if (sc->hw.mac.type == e1000_82545) fiber_type = IFM_1000_LX; - ifmr->ifm_active |= fiber_type | IFM_FDX; + switch (sc->link_speed) { + case 10: + ifmr->ifm_active |= IFM_10_FL; + break; + case 100: + ifmr->ifm_active |= IFM_100_FX; + break; + case 1000: + default: + ifmr->ifm_active |= fiber_type | IFM_FDX; + break; + } } else { switch (sc->link_speed) { case 10: @@ -1848,11 +1859,12 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) ifmr->ifm_active |= IFM_1000_T; break; } - if (sc->link_duplex == FULL_DUPLEX) - ifmr->ifm_active |= IFM_FDX; - else - ifmr->ifm_active |= IFM_HDX; } + + if (sc->link_duplex == FULL_DUPLEX) + ifmr->ifm_active |= IFM_FDX; + else + ifmr->ifm_active |= IFM_HDX; } /********************************************************************* @@ -1886,6 +1898,26 @@ em_if_media_change(if_ctx_t ctx) sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; break; case IFM_100_TX: + sc->hw.mac.autoneg = DO_AUTO_NEG; + if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) { + sc->hw.phy.autoneg_advertised = ADVERTISE_100_FULL; + sc->hw.mac.forced_speed_duplex = ADVERTISE_100_FULL; + } else { + sc->hw.phy.autoneg_advertised = ADVERTISE_100_HALF; + sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF; + } + break; + case IFM_10_T: + sc->hw.mac.autoneg = DO_AUTO_NEG; + if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) { + sc->hw.phy.autoneg_advertised = ADVERTISE_10_FULL; + sc->hw.mac.forced_speed_duplex = ADVERTISE_10_FULL; + } else { + sc->hw.phy.autoneg_advertised = ADVERTISE_10_HALF; + sc->hw.mac.forced_speed_duplex = ADVERTISE_10_HALF; + } + break; + case IFM_100_FX: sc->hw.mac.autoneg = false; sc->hw.phy.autoneg_advertised = 0; if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) @@ -1893,7 +1925,7 @@ em_if_media_change(if_ctx_t ctx) else sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF; break; - case IFM_10_T: + case IFM_10_FL: sc->hw.mac.autoneg = false; sc->hw.phy.autoneg_advertised = 0; if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) From nobody Sun Nov 24 01:14:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwrV00cj8z5f90t for ; Sun, 24 Nov 2024 01:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwrTz3WBVz46t0; Sun, 24 Nov 2024 01:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732410887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0wSiZMck0YBJQI9565PcNGCEt45uYA4Ag9She0WAQj4=; b=RHjeM+I2FsN4DNmEPv7F8JJJon+6s5HLxr7rX95qFx4ijcWyLz/3/V8rFCnC5np5szaGCl 5sSoB1xzX0o6Gey0I2g+xTcqvl2z0aZrG3pgKJC3EjsH53Izx/HxMzuJF5QEYIawquS09L LrNRCoFLwiCPGHyWSZHjQBzI60fTzNo9AXr63dLKqhouQm7kTIBrqbbQBOUBV2+b9aByIC kp9EKv00eExKET/HOGMS0Dx0IIO5/HBBseiNq46YOo/z/yGV7VMXXhhWE0ME+84izgsF6J CGEK2hfDpcm9J8oWB7MQWWULbEPPdUw9PlsUXn/r4oLS8xEWojfvDIO43qrj8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732410887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0wSiZMck0YBJQI9565PcNGCEt45uYA4Ag9She0WAQj4=; b=d3d8SIoJ4zAJQjPGlXBSJKvRWKNruc1IigNP2TR8sP4mYM0uddz5Hj4Xo+OAg10JtXKYmA JjgJLe4hQVi7xMDL/LC25ALcTRc3CxXsiD9wWJkwnNrO9SMN4i+XwkdKhi83w9HlgpXg6A 3Mn/vN8Q2LYE6F542jYUHwiDBBlLp1gJkBP40t8SYCotmI8mjadhMTRhG76hW1/rDaIWJZ gPkTjrcC31PTtD8b/djYy7Sk+l/7iQakTenybVn+Ks7JGjJP2YWkP1PuWsmMpj5w+/Mu6D MzTatFioHtR3Wp/2jZmnbN7lJQHLHlKVylF7GqLqeGhDr+UDqqqDm+MQ5wZfeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732410887; a=rsa-sha256; cv=none; b=qlXrDu/9Sb9aPNLp/VZl6QV8C5ysoZTWcSgmx01Ro7E5xt9Z+Sba4LzKIPPSgf20EJ6+st sLB4vkW5Dr5Ve4uaT0tE4Mafir8qcUBgUyKbytgGRH4DE5byPDxMvhm2XRQiEAoxXYhSNB pXeCRF6UnwQjAljSBK6s1xa0NCeAygTVCh8SnuLb2+8Fy9B9shzhk5AU1yjEV1Uxut65+m KvAqQaWbZwL7MdLNqLNGbVkh1EOqcp6jcY1o7qJpcIgDbhHgf+cyc6pd+Ij2hdWSxefi7G /4EeLIxicW93O44F8bDnZocBHL3xSx4bP+KQssiIniMRzR5Ue1ACR3bnPLge0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwrTw0Bk8zYTQ; Sun, 24 Nov 2024 01:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO1EhEg098845; Sun, 24 Nov 2024 01:14:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO1EhPr098844; Sun, 24 Nov 2024 01:14:43 GMT (envelope-from git) Date: Sun, 24 Nov 2024 01:14:43 GMT Message-Id: <202411240114.4AO1EhPr098844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 1c9a4c8cb44d..d0a91b9f88a4 - 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: d0a91b9f88a47316158508bf304a61baa8c99c10 X-Git-Oldrev: 1c9a4c8cb44d5f865c29e3df3f019872329554b3 X-Git-Newrev: d0a91b9f88a47316158508bf304a61baa8c99c10 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=1c9a4c8cb44d..d0a91b9f88a4 25eb53877838 Fix a potential page leak in mappedread_sf() 178682506f92 Grab the rangelock unconditionally in zfs_getpages() a60ed3822b61 L2ARC: Move different stats updates earlier 46c4f2ce0baa dsl_dataset: put IO-inducing frees on the pool deadlist 8dc452d90783 Fix some nits in zfs_getpages() 3462f3bd5039 zvol_os.c: Increase optimal IO size de2e9a5c6bb5 tests: fix uClibc for getversion.c 648873f02069 AUTHORS: refresh with recent new contributors 483087b06ff2 ZTS: Avoid embedded blocks in bclone/bclone_prop_sync 1ee251bdde88 BRT: Don't call brt_pending_remove() on holes/embedded 309ce6303fa7 ZAP: Add by_dnode variants to lookup/prefetch_uint64 fd6e8c1d2a5c BRT: Rework structures and locks to be per-vdev ff3df1211c4a zed: prevent automatic replacement of offline vdevs 0d6306be8c67 Fix few __VA_ARGS typos in assertions e08e832b10de Expand zpool-remove.8 manpage with example results ffe211279556 Move "no name changes" from compression to checksum table 534688948c39 Remove hash_elements_max accounting from DBUF and ARC 0ca82c568073 L2ARC: Stop rebuild before setting spa_final_txg 49a377aa3042 ZTS: Fix zpool_status_008_pos false positive 457f8b76e768 BRT: More optimizations after per-vdev splitting d76d79fd2784 zio: Avoid sleeping in the I/O path d02257c2804c fix: block incompatible kernel from being installed 9a81484e35f2 ZAP: Reduce leaf array and free chunks fragmentation 225e76cd7d43 Linux 6.12 compat: META ae1d11882d10 BRT: Clear bv_entcount_dirty on destroy 38c0324c0fb6 Linux: Fix zfs_prune panics b3b0ce64d50a FreeBSD: Lock vnode in zfs_ioctl() d0a91b9f88a4 FreeBSD: Reduce copy_file_range() source lock to shared From nobody Sun Nov 24 03:20:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwvHM6lZKz5dLLh; Sun, 24 Nov 2024 03:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwvHM4mqLz4Gvg; Sun, 24 Nov 2024 03:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ps0YkLctUBTvM4mCyCg5Fd4LBih/vHMNjqYbgj1FzK4=; b=FjiXsy37s2OnJAW7PxYLOkqymZ06iDouvKty/D9RyDuFXUyNxsZEg8suj/O0//o5RQkesv GFpH1De4y40V1jFVyQbw4ftI+UNdjN3wTmL3x8zjWzayVzTd64TBpqK3L8b8dpqAaaq4FB DNTRRr7yrakAT9R2DttAkrneaAXZSvp5Gf/LA6+kfb5KLmLIg7eZd+TnUAeNu5l9Go1wAk 5Yt6En4byZMVkLuAs47jCl4lt2i2AoawfvcTB0tTz9hlDXWaZC9j0RgFGsMRO4cDo0RhoB 8jN8PZyGexJZbbCojxUeEGhTl+GiF1KoFqml6dwjz8m3BfF0AzH8AGc/adlNHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ps0YkLctUBTvM4mCyCg5Fd4LBih/vHMNjqYbgj1FzK4=; b=NAJ5berk368P7l/6vjzuduOlzbH9vT9xMWUVIBl46hTdK7xLdbBbEOIm9CUkXON0seKiF3 /RKn73GqlGDrahwYVOJvUVIMESD1rYP31uMugIfuxKyuXG8j4SziW2NhBRk9+ptkWi/rGW tXBLxjgDHoFNeIuh5Vy3RRjwFcpAt9JsGgYFpbythYHtna9eZ92tMfOBJjMEj594DHBohC ZOrvNDuniBVT1CGvWOhutAfB4SpGqbcyU1KmvAAHtxNisuo1LqgBm08/SPcifKDoPcQtNe i+Dl0WPFSWaq2PkAvGszkw9siGT/pbDaS/h/DoLv/OCP4WEH6q6gpSCjW3cEdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418447; a=rsa-sha256; cv=none; b=Bn2cZmbUzqBINBbI9MInDv21wqOj67lNGZuddKK4NQ7C821N7Scxcs8IvQHyeCCb8rqxj4 MCMzYqzeA7MpAs+9UOl1TN4mnZJTYu1pQ8WwASUk3iH0Q508+9GkPtBMs23vabBDNw86ZP DG6Ntmvth1o6CGYDbwQl7mlXnNdgoUvublMiAxkOdabGyOvQb5PDtSxsBBaNreRMHSAM4G yUWSi4st49cQV+Sai+C9K8sYmKg0Ul5jMo4oXNWm7MUr7kx9SlEWK+bU+b7OupCr7AwncN ZDxYqkBqVCQGKuwTSSj5NKaxR1xqXD+XNNvwC2ZjLeFRPWRBy7EzQ+VSCVRLnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwvHM4Mypzd3d; Sun, 24 Nov 2024 03:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO3Klv3034723; Sun, 24 Nov 2024 03:20:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3Klx4034720; Sun, 24 Nov 2024 03:20:47 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:20:47 GMT Message-Id: <202411240320.4AO3Klx4034720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: d1bb1a501118 - main - igc: Normalize indentation 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1bb1a501118851b02a182afdd9dd1413e9f4ce0 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=d1bb1a501118851b02a182afdd9dd1413e9f4ce0 commit d1bb1a501118851b02a182afdd9dd1413e9f4ce0 Author: Kevin Bowling AuthorDate: 2024-11-24 03:17:27 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:17:27 +0000 igc: Normalize indentation a bit MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 294 +++++++++++++++++++++++++-------------------------- 1 file changed, 147 insertions(+), 147 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 9a4d0b2dd0ac..515bb35ac8fd 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -632,7 +632,7 @@ igc_if_attach_pre(if_ctx_t ctx) /* Copy the permanent MAC address out of the EEPROM */ if (igc_read_mac_addr(hw) < 0) { device_printf(dev, "EEPROM read error while reading MAC" - " address\n"); + " address\n"); error = EIO; goto err_late; } @@ -772,7 +772,7 @@ igc_if_mtu_set(if_ctx_t ctx, uint32_t mtu) struct igc_softc *sc = iflib_get_softc(ctx); if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx); - IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); + IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); /* 9K Jumbo Frame size */ max_frame_size = 9234; @@ -1170,13 +1170,13 @@ igc_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) break; case 100: ifmr->ifm_active |= IFM_100_TX; - break; + break; case 1000: ifmr->ifm_active |= IFM_1000_T; break; case 2500: - ifmr->ifm_active |= IFM_2500_T; - break; + ifmr->ifm_active |= IFM_2500_T; + break; } if (sc->link_duplex == FULL_DUPLEX) @@ -1210,9 +1210,9 @@ igc_if_media_change(if_ctx_t ctx) case IFM_AUTO: sc->hw.phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; break; - case IFM_2500_T: - sc->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; - break; + case IFM_2500_T: + sc->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; + break; case IFM_1000_T: sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; break; @@ -1296,7 +1296,7 @@ igc_if_multi_set(if_ctx_t ctx) { struct igc_softc *sc = iflib_get_softc(ctx); if_t ifp = iflib_get_ifp(ctx); - u8 *mta; /* Multicast array memory */ + u8 *mta; /* Multicast array memory */ u32 reg_rctl = 0; int mcnt = 0; @@ -1315,8 +1315,8 @@ igc_if_multi_set(if_ctx_t ctx) if (igc_debug_sbp) reg_rctl |= IGC_RCTL_SBP; } else if (mcnt >= MAX_NUM_MULTICAST_ADDRESSES || - if_getflags(ifp) & IFF_ALLMULTI) { - reg_rctl |= IGC_RCTL_MPE; + if_getflags(ifp) & IFF_ALLMULTI) { + reg_rctl |= IGC_RCTL_MPE; reg_rctl &= ~IGC_RCTL_UPE; } else reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE); @@ -1662,12 +1662,12 @@ igc_setup_msix(if_ctx_t ctx) static void igc_init_dmac(struct igc_softc *sc, u32 pba) { - device_t dev = sc->dev; + device_t dev = sc->dev; struct igc_hw *hw = &sc->hw; - u32 dmac, reg = ~IGC_DMACR_DMAC_EN; - u16 hwm; - u16 max_frame_size; - int status; + u32 dmac, reg = ~IGC_DMACR_DMAC_EN; + u16 hwm; + u16 max_frame_size; + int status; max_frame_size = sc->shared->isc_max_frame_size; @@ -2137,7 +2137,7 @@ igc_initialize_transmit_unit(if_ctx_t ctx) tctl = IGC_READ_REG(&sc->hw, IGC_TCTL); tctl &= ~IGC_TCTL_CT; tctl |= (IGC_TCTL_PSP | IGC_TCTL_RTLC | IGC_TCTL_EN | - (IGC_COLLISION_THRESHOLD << IGC_CT_SHIFT)); + (IGC_COLLISION_THRESHOLD << IGC_CT_SHIFT)); /* This write will effectively turn on the transmit unit. */ IGC_WRITE_REG(&sc->hw, IGC_TCTL, tctl); @@ -2648,17 +2648,17 @@ igc_add_hw_stats(struct igc_softc *sc) /* Driver Statistics */ SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", - CTLFLAG_RD, &sc->dropped_pkts, - "Driver dropped packets"); + CTLFLAG_RD, &sc->dropped_pkts, + "Driver dropped packets"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", - CTLFLAG_RD, &sc->link_irq, - "Link MSI-X IRQ Handled"); + CTLFLAG_RD, &sc->link_irq, + "Link MSI-X IRQ Handled"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "rx_overruns", - CTLFLAG_RD, &sc->rx_overruns, - "RX overruns"); + CTLFLAG_RD, &sc->rx_overruns, + "RX overruns"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "watchdog_timeouts", - CTLFLAG_RD, &sc->watchdog_events, - "Watchdog timeouts"); + CTLFLAG_RD, &sc->watchdog_events, + "Watchdog timeouts"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "device_control", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, IGC_CTRL, igc_sysctl_reg_handler, "IU", @@ -2668,11 +2668,11 @@ igc_add_hw_stats(struct igc_softc *sc) sc, IGC_RCTL, igc_sysctl_reg_handler, "IU", "Receiver Control Register"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_high_water", - CTLFLAG_RD, &sc->hw.fc.high_water, 0, - "Flow Control High Watermark"); + CTLFLAG_RD, &sc->hw.fc.high_water, 0, + "Flow Control High Watermark"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_low_water", - CTLFLAG_RD, &sc->hw.fc.low_water, 0, - "Flow Control Low Watermark"); + CTLFLAG_RD, &sc->hw.fc.low_water, 0, + "Flow Control Low Watermark"); for (int i = 0; i < sc->tx_num_queues; i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; @@ -2694,8 +2694,8 @@ igc_add_hw_stats(struct igc_softc *sc) IGC_TDT(txr->me), igc_sysctl_reg_handler, "IU", "Transmit Descriptor Tail"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tx_irq", - CTLFLAG_RD, &txr->tx_irq, - "Queue MSI-X Transmit Interrupts"); + CTLFLAG_RD, &txr->tx_irq, + "Queue MSI-X Transmit Interrupts"); } for (int j = 0; j < sc->rx_num_queues; j++, rx_que++) { @@ -2707,8 +2707,8 @@ igc_add_hw_stats(struct igc_softc *sc) SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", CTLTYPE_UINT | CTLFLAG_RD, rx_que, - false, igc_sysctl_interrupt_rate_handler, "IU", - "Interrupt Rate"); + false, igc_sysctl_interrupt_rate_handler, "IU", + "Interrupt Rate"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, IGC_RDH(rxr->me), igc_sysctl_reg_handler, "IU", @@ -2718,8 +2718,8 @@ igc_add_hw_stats(struct igc_softc *sc) IGC_RDT(rxr->me), igc_sysctl_reg_handler, "IU", "Receive Descriptor Tail"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "rx_irq", - CTLFLAG_RD, &rxr->rx_irq, - "Queue MSI-X Receive Interrupts"); + CTLFLAG_RD, &rxr->rx_irq, + "Queue MSI-X Receive Interrupts"); } /* MAC stats get their own sub node */ @@ -2729,156 +2729,156 @@ igc_add_hw_stats(struct igc_softc *sc) stat_list = SYSCTL_CHILDREN(stat_node); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll", - CTLFLAG_RD, &stats->ecol, - "Excessive collisions"); + CTLFLAG_RD, &stats->ecol, + "Excessive collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "single_coll", - CTLFLAG_RD, &stats->scc, - "Single collisions"); + CTLFLAG_RD, &stats->scc, + "Single collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "multiple_coll", - CTLFLAG_RD, &stats->mcc, - "Multiple collisions"); + CTLFLAG_RD, &stats->mcc, + "Multiple collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "late_coll", - CTLFLAG_RD, &stats->latecol, - "Late collisions"); + CTLFLAG_RD, &stats->latecol, + "Late collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "collision_count", - CTLFLAG_RD, &stats->colc, - "Collision Count"); + CTLFLAG_RD, &stats->colc, + "Collision Count"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "symbol_errors", - CTLFLAG_RD, &sc->stats.symerrs, - "Symbol Errors"); + CTLFLAG_RD, &sc->stats.symerrs, + "Symbol Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "sequence_errors", - CTLFLAG_RD, &sc->stats.sec, - "Sequence Errors"); + CTLFLAG_RD, &sc->stats.sec, + "Sequence Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "defer_count", - CTLFLAG_RD, &sc->stats.dc, - "Defer Count"); + CTLFLAG_RD, &sc->stats.dc, + "Defer Count"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", - CTLFLAG_RD, &sc->stats.mpc, - "Missed Packets"); + CTLFLAG_RD, &sc->stats.mpc, + "Missed Packets"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", - CTLFLAG_RD, &sc->stats.rlec, - "Receive Length Errors"); + CTLFLAG_RD, &sc->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", - CTLFLAG_RD, &sc->stats.rnbc, - "Receive No Buffers"); + CTLFLAG_RD, &sc->stats.rnbc, + "Receive No Buffers"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_undersize", - CTLFLAG_RD, &sc->stats.ruc, - "Receive Undersize"); + CTLFLAG_RD, &sc->stats.ruc, + "Receive Undersize"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", - CTLFLAG_RD, &sc->stats.rfc, - "Fragmented Packets Received "); + CTLFLAG_RD, &sc->stats.rfc, + "Fragmented Packets Received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_oversize", - CTLFLAG_RD, &sc->stats.roc, - "Oversized Packets Received"); + CTLFLAG_RD, &sc->stats.roc, + "Oversized Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabber", - CTLFLAG_RD, &sc->stats.rjc, - "Recevied Jabber"); + CTLFLAG_RD, &sc->stats.rjc, + "Recevied Jabber"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_errs", - CTLFLAG_RD, &sc->stats.rxerrc, - "Receive Errors"); + CTLFLAG_RD, &sc->stats.rxerrc, + "Receive Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", - CTLFLAG_RD, &sc->stats.crcerrs, - "CRC errors"); + CTLFLAG_RD, &sc->stats.crcerrs, + "CRC errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "alignment_errs", - CTLFLAG_RD, &sc->stats.algnerrc, - "Alignment Errors"); + CTLFLAG_RD, &sc->stats.algnerrc, + "Alignment Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_recvd", - CTLFLAG_RD, &sc->stats.xonrxc, - "XON Received"); + CTLFLAG_RD, &sc->stats.xonrxc, + "XON Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd", - CTLFLAG_RD, &sc->stats.xontxc, - "XON Transmitted"); + CTLFLAG_RD, &sc->stats.xontxc, + "XON Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", - CTLFLAG_RD, &sc->stats.xoffrxc, - "XOFF Received"); + CTLFLAG_RD, &sc->stats.xoffrxc, + "XOFF Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", - CTLFLAG_RD, &sc->stats.xofftxc, - "XOFF Transmitted"); + CTLFLAG_RD, &sc->stats.xofftxc, + "XOFF Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", - CTLFLAG_RD, &sc->stats.fcruc, - "Unsupported Flow Control Received"); + CTLFLAG_RD, &sc->stats.fcruc, + "Unsupported Flow Control Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", - CTLFLAG_RD, &sc->stats.mgprc, - "Management Packets Received"); + CTLFLAG_RD, &sc->stats.mgprc, + "Management Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", - CTLFLAG_RD, &sc->stats.mgpdc, - "Management Packets Dropped"); + CTLFLAG_RD, &sc->stats.mgpdc, + "Management Packets Dropped"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", - CTLFLAG_RD, &sc->stats.mgptc, - "Management Packets Transmitted"); + CTLFLAG_RD, &sc->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", - CTLFLAG_RD, &sc->stats.tpr, - "Total Packets Received "); + CTLFLAG_RD, &sc->stats.tpr, + "Total Packets Received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", - CTLFLAG_RD, &sc->stats.gprc, - "Good Packets Received"); + CTLFLAG_RD, &sc->stats.gprc, + "Good Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", - CTLFLAG_RD, &sc->stats.bprc, - "Broadcast Packets Received"); + CTLFLAG_RD, &sc->stats.bprc, + "Broadcast Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", - CTLFLAG_RD, &sc->stats.mprc, - "Multicast Packets Received"); + CTLFLAG_RD, &sc->stats.mprc, + "Multicast Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", - CTLFLAG_RD, &sc->stats.prc64, - "64 byte frames received "); + CTLFLAG_RD, &sc->stats.prc64, + "64 byte frames received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", - CTLFLAG_RD, &sc->stats.prc127, - "65-127 byte frames received"); + CTLFLAG_RD, &sc->stats.prc127, + "65-127 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", - CTLFLAG_RD, &sc->stats.prc255, - "128-255 byte frames received"); + CTLFLAG_RD, &sc->stats.prc255, + "128-255 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", - CTLFLAG_RD, &sc->stats.prc511, - "256-511 byte frames received"); + CTLFLAG_RD, &sc->stats.prc511, + "256-511 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", - CTLFLAG_RD, &sc->stats.prc1023, - "512-1023 byte frames received"); + CTLFLAG_RD, &sc->stats.prc1023, + "512-1023 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", - CTLFLAG_RD, &sc->stats.prc1522, - "1023-1522 byte frames received"); + CTLFLAG_RD, &sc->stats.prc1522, + "1023-1522 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", - CTLFLAG_RD, &sc->stats.gorc, - "Good Octets Received"); + CTLFLAG_RD, &sc->stats.gorc, + "Good Octets Received"); /* Packet Transmission Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", - CTLFLAG_RD, &sc->stats.gotc, - "Good Octets Transmitted"); + CTLFLAG_RD, &sc->stats.gotc, + "Good Octets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", - CTLFLAG_RD, &sc->stats.tpt, - "Total Packets Transmitted"); + CTLFLAG_RD, &sc->stats.tpt, + "Total Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", - CTLFLAG_RD, &sc->stats.gptc, - "Good Packets Transmitted"); + CTLFLAG_RD, &sc->stats.gptc, + "Good Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", - CTLFLAG_RD, &sc->stats.bptc, - "Broadcast Packets Transmitted"); + CTLFLAG_RD, &sc->stats.bptc, + "Broadcast Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", - CTLFLAG_RD, &sc->stats.mptc, - "Multicast Packets Transmitted"); + CTLFLAG_RD, &sc->stats.mptc, + "Multicast Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", - CTLFLAG_RD, &sc->stats.ptc64, - "64 byte frames transmitted "); + CTLFLAG_RD, &sc->stats.ptc64, + "64 byte frames transmitted "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", - CTLFLAG_RD, &sc->stats.ptc127, - "65-127 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc127, + "65-127 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", - CTLFLAG_RD, &sc->stats.ptc255, - "128-255 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc255, + "128-255 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", - CTLFLAG_RD, &sc->stats.ptc511, - "256-511 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc511, + "256-511 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", - CTLFLAG_RD, &sc->stats.ptc1023, - "512-1023 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc1023, + "512-1023 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", - CTLFLAG_RD, &sc->stats.ptc1522, - "1024-1522 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc1522, + "1024-1522 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_txd", - CTLFLAG_RD, &sc->stats.tsctc, - "TSO Contexts Transmitted"); + CTLFLAG_RD, &sc->stats.tsctc, + "TSO Contexts Transmitted"); /* Interrupt Stats */ @@ -2887,12 +2887,12 @@ igc_add_hw_stats(struct igc_softc *sc) int_list = SYSCTL_CHILDREN(int_node); SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "asserts", - CTLFLAG_RD, &sc->stats.iac, - "Interrupt Assertion Count"); + CTLFLAG_RD, &sc->stats.iac, + "Interrupt Assertion Count"); SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh", - CTLFLAG_RD, &sc->stats.rxdmtc, - "Rx Desc Min Thresh Count"); + CTLFLAG_RD, &sc->stats.rxdmtc, + "Rx Desc Min Thresh Count"); } static void @@ -2913,21 +2913,21 @@ igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) if (fw_ver->eep_major || fw_ver->eep_minor || fw_ver->eep_build) { sbuf_printf(buf, "EEPROM V%d.%d-%d", fw_ver->eep_major, - fw_ver->eep_minor, fw_ver->eep_build); + fw_ver->eep_minor, fw_ver->eep_build); space = " "; } if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", - space, fw_ver->invm_major, fw_ver->invm_minor, - fw_ver->invm_img_type); + space, fw_ver->invm_major, fw_ver->invm_minor, + fw_ver->invm_img_type); space = " "; } if (fw_ver->or_valid) { sbuf_printf(buf, "%sOption ROM V%d-b%d-p%d", - space, fw_ver->or_major, fw_ver->or_build, - fw_ver->or_patch); + space, fw_ver->or_major, fw_ver->or_build, + fw_ver->or_patch); space = " "; } @@ -3085,7 +3085,7 @@ igc_set_flowcntl(SYSCTL_HANDLER_ARGS) { int error; static int input = 3; /* default is full */ - struct igc_softc *sc = (struct igc_softc *) arg1; + struct igc_softc *sc = (struct igc_softc *) arg1; error = sysctl_handle_int(oidp, &input, 0, req); @@ -3253,14 +3253,14 @@ igc_print_debug_info(struct igc_softc *sc) for (int i = 0; i < sc->tx_num_queues; i++, txr++) { device_printf(dev, "TX Queue %d ------\n", i); device_printf(dev, "hw tdh = %d, hw tdt = %d\n", - IGC_READ_REG(&sc->hw, IGC_TDH(i)), - IGC_READ_REG(&sc->hw, IGC_TDT(i))); + IGC_READ_REG(&sc->hw, IGC_TDH(i)), + IGC_READ_REG(&sc->hw, IGC_TDT(i))); } for (int j=0; j < sc->rx_num_queues; j++, rxr++) { device_printf(dev, "RX Queue %d ------\n", j); device_printf(dev, "hw rdh = %d, hw rdt = %d\n", - IGC_READ_REG(&sc->hw, IGC_RDH(j)), - IGC_READ_REG(&sc->hw, IGC_RDT(j))); + IGC_READ_REG(&sc->hw, IGC_RDH(j)), + IGC_READ_REG(&sc->hw, IGC_RDT(j))); } } From nobody Sun Nov 24 03:21:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwvJf2J3yz5dL85; Sun, 24 Nov 2024 03:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwvJf1nndz4HZK; Sun, 24 Nov 2024 03:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZmJJ7sWp8xlcmStJiWXtTX9yUQp+vV6RZNuzogD1/0=; b=hhx1fBAoWRnMBy6/DYnc6PRcUjo4/wtUuIbGpcNhTJaWSojWqAF2BtxjhTUtHYVNxchIeF AHqeqTVlFtWCbQvSbOk80RvNiGaE0zgve4XH/8BmVXltJOxEzLNyLRa283RwPMBbzk46Di 3l+oRRH0lS4lAxWUiF34iEBrg3rRkXSsUc26i6uAuIu8knKf0eiqvLNdbj6MeZCgvu3I0J 3iZBeyBZ3u1eizLkKZqAoh3QCQ6pECGMr3FaDvzgxVQzyn1LGsiG/5P/Mp028BTrmIMygb 8UdAhcm2yhgUWtaZSoxOi0NF9uuiPQB3EtupdqxKn4osAeHOPIZmFK8pMWGviQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZmJJ7sWp8xlcmStJiWXtTX9yUQp+vV6RZNuzogD1/0=; b=HqDt3KU5//vzkXUyNu+TRmUiyyln5h0ujpnDGX/rBg5PRRmVVhUgvPd5WMgYDE/X5RdIXV qOOa5qtFrifopsDs69w44C4R0/N8iRY01YK3VS1P9mhsAr+5ETDgknqpn/jS7nVtd+0xHf /wNeS1eCj8jMB6jbJhFUtmWw/E7F1eymBV4AnLi/Z0+iGwiJKlxKIElRzJMroz2ts5tJjq ZXlhSobSpWuD0Ve7MvRqjRJ9BP5ekuZtAAJeKJrUKLx2IgZZ61rBzFc3CQICdPOMOxWAjy CtVs/YGlAtJpbmP3Z0e3zGSl4pxZgYWqKJUgONE9yEF1wZEkgPMRbVc2A6NLGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418514; a=rsa-sha256; cv=none; b=tIwvx3qv7VzmLKUPYY/6XKtBja6MvLgqWmPalUZZ2vYYwZ1j6SOApTfY93YVbdKiPNYUrm yRfGqrl7InThuRBKs0DWNssKNP/yH/C/xr/OtnK54IlaSlfcV0hCm9wmuE0Blw0nX8hgVZ /l1r3bL6aW4ztHT8eU5WO0SURwF916KdlQtJ8toT9fZjqtgyA9sM8+3RxsSvIY3n/CWXxG +cahZJi7EP8uT+3ccv8jxjLIs/uZw/ECB4QKl4gchiEtPXqeGmDgKOsASQmB5izcmkUzbS GfGYEzInt4gxXnkwosarLOmh8gCjbQSmWslmZovqTgYQYVCK+FdbcIW+L5Y+Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwvJf1PPMzcdg; Sun, 24 Nov 2024 03:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO3Ls5o040804; Sun, 24 Nov 2024 03:21:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3Lsae040800; Sun, 24 Nov 2024 03:21:54 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:21:54 GMT Message-Id: <202411240321.4AO3Lsae040800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 52ff9ccb5b25 - stable/14 - ixgbe: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 52ff9ccb5b2553719d050f8fd041c8e17578250b Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=52ff9ccb5b2553719d050f8fd041c8e17578250b commit 52ff9ccb5b2553719d050f8fd041c8e17578250b Author: Michael Tuexen AuthorDate: 2024-11-21 01:18:17 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:21:03 +0000 ixgbe: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to fix the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Michael notes emperically 82599 has an unexpected middle mask: Chip First Middle Last 82599 0xFF6 0xFF6 0xF7F which should be fixed up to 0xF76 (RFC 3168) in a future commit. Reviewed by: rrs, rscheff Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44258 (cherry picked from commit eea2e089f8dadf850a30ed837edd7a386427a9ed) --- sys/dev/ixgbe/if_ix.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index f8a620295aa4..ad690fdccef4 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -204,6 +204,7 @@ static int ixgbe_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wol_enable(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wufc(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Deferred interrupt tasklets */ static void ixgbe_handle_msf(void *); @@ -2756,6 +2757,24 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + #ifdef IXGBE_DEBUG /* testing sysctls (for all devices) */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", @@ -4742,6 +4761,43 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) return (error); } /* ixgbe_sysctl_eee_state */ +static int +ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IXGBE_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IXGBE_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IXGBE_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IXGBE_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IXGBE_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /************************************************************************ * ixgbe_init_device_features ************************************************************************/ From nobody Sun Nov 24 03:21:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwvJg4mvmz5dLBR; Sun, 24 Nov 2024 03:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwvJg2W7pz4HnF; Sun, 24 Nov 2024 03:21:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t1u00yC4ZtAymlerKx8bLsXlQZdq1RN7D0G0XCrYYzY=; b=LbtQf549ogkYcVDfm7+TlIaZGGEAayyn085jRVLXB3g++7qNVBjOL49yxFIh+89cUPnCdS MaP1iqrtFQtTfY9M9tAZZtuhT0HU+SzpPPpc3LRXEH0dsiBWzmN5MvKFD6P4WjJwcKiawz nSyH67ai+TcFrsj5kyreIi4Pc8S3Jff4L9wqa7/1d5mzTK0rveT3dVyj0Nx8F8qV8k8M/0 EzZ4oUBxT0+CtIJtahbL/KVlkaPtZTKMCr1nGJKQWyIZwVZ8J5Ynyd/vK1Hk0z4efQ7I0w Wri4S52zhvoaUrhUp5MoxRq5LiBHbzxZdVV7Qko6g+cgVT8wYJX6OhleITLrRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t1u00yC4ZtAymlerKx8bLsXlQZdq1RN7D0G0XCrYYzY=; b=kIn6kP3W/tzbUfO6xsZ4E3EE49rKQuItcgopYzmGpKjNbBx5jqhyYJO7esymmJZGqr7k0F 1MFtCLs+ukSoB+qeACFSKpSuS2OWbIR5jBbDXM76VaIzsIGX9lPclmNU+G7Ro1NPO4p8MY aqHsuVdBTTYBdc9MGG7YL4CFHtKR4Xj00mzCVIsB9Bo30WMzyTV+KmjxYtpVshVuj85HBS lUW2JhtgOfT7LEqnjm8fWvf8DscwXO0d7P2zh+9FZT7Mo2pYlNNiUcqKXvpCpRAMzLmKLs Efzs7+qjum2leTurhmJC29vqB+xX3BdZVbX97x+PhR77mV0RuZQf358m4Sd5xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418515; a=rsa-sha256; cv=none; b=nOkdzgrMGbuu9dNU9Ks+tcDb8sQjIGwfQMwWnDndfWQJgrithP1FIkBSJ1MMEERtQrsEs3 Re7ZMry0JvkQX19YTMda+XYYVNamqhgo39DLFye0n+LWKzVSjVp0rfrtiP8ajsKTVbAV+C yC2k9PLW7K1tVClAyf90dHto60kQ5rIIb2T9nwVLRPfUKLV4PEUC8Dcnc+kurSItjKAF3y 4BE5xcSDqa3sBGqBF502Sx0unV3ulxFcXB+VDy+nH8zE7hFt5ivzNTesWMguz1nEdheFrf xrvVZC48tW4xkMfCCH1kP8ssgdJmcVxGwNa1P4mHLoLqViqTbIngsd28R8uahQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwvJg27FLzdHL; Sun, 24 Nov 2024 03:21:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO3LtuF040858; Sun, 24 Nov 2024 03:21:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3Ltk6040855; Sun, 24 Nov 2024 03:21:55 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:21:55 GMT Message-Id: <202411240321.4AO3Ltk6040855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 9a89886460b6 - stable/14 - e1000: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a89886460b6932c7a93bc324529250241f25521 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=9a89886460b6932c7a93bc324529250241f25521 commit 9a89886460b6932c7a93bc324529250241f25521 Author: Michael Tuexen AuthorDate: 2024-11-21 02:22:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:21:17 +0000 e1000: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Reviewed by: rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44259 (cherry picked from commit 90853dfac851afa9e8840f5a38383256d75458b6) --- sys/dev/e1000/if_em.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 0b99f1b06130..98521e6e6ee9 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -333,6 +333,7 @@ static int em_is_valid_ether_addr(u8 *); static void em_newitr(struct e1000_softc *, struct em_rx_queue *, struct tx_ring *, struct rx_ring *); static bool em_automask_tso(if_ctx_t); +static int em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct e1000_softc *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -876,6 +877,24 @@ em_if_attach_pre(if_ctx_t ctx) igb_sysctl_dmac, "I", "DMA Coalesce"); } + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -5182,6 +5201,43 @@ em_sysctl_int_delay(SYSCTL_HANDLER_ARGS) return (0); } +static int +em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct e1000_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = E1000_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = E1000_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = E1000_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = E1000_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + E1000_WRITE_REG(&sc->hw, reg, val); + return (0); +} + static void em_add_int_delay_sysctl(struct e1000_softc *sc, const char *name, const char *description, struct em_int_delay_info *info, From nobody Sun Nov 24 03:21:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwvJh6Nk4z5dL0t; Sun, 24 Nov 2024 03:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwvJh3gH7z4HJc; Sun, 24 Nov 2024 03:21:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5FABlpGduHMsQQ+vBxeUJ0weoBVV08snuQvK3vnYAyg=; b=qu+BlWuiP/6FlrjFpYLg3DJhwWlRVhAu8bYjBhREbz4Mqjvluiq8K4aPJrsgEcH3dBNDyX B6W3r1HWxXy9MtK6cfnTVWRINUQ3ftzz4jFQD3EQGAW1aIuvzHE4r/rrSAXYif4cbNuNk7 kNjo1KBnAAwgo9qwni7Uo0gm4KsA+NAMro/H0EGWdPJrBi7LEzt79GN/NHK1bVcw+X3yeu vUWV6eFTsJjkgGznK26JYN8ifFOBQhenMtQkyT+wAnfzVZqH+eo7IP5Vj4v8kxKhR4Z/Su t2IkgTY1DYH7koJ/5XbK0+Q3V/bOpiOzeIwzf1PKMEW3aGSgCO4iKEafscsb5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5FABlpGduHMsQQ+vBxeUJ0weoBVV08snuQvK3vnYAyg=; b=n6g0IWQsckhGamFDRlO/YzhctHIx10hH9YCY3ak5JMLFZ1XG24bLzDOiBytLqWZIMgtdWH cwEZl0TfhnBg4kK2wWKnENu/kbmj9qJ2EfAD2aU3Mj5CRFfkYnhJDYR27q3CJ1AkYaSg0d UV9JrjY5/ExTkvoqCaCuhhqGmwZJXAwZYWqgpPnZ/tO+LsyyJs11Z3atc9ky73CAbJW7MP kpvkPfZHb8J2bCnwbqjO+dSMsxxxm+ixc1aGsfixxxZezBoJu8Q1DfGsirRUBA+rv6diXB Nyy5l/+8oCvZRRdNMcFVEdwlkVQ+N7NdW0zPo3wBVY2oXua0FTAp2AyHXr5vNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418516; a=rsa-sha256; cv=none; b=hKMk7j+9SC8n4MKnojsdvQXO+LVFVKCrpKB6AS0vDE+c0ZJmTmE1r1cbcqAwzYuxfz5tXu i0LmCUDKtO3FYwiTNVDPIYHLOnDI9SdyStX61xOQi/n2xbQJPxiZsToVDvbWvSCFbEcszA NAledOVz84gleTIoDWhYwCfn/ijAmmBqbnfeFnpuEF90URYxFZmOtnJtCBNuf3z7qiwzGF pOOt6q3zsWtVg4UmBCqKHeskIGsFPuVCYUejb7WT73TbbmgkvZyaK+MuMgKRzxmfDQ+SeO KlNm3fRTMPpKQACJso661SqY67Y7nOh/MHp7UVd9vYkUVOFL0sxnMzodkQmuOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwvJh2zsWzdHM; Sun, 24 Nov 2024 03:21:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO3LubJ040917; Sun, 24 Nov 2024 03:21:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3LuGT040914; Sun, 24 Nov 2024 03:21:56 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:21:56 GMT Message-Id: <202411240321.4AO3LuGT040914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 6890e1e79341 - stable/14 - igc: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6890e1e79341b52665792978899b94a1bbe311dd Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6890e1e79341b52665792978899b94a1bbe311dd commit 6890e1e79341b52665792978899b94a1bbe311dd Author: Kevin Bowling AuthorDate: 2024-11-21 02:38:01 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:21:30 +0000 igc: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Sponsored by: Netflix (cherry picked from commit ab540d44ba3201ff8313b90ba0096004603b2e34) --- sys/dev/igc/if_igc.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/igc/igc_regs.h | 2 ++ 2 files changed, 61 insertions(+) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 38fb1406b1c1..9a4d0b2dd0ac 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -127,6 +127,7 @@ static void igc_print_debug_info(struct igc_softc *); static int igc_is_valid_ether_addr(u8 *); static void igc_neweitr(struct igc_softc *, struct igc_rx_queue *, struct tx_ring *, struct rx_ring *); +static int igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_softc *); static void igc_release_hw_control(struct igc_softc *); @@ -497,6 +498,27 @@ igc_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, igc_sysctl_dmac, "I", "DMA Coalesce"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + /* Determine hardware and mac info */ igc_identify_hardware(ctx); @@ -3013,6 +3035,43 @@ igc_print_nvm_info(struct igc_softc *sc) printf("\n"); } +static int +igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct igc_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IGC_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IGC_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IGC_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IGC_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IGC_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /* * Set flow control using sysctl: * Flow control values: diff --git a/sys/dev/igc/igc_regs.h b/sys/dev/igc/igc_regs.h index 26614dc33df6..17fa89e492e8 100644 --- a/sys/dev/igc/igc_regs.h +++ b/sys/dev/igc/igc_regs.h @@ -145,6 +145,8 @@ #define IGC_FFVT_REG(_i) (0x09800 + ((_i) * 8)) #define IGC_FFLT_REG(_i) (0x05F00 + ((_i) * 8)) #define IGC_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */ +#define IGC_DTXTCPFLGL 0x0359C /* DMA Tx Control flag low - RW */ +#define IGC_DTXTCPFLGH 0x035A0 /* DMA Tx Control flag high - RW */ /* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000 /* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ From nobody Sun Nov 24 03:22:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwvKh73jfz5dL11; Sun, 24 Nov 2024 03:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwvKh6ZYhz4JL4; Sun, 24 Nov 2024 03:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uH7Cb6QAfuZQRnXoJFrVnoUcu/7aDTud8VfahLxQ4Zg=; b=VS15w2a5Ac9OE93wvbQuanTBtaqsT/2Dz/LnMcZKAf/CYyYMBGSrKn82nNHohZn9zXD8EO 6fc/r3OcWgaPH4ejiyXz7Zs9g0yxJldI1FZoIzr/AS3DqKS2CVWsaNXlJAFxpVZ/YHn+6X quajsoZLFc3M9shpszvUoBlGQxHv9FlMtBRRRkJPlN2V+iihUbHZbzEg5UyZxbe44QzcFD vWSHJUbqOWXx208mbO15hpR6uHbYNe2dP2b3FBUc711IQ4aZcXmukJd4cWxiwL59/W+wPI egV/H1xjVhTn4M5bmHMHC9ESITDRPBHY+2LOqr/vsaLFo5KrmaSeRaSo+5dZ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uH7Cb6QAfuZQRnXoJFrVnoUcu/7aDTud8VfahLxQ4Zg=; b=fJGZx0HXkRQ4pblVYvOj9q84Sb9yf9V/IVj+yYSbu1B4W28U3Re2aVQbnGw5x0TLTZHpI3 vDDRcOu/0ZaxCNpOmlznwWv0pKBdBGvaBBhKk9B+TuwezQmp/FCcEZAZdZhT/Tz639n+9k s2o1z5tSih42RGOTonQnleE+PJRXD5wDPQrWpZbgdDiFlcClYP+14Dy9R8UXBC1NblMTl0 WM0X7CtNb33FmApTVtERW9lwca8Ot4WFa3rSTGPv/W7aQHMDE5V46qo7I2n2iaKvAZgpSW BOSzml3ql624ErzkePAoTHujbn5JFdyWjk8hNUyVmqvKBxyJCVnupSP+VAQZNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418568; a=rsa-sha256; cv=none; b=fQGzxUYi7Hqd+znXu0Z705qBJ0oxceNo9Xb53XAXhs5YKo196uSVGJ3tDV6vxE1asJD8t0 DZhcEUyniGE8f5DWLXDi8fgliGXUUBntsjlDrmzvVhEALzqnCaRSRO/bgUsa6ioRKpNfks 15FC6UoYonK9BOKVSx82UuUyVH9oKN75pZ5OpkXV3LmwBshnSa2UVquo/1RGlTrD26j3Vj h3qj4aTrYmVBNyz2tpBcAofKiBUFhxY/3JbR/ub7kaMBorLyvQHZ9mzz4HeWzi3gZv80rJ 081C8XutXGMxxy+A56mIObVIPQY41g3VWoW1ysDbQqxd1f3sJFsnJkQSpbp24g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwvKh69cpzd6T; Sun, 24 Nov 2024 03:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO3MmJl041355; Sun, 24 Nov 2024 03:22:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3MmFh041352; Sun, 24 Nov 2024 03:22:48 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:22:48 GMT Message-Id: <202411240322.4AO3MmFh041352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: e5149ac66c2c - stable/13 - ixgbe: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e5149ac66c2cb809b6ed5fc3ccf09002e481fd6a Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e5149ac66c2cb809b6ed5fc3ccf09002e481fd6a commit e5149ac66c2cb809b6ed5fc3ccf09002e481fd6a Author: Michael Tuexen AuthorDate: 2024-11-21 01:18:17 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:22:16 +0000 ixgbe: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to fix the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Michael notes emperically 82599 has an unexpected middle mask: Chip First Middle Last 82599 0xFF6 0xFF6 0xF7F which should be fixed up to 0xF76 (RFC 3168) in a future commit. Reviewed by: rrs, rscheff Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44258 (cherry picked from commit eea2e089f8dadf850a30ed837edd7a386427a9ed) --- sys/dev/ixgbe/if_ix.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 8ddb0315f254..993aa48d51ef 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -204,6 +204,7 @@ static int ixgbe_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wol_enable(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wufc(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Deferred interrupt tasklets */ static void ixgbe_handle_msf(void *); @@ -2743,6 +2744,24 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + #ifdef IXGBE_DEBUG /* testing sysctls (for all devices) */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", @@ -4729,6 +4748,43 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) return (error); } /* ixgbe_sysctl_eee_state */ +static int +ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IXGBE_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IXGBE_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IXGBE_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IXGBE_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IXGBE_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /************************************************************************ * ixgbe_init_device_features ************************************************************************/ From nobody Sun Nov 24 03:22:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwvKk2f50z5dL12; Sun, 24 Nov 2024 03:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwvKk0Tmkz4J8q; Sun, 24 Nov 2024 03:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UJV/IlOlS7Mqv/F9R6pExmQ7wbuIyPR1bA2HZ/TTWk=; b=uB0M60vsGjFl1OR1Mf4m/G2omcbzg7CrVpmKkE+6z/AlF3UREt3K5RA0DobU1YY59O9Wp0 C+5icJKi2MIp+sSMX3Ze0vAgSuQq+wNKuyOaMMD/GNhrwKAC7eOJBmahcIlA7Zn7SqnqVh pAh0ZsEv/Hk0neadX0HP+i5DJmLSxMRXWKWjOhfAAwGVnBzxG5eZiOxpFsyqGvGAr9y89i 3HYqK+DGUiYMrNumpEmMQmAsMycWSl7b3+nzBS0hIaNyX+IBmuUUzO0QSxcE4vNQw7X8Yb 5put+EC62FU5uA6k2F331NowAKZsYpTn5oOggqoU7Oy9atJ+b/D47+8808uAUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UJV/IlOlS7Mqv/F9R6pExmQ7wbuIyPR1bA2HZ/TTWk=; b=BIMBzAWJaVDQwKE7ohdCIeBY7mk69Dc6vgnRg0Glb59fXwqctguo/hJa03JNPZx3+VeIx4 A6JodG0Fw/HG3i30UO7CoUqSdrwJKLii6mGpA9ubwC1y6AKRc5VFUh3Ssgqlz1iYh+ob0P Q4UfxCssemj9/604sr7cdBMzrQvQ1CGZrgrabjhQXIR/0aFNJXmEjPQytsTHj7I7nOnbzn FgYm/KGr37lE7EunYjMMH6G9uE9w/6/aq73Ke4uEMXOn6jeNN5L0BbHSffRgf7q6lfgUDP mAQki7cRJ/+EglFWe/c/rv1/x18knJkpSENC46rzHnrpfogBEEZWDRAo9S4kag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418570; a=rsa-sha256; cv=none; b=KZSMnFrBLwpSboPWwbBFhXctfL8FKc4bo9RGLpmSF6BLICjuSL+rw4lvDXKEoOCaupIwLr sCEO/eaB2hTl5lwVqmKRsOJHEV+M1/hYC698BuzL+RbCEYR97WXCKEaUpbHQPcXMZNRAPR fEDY6GNSALCu6v7XG0/MAve7lMue3hAnoJOLjhA7m2NIsBtZw+S3cZ8ldR58KuOSXRjawQ QPvLHXBu1IyPVln9ZacEOUqi7sRMCRF5g57i20G2mHmDGxssaXQqTvOrPyCcTm3UzhZq9g 562GqgM2g0omZRFc5k/AnWd6Y0Al/LPDrHYrH3yjJ4XFdZ8vFeY4+v8fOmCyeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwvKk05qJzcds; Sun, 24 Nov 2024 03:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO3MnfJ041406; Sun, 24 Nov 2024 03:22:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3MnNQ041403; Sun, 24 Nov 2024 03:22:49 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:22:49 GMT Message-Id: <202411240322.4AO3MnNQ041403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 367e42ab984d - stable/13 - e1000: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 367e42ab984dc8d06e0b7d662642b8560527cf4b Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=367e42ab984dc8d06e0b7d662642b8560527cf4b commit 367e42ab984dc8d06e0b7d662642b8560527cf4b Author: Michael Tuexen AuthorDate: 2024-11-21 02:22:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:22:28 +0000 e1000: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Reviewed by: rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44259 (cherry picked from commit 90853dfac851afa9e8840f5a38383256d75458b6) --- sys/dev/e1000/if_em.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index e000343eb4b4..537faf046bca 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -333,6 +333,7 @@ static int em_is_valid_ether_addr(u8 *); static void em_newitr(struct e1000_softc *, struct em_rx_queue *, struct tx_ring *, struct rx_ring *); static bool em_automask_tso(if_ctx_t); +static int em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct e1000_softc *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -878,6 +879,24 @@ em_if_attach_pre(if_ctx_t ctx) igb_sysctl_dmac, "I", "DMA Coalesce"); } + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -5184,6 +5203,43 @@ em_sysctl_int_delay(SYSCTL_HANDLER_ARGS) return (0); } +static int +em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct e1000_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = E1000_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = E1000_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = E1000_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = E1000_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + E1000_WRITE_REG(&sc->hw, reg, val); + return (0); +} + static void em_add_int_delay_sysctl(struct e1000_softc *sc, const char *name, const char *description, struct em_int_delay_info *info, From nobody Sun Nov 24 03:22:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwvKl2rj3z5dLdS; Sun, 24 Nov 2024 03:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwvKl1X3Wz4JPy; Sun, 24 Nov 2024 03:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PlPTpHY9LhZzHCZKa5I4/Jp0JoCCnD+zgg6dO6M1KE0=; b=uX+GNaJ0VfhURdAf42RKrxCN3xfrO/MkJqGrxgZdnPhqWw9HF+9l1TgYzRhKXfMtg8rVb0 BFoVr7E0VBearxLdt+cJsmSpr9W1jJiMk8jOxOjqRzdwjSL0dt/tRwOizEvq4BlpZVxO+Q rHl/N8pubN1sTUexWFieNkWV3nugWB3u3k1eyIM6IixYRXQcHceXq4D5E99rd7v9AU4GZH ftSRr7EYI/MbfcFVk2RqrTZAIeACl7TigP7ZekpundekOlIHkFnAPG3ZHDzN+F89cplbSO Nv/j3jYUW2rfZcO3bKo3OnSipLsM0Z5sO/7UysrYhqptLavOCrZDl0MDBEJfOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PlPTpHY9LhZzHCZKa5I4/Jp0JoCCnD+zgg6dO6M1KE0=; b=n24K91pm8y+5KHihz0OpTJ5A7esKI+8o3QXL21S8rcr3ESJTmt9dFzbLpmKQyKezg9ZfMD 3NddOx3QQ09vuzlpN8q1LYCJsGOq9MJD/mDqIk9c0S258dI+BKCXjS4ZbkqhjiW5+fmPIM TrdHdlusLiz8quZ24p77C/1vUG0caoRLvwYdsCiayhrf+KOWYX9forSLm5CkJ+3diqpWK4 R63Os7ANiQKzr3iM3JpGrI9ZJSjna3YEF+cRiLV420FhjFq86KPMl0swtXog22lEFE2NV8 1vRthpilJ/93yfRPrvXknj/y0O6lMcR6sb85wXPZwQ7oUOd3D+Oml7O9D+zKqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418571; a=rsa-sha256; cv=none; b=GngRch0S7R5ssqy/RuarmwuE9GdyED9nQPGkfXHS7DIuRiCve7E8+SPDgZLjMABlxWKg7T Vm8WrNqkHEucUEsxLPa49xiUxos5otF9Risy+9YbOlu1hbwux3FyjKSLM4m0S+F+5+BBpW DfmEmr5diJxBzDrNCaW7XHFr+CxcMav0wWzz1B0r3vMPUotsf7imbAaRgo2ympPZe+z5sD Ca34l4XSKVZUFnCJGH80Cfl/wSYfwTo59oUOP/SV7xfQsTacZOhdpmEFFaXVx7BhNm+oXP 5zbCz1rak9lpWTR7KqlVn1VF2dGiX2sLiTm+1ncn9F9ahfTIsz3woNWgLpvpeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwvKl17m8zdJJ; Sun, 24 Nov 2024 03:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO3MpdO041457; Sun, 24 Nov 2024 03:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3MpjJ041454; Sun, 24 Nov 2024 03:22:51 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:22:51 GMT Message-Id: <202411240322.4AO3MpjJ041454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 27f62dfa4447 - stable/13 - igc: sysctl for TCP flag handling during TSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 27f62dfa4447442c97c776c2267d6ec677a30f23 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=27f62dfa4447442c97c776c2267d6ec677a30f23 commit 27f62dfa4447442c97c776c2267d6ec677a30f23 Author: Kevin Bowling AuthorDate: 2024-11-21 02:38:01 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:22:39 +0000 igc: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Sponsored by: Netflix (cherry picked from commit ab540d44ba3201ff8313b90ba0096004603b2e34) --- sys/dev/igc/if_igc.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/igc/igc_regs.h | 2 ++ 2 files changed, 61 insertions(+) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 5851b715b932..9ecb1d3fc44d 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -127,6 +127,7 @@ static void igc_print_debug_info(struct igc_softc *); static int igc_is_valid_ether_addr(u8 *); static void igc_neweitr(struct igc_softc *, struct igc_rx_queue *, struct tx_ring *, struct rx_ring *); +static int igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_softc *); static void igc_release_hw_control(struct igc_softc *); @@ -498,6 +499,27 @@ igc_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, igc_sysctl_dmac, "I", "DMA Coalesce"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + /* Determine hardware and mac info */ igc_identify_hardware(ctx); @@ -3014,6 +3036,43 @@ igc_print_nvm_info(struct igc_softc *sc) printf("\n"); } +static int +igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct igc_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IGC_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IGC_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IGC_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IGC_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IGC_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /* * Set flow control using sysctl: * Flow control values: diff --git a/sys/dev/igc/igc_regs.h b/sys/dev/igc/igc_regs.h index 26614dc33df6..17fa89e492e8 100644 --- a/sys/dev/igc/igc_regs.h +++ b/sys/dev/igc/igc_regs.h @@ -145,6 +145,8 @@ #define IGC_FFVT_REG(_i) (0x09800 + ((_i) * 8)) #define IGC_FFLT_REG(_i) (0x05F00 + ((_i) * 8)) #define IGC_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */ +#define IGC_DTXTCPFLGL 0x0359C /* DMA Tx Control flag low - RW */ +#define IGC_DTXTCPFLGH 0x035A0 /* DMA Tx Control flag high - RW */ /* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000 /* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ From nobody Sun Nov 24 05:46:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XwyWt5XCdz5dXVH; Sun, 24 Nov 2024 05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XwyWt4nmyz4YnB; Sun, 24 Nov 2024 05: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=1732427210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UoRSAAhk8Rh7SfqfP6lE3xngdCPO40qram7Cb9aCH2E=; b=TRvpkX2XhduPdqT/1OrEyacQtSyubncF9WiZrEeK0S7IP+xg8BuvNEKqCRGYNVR/Lmixc4 WuYNzKtrCkEgU4g4sOO5ocEAjbitptw+kguP8ZhfG9YIE+Rx/XRRVuxszW04bMFjt9OFni nqsCsUnz3y8hGkLHafZhaU2xXd302uJaALB4oHoUytpyz+s6g5DwJmq6YKSMD2jRnqk3cT jHPIVQsMn4JfoJn2pYfNI+NOcVdUcPS/1T5238xJP1bJSIp4nLAJrsQHMvqhlHKQfU2UYP rqn2+jLtPW0vrI+D0VgmigJ+ZPlmG9vSoF46ucomGo/22ahcfnF00nyC0VBv8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732427210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UoRSAAhk8Rh7SfqfP6lE3xngdCPO40qram7Cb9aCH2E=; b=AWGDtk6/R7hXLylUR4oSnY7hflsHZ17+kWDMEYKXBoheAbzQsNjXT/O5bnFV9S9g6HNGYk gpIKDkGv+oYDiD/C0KK01sXu5ZhbhROzaMmaXUXaCg/Gyy1/b4haveiPSZ0FAH7T0rbVAy Q1uU121ell2S2ozJennSrmH3rwQw2LnO4lkscXm8wedNvTHETx6sFkJXJ2njf7DNrFzk4z LBXzIfKo9JSJGEfEiitpFXC1picWPStKbXPIRMyBPiL5kIfvFVH8npOjgNcJxY8Fz4FfTV TILgiLBbgFvltvaix9c8M0RFCMyFM+Ilhc+XIBNdjHK+hCSuwNM7J/gswV5f8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732427210; a=rsa-sha256; cv=none; b=Y9GP4x4Hw3joGZbAK3an7irxBlg9SyG1SIE6VnMqtl15N+h37RIAgM7aT2YMNDVLfq3DBk vUsuMfStLTSGkSoi7OFsqsCvQvOUPnA0ix4yK1TLud8NUP/MoMMLe7ncPMvs2oo0ylnq2E zCZgiCdmQR/CtFS+Rvrhwke3gucKgIxdQgFk5IDHtY/A7xka1VuAqOU+xjOBP6WDz5q6H/ adNuKJUwVLwOm5Lbp62U4B5gy4eppAV2hDzZvzea7ezJMggF+QiSwB5umqrZD0tL85T2EX kDRiov3INp1N+aHx1qcpEqU07zSgD9hwUbUhzx4nNoMVnIVtCbC6LHc+pdCzPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XwyWt4KKpzhvD; Sun, 24 Nov 2024 05:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO5koXo001995; Sun, 24 Nov 2024 05:46:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO5koAE001992; Sun, 24 Nov 2024 05:46:50 GMT (envelope-from git) Date: Sun, 24 Nov 2024 05:46:50 GMT Message-Id: <202411240546.4AO5koAE001992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 6f14883066f1 - main - e1000: Style pass on if_em List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f14883066f10afc9e3e2af45c5b509586f9da9e Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6f14883066f10afc9e3e2af45c5b509586f9da9e commit 6f14883066f10afc9e3e2af45c5b509586f9da9e Author: Kevin Bowling AuthorDate: 2024-11-24 05:45:52 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 05:45:52 +0000 e1000: Style pass on if_em Fix up some indentation and reflow long lines MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/e1000/if_em.c | 1059 +++++++++++++++++++++++++++++-------------------- 1 file changed, 626 insertions(+), 433 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 4b29f44032a5..0978432fd329 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -53,73 +53,129 @@ static const char igb_driver_version[] = "2.5.28-fbsd"; static const pci_vendor_info_t em_vendor_info_array[] = { /* Intel(R) - lem-class legacy devices */ - PVID(0x8086, E1000_DEV_ID_82540EM, "Intel(R) Legacy PRO/1000 MT 82540EM"), - PVID(0x8086, E1000_DEV_ID_82540EM_LOM, "Intel(R) Legacy PRO/1000 MT 82540EM (LOM)"), - PVID(0x8086, E1000_DEV_ID_82540EP, "Intel(R) Legacy PRO/1000 MT 82540EP"), - PVID(0x8086, E1000_DEV_ID_82540EP_LOM, "Intel(R) Legacy PRO/1000 MT 82540EP (LOM)"), - PVID(0x8086, E1000_DEV_ID_82540EP_LP, "Intel(R) Legacy PRO/1000 MT 82540EP (Mobile)"), - - PVID(0x8086, E1000_DEV_ID_82541EI, "Intel(R) Legacy PRO/1000 MT 82541EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82541ER, "Intel(R) Legacy PRO/1000 82541ER"), - PVID(0x8086, E1000_DEV_ID_82541ER_LOM, "Intel(R) Legacy PRO/1000 MT 82541ER"), - PVID(0x8086, E1000_DEV_ID_82541EI_MOBILE, "Intel(R) Legacy PRO/1000 MT 82541EI (Mobile)"), - PVID(0x8086, E1000_DEV_ID_82541GI, "Intel(R) Legacy PRO/1000 MT 82541GI"), - PVID(0x8086, E1000_DEV_ID_82541GI_LF, "Intel(R) Legacy PRO/1000 GT 82541PI"), - PVID(0x8086, E1000_DEV_ID_82541GI_MOBILE, "Intel(R) Legacy PRO/1000 MT 82541GI (Mobile)"), - - PVID(0x8086, E1000_DEV_ID_82542, "Intel(R) Legacy PRO/1000 82542 (Fiber)"), - - PVID(0x8086, E1000_DEV_ID_82543GC_FIBER, "Intel(R) Legacy PRO/1000 F 82543GC (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82543GC_COPPER, "Intel(R) Legacy PRO/1000 T 82543GC (Copper)"), - - PVID(0x8086, E1000_DEV_ID_82544EI_COPPER, "Intel(R) Legacy PRO/1000 XT 82544EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82544EI_FIBER, "Intel(R) Legacy PRO/1000 XF 82544EI (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82544GC_COPPER, "Intel(R) Legacy PRO/1000 T 82544GC (Copper)"), - PVID(0x8086, E1000_DEV_ID_82544GC_LOM, "Intel(R) Legacy PRO/1000 XT 82544GC (LOM)"), - - PVID(0x8086, E1000_DEV_ID_82545EM_COPPER, "Intel(R) Legacy PRO/1000 MT 82545EM (Copper)"), - PVID(0x8086, E1000_DEV_ID_82545EM_FIBER, "Intel(R) Legacy PRO/1000 MF 82545EM (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82545GM_COPPER, "Intel(R) Legacy PRO/1000 MT 82545GM (Copper)"), - PVID(0x8086, E1000_DEV_ID_82545GM_FIBER, "Intel(R) Legacy PRO/1000 MF 82545GM (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82545GM_SERDES, "Intel(R) Legacy PRO/1000 MB 82545GM (SERDES)"), - - PVID(0x8086, E1000_DEV_ID_82546EB_COPPER, "Intel(R) Legacy PRO/1000 MT 82546EB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82546EB_FIBER, "Intel(R) Legacy PRO/1000 MF 82546EB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, "Intel(R) Legacy PRO/1000 MT 82546EB (Quad Copper"), - PVID(0x8086, E1000_DEV_ID_82546GB_COPPER, "Intel(R) Legacy PRO/1000 MT 82546GB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82546GB_FIBER, "Intel(R) Legacy PRO/1000 MF 82546GB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82546GB_SERDES, "Intel(R) Legacy PRO/1000 MB 82546GB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82546GB_PCIE, "Intel(R) Legacy PRO/1000 P 82546GB (PCIe)"), - PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), - - PVID(0x8086, E1000_DEV_ID_82547EI, "Intel(R) Legacy PRO/1000 CT 82547EI"), - PVID(0x8086, E1000_DEV_ID_82547EI_MOBILE, "Intel(R) Legacy PRO/1000 CT 82547EI (Mobile)"), - PVID(0x8086, E1000_DEV_ID_82547GI, "Intel(R) Legacy PRO/1000 CT 82547GI"), + PVID(0x8086, E1000_DEV_ID_82540EM, + "Intel(R) Legacy PRO/1000 MT 82540EM"), + PVID(0x8086, E1000_DEV_ID_82540EM_LOM, + "Intel(R) Legacy PRO/1000 MT 82540EM (LOM)"), + PVID(0x8086, E1000_DEV_ID_82540EP, + "Intel(R) Legacy PRO/1000 MT 82540EP"), + PVID(0x8086, E1000_DEV_ID_82540EP_LOM, + "Intel(R) Legacy PRO/1000 MT 82540EP (LOM)"), + PVID(0x8086, E1000_DEV_ID_82540EP_LP, + "Intel(R) Legacy PRO/1000 MT 82540EP (Mobile)"), + + PVID(0x8086, E1000_DEV_ID_82541EI, + "Intel(R) Legacy PRO/1000 MT 82541EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82541ER, + "Intel(R) Legacy PRO/1000 82541ER"), + PVID(0x8086, E1000_DEV_ID_82541ER_LOM, + "Intel(R) Legacy PRO/1000 MT 82541ER"), + PVID(0x8086, E1000_DEV_ID_82541EI_MOBILE, + "Intel(R) Legacy PRO/1000 MT 82541EI (Mobile)"), + PVID(0x8086, E1000_DEV_ID_82541GI, + "Intel(R) Legacy PRO/1000 MT 82541GI"), + PVID(0x8086, E1000_DEV_ID_82541GI_LF, + "Intel(R) Legacy PRO/1000 GT 82541PI"), + PVID(0x8086, E1000_DEV_ID_82541GI_MOBILE, + "Intel(R) Legacy PRO/1000 MT 82541GI (Mobile)"), + + PVID(0x8086, E1000_DEV_ID_82542, + "Intel(R) Legacy PRO/1000 82542 (Fiber)"), + + PVID(0x8086, E1000_DEV_ID_82543GC_FIBER, + "Intel(R) Legacy PRO/1000 F 82543GC (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82543GC_COPPER, + "Intel(R) Legacy PRO/1000 T 82543GC (Copper)"), + + PVID(0x8086, E1000_DEV_ID_82544EI_COPPER, + "Intel(R) Legacy PRO/1000 XT 82544EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82544EI_FIBER, + "Intel(R) Legacy PRO/1000 XF 82544EI (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82544GC_COPPER, + "Intel(R) Legacy PRO/1000 T 82544GC (Copper)"), + PVID(0x8086, E1000_DEV_ID_82544GC_LOM, + "Intel(R) Legacy PRO/1000 XT 82544GC (LOM)"), + + PVID(0x8086, E1000_DEV_ID_82545EM_COPPER, + "Intel(R) Legacy PRO/1000 MT 82545EM (Copper)"), + PVID(0x8086, E1000_DEV_ID_82545EM_FIBER, + "Intel(R) Legacy PRO/1000 MF 82545EM (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82545GM_COPPER, + "Intel(R) Legacy PRO/1000 MT 82545GM (Copper)"), + PVID(0x8086, E1000_DEV_ID_82545GM_FIBER, + "Intel(R) Legacy PRO/1000 MF 82545GM (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82545GM_SERDES, + "Intel(R) Legacy PRO/1000 MB 82545GM (SERDES)"), + + PVID(0x8086, E1000_DEV_ID_82546EB_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546EB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82546EB_FIBER, + "Intel(R) Legacy PRO/1000 MF 82546EB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546EB (Quad Copper"), + PVID(0x8086, E1000_DEV_ID_82546GB_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546GB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82546GB_FIBER, + "Intel(R) Legacy PRO/1000 MF 82546GB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82546GB_SERDES, + "Intel(R) Legacy PRO/1000 MB 82546GB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82546GB_PCIE, + "Intel(R) Legacy PRO/1000 P 82546GB (PCIe)"), + PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, + "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, + "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), + + PVID(0x8086, E1000_DEV_ID_82547EI, + "Intel(R) Legacy PRO/1000 CT 82547EI"), + PVID(0x8086, E1000_DEV_ID_82547EI_MOBILE, + "Intel(R) Legacy PRO/1000 CT 82547EI (Mobile)"), + PVID(0x8086, E1000_DEV_ID_82547GI, + "Intel(R) Legacy PRO/1000 CT 82547GI"), /* Intel(R) - em-class devices */ - PVID(0x8086, E1000_DEV_ID_82571EB_COPPER, "Intel(R) PRO/1000 PT 82571EB/82571GB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_FIBER, "Intel(R) PRO/1000 PF 82571EB/82571GB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES, "Intel(R) PRO/1000 PB 82571EB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_DUAL, "Intel(R) PRO/1000 82571EB (Dual Mezzanine)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_QUAD, "Intel(R) PRO/1000 82571EB (Quad Mezzanine)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER, "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, "Intel(R) PRO/1000 PF 82571EB (Quad Fiber)"), - PVID(0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, "Intel(R) PRO/1000 PT 82571PT (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI, "Intel(R) PRO/1000 PT 82572EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI_COPPER, "Intel(R) PRO/1000 PT 82572EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI_FIBER, "Intel(R) PRO/1000 PF 82572EI (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82572EI_SERDES, "Intel(R) PRO/1000 82572EI (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82573E, "Intel(R) PRO/1000 82573E (Copper)"), - PVID(0x8086, E1000_DEV_ID_82573E_IAMT, "Intel(R) PRO/1000 82573E AMT (Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_COPPER, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_FIBER, + "Intel(R) PRO/1000 PF 82571EB/82571GB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES, + "Intel(R) PRO/1000 PB 82571EB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_DUAL, + "Intel(R) PRO/1000 82571EB (Dual Mezzanine)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_QUAD, + "Intel(R) PRO/1000 82571EB (Quad Mezzanine)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, + "Intel(R) PRO/1000 PF 82571EB (Quad Fiber)"), + PVID(0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, + "Intel(R) PRO/1000 PT 82571PT (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI, + "Intel(R) PRO/1000 PT 82572EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI_COPPER, + "Intel(R) PRO/1000 PT 82572EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI_FIBER, + "Intel(R) PRO/1000 PF 82572EI (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82572EI_SERDES, + "Intel(R) PRO/1000 82572EI (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82573E, + "Intel(R) PRO/1000 82573E (Copper)"), + PVID(0x8086, E1000_DEV_ID_82573E_IAMT, + "Intel(R) PRO/1000 82573E AMT (Copper)"), PVID(0x8086, E1000_DEV_ID_82573L, "Intel(R) PRO/1000 82573L"), PVID(0x8086, E1000_DEV_ID_82583V, "Intel(R) 82583V"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_SPT, "Intel(R) 80003ES2LAN (Copper)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_SPT, "Intel(R) 80003ES2LAN (SERDES)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_DPT, "Intel(R) 80003ES2LAN (Dual Copper)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_DPT, "Intel(R) 80003ES2LAN (Dual SERDES)"), - PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M_AMT, "Intel(R) 82566MM ICH8 AMT (Mobile)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_SPT, + "Intel(R) 80003ES2LAN (Copper)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_SPT, + "Intel(R) 80003ES2LAN (SERDES)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_DPT, + "Intel(R) 80003ES2LAN (Dual Copper)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_DPT, + "Intel(R) 80003ES2LAN (Dual SERDES)"), + PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M_AMT, + "Intel(R) 82566MM ICH8 AMT (Mobile)"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_AMT, "Intel(R) 82566DM ICH8 AMT"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_C, "Intel(R) 82566DC ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_IFE, "Intel(R) 82562V ICH8"), @@ -127,8 +183,10 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_ICH8_IFE_G, "Intel(R) 82562G ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M, "Intel(R) 82566MC ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_82567V_3, "Intel(R) 82567V-3 ICH8"), - PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_AMT, "Intel(R) 82567LM ICH9 AMT"), - PVID(0x8086, E1000_DEV_ID_ICH9_IGP_AMT, "Intel(R) 82566DM-2 ICH9 AMT"), + PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_AMT, + "Intel(R) 82567LM ICH9 AMT"), + PVID(0x8086, E1000_DEV_ID_ICH9_IGP_AMT, + "Intel(R) 82566DM-2 ICH9 AMT"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_C, "Intel(R) 82566DC-2 ICH9"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M, "Intel(R) 82567LF ICH9"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_V, "Intel(R) 82567V ICH9"), @@ -152,7 +210,8 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_PCH2_LV_V, "Intel(R) 82579V"), PVID(0x8086, E1000_DEV_ID_PCH_LPT_I217_LM, "Intel(R) I217-LM LPT"), PVID(0x8086, E1000_DEV_ID_PCH_LPT_I217_V, "Intel(R) I217-V LPT"), - PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_LM, "Intel(R) I218-LM LPTLP"), + PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_LM, + "Intel(R) I218-LM LPTLP"), PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_V, "Intel(R) I218-V LPTLP"), PVID(0x8086, E1000_DEV_ID_PCH_I218_LM2, "Intel(R) I218-LM (2)"), PVID(0x8086, E1000_DEV_ID_PCH_I218_V2, "Intel(R) I218-V (2)"), @@ -160,57 +219,102 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_PCH_I218_V3, "Intel(R) I218-V (3)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM, "Intel(R) I219-LM SPT"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V, "Intel(R) I219-V SPT"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM2, "Intel(R) I219-LM SPT-H(2)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V2, "Intel(R) I219-V SPT-H(2)"), - PVID(0x8086, E1000_DEV_ID_PCH_LBG_I219_LM3, "Intel(R) I219-LM LBG(3)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM4, "Intel(R) I219-LM SPT(4)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM2, + "Intel(R) I219-LM SPT-H(2)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V2, + "Intel(R) I219-V SPT-H(2)"), + PVID(0x8086, E1000_DEV_ID_PCH_LBG_I219_LM3, + "Intel(R) I219-LM LBG(3)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM4, + "Intel(R) I219-LM SPT(4)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V4, "Intel(R) I219-V SPT(4)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM5, "Intel(R) I219-LM SPT(5)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM5, + "Intel(R) I219-LM SPT(5)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V5, "Intel(R) I219-V SPT(5)"), - PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM6, "Intel(R) I219-LM CNP(6)"), + PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM6, + "Intel(R) I219-LM CNP(6)"), PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_V6, "Intel(R) I219-V CNP(6)"), - PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM7, "Intel(R) I219-LM CNP(7)"), + PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM7, + "Intel(R) I219-LM CNP(7)"), PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_V7, "Intel(R) I219-V CNP(7)"), - PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM8, "Intel(R) I219-LM ICP(8)"), + PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM8, + "Intel(R) I219-LM ICP(8)"), PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_V8, "Intel(R) I219-V ICP(8)"), - PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM9, "Intel(R) I219-LM ICP(9)"), + PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM9, + "Intel(R) I219-LM ICP(9)"), PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_V9, "Intel(R) I219-V ICP(9)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM10, "Intel(R) I219-LM CMP(10)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V10, "Intel(R) I219-V CMP(10)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM11, "Intel(R) I219-LM CMP(11)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V11, "Intel(R) I219-V CMP(11)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM12, "Intel(R) I219-LM CMP(12)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V12, "Intel(R) I219-V CMP(12)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM13, "Intel(R) I219-LM TGP(13)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V13, "Intel(R) I219-V TGP(13)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM14, "Intel(R) I219-LM TGP(14)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V14, "Intel(R) I219-V GTP(14)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM15, "Intel(R) I219-LM TGP(15)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V15, "Intel(R) I219-V TGP(15)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM16, "Intel(R) I219-LM ADL(16)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V16, "Intel(R) I219-V ADL(16)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM17, "Intel(R) I219-LM ADL(17)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V17, "Intel(R) I219-V ADL(17)"), - PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_LM18, "Intel(R) I219-LM MTP(18)"), - PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_V18, "Intel(R) I219-V MTP(18)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM19, "Intel(R) I219-LM ADL(19)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V19, "Intel(R) I219-V ADL(19)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM20, "Intel(R) I219-LM LNL(20)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V20, "Intel(R) I219-V LNL(20)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM21, "Intel(R) I219-LM LNL(21)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V21, "Intel(R) I219-V LNL(21)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM22, "Intel(R) I219-LM RPL(22)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V22, "Intel(R) I219-V RPL(22)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM23, "Intel(R) I219-LM RPL(23)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V23, "Intel(R) I219-V RPL(23)"), - PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_LM24, "Intel(R) I219-LM ARL(24)"), - PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_V24, "Intel(R) I219-V ARL(24)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM25, "Intel(R) I219-LM PTP(25)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V25, "Intel(R) I219-V PTP(25)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM26, "Intel(R) I219-LM PTP(26)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V26, "Intel(R) I219-V PTP(26)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM27, "Intel(R) I219-LM PTP(27)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V27, "Intel(R) I219-V PTP(27)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM10, + "Intel(R) I219-LM CMP(10)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V10, + "Intel(R) I219-V CMP(10)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM11, + "Intel(R) I219-LM CMP(11)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V11, + "Intel(R) I219-V CMP(11)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM12, + "Intel(R) I219-LM CMP(12)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V12, + "Intel(R) I219-V CMP(12)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM13, + "Intel(R) I219-LM TGP(13)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V13, + "Intel(R) I219-V TGP(13)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM14, + "Intel(R) I219-LM TGP(14)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V14, + "Intel(R) I219-V GTP(14)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM15, + "Intel(R) I219-LM TGP(15)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V15, + "Intel(R) I219-V TGP(15)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM16, + "Intel(R) I219-LM ADL(16)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V16, + "Intel(R) I219-V ADL(16)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM17, + "Intel(R) I219-LM ADL(17)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V17, + "Intel(R) I219-V ADL(17)"), + PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_LM18, + "Intel(R) I219-LM MTP(18)"), + PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_V18, + "Intel(R) I219-V MTP(18)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM19, + "Intel(R) I219-LM ADL(19)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V19, + "Intel(R) I219-V ADL(19)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM20, + "Intel(R) I219-LM LNL(20)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V20, + "Intel(R) I219-V LNL(20)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM21, + "Intel(R) I219-LM LNL(21)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V21, + "Intel(R) I219-V LNL(21)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM22, + "Intel(R) I219-LM RPL(22)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V22, + "Intel(R) I219-V RPL(22)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM23, + "Intel(R) I219-LM RPL(23)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V23, + "Intel(R) I219-V RPL(23)"), + PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_LM24, + "Intel(R) I219-LM ARL(24)"), + PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_V24, + "Intel(R) I219-V ARL(24)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM25, + "Intel(R) I219-LM PTP(25)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V25, + "Intel(R) I219-V PTP(25)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM26, + "Intel(R) I219-LM PTP(26)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V26, + "Intel(R) I219-V PTP(26)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM27, + "Intel(R) I219-LM PTP(27)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V27, + "Intel(R) I219-V PTP(27)"), /* required last entry */ PVID_END }; @@ -218,45 +322,68 @@ static const pci_vendor_info_t em_vendor_info_array[] = static const pci_vendor_info_t igb_vendor_info_array[] = { /* Intel(R) - igb-class devices */ - PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, "Intel(R) PRO/1000 82575EB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82575EB_FIBER_SERDES, "Intel(R) PRO/1000 82575EB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82575GB_QUAD_COPPER, "Intel(R) PRO/1000 VT 82575GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, + "Intel(R) PRO/1000 82575EB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82575EB_FIBER_SERDES, + "Intel(R) PRO/1000 82575EB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82575GB_QUAD_COPPER, + "Intel(R) PRO/1000 VT 82575GB (Quad Copper)"), PVID(0x8086, E1000_DEV_ID_82576, "Intel(R) PRO/1000 82576"), PVID(0x8086, E1000_DEV_ID_82576_NS, "Intel(R) PRO/1000 82576NS"), - PVID(0x8086, E1000_DEV_ID_82576_NS_SERDES, "Intel(R) PRO/1000 82576NS (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_FIBER, "Intel(R) PRO/1000 EF 82576 (Dual Fiber)"), - PVID(0x8086, E1000_DEV_ID_82576_SERDES, "Intel(R) PRO/1000 82576 (Dual SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_SERDES_QUAD, "Intel(R) PRO/1000 ET 82576 (Quad SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER, "Intel(R) PRO/1000 ET 82576 (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER_ET2, "Intel(R) PRO/1000 ET(2) 82576 (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82576_VF, "Intel(R) PRO/1000 82576 Virtual Function"), - PVID(0x8086, E1000_DEV_ID_82580_COPPER, "Intel(R) I340 82580 (Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_NS_SERDES, + "Intel(R) PRO/1000 82576NS (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_FIBER, + "Intel(R) PRO/1000 EF 82576 (Dual Fiber)"), + PVID(0x8086, E1000_DEV_ID_82576_SERDES, + "Intel(R) PRO/1000 82576 (Dual SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_SERDES_QUAD, + "Intel(R) PRO/1000 ET 82576 (Quad SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER, + "Intel(R) PRO/1000 ET 82576 (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER_ET2, + "Intel(R) PRO/1000 ET(2) 82576 (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_VF, + "Intel(R) PRO/1000 82576 Virtual Function"), + PVID(0x8086, E1000_DEV_ID_82580_COPPER, + "Intel(R) I340 82580 (Copper)"), PVID(0x8086, E1000_DEV_ID_82580_FIBER, "Intel(R) I340 82580 (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82580_SERDES, "Intel(R) I340 82580 (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82580_SERDES, + "Intel(R) I340 82580 (SERDES)"), PVID(0x8086, E1000_DEV_ID_82580_SGMII, "Intel(R) I340 82580 (SGMII)"), - PVID(0x8086, E1000_DEV_ID_82580_COPPER_DUAL, "Intel(R) I340-T2 82580 (Dual Copper)"), - PVID(0x8086, E1000_DEV_ID_82580_QUAD_FIBER, "Intel(R) I340-F4 82580 (Quad Fiber)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_SERDES, "Intel(R) DH89XXCC (SERDES)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_SGMII, "Intel(R) I347-AT4 DH89XXCC"), + PVID(0x8086, E1000_DEV_ID_82580_COPPER_DUAL, + "Intel(R) I340-T2 82580 (Dual Copper)"), + PVID(0x8086, E1000_DEV_ID_82580_QUAD_FIBER, + "Intel(R) I340-F4 82580 (Quad Fiber)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_SERDES, + "Intel(R) DH89XXCC (SERDES)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_SGMII, + "Intel(R) I347-AT4 DH89XXCC"), PVID(0x8086, E1000_DEV_ID_DH89XXCC_SFP, "Intel(R) DH89XXCC (SFP)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_BACKPLANE, "Intel(R) DH89XXCC (Backplane)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_BACKPLANE, + "Intel(R) DH89XXCC (Backplane)"), PVID(0x8086, E1000_DEV_ID_I350_COPPER, "Intel(R) I350 (Copper)"), PVID(0x8086, E1000_DEV_ID_I350_FIBER, "Intel(R) I350 (Fiber)"), PVID(0x8086, E1000_DEV_ID_I350_SERDES, "Intel(R) I350 (SERDES)"), PVID(0x8086, E1000_DEV_ID_I350_SGMII, "Intel(R) I350 (SGMII)"), PVID(0x8086, E1000_DEV_ID_I350_VF, "Intel(R) I350 Virtual Function"), PVID(0x8086, E1000_DEV_ID_I210_COPPER, "Intel(R) I210 (Copper)"), - PVID(0x8086, E1000_DEV_ID_I210_COPPER_IT, "Intel(R) I210 IT (Copper)"), + PVID(0x8086, E1000_DEV_ID_I210_COPPER_IT, + "Intel(R) I210 IT (Copper)"), PVID(0x8086, E1000_DEV_ID_I210_COPPER_OEM1, "Intel(R) I210 (OEM)"), - PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, "Intel(R) I210 Flashless (Copper)"), - PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, "Intel(R) I210 Flashless (SERDES)"), - PVID(0x8086, E1000_DEV_ID_I210_SGMII_FLASHLESS, "Intel(R) I210 Flashless (SGMII)"), + PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, + "Intel(R) I210 Flashless (Copper)"), + PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, + "Intel(R) I210 Flashless (SERDES)"), + PVID(0x8086, E1000_DEV_ID_I210_SGMII_FLASHLESS, + "Intel(R) I210 Flashless (SGMII)"), PVID(0x8086, E1000_DEV_ID_I210_FIBER, "Intel(R) I210 (Fiber)"), PVID(0x8086, E1000_DEV_ID_I210_SERDES, "Intel(R) I210 (SERDES)"), PVID(0x8086, E1000_DEV_ID_I210_SGMII, "Intel(R) I210 (SGMII)"), PVID(0x8086, E1000_DEV_ID_I211_COPPER, "Intel(R) I211 (Copper)"), - PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_1GBPS, "Intel(R) I354 (1.0 GbE Backplane)"), - PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS, "Intel(R) I354 (2.5 GbE Backplane)"), + PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_1GBPS, + "Intel(R) I354 (1.0 GbE Backplane)"), + PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS, + "Intel(R) I354 (2.5 GbE Backplane)"), PVID(0x8086, E1000_DEV_ID_I354_SGMII, "Intel(R) I354 (SGMII)"), /* required last entry */ PVID_END @@ -274,8 +401,10 @@ static int em_if_shutdown(if_ctx_t); static int em_if_suspend(if_ctx_t); static int em_if_resume(if_ctx_t); -static int em_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int em_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int em_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int em_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void em_if_queues_free(if_ctx_t); static uint64_t em_if_get_counter(if_ctx_t, ift_counter); @@ -517,10 +646,10 @@ SYSCTL_INT(_hw_em, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, static int em_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int em_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); -SYSCTL_INT(_hw_em, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, &em_tx_int_delay_dflt, - 0, "Default transmit interrupt delay in usecs"); -SYSCTL_INT(_hw_em, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, &em_rx_int_delay_dflt, - 0, "Default receive interrupt delay in usecs"); +SYSCTL_INT(_hw_em, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, + &em_tx_int_delay_dflt, 0, "Default transmit interrupt delay in usecs"); +SYSCTL_INT(_hw_em, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, + &em_rx_int_delay_dflt, 0, "Default receive interrupt delay in usecs"); static int em_tx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_TADV); static int em_rx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_RADV); @@ -532,7 +661,8 @@ SYSCTL_INT(_hw_em, OID_AUTO, rx_abs_int_delay, CTLFLAG_RDTUN, "Default receive interrupt delay limit in usecs"); static int em_smart_pwr_down = false; -SYSCTL_INT(_hw_em, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &em_smart_pwr_down, +SYSCTL_INT(_hw_em, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, + &em_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); static bool em_unsupported_tso = false; @@ -589,7 +719,8 @@ static struct if_shared_ctx em_sctx_init = { .isc_vendor_info = em_vendor_info_array, .isc_driver_version = em_driver_version, .isc_driver = &em_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {EM_MIN_RXD}, .isc_ntxd_min = {EM_MIN_TXD}, @@ -616,7 +747,8 @@ static struct if_shared_ctx igb_sctx_init = { .isc_vendor_info = igb_vendor_info_array, .isc_driver_version = igb_driver_version, .isc_driver = &igb_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {EM_MIN_RXD}, .isc_ntxd_min = {EM_MIN_TXD}, @@ -726,15 +858,21 @@ static int em_get_regs(SYSCTL_HANDLER_ARGS) for (j = 0; j < nrxd; j++) { u32 staterr = le32toh(rxr->rx_base[j].wb.upper.status_error); u32 length = le32toh(rxr->rx_base[j].wb.upper.length); - sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" PRIx64 " Error:%d Length:%d\n", j, rxr->rx_base[j].read.buffer_addr, staterr, length); + sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" + PRIx64 " Error:%d Length:%d\n", + j, rxr->rx_base[j].read.buffer_addr, staterr, length); } for (j = 0; j < min(ntxd, 256); j++) { unsigned int *ptr = (unsigned int *)&txr->tx_base[j]; - sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x eop: %d DD=%d\n", - j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, - buf->eop != -1 ? txr->tx_base[buf->eop].upper.fields.status & E1000_TXD_STAT_DD : 0); + sbuf_printf(sb, + "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x" + " eop: %d DD=%d\n", + j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, + buf->eop != -1 ? + txr->tx_base[buf->eop].upper.fields.status & + E1000_TXD_STAT_DD : 0); } } @@ -848,7 +986,7 @@ em_if_attach_pre(if_ctx_t ctx) sc->enable_aim = em_enable_aim; SYSCTL_ADD_INT(ctx_list, child, OID_AUTO, "enable_aim", CTLFLAG_RW, &sc->enable_aim, 0, - "Interrupt Moderation (1=normal, 2=lowlatency)"); + "Interrupt Moderation (1=normal, 2=lowlatency)"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, @@ -896,14 +1034,17 @@ em_if_attach_pre(if_ctx_t ctx) "TSO TCP flags mask for last segment"); scctx->isc_tx_nsegments = EM_MAX_SCATTER; - scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); + scctx->isc_nrxqsets_max = + scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); if (hw->mac.type >= igb_mac_min) { - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); scctx->isc_rxd_size[0] = sizeof(union e1000_adv_rx_desc); scctx->isc_txrx = &igb_txrx; @@ -922,8 +1063,10 @@ em_if_attach_pre(if_ctx_t ctx) */ scctx->isc_msix_bar = pci_msix_table_bar(dev); } else if (hw->mac.type >= em_mac_min) { - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); scctx->isc_rxd_size[0] = sizeof(union e1000_rx_desc_extended); scctx->isc_txrx = &em_txrx; @@ -934,11 +1077,12 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - /* Disable TSO on all em(4) until ring stalls can be debugged */ + /* Disable TSO on all em(4) until ring stalls are debugged */ scctx->isc_capenable &= ~IFCAP_TSO; /* - * Disable TSO on SPT due to errata that downclocks DMA performance + * Disable TSO on SPT due to errata that downclocks DMA + * performance * i218-i219 Specification Update 1.5.4.5 */ if (hw->mac.type == e1000_pch_spt) @@ -955,8 +1099,10 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_disable_msix = 1; } } else { - scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * + sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * + sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); scctx->isc_rxd_size[0] = sizeof(struct e1000_rx_desc); scctx->isc_txrx = &lem_txrx; @@ -969,7 +1115,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - /* Disable TSO on all lem(4) until ring stalls can be debugged */ + /* Disable TSO on all lem(4) until ring stalls debugged */ scctx->isc_capenable &= ~IFCAP_TSO; /* 82541ER doesn't do HW tagging */ @@ -980,15 +1126,18 @@ em_if_attach_pre(if_ctx_t ctx) } /* This is the first e1000 chip and it does not do offloads */ if (hw->mac.type == e1000_82542) { - scctx->isc_capabilities &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | - IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWTAGGING | - IFCAP_VLAN_HWFILTER | IFCAP_TSO | IFCAP_VLAN_HWTSO); + scctx->isc_capabilities &= ~(IFCAP_HWCSUM | + IFCAP_VLAN_HWCSUM | IFCAP_HWCSUM_IPV6 | + IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWFILTER | + IFCAP_TSO | IFCAP_VLAN_HWTSO); scctx->isc_capenable = scctx->isc_capabilities; } /* These can't do TSO for various reasons */ - if (hw->mac.type < e1000_82544 || hw->mac.type == e1000_82547 || + if (hw->mac.type < e1000_82544 || + hw->mac.type == e1000_82547 || hw->mac.type == e1000_82547_rev_2) { - scctx->isc_capabilities &= ~(IFCAP_TSO | IFCAP_VLAN_HWTSO); + scctx->isc_capabilities &= + ~(IFCAP_TSO |IFCAP_VLAN_HWTSO); scctx->isc_capenable = scctx->isc_capabilities; } /* XXXKB: No IPv6 before this? */ @@ -996,10 +1145,14 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities &= ~IFCAP_HWCSUM_IPV6; scctx->isc_capenable = scctx->isc_capabilities; } - /* "PCI/PCI-X SDM 4.0" page 33 (b) - FDX requirement on these chips */ - if (hw->mac.type == e1000_82547 || hw->mac.type == e1000_82547_rev_2) - scctx->isc_capenable &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | - IFCAP_HWCSUM_IPV6); + /* + * "PCI/PCI-X SDM 4.0" page 33 (b): + * FDX requirement on these chips + */ + if (hw->mac.type == e1000_82547 || + hw->mac.type == e1000_82547_rev_2) + scctx->isc_capenable &= ~(IFCAP_HWCSUM | + IFCAP_VLAN_HWCSUM | IFCAP_HWCSUM_IPV6); /* INTx only */ scctx->isc_msix_bar = 0; @@ -1046,11 +1199,9 @@ em_if_attach_pre(if_ctx_t ctx) ** FLASH read/write macros in the shared code. */ else if (hw->mac.type >= e1000_pch_spt) { - sc->osdep.flash_bus_space_tag = - sc->osdep.mem_bus_space_tag; + sc->osdep.flash_bus_space_tag = sc->osdep.mem_bus_space_tag; sc->osdep.flash_bus_space_handle = - sc->osdep.mem_bus_space_handle - + E1000_FLASH_BASE_ADDR; + sc->osdep.mem_bus_space_handle + E1000_FLASH_BASE_ADDR; } /* Do Shared Code initialization */ @@ -1076,15 +1227,17 @@ em_if_attach_pre(if_ctx_t ctx) } if (hw->mac.type >= e1000_82540 && hw->mac.type < igb_mac_min) { em_add_int_delay_sysctl(sc, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", &sc->rx_abs_int_delay, + "receive interrupt delay limit in usecs", + &sc->rx_abs_int_delay, E1000_REGISTER(hw, E1000_RADV), em_rx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", &sc->tx_abs_int_delay, + "transmit interrupt delay limit in usecs", + &sc->tx_abs_int_delay, E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "itr", "interrupt delay limit in usecs/4", &sc->tx_itr, E1000_REGISTER(hw, E1000_ITR), - EM_INTS_TO_ITR(em_max_interrupt_rate)); + EM_INTS_TO_ITR(em_max_interrupt_rate)); } hw->mac.autoneg = DO_AUTO_NEG; @@ -1119,7 +1272,8 @@ em_if_attach_pre(if_ctx_t ctx) sc->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err_late; } @@ -1129,8 +1283,8 @@ em_if_attach_pre(if_ctx_t ctx) /* Check SOL/IDER usage */ if (e1000_check_reset_block(hw)) - device_printf(dev, "PHY reset is blocked" - " due to SOL/IDER session.\n"); + device_printf(dev, + "PHY reset is blocked due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ if (hw->mac.type < igb_mac_min) @@ -1165,8 +1319,8 @@ em_if_attach_pre(if_ctx_t ctx) /* Copy the permanent MAC address out of the EEPROM */ if (e1000_read_mac_addr(hw) < 0) { - device_printf(dev, "EEPROM read error while reading MAC" - " address\n"); + device_printf(dev, + "EEPROM read error while reading MAC address\n"); error = EIO; goto err_late; } @@ -1241,7 +1395,10 @@ em_if_attach_post(if_ctx_t ctx) return (0); err_late: - /* upon attach_post() error, iflib calls _if_detach() to free resources. */ + /* + * Upon em_if_attach_post() error, iflib calls em_if_detach() to + * free resources + */ return (error); } @@ -1383,8 +1540,7 @@ em_if_init(if_ctx_t ctx) INIT_DEBUGOUT("em_if_init: begin"); /* Get the latest mac address, User can use a LAA */ - bcopy(if_getlladdr(ifp), sc->hw.mac.addr, - ETHER_ADDR_LEN); + bcopy(if_getlladdr(ifp), sc->hw.mac.addr, ETHER_ADDR_LEN); /* Put the address into the Receive Address Array */ e1000_rar_set(&sc->hw, sc->hw.mac.addr, 0); @@ -1405,7 +1561,8 @@ em_if_init(if_ctx_t ctx) em_reset(ctx); em_if_update_admin_status(ctx); - for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; + i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; txr->tx_rs_cidx = txr->tx_rs_pidx; @@ -1452,8 +1609,10 @@ em_if_init(if_ctx_t ctx) E1000_WRITE_REG(&sc->hw, E1000_CTRL_EXT, tmp); /* Set the IVAR - interrupt vector routing. */ E1000_WRITE_REG(&sc->hw, E1000_IVAR, sc->ivars); - } else if (sc->intr_type == IFLIB_INTR_MSIX) /* Set up queue routing */ + } else if (sc->intr_type == IFLIB_INTR_MSIX) { + /* Set up queue routing */ igb_configure_queues(sc); + } /* this clears any pending interrupts */ E1000_READ_REG(&sc->hw, E1000_ICR); @@ -1516,7 +1675,7 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, goto em_set_next_itr; } - /* Get the largest values from the associated tx and rx ring */ + /* Get largest values from the associated tx and rx ring */ if (txr->tx_bytes && txr->tx_packets) { bytes = txr->tx_bytes; bytes_packets = txr->tx_bytes/txr->tx_packets; @@ -1524,7 +1683,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, } if (rxr->rx_bytes && rxr->rx_packets) { bytes = max(bytes, rxr->rx_bytes); - bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + bytes_packets = + max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); packets = max(packets, rxr->rx_packets); } @@ -1545,7 +1705,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, /* Handle TSO */ if (bytes_packets > 8000) nextlatency = itr_latency_bulk; - else if ((packets < 10) || (bytes_packets > 1200)) + else if ((packets < 10) || + (bytes_packets > 1200)) nextlatency = itr_latency_bulk; else if (packets > 35) nextlatency = itr_latency_lowest; @@ -1564,8 +1725,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, break; default: nextlatency = itr_latency_low; - device_printf(sc->dev, "Unexpected newitr transition %d\n", - nextlatency); + device_printf(sc->dev, + "Unexpected newitr transition %d\n", nextlatency); break; } @@ -1609,7 +1770,8 @@ em_set_next_itr: if (newitr != que->itr_setting) { que->itr_setting = newitr; - E1000_WRITE_REG(hw, E1000_EITR(que->msix), que->itr_setting); + E1000_WRITE_REG(hw, E1000_EITR(que->msix), + que->itr_setting); } } else { newitr = EM_INTS_TO_ITR(newitr); @@ -1618,9 +1780,11 @@ em_set_next_itr: que->itr_setting = newitr; if (hw->mac.type == e1000_82574 && que->msix) { E1000_WRITE_REG(hw, - E1000_EITR_82574(que->msix), que->itr_setting); + E1000_EITR_82574(que->msix), + que->itr_setting); } else { - E1000_WRITE_REG(hw, E1000_ITR, que->itr_setting); + E1000_WRITE_REG(hw, E1000_ITR, + que->itr_setting); } } } @@ -1779,8 +1943,8 @@ em_msix_link(void *arg) E1000_WRITE_REG(&sc->hw, E1000_IMS, E1000_IMS_LSC); E1000_WRITE_REG(&sc->hw, E1000_EIMS, sc->link_mask); } else if (sc->hw.mac.type == e1000_82574) { - E1000_WRITE_REG(&sc->hw, E1000_IMS, E1000_IMS_LSC | - E1000_IMS_OTHER); + E1000_WRITE_REG(&sc->hw, E1000_IMS, + E1000_IMS_LSC | E1000_IMS_OTHER); /* * Because we must read the ICR for this interrupt it may * clear other causes using autoclear, for this reason we @@ -1955,7 +2119,8 @@ em_if_set_promisc(if_ctx_t ctx, int flags) if (flags & IFF_ALLMULTI) mcnt = MAX_NUM_MULTICAST_ADDRESSES; else - mcnt = min(if_llmaddr_count(ifp), MAX_NUM_MULTICAST_ADDRESSES); + mcnt = min(if_llmaddr_count(ifp), + MAX_NUM_MULTICAST_ADDRESSES); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) reg_rctl &= (~E1000_RCTL_MPE); @@ -2004,7 +2169,7 @@ em_if_multi_set(if_ctx_t ctx) { struct e1000_softc *sc = iflib_get_softc(ctx); if_t ifp = iflib_get_ifp(ctx); - u8 *mta; /* Multicast array memory */ + u8 *mta; /* Multicast array memory */ u32 reg_rctl = 0; int mcnt = 0; @@ -2063,7 +2228,6 @@ em_if_multi_set(if_ctx_t ctx) static void em_if_timer(if_ctx_t ctx, uint16_t qid) { - if (qid != 0) return; @@ -2097,8 +2261,8 @@ em_if_update_admin_status(if_ctx_t ctx) break; case e1000_media_type_fiber: e1000_check_for_link(hw); - link_check = (E1000_READ_REG(hw, E1000_STATUS) & - E1000_STATUS_LU); + link_check = + (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU); break; case e1000_media_type_internal_serdes: e1000_check_for_link(hw); @@ -2155,11 +2319,11 @@ em_if_update_admin_status(if_ctx_t ctx) sc->flags |= IGB_MEDIA_RESET; em_reset(ctx); } - /* Only do TSO on gigabit Ethernet for older chips due to errata */ + /* Only do TSO on gigabit for older chips due to errata */ if (hw->mac.type < igb_mac_min) automasked = em_automask_tso(ctx); - /* Automasking resets the interface, so don't mark it up yet */ + /* Automasking resets the interface so don't mark it up yet */ if (!automasked) iflib_link_state_change(ctx, LINK_STATE_UP, IF_Mbps(sc->link_speed)); @@ -2234,10 +2398,8 @@ em_identify_hardware(if_ctx_t ctx) sc->hw.vendor_id = pci_get_vendor(dev); sc->hw.device_id = pci_get_device(dev); sc->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); - sc->hw.subsystem_vendor_id = - pci_read_config(dev, PCIR_SUBVEND_0, 2); - sc->hw.subsystem_device_id = - pci_read_config(dev, PCIR_SUBDEV_0, 2); + sc->hw.subsystem_vendor_id = pci_read_config(dev, PCIR_SUBVEND_0, 2); + sc->hw.subsystem_device_id = pci_read_config(dev, PCIR_SUBDEV_0, 2); /* Do Shared Code Init and Setup */ if (e1000_set_mac_type(&sc->hw)) { @@ -2261,15 +2423,15 @@ em_allocate_pci_resources(if_ctx_t ctx) int rid, val; rid = PCIR_BAR(0); - sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE); + sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); if (sc->memory == NULL) { - device_printf(dev, "Unable to allocate bus resource: memory\n"); + device_printf(dev, + "Unable to allocate bus resource: memory\n"); return (ENXIO); } sc->osdep.mem_bus_space_tag = rman_get_bustag(sc->memory); - sc->osdep.mem_bus_space_handle = - rman_get_bushandle(sc->memory); + sc->osdep.mem_bus_space_handle = rman_get_bushandle(sc->memory); sc->hw.hw_addr = (u8 *)&sc->osdep.mem_bus_space_handle; /* Only older adapters use IO mapping */ @@ -2292,8 +2454,8 @@ em_allocate_pci_resources(if_ctx_t ctx) sc->ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (sc->ioport == NULL) { - device_printf(dev, "Unable to allocate bus resource: " - "ioport\n"); + device_printf(dev, + "Unable to allocate bus resource: ioport\n"); return (ENXIO); } sc->hw.io_base = 0; @@ -2326,9 +2488,12 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) for (i = 0; i < sc->rx_num_queues; i++, rx_que++, vector++) { rid = vector + 1; snprintf(buf, sizeof(buf), "rxq%d", i); - error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, IFLIB_INTR_RXTX, em_msix_que, rx_que, rx_que->me, buf); + error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, + IFLIB_INTR_RXTX, em_msix_que, rx_que, rx_que->me, buf); if (error) { - device_printf(iflib_get_dev(ctx), "Failed to allocate que int %d err: %d", i, error); + device_printf(iflib_get_dev(ctx), + "Failed to allocate que int %d err: %d", + i, error); sc->rx_num_queues = i + 1; goto fail; } @@ -2381,10 +2546,12 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) *** 890 LINES SKIPPED *** From nobody Sun Nov 24 05:58:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xwynv6NGxz5dY6f; Sun, 24 Nov 2024 05:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xwynv5jv8z4Z9N; Sun, 24 Nov 2024 05:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732427939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BGlVnISXbpijmKbC8U1NlEFa5Sc4l7C4O1v+7sIw7kY=; b=c5hmpbA03EavUcEXwDaKMaIFAvcPUd2bBSG7I0AYvTgmMnvJZsWTeE89OKjzgpH3/HFxYp a+9cjK9vyFtJWMC3w6qnKJgavS8Ct3ls3n5LIJ5A/mi+TiiOERgldIUHKk+LpsdhXsyDoU 7G4fUtujc+AOAX8VbKsAvMsz7iSR46XOxnEMOAif+ISoaTUO/3ZyxyLVSls/wRlnl004g+ czLC+rWy1M7mWFcDGHTYkddVq+B0yBqcroJDpTh4nCpQOI9obL7Zqe59ZIg2lzz/oxfeio ArIAJdX7kgH6WEfOp8LkOb2rkJ23FbUKXHkBAOjpEuQrfviKkEHxucwrqSWXDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732427939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BGlVnISXbpijmKbC8U1NlEFa5Sc4l7C4O1v+7sIw7kY=; b=pSa1K7Bt2qLZ5HcHwVDKH0ViFjYYcE/ClxN6a900hFyUCLmjoQ1Te9OppS6rdvpzBsEKIh iqeui4mRpAQ+bJbJ0agtdIp+HQTYiEdd5w+/A0je+SVkzCewbh0yHaKFRS2tGMdmJUC7+g 5+D5w6ZkHXyFJVB2Mu4bCMCYvOqDj7vSaQqJgzGzuK81JRG4cFtvCw45us1OxeZmGythyE T2PPsdCemnRiJAAwHqjcb5MnOkojDHY7ATFjTICAEoPdVDKPJs3A+q7vs0Ff2X1BDgTQQR NOrbcTluZl5NFKvENXF3yZVhdheQJRO78mXs8vOngBOqGs/ojLiO1Q/pUIuEQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732427939; a=rsa-sha256; cv=none; b=CZCFE69lboNleSo/RuLu9zFx5CS781JwsTaM3w50rkJ5mYxIGAuToxzal0yD2LQw17DvK7 8hm1HN+8P9SX3kY1/tak7lxJ3eNy/NMKK5jX8jBMHU/zqLnIJZew+iH4GtJx3qFyHB+Bup fBYjKAm+mhe+/sVGeneeFXwkk7DJGrmFYQOWar2YyRO+43Vv8KSbjqqhMF1qVE/QuZ1Wu7 83hfPBALoyhlbaVJ4haF//15toiPceOMGpYXsC1/xyrBPNEyZ7bXCLBYeYC+r+FLuEQ8+m 3OPaKzG7SBZWJ5/L9HvCa3rOcVWOlJoEhyKY+vH7K8G3tijiFL9J1TkMLk+1Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xwynv5850zhvb; Sun, 24 Nov 2024 05:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO5wxGk021602; Sun, 24 Nov 2024 05:58:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO5wxwM021599; Sun, 24 Nov 2024 05:58:59 GMT (envelope-from git) Date: Sun, 24 Nov 2024 05:58:59 GMT Message-Id: <202411240558.4AO5wxwM021599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 9efc7325f1ac - main - igc: Reflow long lines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9efc7325f1acb85ac8772096cc2b54fd0c6a60ff Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=9efc7325f1acb85ac8772096cc2b54fd0c6a60ff commit 9efc7325f1acb85ac8772096cc2b54fd0c6a60ff Author: Kevin Bowling AuthorDate: 2024-11-24 05:58:13 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 05:58:13 +0000 igc: Reflow long lines MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 153 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 98 insertions(+), 55 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 515bb35ac8fd..5356a6e87a5b 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -49,22 +49,38 @@ static const pci_vendor_info_t igc_vendor_info_array[] = { /* Intel(R) PRO/1000 Network Connection - igc */ - PVID(0x8086, IGC_DEV_ID_I225_LM, "Intel(R) Ethernet Controller I225-LM"), - PVID(0x8086, IGC_DEV_ID_I225_V, "Intel(R) Ethernet Controller I225-V"), - PVID(0x8086, IGC_DEV_ID_I225_K, "Intel(R) Ethernet Controller I225-K"), - PVID(0x8086, IGC_DEV_ID_I225_I, "Intel(R) Ethernet Controller I225-I"), - PVID(0x8086, IGC_DEV_ID_I220_V, "Intel(R) Ethernet Controller I220-V"), - PVID(0x8086, IGC_DEV_ID_I225_K2, "Intel(R) Ethernet Controller I225-K(2)"), - PVID(0x8086, IGC_DEV_ID_I225_LMVP, "Intel(R) Ethernet Controller I225-LMvP(2)"), - PVID(0x8086, IGC_DEV_ID_I226_K, "Intel(R) Ethernet Controller I226-K"), - PVID(0x8086, IGC_DEV_ID_I226_LMVP, "Intel(R) Ethernet Controller I226-LMvP"), - PVID(0x8086, IGC_DEV_ID_I225_IT, "Intel(R) Ethernet Controller I225-IT(2)"), - PVID(0x8086, IGC_DEV_ID_I226_LM, "Intel(R) Ethernet Controller I226-LM"), - PVID(0x8086, IGC_DEV_ID_I226_V, "Intel(R) Ethernet Controller I226-V"), - PVID(0x8086, IGC_DEV_ID_I226_IT, "Intel(R) Ethernet Controller I226-IT"), - PVID(0x8086, IGC_DEV_ID_I221_V, "Intel(R) Ethernet Controller I221-V"), - PVID(0x8086, IGC_DEV_ID_I226_BLANK_NVM, "Intel(R) Ethernet Controller I226(blankNVM)"), - PVID(0x8086, IGC_DEV_ID_I225_BLANK_NVM, "Intel(R) Ethernet Controller I225(blankNVM)"), + PVID(0x8086, IGC_DEV_ID_I225_LM, + "Intel(R) Ethernet Controller I225-LM"), + PVID(0x8086, IGC_DEV_ID_I225_V, + "Intel(R) Ethernet Controller I225-V"), + PVID(0x8086, IGC_DEV_ID_I225_K, + "Intel(R) Ethernet Controller I225-K"), + PVID(0x8086, IGC_DEV_ID_I225_I, + "Intel(R) Ethernet Controller I225-I"), + PVID(0x8086, IGC_DEV_ID_I220_V, + "Intel(R) Ethernet Controller I220-V"), + PVID(0x8086, IGC_DEV_ID_I225_K2, + "Intel(R) Ethernet Controller I225-K(2)"), + PVID(0x8086, IGC_DEV_ID_I225_LMVP, + "Intel(R) Ethernet Controller I225-LMvP(2)"), + PVID(0x8086, IGC_DEV_ID_I226_K, + "Intel(R) Ethernet Controller I226-K"), + PVID(0x8086, IGC_DEV_ID_I226_LMVP, + "Intel(R) Ethernet Controller I226-LMvP"), + PVID(0x8086, IGC_DEV_ID_I225_IT, + "Intel(R) Ethernet Controller I225-IT(2)"), + PVID(0x8086, IGC_DEV_ID_I226_LM, + "Intel(R) Ethernet Controller I226-LM"), + PVID(0x8086, IGC_DEV_ID_I226_V, + "Intel(R) Ethernet Controller I226-V"), + PVID(0x8086, IGC_DEV_ID_I226_IT, + "Intel(R) Ethernet Controller I226-IT"), + PVID(0x8086, IGC_DEV_ID_I221_V, + "Intel(R) Ethernet Controller I221-V"), + PVID(0x8086, IGC_DEV_ID_I226_BLANK_NVM, + "Intel(R) Ethernet Controller I226(blankNVM)"), + PVID(0x8086, IGC_DEV_ID_I225_BLANK_NVM, + "Intel(R) Ethernet Controller I225(blankNVM)"), /* required last entry */ PVID_END }; @@ -80,8 +96,10 @@ static int igc_if_shutdown(if_ctx_t); static int igc_if_suspend(if_ctx_t); static int igc_if_resume(if_ctx_t); -static int igc_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int igc_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int igc_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int igc_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void igc_if_queues_free(if_ctx_t); static uint64_t igc_if_get_counter(if_ctx_t, ift_counter); @@ -229,7 +247,8 @@ SYSCTL_INT(_hw_igc, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, &igc_disable_crc_stripping, 0, "Disable CRC Stripping"); static int igc_smart_pwr_down = false; -SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &igc_smart_pwr_down, +SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, + &igc_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); /* Controls whether promiscuous also shows bad packets */ @@ -277,7 +296,8 @@ static struct if_shared_ctx igc_sctx_init = { .isc_vendor_info = igc_vendor_info_array, .isc_driver_version = "1", .isc_driver = &igc_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {IGC_MIN_RXD}, .isc_ntxd_min = {IGC_MIN_TXD}, @@ -383,15 +403,20 @@ static int igc_get_regs(SYSCTL_HANDLER_ARGS) for (j = 0; j < nrxd; j++) { u32 staterr = le32toh(rxr->rx_base[j].wb.upper.status_error); u32 length = le32toh(rxr->rx_base[j].wb.upper.length); - sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" PRIx64 " Error:%d Length:%d\n", j, rxr->rx_base[j].read.buffer_addr, staterr, length); + sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" + PRIx64 " Error:%d Length:%d\n", + j, rxr->rx_base[j].read.buffer_addr, staterr, length); } for (j = 0; j < min(ntxd, 256); j++) { unsigned int *ptr = (unsigned int *)&txr->tx_base[j]; - sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x eop: %d DD=%d\n", - j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, - buf->eop != -1 ? txr->tx_base[buf->eop].upper.fields.status & IGC_TXD_STAT_DD : 0); + sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x" + "[3]: %08x eop: %d DD=%d\n", + j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, + buf->eop != -1 ? + txr->tx_base[buf->eop].upper.fields.status & + IGC_TXD_STAT_DD : 0); } } @@ -523,13 +548,16 @@ igc_if_attach_pre(if_ctx_t ctx) igc_identify_hardware(ctx); scctx->isc_tx_nsegments = IGC_MAX_SCATTER; - scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = igc_set_num_queues(ctx); + scctx->isc_nrxqsets_max = + scctx->isc_ntxqsets_max = igc_set_num_queues(ctx); if (bootverbose) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union igc_adv_tx_desc), IGC_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union igc_adv_rx_desc), IGC_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(union igc_adv_tx_desc), IGC_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union igc_adv_rx_desc), IGC_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union igc_adv_tx_desc); scctx->isc_rxd_size[0] = sizeof(union igc_adv_rx_desc); scctx->isc_txrx = &igc_txrx; @@ -588,7 +616,8 @@ igc_if_attach_pre(if_ctx_t ctx) sc->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err_late; } @@ -817,7 +846,8 @@ igc_if_init(if_ctx_t ctx) igc_reset(ctx); igc_if_update_admin_status(ctx); - for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; + i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; txr->tx_rs_cidx = txr->tx_rs_pidx; @@ -906,7 +936,7 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, goto igc_set_next_eitr; } - /* Get the largest values from the associated tx and rx ring */ + /* Get largest values from the associated tx and rx ring */ if (txr->tx_bytes && txr->tx_packets) { bytes = txr->tx_bytes; bytes_packets = txr->tx_bytes/txr->tx_packets; @@ -914,7 +944,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, } if (rxr->rx_bytes && rxr->rx_packets) { bytes = max(bytes, rxr->rx_bytes); - bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + bytes_packets = max(bytes_packets, + rxr->rx_bytes/rxr->rx_packets); packets = max(packets, rxr->rx_packets); } @@ -935,7 +966,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, /* Handle TSO */ if (bytes_packets > 8000) nextlatency = eitr_latency_bulk; - else if ((packets < 10) || (bytes_packets > 1200)) + else if ((packets < 10) || + (bytes_packets > 1200)) nextlatency = eitr_latency_bulk; else if (packets > 35) nextlatency = eitr_latency_lowest; @@ -954,7 +986,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, break; default: nextlatency = eitr_latency_low; - device_printf(sc->dev, "Unexpected neweitr transition %d\n", + device_printf(sc->dev, + "Unexpected neweitr transition %d\n", nextlatency); break; } @@ -1463,7 +1496,8 @@ igc_allocate_pci_resources(if_ctx_t ctx) sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->memory == NULL) { - device_printf(dev, "Unable to allocate bus resource: memory\n"); + device_printf(dev, + "Unable to allocate bus resource: memory\n"); return (ENXIO); } sc->osdep.mem_bus_space_tag = rman_get_bustag(sc->memory); @@ -1494,9 +1528,12 @@ igc_if_msix_intr_assign(if_ctx_t ctx, int msix) for (i = 0; i < sc->rx_num_queues; i++, rx_que++, vector++) { rid = vector + 1; snprintf(buf, sizeof(buf), "rxq%d", i); - error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, IFLIB_INTR_RXTX, igc_msix_que, rx_que, rx_que->me, buf); + error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, + IFLIB_INTR_RXTX, igc_msix_que, rx_que, rx_que->me, buf); if (error) { - device_printf(iflib_get_dev(ctx), "Failed to allocate que int %d err: %d", i, error); + device_printf(iflib_get_dev(ctx), + "Failed to allocate que int %d err: %d", + i, error); sc->rx_num_queues = i + 1; goto fail; } @@ -1534,10 +1571,12 @@ igc_if_msix_intr_assign(if_ctx_t ctx, int msix) /* Link interrupt */ rid = rx_vectors + 1; - error = iflib_irq_alloc_generic(ctx, &sc->irq, rid, IFLIB_INTR_ADMIN, igc_msix_link, sc, 0, "aq"); + error = iflib_irq_alloc_generic(ctx, &sc->irq, rid, IFLIB_INTR_ADMIN, + igc_msix_link, sc, 0, "aq"); if (error) { - device_printf(iflib_get_dev(ctx), "Failed to register admin handler"); + device_printf(iflib_get_dev(ctx), + "Failed to register admin handler"); goto fail; } sc->linkvec = rx_vectors; @@ -1777,7 +1816,8 @@ igc_reset(if_ctx_t ctx) * response (Rx) to Ethernet PAUSE frames. * - High water mark should allow for at least two frames to be * received after sending an XOFF. - * - Low water mark works best when it is very near the high water mark. + * - Low water mark works best when it is very near the high water + * mark. * This allows the receiver to restart by sending XON when it has * drained a bit. Here we use an arbitrary value of 1500 which will * restart after one full frame is pulled from the buffer. There @@ -1957,7 +1997,8 @@ igc_setup_interface(if_ctx_t ctx) } static int -igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxqs, int ntxqsets) +igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, + int ntxqs, int ntxqsets) { struct igc_softc *sc = iflib_get_softc(ctx); if_softc_ctx_t scctx = sc->shared; @@ -1972,7 +2013,8 @@ igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxq if (!(sc->tx_queues = (struct igc_tx_queue *) malloc(sizeof(struct igc_tx_queue) * sc->tx_num_queues, M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "Unable to allocate queue memory\n"); + device_printf(iflib_get_dev(ctx), + "Unable to allocate queue memory\n"); return(ENOMEM); } @@ -1984,14 +2026,16 @@ igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxq que->me = txr->me = i; /* Allocate report status array */ - if (!(txr->tx_rsq = (qidx_t *) malloc(sizeof(qidx_t) * scctx->isc_ntxd[0], M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "failed to allocate rs_idxs memory\n"); + if (!(txr->tx_rsq = (qidx_t *) malloc(sizeof(qidx_t) * + scctx->isc_ntxd[0], M_DEVBUF, M_NOWAIT | M_ZERO))) { + device_printf(iflib_get_dev(ctx), + "failed to allocate rs_idxs memory\n"); error = ENOMEM; goto fail; } for (j = 0; j < scctx->isc_ntxd[0]; j++) txr->tx_rsq[j] = QIDX_INVALID; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ txr->tx_base = (struct igc_tx_desc *)vaddrs[i*ntxqs]; txr->tx_paddr = paddrs[i*ntxqs]; } @@ -2006,7 +2050,8 @@ fail: } static int -igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxqs, int nrxqsets) +igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, + int nrxqs, int nrxqsets) { struct igc_softc *sc = iflib_get_softc(ctx); int error = IGC_SUCCESS; @@ -2020,7 +2065,8 @@ igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxq if (!(sc->rx_queues = (struct igc_rx_queue *) malloc(sizeof(struct igc_rx_queue) * sc->rx_num_queues, M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "Unable to allocate queue memory\n"); + device_printf(iflib_get_dev(ctx), + "Unable to allocate queue memory\n"); error = ENOMEM; goto fail; } @@ -2032,7 +2078,7 @@ igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxq rxr->que = que; que->me = rxr->me = i; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ rxr->rx_base = (union igc_rx_desc_extended *)vaddrs[i*nrxqs]; rxr->rx_paddr = paddrs[i*nrxqs]; } @@ -2247,11 +2293,9 @@ igc_initialize_receive_unit(if_ctx_t ctx) #endif IGC_WRITE_REG(hw, IGC_RDLEN(i), - scctx->isc_nrxd[0] * sizeof(struct igc_rx_desc)); - IGC_WRITE_REG(hw, IGC_RDBAH(i), - (uint32_t)(bus_addr >> 32)); - IGC_WRITE_REG(hw, IGC_RDBAL(i), - (uint32_t)bus_addr); + scctx->isc_nrxd[0] * sizeof(struct igc_rx_desc)); + IGC_WRITE_REG(hw, IGC_RDBAH(i), (uint32_t)(bus_addr >> 32)); + IGC_WRITE_REG(hw, IGC_RDBAL(i), (uint32_t)bus_addr); IGC_WRITE_REG(hw, IGC_SRRCTL(i), srrctl); /* Setup the Head and Tail Descriptor Pointers */ IGC_WRITE_REG(hw, IGC_RDH(i), 0); @@ -2723,7 +2767,6 @@ igc_add_hw_stats(struct igc_softc *sc) } /* MAC stats get their own sub node */ - stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); @@ -2881,7 +2924,6 @@ igc_add_hw_stats(struct igc_softc *sc) "TSO Contexts Transmitted"); /* Interrupt Stats */ - int_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "interrupts", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Interrupt Statistics"); int_list = SYSCTL_CHILDREN(int_node); @@ -2917,7 +2959,8 @@ igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) space = " "; } - if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { + if (fw_ver->invm_major || fw_ver->invm_minor || + fw_ver->invm_img_type) { sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", space, fw_ver->invm_major, fw_ver->invm_minor, fw_ver->invm_img_type); From nobody Sun Nov 24 07:21:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xx0dc2vM5z5dg0k; Sun, 24 Nov 2024 07:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xx0dc1LWzz4gtd; Sun, 24 Nov 2024 07:21:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732432916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tZMlyjdiVC43AZfa+AskBnuo5NXMHUXBAy4aPqRe54=; b=djfiXQnr7ZPWKA6uVuN++WaeewRZdKkhXpcUIrQvf60uD2y7bQk+b0BWyT2upjnknfsVHe AB8fWQi6UOlnDHxApndOHDZa3+UrpwqEzTUEObl9lTga2iS+v1E4McEJWZ7NYOtlOyIBVX Boy93R5ziu9yXSl0rjp6VtA6LxOZFvOx4Y0nt5namv38XDSj6lW3KJIJMwi9fYMHHHVgLA DMXrMVuFyB86OJN0EM4C3rDJGDtTXpyCBWKyWHXZ3db5rwV+xI9yGnrVzlSIYtAOMTjhbE tBe8LdYTnB9qUkdBvl1aXEGYMhSZ6wq/Eurz+Dky3mynKXQa8Tzw+LrRWdVEeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732432916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tZMlyjdiVC43AZfa+AskBnuo5NXMHUXBAy4aPqRe54=; b=kbqjrM/0C/gzXI0yUV79mvQ2KmP8/rE1HlUhuw7GICH3A032H+plBlzXbnYwrCpxy0grOv eg1X/AjBgLcTDcwtRpHCFgTIOFHHOhIB3h1XgZnn4DRlK/+OLUjdsATamVkZpZB+F6fC+t sluEyeikG9gooIeRE+ESKvfop86zyjFQbFHJ60CKYZ327r5jRTMCQh/8SgZDU9jqw4i+8w irTED5GPtIJsRYKo4Jd2ATcEOnlaQjFSRWeMIYWL/6yU9E+ZfJWY3bVpSvJ7livy8U3U4r t2cFwWA7ABpsidg2VdThVHDIFqdz3zzH1Gjyqzv8g51HCMwUoMP/fNw6ldufMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732432916; a=rsa-sha256; cv=none; b=Vn4ze6ESXhHHL62uZKR/LZvb5aLPE/L4XTrmYSw3KHVCqaBkgO8HVPXordxpn6Hs7NecTj NIN3ubfTttsg24vU0JZ6NyFuwtUoRSUG+M2FGg5jKuzcFinQcCycZFsVoWxiU3WwpZd2J7 c79BEQ5fQMzBu/NQJcZSau48iJhD72YWqh23lfZuqCaLyPErbZE7DqpLQzKkh709Fp8/oH mJ/j6fItngXBvW4cB2zTmnq4aihTQv/HV/CYHtyP7utlIZ24liOLt3NNpfb6kgmqjzWSLi aCBSlrI6PFPT59niJnk9DoyPlEC6ufI3CGuvbQRLPCNnhaBnlOfhNonzaBUkUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xx0dc0xHszl2y; Sun, 24 Nov 2024 07:21:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO7LuIl086410; Sun, 24 Nov 2024 07:21:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO7Luqa086407; Sun, 24 Nov 2024 07:21:56 GMT (envelope-from git) Date: Sun, 24 Nov 2024 07:21:56 GMT Message-Id: <202411240721.4AO7Luqa086407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: c58d34dd67a4 - main - ixgbe: Style pass on FreeBSD part of driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c58d34dd67a419866ee50f152044e49cecbae261 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c58d34dd67a419866ee50f152044e49cecbae261 commit c58d34dd67a419866ee50f152044e49cecbae261 Author: Kevin Bowling AuthorDate: 2024-11-24 07:18:33 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 07:21:37 +0000 ixgbe: Style pass on FreeBSD part of driver Fix up some indentation and reflow long lines MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/ixgbe/if_bypass.c | 110 ++++--- sys/dev/ixgbe/if_fdir.c | 24 +- sys/dev/ixgbe/if_ix.c | 814 ++++++++++++++++++++++++++-------------------- sys/dev/ixgbe/if_ixv.c | 254 ++++++++------- sys/dev/ixgbe/if_sriov.c | 59 ++-- sys/dev/ixgbe/ix_txrx.c | 106 +++--- sys/dev/ixgbe/ixgbe.h | 8 +- 7 files changed, 765 insertions(+), 610 deletions(-) diff --git a/sys/dev/ixgbe/if_bypass.c b/sys/dev/ixgbe/if_bypass.c index 166150d75cc6..138b4e17db0d 100644 --- a/sys/dev/ixgbe/if_bypass.c +++ b/sys/dev/ixgbe/if_bypass.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "ixgbe.h" @@ -114,11 +114,11 @@ ixgbe_get_bypass_time(u32 *year, u32 *sec) static int ixgbe_bp_version(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int version = 0; - u32 cmd; + int error = 0; + static int version = 0; + u32 cmd; ixgbe_bypass_mutex_enter(sc); cmd = BYPASS_PAGE_CTL2 | BYPASS_WE; @@ -154,15 +154,14 @@ err: static int ixgbe_bp_set_state(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int state = 0; + int error = 0; + static int state = 0; /* Get the current state */ ixgbe_bypass_mutex_enter(sc); - error = hw->mac.ops.bypass_rw(hw, - BYPASS_PAGE_CTL0, &state); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &state); ixgbe_bypass_mutex_clear(sc); if (error != 0) return (error); @@ -216,10 +215,10 @@ out: static int ixgbe_bp_timeout(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int timeout = 0; + int error = 0; + static int timeout = 0; /* Get the current value */ ixgbe_bypass_mutex_enter(sc); @@ -259,10 +258,10 @@ ixgbe_bp_timeout(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_main_on(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int main_on = 0; + int error = 0; + static int main_on = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_on); @@ -301,10 +300,10 @@ ixgbe_bp_main_on(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_main_off(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int main_off = 0; + int error = 0; + static int main_off = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_off); @@ -343,10 +342,10 @@ ixgbe_bp_main_off(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_aux_on(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int aux_on = 0; + int error = 0; + static int aux_on = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_on); @@ -385,10 +384,10 @@ ixgbe_bp_aux_on(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_aux_off(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int aux_off = 0; + int error = 0; + static int aux_off = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_off); @@ -432,11 +431,11 @@ ixgbe_bp_aux_off(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_wd_set(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error, tmp; - static int timeout = 0; - u32 mask, arg; + int error, tmp; + static int timeout = 0; + u32 mask, arg; /* Get the current hardware value */ ixgbe_bypass_mutex_enter(sc); @@ -503,11 +502,11 @@ ixgbe_bp_wd_set(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - u32 sec, year; - int cmd, count = 0, error = 0; - int reset_wd = 0; + u32 sec, year; + int cmd, count = 0, error = 0; + int reset_wd = 0; error = sysctl_handle_int(oidp, &reset_wd, 0, req); if ((error) || (req->newptr == NULL)) @@ -549,14 +548,14 @@ ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_log(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; - struct ixgbe_hw *hw = &sc->hw; - u32 cmd, base, head; - u32 log_off, count = 0; - static int status = 0; - u8 data; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_hw *hw = &sc->hw; + u32 cmd, base, head; + u32 log_off, count = 0; + static int status = 0; + u8 data; struct ixgbe_bypass_eeprom eeprom[BYPASS_MAX_LOGS]; - int i, error = 0; + int i, error = 0; error = sysctl_handle_int(oidp, &status, 0, req); if ((error) || (req->newptr == NULL)) @@ -639,12 +638,15 @@ ixgbe_bp_log(SYSCTL_HANDLER_ARGS) BYPASS_LOG_EVENT_SHIFT; u8 action = eeprom[count].actions & BYPASS_LOG_ACTION_M; u16 day_mon[2][13] = { - {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, - {0, 31, 59, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, + 334, 365}, + {0, 31, 59, 91, 121, 152, 182, 213, 244, 274, 305, + 335, 366} }; char *event_str[] = {"unknown", "main on", "aux on", "main off", "aux off", "WDT", "user" }; - char *action_str[] = {"ignore", "normal", "bypass", "isolate",}; + char *action_str[] = + {"ignore", "normal", "bypass", "isolate",}; /* verify vaild data 1 - 6 */ if (event < BYPASS_EVENT_MAIN_ON || event > BYPASS_EVENT_USR) @@ -711,11 +713,11 @@ unlock_err: void ixgbe_bypass_init(struct ixgbe_softc *sc) { - struct ixgbe_hw *hw = &sc->hw; - device_t dev = sc->dev; - struct sysctl_oid *bp_node; + struct ixgbe_hw *hw = &sc->hw; + device_t dev = sc->dev; + struct sysctl_oid *bp_node; struct sysctl_oid_list *bp_list; - u32 mask, value, sec, year; + u32 mask, value, sec, year; if (!(sc->feat_cap & IXGBE_FEATURE_BYPASS)) return; @@ -723,13 +725,13 @@ ixgbe_bypass_init(struct ixgbe_softc *sc) /* First set up time for the hardware */ ixgbe_get_bypass_time(&year, &sec); - mask = BYPASS_CTL1_TIME_M - | BYPASS_CTL1_VALID_M - | BYPASS_CTL1_OFFTRST_M; + mask = BYPASS_CTL1_TIME_M | + BYPASS_CTL1_VALID_M | + BYPASS_CTL1_OFFTRST_M; - value = (sec & BYPASS_CTL1_TIME_M) - | BYPASS_CTL1_VALID - | BYPASS_CTL1_OFFTRST; + value = (sec & BYPASS_CTL1_TIME_M) | + BYPASS_CTL1_VALID | + BYPASS_CTL1_OFFTRST; ixgbe_bypass_mutex_enter(sc); hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL1, mask, value); diff --git a/sys/dev/ixgbe/if_fdir.c b/sys/dev/ixgbe/if_fdir.c index 6c52cc452987..37f45cb3808f 100644 --- a/sys/dev/ixgbe/if_fdir.c +++ b/sys/dev/ixgbe/if_fdir.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "ixgbe.h" @@ -51,9 +51,9 @@ ixgbe_init_fdir(struct ixgbe_softc *sc) void ixgbe_reinit_fdir(void *context) { - if_ctx_t ctx = context; + if_ctx_t ctx = context; struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_t ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); if (!(sc->feat_en & IXGBE_FEATURE_FDIR)) return; @@ -79,16 +79,16 @@ ixgbe_reinit_fdir(void *context) void ixgbe_atr(struct tx_ring *txr, struct mbuf *mp) { - struct ixgbe_softc *sc = txr->sc; - struct ix_queue *que; - struct ip *ip; - struct tcphdr *th; - struct udphdr *uh; - struct ether_vlan_header *eh; + struct ixgbe_softc *sc = txr->sc; + struct ix_queue *que; + struct ip *ip; + struct tcphdr *th; + struct udphdr *uh; + struct ether_vlan_header *eh; union ixgbe_atr_hash_dword input = {.dword = 0}; union ixgbe_atr_hash_dword common = {.dword = 0}; - int ehdrlen, ip_hlen; - u16 etype; + int ehdrlen, ip_hlen; + u16 etype; eh = mtod(mp, struct ether_vlan_header *); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index ad690fdccef4..e94e120e27f9 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "opt_inet.h" #include "opt_inet6.h" @@ -58,53 +58,94 @@ static const char ixgbe_driver_version[] = "4.0.1-k"; ************************************************************************/ static const pci_vendor_info_t ixgbe_vendor_info_array[] = { - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, "Intel(R) 82598EB AF (Dual Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, "Intel(R) 82598EB AF (Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, "Intel(R) 82598EB AT (CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, "Intel(R) 82598EB AT"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, "Intel(R) 82598EB AT2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, "Intel(R) 82598"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, "Intel(R) 82598EB AF DA (Dual Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, "Intel(R) 82598EB AT (Dual CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, "Intel(R) 82598EB AF (Dual Fiber LR)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, "Intel(R) 82598EB AF (Dual Fiber SR)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, "Intel(R) 82598EB LOM"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, "Intel(R) X520 82599 (KX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, "Intel(R) X520 82599 (KX4 Mezzanine)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, "Intel(R) X520 82599ES (SFI/SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, "Intel(R) X520 82599 (XAUI/BX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, "Intel(R) X520 82599 (Dual CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, "Intel(R) X520-T 82599 LOM"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS, "Intel(R) X520 82599 LS"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, "Intel(R) X520 82599 (Combined Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, "Intel(R) X520 82599 (Backplane w/FCoE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, "Intel(R) X520 82599 (Dual SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, "Intel(R) X520 82599 (Dual SFP+ w/FCoE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, "Intel(R) X520-1 82599EN (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, "Intel(R) X520-4 82599 (Quad SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, "Intel(R) X520-Q1 82599 (QSFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, "Intel(R) X540-AT2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, "Intel(R) X540-T1"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, "Intel(R) X550-T2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T1, "Intel(R) X550-T1"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, "Intel(R) X552 (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, "Intel(R) X552 (KX4 Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, "Intel(R) X552/X557-AT (10GBASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T, "Intel(R) X552 (1000BASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP, "Intel(R) X552 (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR, "Intel(R) X553 (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L, "Intel(R) X553 L (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP, "Intel(R) X553 (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP_N, "Intel(R) X553 N (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII, "Intel(R) X553 (1GbE SGMII)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII_L, "Intel(R) X553 L (1GbE SGMII)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_10G_T, "Intel(R) X553/X557-AT (10GBASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T, "Intel(R) X553 (1GbE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T_L, "Intel(R) X553 L (1GbE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_BYPASS, "Intel(R) X540-T2 (Bypass)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS, "Intel(R) X520 82599 (Bypass)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, + "Intel(R) 82598EB AF (Dual Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, + "Intel(R) 82598EB AF (Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, + "Intel(R) 82598EB AT (CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, + "Intel(R) 82598EB AT"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, + "Intel(R) 82598EB AT2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, "Intel(R) 82598"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, + "Intel(R) 82598EB AF DA (Dual Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, + "Intel(R) 82598EB AT (Dual CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, + "Intel(R) 82598EB AF (Dual Fiber LR)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, + "Intel(R) 82598EB AF (Dual Fiber SR)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, + "Intel(R) 82598EB LOM"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, + "Intel(R) X520 82599 (KX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, + "Intel(R) X520 82599 (KX4 Mezzanine)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, + "Intel(R) X520 82599ES (SFI/SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, + "Intel(R) X520 82599 (XAUI/BX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, + "Intel(R) X520 82599 (Dual CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, + "Intel(R) X520-T 82599 LOM"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS, + "Intel(R) X520 82599 LS"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, + "Intel(R) X520 82599 (Combined Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, + "Intel(R) X520 82599 (Backplane w/FCoE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, + "Intel(R) X520 82599 (Dual SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, + "Intel(R) X520 82599 (Dual SFP+ w/FCoE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, + "Intel(R) X520-1 82599EN (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, + "Intel(R) X520-4 82599 (Quad SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, + "Intel(R) X520-Q1 82599 (QSFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, + "Intel(R) X540-AT2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, "Intel(R) X540-T1"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, "Intel(R) X550-T2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T1, "Intel(R) X550-T1"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, + "Intel(R) X552 (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, + "Intel(R) X552 (KX4 Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, + "Intel(R) X552/X557-AT (10GBASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T, + "Intel(R) X552 (1000BASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP, + "Intel(R) X552 (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR, + "Intel(R) X553 (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L, + "Intel(R) X553 L (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP, + "Intel(R) X553 (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP_N, + "Intel(R) X553 N (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII, + "Intel(R) X553 (1GbE SGMII)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII_L, + "Intel(R) X553 L (1GbE SGMII)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_10G_T, + "Intel(R) X553/X557-AT (10GBASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T, + "Intel(R) X553 (1GbE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T_L, + "Intel(R) X553 L (1GbE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_BYPASS, + "Intel(R) X540-T2 (Bypass)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS, + "Intel(R) X520 82599 (Bypass)"), /* required last entry */ - PVID_END + PVID_END }; static void *ixgbe_register(device_t); @@ -127,8 +168,10 @@ static int ixgbe_if_mtu_set(if_ctx_t, uint32_t); static void ixgbe_if_crcstrip_set(if_ctx_t, int, int); static void ixgbe_if_multi_set(if_ctx_t); static int ixgbe_if_promisc_set(if_ctx_t, int); -static int ixgbe_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int ixgbe_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int ixgbe_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int ixgbe_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void ixgbe_if_queues_free(if_ctx_t); static void ixgbe_if_timer(if_ctx_t, uint16_t); static void ixgbe_if_update_admin_status(if_ctx_t); @@ -318,7 +361,8 @@ static int ixgbe_smart_speed = ixgbe_smart_speed_on; * but this allows it to be forced off for testing. */ static int ixgbe_enable_msix = 1; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, + 0, "Enable MSI-X interrupts"); /* @@ -336,12 +380,14 @@ SYSCTL_INT(_hw_ix, OID_AUTO, unsupported_sfp, CTLFLAG_RDTUN, * so we'll default to turning it off. */ static int ixgbe_enable_fdir = 0; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_fdir, CTLFLAG_RDTUN, &ixgbe_enable_fdir, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_fdir, CTLFLAG_RDTUN, &ixgbe_enable_fdir, + 0, "Enable Flow Director"); /* Receive-Side Scaling */ static int ixgbe_enable_rss = 1; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, + 0, "Enable Receive-Side Scaling (RSS)"); /* @@ -351,7 +397,8 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0, * traffic for that interrupt vector */ static int ixgbe_enable_aim = false; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, + 0, "Enable adaptive interrupt moderation"); #if 0 @@ -407,9 +454,9 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxqs, int ntxqsets) { struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_softc_ctx_t scctx = sc->shared; + if_softc_ctx_t scctx = sc->shared; struct ix_tx_queue *que; - int i, j, error; + int i, j, error; MPASS(sc->num_tx_queues > 0); MPASS(sc->num_tx_queues == ntxqsets); @@ -417,8 +464,8 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, /* Allocate queue structure memory */ sc->tx_queues = - (struct ix_tx_queue *)malloc(sizeof(struct ix_tx_queue) * ntxqsets, - M_IXGBE, M_NOWAIT | M_ZERO); + (struct ix_tx_queue *)malloc(sizeof(struct ix_tx_queue) * + ntxqsets, M_IXGBE, M_NOWAIT | M_ZERO); if (!sc->tx_queues) { device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n"); @@ -429,20 +476,20 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, struct tx_ring *txr = &que->txr; /* In case SR-IOV is enabled, align the index properly */ - txr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, - i); + txr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, i); txr->sc = que->sc = sc; /* Allocate report status array */ - txr->tx_rsq = (qidx_t *)malloc(sizeof(qidx_t) * scctx->isc_ntxd[0], M_IXGBE, M_NOWAIT | M_ZERO); + txr->tx_rsq = (qidx_t *)malloc(sizeof(qidx_t) * + scctx->isc_ntxd[0], M_IXGBE, M_NOWAIT | M_ZERO); if (txr->tx_rsq == NULL) { error = ENOMEM; goto fail; } for (j = 0; j < scctx->isc_ntxd[0]; j++) txr->tx_rsq[j] = QIDX_INVALID; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ txr->tail = IXGBE_TDT(txr->me); txr->tx_base = (union ixgbe_adv_tx_desc *)vaddrs[i]; txr->tx_paddr = paddrs[i]; @@ -474,9 +521,9 @@ static int ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxqs, int nrxqsets) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ix_rx_queue *que; - int i; + int i; MPASS(sc->num_rx_queues > 0); MPASS(sc->num_rx_queues == nrxqsets); @@ -485,7 +532,7 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, /* Allocate queue structure memory */ sc->rx_queues = (struct ix_rx_queue *)malloc(sizeof(struct ix_rx_queue)*nrxqsets, - M_IXGBE, M_NOWAIT | M_ZERO); + M_IXGBE, M_NOWAIT | M_ZERO); if (!sc->rx_queues) { device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n"); @@ -496,8 +543,7 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, struct rx_ring *rxr = &que->rxr; /* In case SR-IOV is enabled, align the index properly */ - rxr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, - i); + rxr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, i); rxr->sc = que->sc = sc; @@ -521,10 +567,10 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, static void ixgbe_if_queues_free(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ix_tx_queue *tx_que = sc->tx_queues; struct ix_rx_queue *rx_que = sc->rx_queues; - int i; + int i; if (tx_que != NULL) { for (i = 0; i < sc->num_tx_queues; i++, tx_que++) { @@ -552,10 +598,10 @@ static void ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) { struct ixgbe_hw *hw = &sc->hw; - u32 reta = 0, mrqc, rss_key[10]; - int queue_id, table_size, index_mult; - int i, j; - u32 rss_hash_config; + u32 reta = 0, mrqc, rss_key[10]; + int queue_id, table_size, index_mult; + int i, j; + u32 rss_hash_config; if (sc->feat_en & IXGBE_FEATURE_RSS) { /* Fetch the configured RSS key */ @@ -607,8 +653,8 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) if (i < 128) IXGBE_WRITE_REG(hw, IXGBE_RETA(i >> 2), reta); else - IXGBE_WRITE_REG(hw, IXGBE_ERETA((i >> 2) - 32), - reta); + IXGBE_WRITE_REG(hw, + IXGBE_ERETA((i >> 2) - 32), reta); reta = 0; } } @@ -626,12 +672,12 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) * and so we end up with a mix of 2-tuple and 4-tuple * traffic. */ - rss_hash_config = RSS_HASHTYPE_RSS_IPV4 - | RSS_HASHTYPE_RSS_TCP_IPV4 - | RSS_HASHTYPE_RSS_IPV6 - | RSS_HASHTYPE_RSS_TCP_IPV6 - | RSS_HASHTYPE_RSS_IPV6_EX - | RSS_HASHTYPE_RSS_TCP_IPV6_EX; + rss_hash_config = RSS_HASHTYPE_RSS_IPV4 | + RSS_HASHTYPE_RSS_TCP_IPV4 | + RSS_HASHTYPE_RSS_IPV6 | + RSS_HASHTYPE_RSS_TCP_IPV6 | + RSS_HASHTYPE_RSS_IPV6_EX | + RSS_HASHTYPE_RSS_TCP_IPV6_EX; } mrqc = IXGBE_MRQC_RSSEN; @@ -665,14 +711,14 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) static void ixgbe_initialize_receive_units(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_softc_ctx_t scctx = sc->shared; - struct ixgbe_hw *hw = &sc->hw; - if_t ifp = iflib_get_ifp(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); + if_softc_ctx_t scctx = sc->shared; + struct ixgbe_hw *hw = &sc->hw; + if_t ifp = iflib_get_ifp(ctx); struct ix_rx_queue *que; - int i, j; - u32 bufsz, fctrl, srrctl, rxcsum; - u32 hlreg; + int i, j; + u32 bufsz, fctrl, srrctl, rxcsum; + u32 hlreg; /* * Make sure receives are disabled while @@ -703,7 +749,7 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) /* Setup the Base and Length of the Rx Descriptor Ring */ for (i = 0, que = sc->rx_queues; i < sc->num_rx_queues; i++, que++) { struct rx_ring *rxr = &que->rxr; - u64 rdba = rxr->rx_paddr; + u64 rdba = rxr->rx_paddr; j = rxr->me; @@ -745,10 +791,10 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) } if (sc->hw.mac.type != ixgbe_mac_82598EB) { - u32 psrtype = IXGBE_PSRTYPE_TCPHDR - | IXGBE_PSRTYPE_UDPHDR - | IXGBE_PSRTYPE_IPV4HDR - | IXGBE_PSRTYPE_IPV6HDR; + u32 psrtype = IXGBE_PSRTYPE_TCPHDR | + IXGBE_PSRTYPE_UDPHDR | + IXGBE_PSRTYPE_IPV4HDR | + IXGBE_PSRTYPE_IPV6HDR; IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); } @@ -778,9 +824,9 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) static void ixgbe_initialize_transmit_units(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - struct ixgbe_hw *hw = &sc->hw; - if_softc_ctx_t scctx = sc->shared; + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &sc->hw; + if_softc_ctx_t scctx = sc->shared; struct ix_tx_queue *que; int i; @@ -821,7 +867,8 @@ ixgbe_initialize_transmit_units(if_ctx_t ctx) txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j)); break; default: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); + txctrl = + IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); break; } txctrl &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; @@ -830,7 +877,8 @@ ixgbe_initialize_transmit_units(if_ctx_t ctx) IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl); break; default: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), + txctrl); break; } @@ -875,12 +923,12 @@ ixgbe_register(device_t dev) static int ixgbe_if_attach_pre(if_ctx_t ctx) { - struct ixgbe_softc *sc; - device_t dev; - if_softc_ctx_t scctx; + struct ixgbe_softc *sc; + device_t dev; + if_softc_ctx_t scctx; struct ixgbe_hw *hw; - int error = 0; - u32 ctrl_ext; + int error = 0; + u32 ctrl_ext; size_t i; INIT_DEBUGOUT("ixgbe_attach: begin"); @@ -922,8 +970,10 @@ ixgbe_if_attach_pre(if_ctx_t ctx) goto err_pci; } - if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) { - device_printf(dev, "Firmware recovery mode detected. Limiting " + if (hw->mac.ops.fw_recovery_mode && + hw->mac.ops.fw_recovery_mode(hw)) { + device_printf(dev, + "Firmware recovery mode detected. Limiting " "functionality.\nRefer to the Intel(R) Ethernet Adapters " "and Devices User Guide for details on firmware recovery " "mode."); @@ -990,7 +1040,12 @@ ixgbe_if_attach_pre(if_ctx_t ctx) error = ixgbe_start_hw(hw); switch (error) { case IXGBE_ERR_EEPROM_VERSION: - device_printf(dev, "This device is a pre-production adapter/LOM. Please be aware there may be issues associated with your hardware.\nIf you are experiencing problems please contact your Intel or hardware representative who provided you with this hardware.\n"); + device_printf(dev, + "This device is a pre-production adapter/LOM. Please be" + " aware there may be issues associated with your" + " hardware.\nIf you are experiencing problems please" + " contact your Intel or hardware representative who" + " provided you with this hardware.\n"); break; case IXGBE_ERR_SFP_NOT_SUPPORTED: device_printf(dev, "Unsupported SFP+ Module\n"); @@ -1072,15 +1127,14 @@ static int ixgbe_if_attach_post(if_ctx_t ctx) { device_t dev; - struct ixgbe_softc *sc; + struct ixgbe_softc *sc; struct ixgbe_hw *hw; - int error = 0; + int error = 0; dev = iflib_get_dev(ctx); sc = iflib_get_softc(ctx); hw = &sc->hw; - if (sc->intr_type == IFLIB_INTR_LEGACY && (sc->feat_cap & IXGBE_FEATURE_LEGACY_IRQ) == 0) { device_printf(dev, "Device does not support legacy interrupts"); @@ -1089,10 +1143,11 @@ ixgbe_if_attach_post(if_ctx_t ctx) } /* Allocate multicast array memory. */ - sc->mta = malloc(sizeof(*sc->mta) * - MAX_NUM_MULTICAST_ADDRESSES, M_IXGBE, M_NOWAIT); + sc->mta = malloc(sizeof(*sc->mta) * MAX_NUM_MULTICAST_ADDRESSES, + M_IXGBE, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err; } @@ -1172,7 +1227,7 @@ static void ixgbe_check_wol_support(struct ixgbe_softc *sc) { struct ixgbe_hw *hw = &sc->hw; - u16 dev_caps = 0; + u16 dev_caps = 0; /* Find out WoL support for port */ sc->wol_support = hw->wol_enabled = 0; @@ -1196,7 +1251,7 @@ ixgbe_check_wol_support(struct ixgbe_softc *sc) static int ixgbe_setup_interface(if_ctx_t ctx) { - if_t ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); struct ixgbe_softc *sc = iflib_get_softc(ctx); INIT_DEBUGOUT("ixgbe_setup_interface: begin"); @@ -1222,7 +1277,7 @@ static uint64_t ixgbe_if_get_counter(if_ctx_t ctx, ift_counter cnt) { struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_t ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); switch (cnt) { case IFCOUNTER_IPACKETS: @@ -1256,10 +1311,9 @@ ixgbe_if_get_counter(if_ctx_t ctx, ift_counter cnt) static int ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - struct ixgbe_hw *hw = &sc->hw; - int i; - + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &sc->hw; + int i; if (hw->phy.ops.read_i2c_byte == NULL) return (ENXIO); @@ -1269,7 +1323,8 @@ ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) return (0); } /* ixgbe_if_i2c_req */ -/* ixgbe_if_needs_restart - Tell iflib when the driver needs to be reinitialized +/* ixgbe_if_needs_restart - Tell iflib when the driver needs to be + * reinitialized * @ctx: iflib context * @event: event code to check * @@ -1293,10 +1348,10 @@ ixgbe_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) static void ixgbe_add_media_types(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ixgbe_hw *hw = &sc->hw; - device_t dev = iflib_get_dev(ctx); - u64 layer; + device_t dev = iflib_get_dev(ctx); + u64 layer; layer = sc->phy_layer = ixgbe_get_supported_physical_layer(hw); @@ -1416,10 +1471,10 @@ ixgbe_is_sfp(struct ixgbe_hw *hw) static void ixgbe_config_link(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ixgbe_hw *hw = &sc->hw; - u32 autoneg, err = 0; - bool sfp, negotiate; + u32 autoneg, err = 0; + bool sfp, negotiate; sfp = ixgbe_is_sfp(hw); @@ -1480,11 +1535,11 @@ ixgbe_config_link(if_ctx_t ctx) static void ixgbe_update_stats_counters(struct ixgbe_softc *sc) { - struct ixgbe_hw *hw = &sc->hw; + struct ixgbe_hw *hw = &sc->hw; struct ixgbe_hw_stats *stats = &sc->stats.pf; - u32 missed_rx = 0, bprc, lxon, lxoff, total; - u32 lxoffrxc; - u64 total_missed_rx = 0; + u32 missed_rx = 0, bprc, lxon, lxoff, total; + u32 lxoffrxc; + u64 total_missed_rx = 0; stats->crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS); stats->illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC); @@ -1612,8 +1667,8 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc) * - jabber count. */ IXGBE_SET_IERRORS(sc, stats->crcerrs + stats->illerrc + - stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + stats->roc + - stats->rjc); + stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + + stats->roc + stats->rjc); } /* ixgbe_update_stats_counters */ /************************************************************************ @@ -1624,19 +1679,19 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc) static void ixgbe_add_hw_stats(struct ixgbe_softc *sc) { - device_t dev = iflib_get_dev(sc->ctx); - struct ix_rx_queue *rx_que; - struct ix_tx_queue *tx_que; + device_t dev = iflib_get_dev(sc->ctx); + struct ix_rx_queue *rx_que; + struct ix_tx_queue *tx_que; struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); - struct sysctl_oid *tree = device_get_sysctl_tree(dev); + struct sysctl_oid *tree = device_get_sysctl_tree(dev); struct sysctl_oid_list *child = SYSCTL_CHILDREN(tree); - struct ixgbe_hw_stats *stats = &sc->stats.pf; - struct sysctl_oid *stat_node, *queue_node; + struct ixgbe_hw_stats *stats = &sc->stats.pf; + struct sysctl_oid *stat_node, *queue_node; struct sysctl_oid_list *stat_list, *queue_list; - int i; + int i; #define QUEUE_NAME_LEN 32 - char namebuf[QUEUE_NAME_LEN]; + char namebuf[QUEUE_NAME_LEN]; /* Driver Statistics */ SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", @@ -1646,7 +1701,8 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", CTLFLAG_RD, &sc->link_irq, "Link MSI-X IRQ Handled"); - for (i = 0, tx_que = sc->tx_queues; i < sc->num_tx_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->num_tx_queues; + i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, @@ -1655,10 +1711,12 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", CTLTYPE_UINT | CTLFLAG_RD, txr, 0, - ixgbe_sysctl_tdh_handler, "IU", "Transmit Descriptor Head"); + ixgbe_sysctl_tdh_handler, "IU", + "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", CTLTYPE_UINT | CTLFLAG_RD, txr, 0, - ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); + ixgbe_sysctl_tdt_handler, "IU", + "Transmit Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tx_packets", @@ -1666,7 +1724,8 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) "Queue Packets Transmitted"); } - for (i = 0, rx_que = sc->rx_queues; i < sc->num_rx_queues; i++, rx_que++) { + for (i = 0, rx_que = sc->rx_queues; i < sc->num_rx_queues; + i++, rx_que++) { *** 2198 LINES SKIPPED *** From nobody Sun Nov 24 07:28:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xx0n36BRYz5dgRq; Sun, 24 Nov 2024 07:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xx0n35fZMz4hll; Sun, 24 Nov 2024 07:28:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732433303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2icgXbiIqT2k33PYLBLfo7hqjlAzaqb0Ntlr+aftnyE=; b=iIwobV0Kbl8KB5n3GtJ9oC2VIebIDN3IoxFiD3R6imgJleAQQf1YWclK1JvKjbPWJ79T3r PLQZymRvBHgMamUJQfFhjVZsrdQFScTZ2pBNlFFrEnJcCSBFpGrO0aHdMV1g32M7BWSB6p IrSYyyWQYvY6/Q/DF6cIR2woNbuFhQrWMfItvZNVl1zq9Q/2vLR0QxFb0gSGaQEKHIE5Ea ijKTdVYO9GG8Cm2lMXh3NTvACO2Q8VEtMok3w7nSq319wRQbuuflfzEWvNDVXsimehg4n/ rVvf7498xNZuMTjROiZKLOakO6Iig9Yyg7+MQDH2hOpLZA2TiA1OAersmBYOpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732433303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2icgXbiIqT2k33PYLBLfo7hqjlAzaqb0Ntlr+aftnyE=; b=LRIhlWXC3oggXKB/B3OWIy9ZS5155AW62j6vCbzeTlbijjZgbczeik/M8Pt7xyxUaGz4I1 6yVqcM+E+p5gFQjB7j+uVt1KMpLhKcgwDEEwNRviAAaqVPQIY1Kv59jR1Rd2bWYCOWleHC xHoOxTZjX5CFkFwm/tQgI+EjwiBHUTWrOMZ6ni3t4RuyXRT5Y1BFx1T6EAt0QmWpygvIlZ IAmoOQRAzHs5sIo1ehV3bECMKMSF3KoBDZtQw85sFVCHLms6xy9GlNbofCq1G3pXRwr/zD Rg2eXU7FifQ7sTTgb0mvcdfmSHG4vBaZRvAXCc5RwkgNilWfzetMw/SJBveFiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732433303; a=rsa-sha256; cv=none; b=Hs5g2kkyqn39269biAoOyvjWTy+fvu2qSW8k6wy7GV2E0cS64VrBt+XjhW/4e0whfPnHtE uXKE3+TdSdkocBKGJ8HTfJIPYsrtZOrvI98DWYXShaBo+cGH3jZyKUapbnBSHR1kI1GerD cz9fSLokr7hMBXJ/2Ioi22Nc7ufS94DqkOSzcBWT0qmSKUiHHV56xN2Wj0rve6qJa7IYDh 4H3FjwbsrNvqBiSoSjPSot/4ZPKfWW8Ogiv1LPKDE4sGjFIbyreujAH4Hfd5AuShQJvc2f EFu3Vl9aUgQEJl1RRrVKYXrTJQDdu2oALj/tYO2jG9+Zqd2KIqB9yjQcBLIg9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xx0n35FM4zlDk; Sun, 24 Nov 2024 07:28:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO7SNqG088630; Sun, 24 Nov 2024 07:28:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO7SNYW088627; Sun, 24 Nov 2024 07:28:23 GMT (envelope-from git) Date: Sun, 24 Nov 2024 07:28:23 GMT Message-Id: <202411240728.4AO7SNYW088627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: c7fb7b5d9fcd - main - igc: Style pass igc_txrx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7fb7b5d9fcd1fc67794228820aa54df388d47b4 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c7fb7b5d9fcd1fc67794228820aa54df388d47b4 commit c7fb7b5d9fcd1fc67794228820aa54df388d47b4 Author: Kevin Bowling AuthorDate: 2024-11-24 07:27:12 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 07:27:12 +0000 igc: Style pass igc_txrx Fix up indentation and reflow long lines. MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/igc/igc_txrx.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/sys/dev/igc/igc_txrx.c b/sys/dev/igc/igc_txrx.c index 59f4725388ee..92ba81c79c58 100644 --- a/sys/dev/igc/igc_txrx.c +++ b/sys/dev/igc/igc_txrx.c @@ -97,15 +97,19 @@ igc_dump_rs(struct igc_softc *sc) cur = txr->tx_rsq[rs_cidx]; status = txr->tx_base[cur].upper.fields.status; if (!(status & IGC_TXD_STAT_DD)) - printf("qid[%d]->tx_rsq[%d]: %d clear ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[%d]: %d clear ", + qid, rs_cidx, cur); } else { rs_cidx = (rs_cidx-1)&(ntxd-1); cur = txr->tx_rsq[rs_cidx]; - printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", + qid, rs_cidx, cur); } - printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); + printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, + txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { - if (txr->tx_base[i].upper.fields.status & IGC_TXD_STAT_DD) + if (txr->tx_base[i].upper.fields.status & + IGC_TXD_STAT_DD) printf("%d set ", i); } printf("\n"); @@ -138,14 +142,15 @@ igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, break; default: panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(pi->ipi_etype)); + __func__, ntohs(pi->ipi_etype)); break; } TXD = (struct igc_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; /* This is used in the transmit desc in encap */ - paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - pi->ipi_tcp_hlen; + paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - + pi->ipi_tcp_hlen; /* VLAN MACLEN IPLEN */ if (pi->ipi_mflags & M_VLANTAG) { @@ -180,8 +185,8 @@ igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, * **********************************************************************/ static int -igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, - uint32_t *olinfo_status) +igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, + uint32_t *cmd_type_len, uint32_t *olinfo_status) { struct igc_adv_tx_context_desc *TXD; uint32_t vlan_macip_lens, type_tucmd_mlhl; @@ -275,7 +280,7 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = olinfo_status = 0; /* Basic descriptor defines */ cmd_type_len = (IGC_ADVTXD_DTYP_DATA | - IGC_ADVTXD_DCMD_IFCS | IGC_ADVTXD_DCMD_DEXT); + IGC_ADVTXD_DCMD_IFCS | IGC_ADVTXD_DCMD_DEXT); if (pi->ipi_mflags & M_VLANTAG) cmd_type_len |= IGC_ADVTXD_DCMD_VLE; @@ -324,9 +329,9 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) static void igc_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) { - struct igc_softc *sc = arg; - struct igc_tx_queue *que = &sc->tx_queues[txqid]; - struct tx_ring *txr = &que->txr; + struct igc_softc *sc = arg; + struct igc_tx_queue *que = &sc->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; IGC_WRITE_REG(&sc->hw, IGC_TDT(txr->me), pidx); } @@ -370,12 +375,13 @@ igc_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) MPASS(delta > 0); processed += delta; - prev = cur; + prev = cur; rs_cidx = (rs_cidx + 1) & (ntxd-1); - if (rs_cidx == txr->tx_rs_pidx) + if (rs_cidx == txr->tx_rs_pidx) break; cur = txr->tx_rsq[rs_cidx]; - status = ((union igc_adv_tx_desc *)&txr->tx_base[cur])->wb.status; + status = + ((union igc_adv_tx_desc *)&txr->tx_base[cur])->wb.status; } while ((status & IGC_TXD_STAT_DD)); txr->tx_rs_cidx = rs_cidx; @@ -411,7 +417,8 @@ igc_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct igc_softc *sc = arg; struct igc_rx_queue *que = &sc->rx_queues[rxqid]; @@ -477,7 +484,8 @@ igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) MPASS ((staterr & IGC_RXD_STAT_DD) != 0); len = le16toh(rxd->wb.upper.length); - ptype = le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK; + ptype = + le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK; ri->iri_len += len; rxr->rx_bytes += ri->iri_len; @@ -558,7 +566,8 @@ igc_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) (ptype & IGC_RXDADV_PKTTYPE_SCTP) != 0)) { ri->iri_csum_flags |= CSUM_SCTP_VALID; } else { - ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; ri->iri_csum_data = htons(0xffff); } } From nobody Sun Nov 24 07:40:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xx13411ghz5dhCB; Sun, 24 Nov 2024 07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xx1340DYfz4jbh; Sun, 24 Nov 2024 07: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=1732434032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=haD4cIlZmDywIAUOuviGu/74dHVyV1qsl79+Ui16uV4=; b=OtMaw8/msv3VeOTP4MuXS9DWbd8y39ZIWEQkNaBndDp7Mr7RPS4wDn8Rn/916N1sXOEx2d f3RlgCatbLkGi8DJxd7VjLwFS3uwnw0F6paerGyfI3ND8lKJlOKU8RE5rKFH+6/5wfv5tH 9PZpwy/8EKtmVtEFTeQ07CuGEOsikIpjgYkGVGpTu6lMf9qdKrq5TTqGJJJBgv1J/y0jKO yHVTwt1XLWow1fQFOuCp3hghf3MPskpd1Q5TJKP6qesbfaXk4iW0FEzFlkvz6ezHUdobTO Fj5vF9BpSPEzhwmTbJymGPe0+vJFTKMrR0GRKec+x7JYtbw5x4eoHfoG1lEcoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732434032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=haD4cIlZmDywIAUOuviGu/74dHVyV1qsl79+Ui16uV4=; b=WbVezli14f+MI9k5HSCTByLevntiDJHentzzC7dN/5bKsIXBaDP9N96dB0J3fo88QsJqJn n3RKF/VeFMVj2xqwgTbL7UmwVlcwp7ppdifO9aPkuwCc+NfwaAauPaIV3Pd4ABLFvseCrJ i3XxwQKIktzJiAjvTkyIC0CcOm4LecLB/bihZsRGTK0C0tCUpzHMC4GO3vyQ/K6zWddqND eQzA1A2IKXqKEYamoaVxxnebq/eH/upr288jDNjJtIFl6eXoNwrGpOmwpbGLbCdNExZ1O+ Acm2vc/55eT+GETAn9a8ibxwyeDk9If8WP0EwnuuKJvS1Xct3Hnen5jowFmdbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732434032; a=rsa-sha256; cv=none; b=sqI+0/AMg68fprkQFv4pYSgFYv4rGdhcSQ/2XcX0mfemou35lkjLxRFJFsxN/szTVBS7Fo 42dn81Ypdgmqx6i1aArdLm5OBBxyNKtm6z6BQIuejVY0FSIJEvwgYL3pK6t3gWuNUMVPPi +cZv1RbDaYMMeIHp3RKeeAq66JRiPBgIy1KZwtDovUOtMubBaDzVwzc19qqpeF+NSGdD85 c0f0uG3b1ht+5u9AXLCEtbmmqr4MzB/6ziptv/TNhpK1wk4gobujAGfJA9RY6ETb77/AeB xKQB2VSG63OPymOlW2YJWZ3jPU1D1uXA4VQt2v/weguaEMemkhJauhFAgcaZ6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xx1336xjZzlWF; Sun, 24 Nov 2024 07:40:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO7eVQg016207; Sun, 24 Nov 2024 07:40:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO7eVHk016204; Sun, 24 Nov 2024 07:40:31 GMT (envelope-from git) Date: Sun, 24 Nov 2024 07:40:31 GMT Message-Id: <202411240740.4AO7eVHk016204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 7390daf87c53 - main - e1000: Style txrx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7390daf87c53073da5e74b2d73ac7320c1a44475 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=7390daf87c53073da5e74b2d73ac7320c1a44475 commit 7390daf87c53073da5e74b2d73ac7320c1a44475 Author: Kevin Bowling AuthorDate: 2024-11-24 07:39:43 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 07:39:43 +0000 e1000: Style txrx Fix up indentation and reflow long lines. MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/e1000/em_txrx.c | 55 ++++++++++++++++++++++++++++++------------------ sys/dev/e1000/if_em.c | 3 ++- sys/dev/e1000/igb_txrx.c | 44 ++++++++++++++++++++++---------------- 3 files changed, 62 insertions(+), 40 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 65ffcdfd67f6..edbe0f8ab546 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -108,16 +108,19 @@ em_dump_rs(struct e1000_softc *sc) cur = txr->tx_rsq[rs_cidx]; status = txr->tx_base[cur].upper.fields.status; if (!(status & E1000_TXD_STAT_DD)) - printf("qid[%d]->tx_rsq[%d]: %d clear ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[%d]: %d clear ", + qid, rs_cidx, cur); } else { rs_cidx = (rs_cidx-1)&(ntxd-1); cur = txr->tx_rsq[rs_cidx]; - printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", + qid, rs_cidx, cur); } printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { - if (txr->tx_base[i].upper.fields.status & E1000_TXD_STAT_DD) + if (txr->tx_base[i].upper.fields.status & + E1000_TXD_STAT_DD) printf("%d set ", i); } printf("\n"); @@ -143,8 +146,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen + pi->ipi_tcp_hlen; *txd_lower = (E1000_TXD_CMD_DEXT | /* Extended descr type */ - E1000_TXD_DTYP_D | /* Data descr type */ - E1000_TXD_CMD_TSE); /* Do TSE on this packet */ + E1000_TXD_DTYP_D | /* Data descr type */ + E1000_TXD_CMD_TSE); /* Do TSE on this packet */ cur = pi->ipi_pidx; TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; @@ -157,7 +160,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, switch(pi->ipi_etype) { case ETHERTYPE_IP: /* IP and/or TCP header checksum calculation and insertion. */ - *txd_upper = (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; + *txd_upper = + (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; TXD->lower_setup.ip_fields.ipcse = htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); @@ -183,7 +187,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, TXD->upper_setup.tcp_fields.tucss = pi->ipi_ehdrlen + pi->ipi_ip_hlen; TXD->upper_setup.tcp_fields.tucse = 0; TXD->upper_setup.tcp_fields.tucso = - pi->ipi_ehdrlen + pi->ipi_ip_hlen + offsetof(struct tcphdr, th_sum); + pi->ipi_ehdrlen + pi->ipi_ip_hlen + + offsetof(struct tcphdr, th_sum); /* * Payload size per packet w/o any headers. @@ -211,8 +216,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, if (++cur == scctx->isc_ntxd[0]) { cur = 0; } - DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, - pi->ipi_pidx, cur); + DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", + __FUNCTION__, pi->ipi_pidx, cur); return (cur); } @@ -277,8 +282,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, * ipcse - End offset for header checksum calculation. * ipcso - Offset of place to put the checksum. * - * We set ipcsX values regardless of IP version to work around HW issues - * and ipcse must be 0 for IPv6 per "PCIe GbE SDM 2.5" page 61. + * We set ipcsX values regardless of IP version to work around HW + * issues and ipcse must be 0 for IPv6 per "PCIe GbE SDM 2.5" page 61. * IXSM controls whether it's inserted. */ TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; @@ -296,7 +301,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, * tucse - End offset for payload checksum calculation. * tucso - Offset of place to put the checksum. */ - if (csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP6_TCP | CSUM_IP6_UDP)) { + if (csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP6_TCP | + CSUM_IP6_UDP)) { uint8_t tucso; *txd_upper |= E1000_TXD_POPTS_TXSM << 8; @@ -326,7 +332,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, cur = 0; } DPRINTF(iflib_get_dev(sc->ctx), - "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", + "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x" + " hdr_len=%d cmd=%x\n", csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); return (cur); } @@ -372,7 +379,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) i = em_tso_setup(sc, pi, &txd_upper, &txd_lower); tso_desc = true; } else if (csum_flags & EM_CSUM_OFFLOAD) { - i = em_transmit_checksum_setup(sc, pi, &txd_upper, &txd_lower); + i = em_transmit_checksum_setup(sc, pi, &txd_upper, + &txd_lower); } if (pi->ipi_mflags & M_VLANTAG) { @@ -414,7 +422,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) /* Now make the sentinel */ ctxd = &txr->tx_base[i]; ctxd->buffer_addr = htole64(seg_addr + seg_len); - ctxd->lower.data = htole32(cmd | txd_lower | TSO_WORKAROUND); + ctxd->lower.data = + htole32(cmd | txd_lower | TSO_WORKAROUND); ctxd->upper.data = htole32(txd_upper); pidx_last = i; if (++i == scctx->isc_ntxd[0]) @@ -429,7 +438,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = i; if (++i == scctx->isc_ntxd[0]) i = 0; - DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", + DPRINTF(iflib_get_dev(sc->ctx), + "pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); } } @@ -449,7 +459,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) } ctxd->lower.data |= htole32(E1000_TXD_CMD_EOP | txd_flags); DPRINTF(iflib_get_dev(sc->ctx), - "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); + "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", + first, pidx_last, i); pi->ipi_new_pidx = i; /* Sent data accounting for AIM */ @@ -508,8 +519,8 @@ em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) delta += ntxd; MPASS(delta > 0); DPRINTF(iflib_get_dev(sc->ctx), - "%s: cidx_processed=%u cur=%u clear=%d delta=%d\n", - __FUNCTION__, prev, cur, clear, delta); + "%s: cidx_processed=%u cur=%u clear=%d delta=%d\n", + __FUNCTION__, prev, cur, clear, delta); processed += delta; prev = cur; @@ -699,7 +710,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) if (scctx->isc_capenable & IFCAP_VLAN_HWTAGGING && status & E1000_RXD_STAT_VP) { - ri->iri_vtag = le16toh(rxd->special & E1000_RXD_SPC_VLAN_MASK); + ri->iri_vtag = + le16toh(rxd->special & E1000_RXD_SPC_VLAN_MASK); ri->iri_flags |= M_VLANTAG; } @@ -789,7 +801,8 @@ em_receive_checksum(uint16_t status, uint8_t errors, if_rxd_info_t ri) return; /* If there is a layer 3 or 4 error we are done */ - if (__predict_false(errors & (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) + if (__predict_false(errors & (E1000_RXD_ERR_IPE | + E1000_RXD_ERR_TCPE))) return; /* IP Checksum Good */ diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 0978432fd329..aed97d076a5e 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3188,7 +3188,8 @@ em_reset(if_ctx_t ctx) * response (Rx) to Ethernet PAUSE frames. * - High water mark should allow for at least two frames to be * received after sending an XOFF. - * - Low water mark works best when it is very near the high water mark + * - Low water mark works best when it is very near the high water + mark. * This allows the receiver to restart by sending XON when it has * drained a bit. Here we use an arbitrary value of 1500 which will * restart after one full frame is pulled from the buffer. There diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c index 8b663d7e6d3e..568d84807173 100644 --- a/sys/dev/e1000/igb_txrx.c +++ b/sys/dev/e1000/igb_txrx.c @@ -102,14 +102,15 @@ igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, break; default: panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(pi->ipi_etype)); + __func__, ntohs(pi->ipi_etype)); break; } - TXD = (struct e1000_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; + TXD = (struct e1000_adv_tx_context_desc *)&txr->tx_base[pi->ipi_pidx]; /* This is used in the transmit desc in encap */ - paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - pi->ipi_tcp_hlen; + paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - + pi->ipi_tcp_hlen; /* VLAN MACLEN IPLEN */ if (pi->ipi_mflags & M_VLANTAG) { @@ -147,8 +148,8 @@ igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, * **********************************************************************/ static int -igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, - uint32_t *olinfo_status) +igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, + uint32_t *cmd_type_len, uint32_t *olinfo_status) { struct e1000_adv_tx_context_desc *TXD; struct e1000_softc *sc = txr->sc; @@ -164,7 +165,7 @@ igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, *olinfo_status |= pi->ipi_len << E1000_ADVTXD_PAYLEN_SHIFT; /* Now ready a context descriptor */ - TXD = (struct e1000_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; + TXD = (struct e1000_adv_tx_context_desc *)&txr->tx_base[pi->ipi_pidx]; /* ** In advanced descriptors the vlan tag must @@ -246,8 +247,8 @@ igb_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = olinfo_status = 0; /* Basic descriptor defines */ - cmd_type_len = (E1000_ADVTXD_DTYP_DATA | - E1000_ADVTXD_DCMD_IFCS | E1000_ADVTXD_DCMD_DEXT); + cmd_type_len = (E1000_ADVTXD_DTYP_DATA | E1000_ADVTXD_DCMD_IFCS | + E1000_ADVTXD_DCMD_DEXT); if (pi->ipi_mflags & M_VLANTAG) cmd_type_len |= E1000_ADVTXD_DCMD_VLE; @@ -300,9 +301,9 @@ igb_isc_txd_encap(void *arg, if_pkt_info_t pi) static void igb_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) { - struct e1000_softc *sc = arg; - struct em_tx_queue *que = &sc->tx_queues[txqid]; - struct tx_ring *txr = &que->txr; + struct e1000_softc *sc = arg; + struct em_tx_queue *que = &sc->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; E1000_WRITE_REG(&sc->hw, E1000_TDT(txr->me), pidx); } @@ -351,7 +352,8 @@ igb_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) if (rs_cidx == txr->tx_rs_pidx) break; cur = txr->tx_rsq[rs_cidx]; - status = ((union e1000_adv_tx_desc *)&txr->tx_base[cur])->wb.status; + status = ((union e1000_adv_tx_desc *) + &txr->tx_base[cur])->wb.status; } while ((status & E1000_TXD_STAT_DD)); txr->tx_rs_cidx = rs_cidx; @@ -387,7 +389,8 @@ igb_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -igb_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +igb_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct e1000_softc *sc = arg; struct em_rx_queue *que = &sc->rx_queues[rxqid]; @@ -453,7 +456,8 @@ igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) MPASS ((staterr & E1000_RXD_STAT_DD) != 0); len = le16toh(rxd->wb.upper.length); - ptype = le32toh(rxd->wb.lower.lo_dword.data) & IGB_PKTTYPE_MASK; + ptype = + le32toh(rxd->wb.lower.lo_dword.data) & IGB_PKTTYPE_MASK; ri->iri_len += len; rxr->rx_bytes += ri->iri_len; @@ -462,7 +466,8 @@ igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) eop = ((staterr & E1000_RXD_STAT_EOP) == E1000_RXD_STAT_EOP); /* Make sure bad packets are discarded */ - if (eop && ((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0)) { + if (eop && + ((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0)) { sc->dropped_pkts++; ++rxr->rx_discarded; return (EBADMSG); @@ -524,7 +529,8 @@ igb_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) return; /* If there is a layer 3 or 4 error we are done */ - if (__predict_false(errors & (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) + if (__predict_false(errors & + (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) return; /* IP Checksum Good */ @@ -535,11 +541,13 @@ igb_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) if (__predict_true(status & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))) { /* SCTP header present */ - if (__predict_false((ptype & E1000_RXDADV_PKTTYPE_ETQF) == 0 && + if (__predict_false( + (ptype & E1000_RXDADV_PKTTYPE_ETQF) == 0 && (ptype & E1000_RXDADV_PKTTYPE_SCTP) != 0)) { ri->iri_csum_flags |= CSUM_SCTP_VALID; } else { - ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; ri->iri_csum_data = htons(0xffff); } } From nobody Sun Nov 24 08:34:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xx2FM2sp4z5dm0T; Sun, 24 Nov 2024 08:34: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xx2FM1wj9z4nfQ; Sun, 24 Nov 2024 08:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732437271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ldL+m44Ld9jBtprTRlCeDtTRj8q83laQdUwVlLAmPKU=; b=dzUtFXNE9dKOQoGa+bIwUH7ZalfRpdW8LQXOFFpdeLMmI7c72UxDclpxdiE4dsR5ZSOu0+ cfR0AjEbtbQvu+Zj7gwoEd4YB118nSIGM2J+GYC2gDZIy/DrhI6/bDOirs35t5xWlt1zt3 UhtiLADFXpaCKzCeV+EX3NYnxru5e8ef1DG8qqmdhDIO/C3i7lzIJxqvAcWfV0T21Kauoq Ek8cita9wMuw+eZ8DuvA7nYcGpM7hj87YnFGI5VKw4dDbiJCWAUDw/SC1jwN6kJ1DGDll5 iTbjMk0YT0QmhQml+oioI5pUG0nIe9CIYs70+EE/Uu9ssY3IzTRBCUHrRxinfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732437271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ldL+m44Ld9jBtprTRlCeDtTRj8q83laQdUwVlLAmPKU=; b=EI9rKj3QRwYQUpT/sNE5T1MWdnlEGVMTD+qXnIKFG4X5jItcXOGew673CJ1j99BnrrcpPb bkfQ/Oogtu0D2t+nfGNGGM6O8Ir9iyeQ7CrEAG7PkKrUikkACmIg8/HZ8iC8yi1VSRDD+b ZIq8KuKOVtHEMhKY01xfTLdwz5eE+7srNvfJaBaMulpaUsrvuB1FTFT91AEjS1wIKnK9zo q16ZfSNrSxEit1IF/6HwGQRmgv0eVFaMv0K4tN7KYP09klO/yQ5qxbS1pgFFDczDvxlyv6 hH+FtpLbs3Ar8mtwUj4NNGQnPMYIlrowez3VABW8Hg4wXcajIyJYzh0CVqrpfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732437271; a=rsa-sha256; cv=none; b=qVmNljXc11rK9S1ETu9kP1Iw6+7OXaTQ6XE4ztHWoEiQ2sSQ7sWLDWeHVzOijCzS89vxsn zs8U7Gh5SxUsK/9yTvBq301qTcfGEnEBJolHbfuPZ+3jrHjKl7KFTDv4D46SyTJxPYHrx6 YWJH5cVI/ALtxML0itWvXJZgcXXimyW3U+I08IJ5YrrbEMZhGGpoyRypYhrhJrcQA0AJ3S sA9eGU83XhP5LvQDsyJ/xJ8NJ6mp58NNMzel3tPEwDwUI6vQHOr8FiP8hG4xy4g7VGZeFs KtjMeh3uOnkezWCP2PP/nk2tRpKIqBCQJyw2SWMxw5dkmqzScGlA1Y4S0yVddw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xx2FM18qkznH4; Sun, 24 Nov 2024 08:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO8YVMs017316; Sun, 24 Nov 2024 08:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO8YVqw017313; Sun, 24 Nov 2024 08:34:31 GMT (envelope-from git) Date: Sun, 24 Nov 2024 08:34:31 GMT Message-Id: <202411240834.4AO8YVqw017313@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: a46c121db4a5 - main - netpfil tests: make dummynet tests more robust List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a46c121db4a50748eae0a32bed786f68349c95f5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a46c121db4a50748eae0a32bed786f68349c95f5 commit a46c121db4a50748eae0a32bed786f68349c95f5 Author: Kristof Provost AuthorDate: 2024-11-23 18:29:02 +0000 Commit: Kristof Provost CommitDate: 2024-11-24 08:34:09 +0000 netpfil tests: make dummynet tests more robust These tests try to verify that packet prioritisation works as expected. This is inherently a statistical process, and is difficuly to measure automatically. Run the tests more times and accept more failures. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/common/dummynet.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/sys/netpfil/common/dummynet.sh b/tests/sys/netpfil/common/dummynet.sh index 126240f00384..b77b2df84010 100644 --- a/tests/sys/netpfil/common/dummynet.sh +++ b/tests/sys/netpfil/common/dummynet.sh @@ -320,7 +320,7 @@ queue_body() # TCP should still just pass fails=0 - for i in `seq 1 3` + for i in `seq 1 5` do result=$(dd if=/dev/zero bs=1024 count=2000 | timeout 3 nc -w 5 -N 192.0.2.2 7 | wc -c) if [ $result -ne 2048000 ]; @@ -329,7 +329,7 @@ queue_body() fails=$(( ${fails} + 1 )) fi done - if [ ${fails} -gt 0 ]; + if [ ${fails} -gt 2 ]; then atf_fail "We failed prioritisation ${fails} times" fi @@ -348,7 +348,7 @@ queue_body() sleep 1 fails=0 - for i in `seq 1 3` + for i in `seq 1 5` do result=$(dd if=/dev/zero bs=1024 count=2000 | timeout 3 nc -w 5 -N 192.0.2.2 7 | wc -c) if [ $result -ne 2048000 ]; @@ -429,7 +429,7 @@ queue_v6_body() # TCP should still just pass fails=0 - for i in `seq 1 3` + for i in `seq 1 5` do result=$(dd if=/dev/zero bs=1024 count=1000 | timeout 3 nc -w 5 -N 2001:db8:42::2 7 | wc -c) if [ $result -ne 1024000 ]; @@ -438,7 +438,7 @@ queue_v6_body() fails=$(( ${fails} + 1 )) fi done - if [ ${fails} -gt 0 ]; + if [ ${fails} -gt 2 ]; then atf_fail "We failed prioritisation ${fails} times" fi @@ -454,7 +454,7 @@ queue_v6_body() "pass in proto icmp6 dnqueue (0, 100)" fails=0 - for i in `seq 1 3` + for i in `seq 1 5` do result=$(dd if=/dev/zero bs=1024 count=1000 | timeout 3 nc -w 5 -N 2001:db8:42::2 7 | wc -c) if [ $result -ne 1024000 ]; From nobody Sun Nov 24 09:06:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xx2y91PvZz5dnxS; Sun, 24 Nov 2024 09:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xx2y90q1Mz4qVS; Sun, 24 Nov 2024 09:06:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732439185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=97bC/iPijzZ8LQdivS+KFqNvBmR/VmoaqyP3LE/EsHk=; b=AFvehQrUVDoV0oEiVzV+YwNVHxxkWMz4o8apg8K2WV/tAh/NF2tailpgcoxNMrI64iYyCJ 8+u0KtKbWR8LGsWd9zYATka0cF2jtdy0fpTtZ1XK4QwrRryj+Vbyl9gwMsY1SDtmWATUG3 BpNdqxE4vHgLS51uTYbP9TMPWBdI1UloehAU7vCJSXUawgteM8y4Vkg6enQDh8W0KQHP8u v2Oc9cB3RlTQQ372zf5ZJbRve4UGn91m6Lda3ZCT59R0epwAvFfdJEgXxjRi5zIOwCzYib KXql7us9NHbFI8VO3w/PBxhvem5BCrWKFZ9EFznYg2yFmsBhDxJGpSbZ3DRqaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732439185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=97bC/iPijzZ8LQdivS+KFqNvBmR/VmoaqyP3LE/EsHk=; b=a34OXOtpCcXjIq5wv+YIzVe3y1dZ9PnXs+ZhdTmV793Xhp2kjIKcAZSqV92cJ4Dj4dYWWZ DkJ/5CkMJ3SflEMT25HHn1P7I5kamoAfb5PM61u7U/3yYDHnHt6iLgOLnJVPoLE1dPkYH1 2ZsxNS7yhV3g09bJTnlfaQjORdkyoCM/rFwKGqfMyza0UZhwq8s7R/MV9gr5aTJvDsuOdw iABLdmHPV81lM6z2LzKPlX+pyGiFUj7jISfbdsMhGykLBCUitwbQdJjZXbSWkscZaOBSs5 cbxz/mGHU8RvUUyGrpg5lJJhdXmDwaLDY8kaH+oVTXhzk2s9RFSHqqgh5gdgrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732439185; a=rsa-sha256; cv=none; b=ZxtM2iuSYgNVYvwKBXe89eRHo4zFa0CgitsLlK7oLdT/SmqCF25rCayr9aqf1Yb64Lv1zn VI7qyFJ6uJ+HkXqRAMcKEj8rBE19ZAtx7CtfjCcudqOaRmvhMFGnELCt2sUsfkdB8COC9D stqqANigCYj91ZMTbDFVWyJUnl0bYeRI1Rm/Uk3HhOE3ASEudeuMtWm7MqOFm8W0ed1zJE ztWczQo+EWCNu5oggmEiNbW6XFcn9OhwdyKbB9YLu88eJqq2h46VLx6FSLZ5jknqlE/2Bc Mw/KZHRjIS2PjREj4tajR0CODARduc6Ukryvhxvy+6tn4tvz+bhrNIXtA9l0NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xx2y90Pq7znXK; Sun, 24 Nov 2024 09:06:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO96OUX074356; Sun, 24 Nov 2024 09:06:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO96MWU074339; Sun, 24 Nov 2024 09:06:22 GMT (envelope-from git) Date: Sun, 24 Nov 2024 09:06:22 GMT Message-Id: <202411240906.4AO96MWU074339@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: 718519f4efc7 - main - zfs: merge openzfs/zfs@d0a91b9f8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 718519f4efc71096422fc71dab90b2a3369871ff Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=718519f4efc71096422fc71dab90b2a3369871ff commit 718519f4efc71096422fc71dab90b2a3369871ff Merge: a46c121db4a5 d0a91b9f88a4 Author: Martin Matuska AuthorDate: 2024-11-24 09:04:11 +0000 Commit: Martin Matuska CommitDate: 2024-11-24 09:04:51 +0000 zfs: merge openzfs/zfs@d0a91b9f8 Notable upstream pull request merges: #16643 -multiple Change rangelock handling in FreeBSD's zfs_getpages() #16697 46c4f2ce0 dsl_dataset: put IO-inducing frees on the pool deadlist #16740 -multiple BRT: Rework structures and locks to be per-vdev #16743 a60ed3822 L2ARC: Move different stats updates earlier #16758 8dc452d90 Fix some nits in zfs_getpages() #16759 534688948 Remove hash_elements_max accounting from DBUF and ARC #16766 9a81484e3 ZAP: Reduce leaf array and free chunks fragmentation #16773 457f8b76e BRT: More optimizations after per-vdev splitting #16782 0ca82c568 L2ARC: Stop rebuild before setting spa_final_txg #16785 d76d79fd2 zio: Avoid sleeping in the I/O path #16791 ae1d11882 BRT: Clear bv_entcount_dirty on destroy #16796 b3b0ce64d FreeBSD: Lock vnode in zfs_ioctl() #16797 d0a91b9f8 FreeBSD: Reduce copy_file_range() source lock to shared Obtained from: OpenZFS OpenZFS commit: d0a91b9f88a47316158508bf304a61baa8c99c10 sys/contrib/openzfs/.mailmap | 2 + sys/contrib/openzfs/AUTHORS | 4 + sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/arc_summary | 5 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 34 +- sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 4 +- .../openzfs/include/os/freebsd/spl/sys/debug.h | 4 +- .../openzfs/include/os/freebsd/spl/sys/vnode.h | 2 - .../openzfs/include/os/linux/spl/sys/debug.h | 4 +- sys/contrib/openzfs/include/sys/arc.h | 1 + sys/contrib/openzfs/include/sys/arc_impl.h | 1 + sys/contrib/openzfs/include/sys/brt_impl.h | 106 +- sys/contrib/openzfs/include/sys/spa.h | 1 + sys/contrib/openzfs/include/sys/spa_impl.h | 6 +- sys/contrib/openzfs/include/sys/zap.h | 7 +- sys/contrib/openzfs/man/man8/zpool-remove.8 | 36 +- sys/contrib/openzfs/man/man8/zpool.8 | 34 + .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 81 +- .../openzfs/module/os/linux/zfs/zpl_super.c | 13 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 2 +- sys/contrib/openzfs/module/zfs/arc.c | 66 +- sys/contrib/openzfs/module/zfs/brt.c | 1138 ++++++++------------ sys/contrib/openzfs/module/zfs/dbuf.c | 19 +- sys/contrib/openzfs/module/zfs/dsl_dataset.c | 28 +- sys/contrib/openzfs/module/zfs/spa.c | 2 + sys/contrib/openzfs/module/zfs/spa_misc.c | 17 +- sys/contrib/openzfs/module/zfs/zap_leaf.c | 106 +- sys/contrib/openzfs/module/zfs/zap_micro.c | 68 +- sys/contrib/openzfs/module/zfs/zio.c | 27 +- sys/contrib/openzfs/module/zfs/zio_checksum.c | 6 + sys/contrib/openzfs/module/zfs/zio_compress.c | 4 - sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in | 1 + .../openzfs/tests/zfs-tests/cmd/getversion.c | 6 +- .../tests/functional/bclone/bclone_prop_sync.ksh | 8 +- .../cli_root/zpool_status/zpool_status_008_pos.ksh | 10 +- sys/modules/zfs/zfs_config.h | 6 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 37 files changed, 956 insertions(+), 907 deletions(-) diff --cc sys/contrib/openzfs/.mailmap index 5aa1eef464d9,000000000000..64e02681e37d mode 100644,000000..100644 --- a/sys/contrib/openzfs/.mailmap +++ b/sys/contrib/openzfs/.mailmap @@@ -1,214 -1,0 +1,216 @@@ +# This file maps the name+email seen in a commit back to a canonical +# name+email. Git will replace the commit name/email with the canonical version +# wherever it sees it. +# +# If there is a commit in the history with a "wrong" name or email, list it +# here. If you regularly commit with an alternate name or email address and +# would like to ensure that you are always listed consistently in the repo, add +# mapping here. +# +# On the other hand, if you use multiple names or email addresses legitimately +# (eg you use a company email address for your paid OpenZFS work, and a +# personal address for your evening side projects), then don't map one to the +# other here. +# +# The most common formats are: +# +# Canonical Name +# Canonical Name +# Canonical Name Commit Name +# +# See https://git-scm.com/docs/gitmailmap for more info. + +# These maps are making names consistent where they have varied but the email +# address has never changed. In most cases, the full name is in the +# Signed-off-by of a commit with a matching author. +Ahelenia Ziemiańska +Ahelenia Ziemiańska +Alex John +Andreas Dilger +Andrew Walker +Benedikt Neuffer +Chengfei Zhu +ChenHao Lu <18302010006@fudan.edu.cn> +Chris Lindee +Colm Buckley +Crag Wang +Damian Szuberski +Daniel Kolesa +Debabrata Banerjee +Finix Yan +Gaurav Kumar +Gionatan Danti +Glenn Washburn +Gordan Bobic +Gregory Bartholomew +hedong zhang +Ilkka Sovanto +InsanePrawn +Jason Cohen +Jason Harmening +Jeremy Faulkner +Jinshan Xiong +John Poduska +Justin Scholz +Ka Ho Ng +Kash Pande +Kay Pedersen +KernelOfTruth +Liu Hua +Liu Qing +loli10K +Mart Frauenlob +Matthias Blankertz +Michael Gmelin +Olivier Mazouffre +Piotr Kubaj +Quentin Zdanis +Roberto Ricci +Rob Norris +Rob Norris +Sam Lunt +Sanjeev Bagewadi ++Sebastian Wuerl +Stoiko Ivanov +Tamas TEVESZ +WHR +Yanping Gao +Youzhong Yang + +# Signed-off-by: overriding Author: +Ryan ++Sietse +Qiuhao Chen +Yuxin Wang +Zhenlei Huang + +# Commits from strange places, long ago +Brian Behlendorf +Brian Behlendorf +Brian Behlendorf +Brian Behlendorf +Brian Behlendorf +Herb Wartens +Ned Bass +Tulsi Jain + +# Mappings from Github no-reply addresses +ajs124 +Alek Pinchuk +Alexander Lobakin +Alexey Smirnoff +Allen Holl <65494904+allen-4@users.noreply.github.com> +Alphan Yılmaz +Ameer Hamza <106930537+ixhamza@users.noreply.github.com> +Andrew J. Hesford <48421688+ahesford@users.noreply.github.com>> +Andrew Sun +Aron Xu +Arun KV <65647132+arun-kv@users.noreply.github.com> +Ben Wolsieffer +bernie1995 <42413912+bernie1995@users.noreply.github.com> +Bojan Novković <72801811+bnovkov@users.noreply.github.com> +Boris Protopopov +Brad Forschinger +Brandon Thetford +buzzingwires <131118055+buzzingwires@users.noreply.github.com> +Cedric Maunoury <38213715+cedricmaunoury@users.noreply.github.com> +Charles Suh +Chris Peredun <126915832+chrisperedun@users.noreply.github.com> +Dacian Reece-Stremtan <35844628+dacianstremtan@users.noreply.github.com> +Damian Szuberski <30863496+szubersk@users.noreply.github.com> +Daniel Hiepler <32984777+heeplr@users.noreply.github.com> +Daniel Kobras +Daniel Reichelt +David Quigley +Dennis R. Friedrichsen <31087738+dennisfriedrichsen@users.noreply.github.com> +Dex Wood +DHE +Dmitri John Ledkov <19779+xnox@users.noreply.github.com> +Dries Michiels <32487486+driesmp@users.noreply.github.com> +Edmund Nadolski <137826107+ednadolski-ix@users.noreply.github.com> +Érico Nogueira <34201958+ericonr@users.noreply.github.com> +Fedor Uporov <60701163+fuporovvStack@users.noreply.github.com> +Felix Dörre +Felix Neumärker <34678034+xdch47@users.noreply.github.com> +Finix Yan +Gaurav Kumar +George Gaydarov +Georgy Yakovlev <168902+gyakovlev@users.noreply.github.com> +Gerardwx +Gian-Carlo DeFazio +Giuseppe Di Natale +Hajo Möller +Harry Mallon <1816667+hjmallon@users.noreply.github.com> +Hiếu Lê +Jake Howard +James Cowgill +Jaron Kent-Dobias +Jason King +Jeff Dike <52420226+jdike@users.noreply.github.com> +Jitendra Patidar <53164267+jsai20@users.noreply.github.com> +João Carlos Mendes Luís +John Eismeier <32205350+jeis2497052@users.noreply.github.com> +John L. Hammond <35266395+jhammond-intel@users.noreply.github.com> +John-Mark Gurney +John Ramsden +Jonathon Fernyhough <559369+jonathonf@users.noreply.github.com> +Jose Luis Duran +Justin Hibbits +Kevin Greene <104801862+kxgreene@users.noreply.github.com> +Kevin Jin <33590050+jxdking@users.noreply.github.com> +Kevin P. Fleming +Krzysztof Piecuch <3964215+pikrzysztof@users.noreply.github.com> +Kyle Evans +Laurențiu Nicola +loli10K +Lorenz Hüdepohl +Luís Henriques <73643340+lumigch@users.noreply.github.com> +Marcin Skarbek +Matt Fiddaman <81489167+matt-fidd@users.noreply.github.com> +Maxim Filimonov +Max Zettlmeißl <6818198+maxz@users.noreply.github.com> +Michael Niewöhner +Michael Zhivich <33133421+mzhivich@users.noreply.github.com> +MigeljanImeri <78048439+MigeljanImeri@users.noreply.github.com> +Mo Zhou <5723047+cdluminate@users.noreply.github.com> +Nick Mattis +omni <79493359+omnivagant@users.noreply.github.com> +Pablo Correa Gómez <32678034+pablofsf@users.noreply.github.com> +Paul Zuchowski <31706010+PaulZ-98@users.noreply.github.com> +Peter Ashford +Peter Dave Hello +Peter Wirdemo <4224155+pewo@users.noreply.github.com> +Petros Koutoupis +Ping Huang <101400146+hpingfs@users.noreply.github.com> +Piotr P. Stefaniak +Richard Allen <33836503+belperite@users.noreply.github.com> +Rich Ercolani <214141+rincebrain@users.noreply.github.com> +Rick Macklem <64620010+rmacklem@users.noreply.github.com> +Rob Wing <98866084+rob-wing@users.noreply.github.com> +Roman Strashkin +Ryan Hirasaki <4690732+RyanHir@users.noreply.github.com> +Samuel Wycliffe J <115969550+samwyc@users.noreply.github.com> +Samuel Wycliffe <50765275+npc203@users.noreply.github.com> +Savyasachee Jha +Scott Colby +Sean Eric Fagan +Spencer Kinny <30333052+Spencer-Kinny@users.noreply.github.com> +Srikanth N S <75025422+nssrikanth@users.noreply.github.com> +Stefan Lendl <1321542+stfl@users.noreply.github.com> +Thomas Bertschinger <101425190+bertschinger@users.noreply.github.com> +Thomas Geppert +Tim Crawford +Todd Seidelmann <18294602+seidelma@users.noreply.github.com> +Tom Matthews +Tony Perkins <62951051+tony-zfs@users.noreply.github.com> +Torsten Wörtwein +Tulsi Jain +Václav Skála <33496485+vaclavskala@users.noreply.github.com> +Vaibhav Bhanawat <88050553+vaibhav-delphix@users.noreply.github.com> +Violet Purcell <66446404+vimproved@users.noreply.github.com> +Vipin Kumar Verma <75025470+vermavipinkumar@users.noreply.github.com> +Wolfgang Bumiller +XDTG <35128600+XDTG@users.noreply.github.com> +xtouqh <72357159+xtouqh@users.noreply.github.com> +Yuri Pankov <113725409+yuripv@users.noreply.github.com> +Yuri Pankov <82001006+yuripv@users.noreply.github.com> diff --cc sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h index 8df28071252d,10cb3663d4fb..c7ade2564757 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h @@@ -101,11 -99,8 +101,9 @@@ vn_flush_cached_data(vnode_t *vp, boole zfs_vmobject_wlock(vp->v_object); vm_object_page_clean(vp->v_object, 0, 0, flags); zfs_vmobject_wunlock(vp->v_object); - VOP_UNLOCK(vp); } } +#endif #define vn_exists(vp) do { } while (0) #define vn_invalid(vp) do { } while (0) diff --cc sys/modules/zfs/zfs_config.h index fc6d0a0839ba,000000000000..1959b7cab014 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,831 -1,0 +1,831 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* __assign_str() has one arg */ +/* #undef HAVE_1ARG_ASSIGN_STR */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* backtrace() is available */ +/* #undef HAVE_BACKTRACE */ + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_file_open_by_path() exists */ +/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* bdev_nr_bytes() is available */ +/* #undef HAVE_BDEV_NR_BYTES */ + +/* bdev_open_by_path() exists */ +/* #undef HAVE_BDEV_OPEN_BY_PATH */ + +/* bdev_release() exists */ +/* #undef HAVE_BDEV_RELEASE */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* __blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */ + +/* __blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */ + +/* blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() exists */ +/* #undef HAVE_BLKDEV_PUT */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* struct queue_limits has a features field */ +/* #undef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_disk() exists and takes 2 args */ +/* #undef HAVE_BLK_ALLOC_DISK_2ARG */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue hardware context is cached in struct request */ +/* #undef HAVE_BLK_MQ_RQ_HCTX */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* backing_dev_info is available through queue gendisk */ +/* #undef HAVE_BLK_QUEUE_DISK_BDI */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* 3-arg dequeue_signal() takes a type argument */ +/* #undef HAVE_DEQUEUE_SIGNAL_3ARG_TYPE */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the 'execvpe' function. */ +#define HAVE_EXECVPE 1 + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* file->f_version exists */ +/* #undef HAVE_FILE_F_VERSION */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* GENHD_FL_EXT_DEVT flag is available */ +/* #undef HAVE_GENHD_FL_EXT_DEVT */ + +/* GENHD_FL_NO_PART flag is available */ +/* #undef HAVE_GENHD_FL_NO_PART */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the 'gettid' function. */ +/* #undef HAVE_GETTID */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* mnt_idmap does not have user_namespace */ +/* #undef HAVE_IDMAP_NO_USERNS */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_atime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_ATIME */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* inode_get_mtime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_MTIME */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_atime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_ATIME_TO_TS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_mtime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_MTIME_TO_TS */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_get_pages() is available */ +/* #undef HAVE_IOV_ITER_GET_PAGES */ + +/* iov_iter_get_pages2() is available */ +/* #undef HAVE_IOV_ITER_GET_PAGES2 */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* Define to 1 if you have the 'issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel defines intptr_t */ +/* #undef HAVE_KERNEL_INTPTR_T */ + +/* kernel has kernel_neon_* functions */ +/* #undef HAVE_KERNEL_NEON */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* strlcpy() exists */ +/* #undef HAVE_KERNEL_STRLCPY */ + +/* kernel has kmap_local_page */ +/* #undef HAVE_KMAP_LOCAL_PAGE */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [unwind] */ +/* #undef HAVE_LIBUNWIND */ + +/* libunwind has unw_get_elf_filename */ +/* #undef HAVE_LIBUNWIND_ELF */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* building against unsupported kernel version */ +/* #undef HAVE_LINUX_EXPERIMENTAL */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Define to 1 if you have the 'mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* PG_error flag is available */ +/* #undef HAVE_MM_PAGE_FLAG_ERROR */ + +/* page_mapping() is available */ +/* #undef HAVE_MM_PAGE_MAPPING */ + +/* page_size() is available */ +/* #undef HAVE_MM_PAGE_SIZE */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* proc_handler ctl_table arg is const */ +/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_sz exists */ +/* #undef HAVE_REGISTER_SYSCTL_SZ */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* shrinker_register exists */ +/* #undef HAVE_SHRINKER_REGISTER */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the 'strerror_l' function. */ +#define HAVE_STRERROR_L 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the 'strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* have super_block s_shrink */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ + +/* have super_block s_shrink pointer */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the 'udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + *** 168 LINES SKIPPED *** From nobody Sun Nov 24 14:28:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxB6R2CB3z5fBCG; Sun, 24 Nov 2024 14:29:03 +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 4XxB6R01wSz40k6; Sun, 24 Nov 2024 14:29:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id F9sKtyxBlMArNFDbitQJm4; Sun, 24 Nov 2024 14:29:02 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id FDbgtEatKE0IVFDbhtDA3Z; Sun, 24 Nov 2024 14:29:01 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=cI9DsUeN c=1 sm=1 tr=0 ts=6743382d a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=IkcTkHD0fZMA:10 a=VlfZXiiP6vEA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=voI1QXGuHuIWVWvOBhQA:9 a=7HvbkwkcuuyCew05:21 a=QEXdDO2ut3YA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 070BAD3; Sun, 24 Nov 2024 06:29:00 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id D814033D; Sun, 24 Nov 2024 06:28:59 -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: Martin Matuska cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 718519f4efc7 - main - zfs: merge openzfs/zfs@d0a91b9f8 In-reply-to: <202411240906.4AO96MWU074339@gitrepo.freebsd.org> References: <202411240906.4AO96MWU074339@gitrepo.freebsd.org> Comments: In-reply-to Martin Matuska message dated "Sun, 24 Nov 2024 09:06: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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Date: Sun, 24 Nov 2024 06:28:59 -0800 Message-Id: <20241124142859.D814033D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfFbMbcNpuArUVfNXrfkOlRtMrj7diBcc+nBTNiGy/f/UuTPtW1Mp4++SfqIRv5QKHJA5jPjsRci9AfJyeLAuRCXVdkodZHLyOhl91rD8m8r3zc1bfqhA 553qwI7pk5ADFu2KqjYSH2HE6OJrArqM99KmEBRvtChJv0BNlGnbAASXeNXLb/9KxDe0spX9aYcZOIHUOulFILFVLZQb/x7Ek6AUezz54oU8IKOr82364xl7 +YlDFJB8WnZlRczeo2CiC8Kww+BfKYU8QB8F/osSHkKEabtaXrUrFXG+4pTaanvdvAVw15bL3Un7sDYu9BFicgfTMaMTQheXZbfJJh/ZojE= 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: 4XxB6R01wSz40k6 X-Spamd-Bar: ---- In message <202411240906.4AO96MWU074339@gitrepo.freebsd.org>, Martin Matuska wr ites: > The branch main has been updated by mm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=718519f4efc71096422fc71dab90b2a3 > 369871ff > > commit 718519f4efc71096422fc71dab90b2a3369871ff > Merge: a46c121db4a5 d0a91b9f88a4 > Author: Martin Matuska > AuthorDate: 2024-11-24 09:04:11 +0000 > Commit: Martin Matuska > CommitDate: 2024-11-24 09:04:51 +0000 > > zfs: merge openzfs/zfs@d0a91b9f8 > > Notable upstream pull request merges: > #16643 -multiple Change rangelock handling in FreeBSD's zfs_getpages() > #16697 46c4f2ce0 dsl_dataset: put IO-inducing frees on the pool deadlist > #16740 -multiple BRT: Rework structures and locks to be per-vdev > #16743 a60ed3822 L2ARC: Move different stats updates earlier > #16758 8dc452d90 Fix some nits in zfs_getpages() > #16759 534688948 Remove hash_elements_max accounting from DBUF and ARC > #16766 9a81484e3 ZAP: Reduce leaf array and free chunks fragmentation > #16773 457f8b76e BRT: More optimizations after per-vdev splitting > #16782 0ca82c568 L2ARC: Stop rebuild before setting spa_final_txg > #16785 d76d79fd2 zio: Avoid sleeping in the I/O path > #16791 ae1d11882 BRT: Clear bv_entcount_dirty on destroy > #16796 b3b0ce64d FreeBSD: Lock vnode in zfs_ioctl() > #16797 d0a91b9f8 FreeBSD: Reduce copy_file_range() source lock to shared > > Obtained from: OpenZFS > OpenZFS commit: d0a91b9f88a47316158508bf304a61baa8c99c10 > > sys/contrib/openzfs/.mailmap | 2 + > sys/contrib/openzfs/AUTHORS | 4 + > sys/contrib/openzfs/META | 2 +- > sys/contrib/openzfs/cmd/arc_summary | 5 +- > sys/contrib/openzfs/cmd/zdb/zdb.c | 34 +- > sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 4 +- > .../openzfs/include/os/freebsd/spl/sys/debug.h | 4 +- > .../openzfs/include/os/freebsd/spl/sys/vnode.h | 2 - > .../openzfs/include/os/linux/spl/sys/debug.h | 4 +- > sys/contrib/openzfs/include/sys/arc.h | 1 + > sys/contrib/openzfs/include/sys/arc_impl.h | 1 + > sys/contrib/openzfs/include/sys/brt_impl.h | 106 +- > sys/contrib/openzfs/include/sys/spa.h | 1 + > sys/contrib/openzfs/include/sys/spa_impl.h | 6 +- > sys/contrib/openzfs/include/sys/zap.h | 7 +- > sys/contrib/openzfs/man/man8/zpool-remove.8 | 36 +- > sys/contrib/openzfs/man/man8/zpool.8 | 34 + > .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 81 +- > .../openzfs/module/os/linux/zfs/zpl_super.c | 13 +- > sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 2 +- > sys/contrib/openzfs/module/zfs/arc.c | 66 +- > sys/contrib/openzfs/module/zfs/brt.c | 1138 ++++++++---------- > -- > sys/contrib/openzfs/module/zfs/dbuf.c | 19 +- > sys/contrib/openzfs/module/zfs/dsl_dataset.c | 28 +- > sys/contrib/openzfs/module/zfs/spa.c | 2 + > sys/contrib/openzfs/module/zfs/spa_misc.c | 17 +- > sys/contrib/openzfs/module/zfs/zap_leaf.c | 106 +- > sys/contrib/openzfs/module/zfs/zap_micro.c | 68 +- > sys/contrib/openzfs/module/zfs/zio.c | 27 +- > sys/contrib/openzfs/module/zfs/zio_checksum.c | 6 + > sys/contrib/openzfs/module/zfs/zio_compress.c | 4 - > sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in | 1 + > .../openzfs/tests/zfs-tests/cmd/getversion.c | 6 +- > .../tests/functional/bclone/bclone_prop_sync.ksh | 8 +- > .../cli_root/zpool_status/zpool_status_008_pos.ksh | 10 +- > sys/modules/zfs/zfs_config.h | 6 +- > sys/modules/zfs/zfs_gitrev.h | 2 +- > 37 files changed, 956 insertions(+), 907 deletions(-) > This commit results in the following panic. Fatal trap 12: page fault while in kernel mode^M cpuid = 1; apic id = 01^M fault virtual address = 0x8^M fault code = supervisor write data, page not present^M instruction pointer = 0x20:0xffffffff81502f4c^M stack pointer = 0x28:0xfffffe008ea11680^M frame pointer = 0x28:0xfffffe008ea11680^M code segment = base 0x0, limit 0xfffff, type 0x1b^M = DPL 0, pres 1, long 1, def32 0, gran 1^M processor eflags = interrupt enabled, resume, IOPL = 0^M current process = 65 (zpool)^M rdi: fffffe00927d75f8 rsi: fffffe00927e9000 rdx: fffffe00927e9000^M rcx: 0000000000000000 r8: 0000000000000010 r9: fffffe000ec6a640^M rax: 0000000000000000 rbx: fffffe00927e9000 rbp: fffffe008ea11680^M r10: 0000000000000000 r11: 00000000c052d227 r12: fffff8000625ad10^M r13: 0000000000000000 r14: 0000000000000000 r15: 0000000000000000^M trap number = 12^M panic: page fault^M cpuid = 1^M time = 1732429270^M KDB: stack backtrace:^M db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe008ea11370^M vpanic() at vpanic+0x136/frame 0xfffffe008ea114a0^M panic() at panic+0x43/frame 0xfffffe008ea11500^M trap_fatal() at trap_fatal+0x40b/frame 0xfffffe008ea11560^M trap_pfault() at trap_pfault+0x46/frame 0xfffffe008ea115b0^M calltrap() at calltrap+0x8/frame 0xfffffe008ea115b0^M --- trap 0xc, rip = 0xffffffff81502f4c, rsp = 0xfffffe008ea11680, rbp = 0xfffffe 008ea11680 ---^M list_insert_head() at list_insert_head+0x1c/frame 0xfffffe008ea11680^M vdev_add_child() at vdev_add_child+0xd2/frame 0xfffffe008ea116c0^M vdev_alloc() at vdev_alloc+0x9ab/frame 0xfffffe008ea11760^M spa_config_parse() at spa_config_parse+0x22/frame 0xfffffe008ea117b0^M spa_config_parse() at spa_config_parse+0x9c/frame 0xfffffe008ea11800^M spa_config_parse() at spa_config_parse+0x9c/frame 0xfffffe008ea11850^M spa_ld_mos_init() at spa_ld_mos_init+0x299/frame 0xfffffe008ea118d0^M spa_ld_mos_with_trusted_config() at spa_ld_mos_with_trusted_config+0x18/fram e 0x fffffe008ea11900^M spa_load() at spa_load+0xa7/frame 0xfffffe008ea11a70^M spa_tryimport() at spa_tryimport+0x1d9/frame 0xfffffe008ea11af0^M zfs_ioc_pool_tryimport() at zfs_ioc_pool_tryimport+0x3a/frame 0xfffffe008ea11b20 ^M zfsdev_ioctl_common() at zfsdev_ioctl_common+0x48d/frame 0xfffffe008ea11bc0^M zfsdev_ioctl() at zfsdev_ioctl+0xee/frame 0xfffffe008ea11bf0^M devfs_ioctl() at devfs_ioctl+0xcb/frame 0xfffffe008ea11c40^M vn_ioctl() at vn_ioctl+0xc8/frame 0xfffffe008ea11cb0^M devfs_ioctl_f() at devfs_ioctl_f+0x1e/frame 0xfffffe008ea11cd0^M kern_ioctl() at kern_ioctl+0x255/frame 0xfffffe008ea11d40^M sys_ioctl() at sys_ioctl+0x101/frame 0xfffffe008ea11e00^M amd64_syscall() at amd64_syscall+0x115/frame 0xfffffe008ea11f30^M fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe008ea11f30^M --- syscall (54, FreeBSD ELF64, ioctl), rip = 0x33b958fe6b6a, rsp = 0x33b94cd0f3 48, rbp = 0x33b94cd0f3b0 ---^M Uptime: 9s^M Dumping 425 out of 8160 MB:..4%..12%..23%..31%..42%..53%..61%..72%..83%..91% ^M -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Sun Nov 24 16:46:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxF8g1Gvyz5fLxK; Sun, 24 Nov 2024 16:46: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxF8g0rCSz4BHM; Sun, 24 Nov 2024 16:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732466771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=owhQP3//vbrce5UzxRbafmLdsvdCN1PuWubFhYfAUCs=; b=PovlNiNDc86kCbRw/LsIXg/JgdFOt45IiMU4DxE3N0472/JIxOP4JJXfRiHl6pssbJykJC 0kYDqskQnG5dhT/vh9nEFp70KpPa61lOKzwxAXjk0yLis6hVY6dA5Lrnup3Y9d0tl/FlY8 qA1i/488K1hRFQOVF6DDVyVICDuj3ooI9KiPIP5+PXE0ntnjbxX51MMMjhf+74iJETxQ9Y Dlb/gtveM8bGtQrIgOmMHVdl5DNGbcb2ZFfSE/PVQZMrsbxTML2cLnbIUG1j1GkiJYEOK/ YRYkI3qAbWBgs6MrYrBfufWmifHzXQ3qw+8uMA4DRjgCHTSi9DtlLvN7dd8qsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732466771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=owhQP3//vbrce5UzxRbafmLdsvdCN1PuWubFhYfAUCs=; b=JDoN/4erhhEb9WuGg2VvD657TwqAgSGM4Cqddcchr5CKFAOS7janY7KlvlqbbphRYUvwHN TJunYGCNTh0ud37+I7CSJ+Kn4AR/ZgRifUne/rgDK2cTUSnoT1MG0TGYlIAInbGE2fAHUC oIj79apumwfxgL7btNPYzZaZMHPJPRrrWgrWA520vRa0VfMmV+EjXZ5o6QlAup3G7e2UFS T6UWpRU2eb5Iyvm7Qq6st2UDOnmbUNc5Fb8ct8Wfg6clckpS0a00kM3/34/4DumVlXriOm 3HMY9NpX+D9DF/eZh6N+guNIbsH/eWDycqbOvbNWpa3JgITYugV6x6VT03yeeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732466771; a=rsa-sha256; cv=none; b=hJAzo1PU4iK5GJPsxnBr6XY8URjXwhNbO13xROf75eDHXxa+TehnpaTYpSjj4e46QcDoaj PIMMeO9vgr6Iia0edsNaNYX5/D+6b1YgQHu7eQtXK64lxNAzonbdNa0Vg20NhygdtKSbEl SjtG8JLxoEMVX7YQTwoDDR2YEp5qGqU7WjyCqFGGfgniLa9NH9Wg8B0Ruf38JdA6/v0FRN CDN32moVYLJ0NC1R5kMFvlwKt+NhFVR63yroeyOqENSbS6RNu87tyqKuik+QbRla4zz6RG utqUrT2ofWuubzb3mWeBQsPBUrX9w8fZRssoyzgRQ/zQGHibA97O/Hb2pQcYXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XxF8g0QmSz12VQ; Sun, 24 Nov 2024 16:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AOGkAGg038300; Sun, 24 Nov 2024 16:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AOGkApr038297; Sun, 24 Nov 2024 16:46:10 GMT (envelope-from git) Date: Sun, 24 Nov 2024 16:46:10 GMT Message-Id: <202411241646.4AOGkApr038297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 28092a8bc72e - stable/14 - mac_bsdextended: Remove \n from sysctl descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 28092a8bc72e969d3736ff064ad3f1ca7d80ce0b Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=28092a8bc72e969d3736ff064ad3f1ca7d80ce0b commit 28092a8bc72e969d3736ff064ad3f1ca7d80ce0b Author: Ed Maste AuthorDate: 2024-11-21 15:22:27 +0000 Commit: Ed Maste CommitDate: 2024-11-24 16:46:00 +0000 mac_bsdextended: Remove \n from sysctl descriptions sysctl(8) prints a newline after the description; the description should not end with one itself. Sponsored by: The FreeBSD Foundation (cherry picked from commit 6b62e00da4ad0624fce5e6f0b5b39a6f44c8ba60) --- sys/security/mac_bsdextended/mac_bsdextended.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index d143901330a1..95efc537735a 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -88,11 +88,11 @@ static int rule_slots = 0; static int rule_version = MB_VERSION; SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_count, CTLFLAG_RD, - &rule_count, 0, "Number of defined rules\n"); + &rule_count, 0, "Number of defined rules"); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_slots, CTLFLAG_RD, - &rule_slots, 0, "Number of used rule slots\n"); + &rule_slots, 0, "Number of used rule slots"); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_version, CTLFLAG_RD, - &rule_version, 0, "Version number for API\n"); + &rule_version, 0, "Version number for API"); /* * This is just used for logging purposes, eventually we would like to log From nobody Sun Nov 24 16:46:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxF8z5025z5fLv4; Sun, 24 Nov 2024 16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxF8z2wJCz4Ch6; Sun, 24 Nov 2024 16: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=1732466787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vKNH2QWVigGudlyFNuJGYdexfcx3BvxKEpPRqzagras=; b=OkCVtx8wE96Bccb7TchRONzeOb+wzBJVnOSSjo9nB4g7dtEi5pv/CKdk28s1HxVs9+746L LqV1+wXqbGGMl4xii5zzsUXpWUoGv1o0lwf7rENtor6u8rTqNk+yjGjUPdP+CSETs/3pHR sB/cS8RQHclX2EOvzjvO2kQkjSG1XpYctTivTm9iW3gVqi36Hj5KGPgQbdbJzV6nQ5UfI+ ns5UfODW7kWmQin6R0VS1scOc/LwcCZj3u1GCwvcQM0hcy1HG87ZpFzzsbvKVY6JNvjpEP 3Rs6d7UEXyH7b6+1kiAJP0f6VRrPds3kieQLRqnuONT4G6tfTHQ6izWZCSt4bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732466787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vKNH2QWVigGudlyFNuJGYdexfcx3BvxKEpPRqzagras=; b=XxKQe7c9ZbSCv1u2/Rsr97nwqhFwQntEFufLaFLwAA1i9mKYF0rKeyeUK7YbDCsADY/OUl KH8fPZN8i18l4bkePKJQz3PJDoj5bNiT82YI1QZIbreQRjSQxKuLQajoD2x0wlJkzoNKIz PEMz2bqz8OOVC3t7chGayYQAKTLeP9EPieLU+Jptqr7JStrfXo7K4H3zh8mw+qoLJPcXkx 7sQYAGJGwoYrGW4XpjEzihJKtOUGYxGrXg/62rzUSu+SDzJhE6tDdgECINj1nH/Ry7C4zo B5Alty17ZNQZW1UYbV0D+IVl+4VDaoocmBwL39EEKHxF5bY1vNwGjHnFlnra0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732466787; a=rsa-sha256; cv=none; b=BzOuzSivinX3dFf0DJrUE5J2T2CIwrue0fr8FGnPX7gGJG/tZSa5WccYMGcrgmfQDMkzvg XE8OlvwxL/4LvHTxmGWAiWHpzcdm8v+Ndcqh95WLR+3qty7dKuKKPeueePuq2aYeUcitop 0lAZrh1X4hz9l8Qpl33uQdFYaX1MRg0q+SC7DtFb6AmZsZe50BQLp6Kg/xHp2VLxIsEuQF ujd2mYEhWL/un9I2mIM521YUpj1HU0EuZWAf1tNxWBzJ3W8c5eJyiTxO4f2i1D3EDQqOfE 4Jh0hgAZstRqYEn8yT9d7WNOBiubkM/wrhvHDcDE1PT+N5BBKEzcYo08HTve+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 4XxF8z2JqZz12VR; Sun, 24 Nov 2024 16:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AOGkRSV038487; Sun, 24 Nov 2024 16:46:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AOGkRb9038484; Sun, 24 Nov 2024 16:46:27 GMT (envelope-from git) Date: Sun, 24 Nov 2024 16:46:27 GMT Message-Id: <202411241646.4AOGkRb9038484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 93a321b60750 - stable/14 - libc: Note that getentropy is nearly POSIX 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 93a321b60750df2900e0a856c5e7210276147816 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=93a321b60750df2900e0a856c5e7210276147816 commit 93a321b60750df2900e0a856c5e7210276147816 Author: Ed Maste AuthorDate: 2024-11-15 02:29:49 +0000 Commit: Ed Maste CommitDate: 2024-11-24 16:46:00 +0000 libc: Note that getentropy is nearly POSIX 2024 Our implementation currently diverges from POSIX 2024 in a couple of ways, as now noted in the BUGS section. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47589 (cherry picked from commit 95b71a659a9bdc6e9071d80c7369a935c2bc16f4) --- lib/libc/gen/getentropy.3 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/getentropy.3 b/lib/libc/gen/getentropy.3 index 0a3ba3e25610..5bbbc80e2414 100644 --- a/lib/libc/gen/getentropy.3 +++ b/lib/libc/gen/getentropy.3 @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 24, 2018 +.Dd November 20, 2024 .Dt GETENTROPY 3 .Os .Sh NAME @@ -69,10 +69,8 @@ Too many bytes requested, or some other fatal error occurred. .Xr random 4 .Sh STANDARDS .Fn getentropy -is non-standard. -It is present on -.Ox -and Linux. +nearly conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn getentropy @@ -82,3 +80,9 @@ The .Fx libc compatibility shim first appeared in .Fx 12.0 . +.Sh BUGS +.In limits.h +does not define +.Dv GETENTROPY_MAX . +Some error values do not match +.St -p1003.1-2024 . From nobody Sun Nov 24 20:49:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxLXv092vz5dfSQ; Sun, 24 Nov 2024 20:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxLXt6g02z4cJ8; Sun, 24 Nov 2024 20:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732481342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuiItwxBwLlHnm+5uDIhenI385yAM+D0iANWJl6lV8Y=; b=ASynSORjY12bEPTS1o2FDq1kqSKQ9/We/qDFnMJWa/JMg/Hj+Yv3xf8kPg7540XCCJrT1Q +ZT1dFQ7DzGSJNHiXaHMV3Cx5ykybE44PAouQ4pDBzMCsBloLTbDMgGwFkamyk7TGY39T4 JIS52wDvsFslNyhAu2QY+A6ZMGBe83jE27uicHsoJX9c/ewcyvC0u7wudobQRqgytqwnUR 7KDilQHr31jNupJpuNFoSDUIwFLWraVWzLLuSHJuEvaCaT4qWe+0Tp9fl6XUbL2CPhpS/S WJe+aY+bzdkEfDANMu5OPW+2RBNdhFwDuSutl3wWajlV2G7WWh6+4rZVLwoYiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732481342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuiItwxBwLlHnm+5uDIhenI385yAM+D0iANWJl6lV8Y=; b=tRf4+5V/DuoNjlae6MAVu/M2VlSQa/1/WjX2cFJmiR4l5e4Y1OOYCAAniqD3Z6VlhLp5f/ Ga5Bq8glplJPSgiRLUR4kcEVIJjcDB/pKztZEccM2DHOWQw6+Mz8YFz4/E4qH7QMX95gx3 ddn0lfXUuNUJQ9i80xOUX3J8ssi5Xp2CvQW8Q0x3nh+ksdKpE0kn1+Evl8pyaQt5Il6TbQ OEmys0qkemHETryFBD/3hlTGd33Euhd8X5yI4TTZb+vM9oXd+hy5Zjb9+/rmPwV/+I9RsB RDbzZrLgWCBd5G4HG8fWbTeXBihEYRpf5UL2k9Fc4igxw3hnQIXaQnz5hB4c4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732481342; a=rsa-sha256; cv=none; b=HZLKDYD7Mn4OfkJhc9MrXeNdaVzX8KThTMr6A0GD+YxfeKJGirxvqTaAwEIrXrKF4xGYZP NWcCJVWDQ8OAp6x3pP6TqPyo4Y+GdBHvCf8jTqdQRsVBOdgdSRVJ8XCG/o0ie8IpoqYO9e PK3JwVW074W8bgxVXics4lEzNKbLZ7TrN1RmvyBIqWTigZbqPnfATAbOPDrEfke1G3UXWM 7OCoieK2thLIPuNcN0qpXkOg46XoJBCFSqgsn3SFfg7E19YWdcqEXSXovCqcGh52bQDDR2 /p7a2IUKrkQn0mrxq628UDV7zUWftxi1tty/qeaBiqHl3YxBVo+sMC/zMUcpmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XxLXt67zDz192D; Sun, 24 Nov 2024 20:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AOKn2Qc084230; Sun, 24 Nov 2024 20:49:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AOKn2rI084226; Sun, 24 Nov 2024 20:49:02 GMT (envelope-from git) Date: Sun, 24 Nov 2024 20:49:02 GMT Message-Id: <202411242049.4AOKn2rI084226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 0347ddf41f42 - main - nfs_commonsubs.c: Make all upper case user domain work List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0347ddf41f4226c0351d2d1d78f09e8300ebac93 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=0347ddf41f4226c0351d2d1d78f09e8300ebac93 commit 0347ddf41f4226c0351d2d1d78f09e8300ebac93 Author: Rick Macklem AuthorDate: 2024-11-24 20:47:56 +0000 Commit: Rick Macklem CommitDate: 2024-11-24 20:47:56 +0000 nfs_commonsubs.c: Make all upper case user domain work Without this patch, an all upper case user domain name (as specified by nfsuserd(8)) would not work. I believe this was done so that Kerberos realms were not confused with user domains. Now, RFC8881 specifies that the user domain name is a DNS name. As such, all upper case names should work. This patch fixes this case so that it works. The custom comparison function is no longer needed. PR: 282620 Tested by: jmmv MFC after: 2 weeks --- sys/fs/nfs/nfs_commonsubs.c | 42 ++++++------------------------------------ 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 81c558d768ea..fc01630f77f9 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -225,7 +225,6 @@ static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); static void nfsv4_wanted(struct nfsv4lock *lp); static uint32_t nfsv4_filesavail(struct statfs *, struct mount *); -static int nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len); static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name); static void nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser); static int nfsrv_getrefstr(struct nfsrv_descript *, u_char **, u_char **, @@ -3438,13 +3437,13 @@ tryagain: /* * If an '@' is found and the domain name matches, search for * the name with dns stripped off. - * Mixed case alphabetics will match for the domain name, but - * all upper case will not. + * The match for alphabetics in now case insensitive, + * since RFC8881 defines this string as a DNS domain name. */ if (cnt == 0 && i < len && i > 0 && (len - 1 - i) == NFSD_VNET(nfsrv_dnsnamelen) && - !nfsrv_cmpmixedcase(cp, - NFSD_VNET(nfsrv_dnsname), NFSD_VNET(nfsrv_dnsnamelen))) { + strncasecmp(cp, NFSD_VNET(nfsrv_dnsname), + NFSD_VNET(nfsrv_dnsnamelen)) == 0) { len -= (NFSD_VNET(nfsrv_dnsnamelen) + 1); *(cp - 1) = '\0'; } @@ -3665,8 +3664,8 @@ tryagain: */ if (cnt == 0 && i < len && i > 0 && (len - 1 - i) == NFSD_VNET(nfsrv_dnsnamelen) && - !nfsrv_cmpmixedcase(cp, - NFSD_VNET(nfsrv_dnsname), NFSD_VNET(nfsrv_dnsnamelen))) { + strncasecmp(cp, NFSD_VNET(nfsrv_dnsname), + NFSD_VNET(nfsrv_dnsnamelen)) == 0) { len -= (NFSD_VNET(nfsrv_dnsnamelen) + 1); *(cp - 1) = '\0'; } @@ -3714,35 +3713,6 @@ out: return (error); } -/* - * Cmp len chars, allowing mixed case in the first argument to match lower - * case in the second, but not if the first argument is all upper case. - * Return 0 for a match, 1 otherwise. - */ -static int -nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len) -{ - int i; - u_char tmp; - int fndlower = 0; - - for (i = 0; i < len; i++) { - if (*cp >= 'A' && *cp <= 'Z') { - tmp = *cp++ + ('a' - 'A'); - } else { - tmp = *cp++; - if (tmp >= 'a' && tmp <= 'z') - fndlower = 1; - } - if (tmp != *cp2++) - return (1); - } - if (fndlower) - return (0); - else - return (1); -} - /* * Set the port for the nfsuserd. */ From nobody Sun Nov 24 21:10:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxM1W0wqsz5dhGX; Sun, 24 Nov 2024 21:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxM1W0Q4Pz4jSj; Sun, 24 Nov 2024 21:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732482623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2c7naXC70rtY8bJwNFiabgZjsq/FCXTptxgBqhjUsYM=; b=QpZUqNn2knF2iFpP0NtuBF9rLqlvn+YOwkX5Bw+uRgC+j86/CFdWarRaLdYVT7W8FRyIAw tkxGW4TqkMM482pb5stn26OQDo1xS3Aj4q/Wx3oJ1XNlhEetAs4UGkgFdcLZ5fzD4CzT0F 1PDzWG7999o1BLnKvfQ2arFCLH1rVx2Hyy+VDPMN9fJOoc4D2nZ9gINZj7its3bvUN6S6e +FQ5Y3dsgsUUsvl50/1jTQLJNi+KsI20/gcpa6roLI8bRjQqNykcE7Mp1kbK9EkKs6hbq+ dL+QCYYfGJCjQLO4/Wi+d3cAk8zWIfQeRxFf4faGevP6fETWkkVCiSPj4lNkxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732482623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2c7naXC70rtY8bJwNFiabgZjsq/FCXTptxgBqhjUsYM=; b=gdRqkiX07HFT5B4ibwHCsjn6sKIXo0hrMpfOrw8HwFZFDEvvcMMqeN0aAVqgILifBZoZkT oMmE8dXWD8ZU7PK7FlUtTkeeDDR51c0EScmoE+AUcnfcIt2Q6NwDEfko7ksCecjEGOHiAS vOFVqsT4PBncOrYdyT3asSz27p7EDIh9ktcqMy0QeRmLVM1KoO/lLV1jxSO2cTgxfM/gRB rB7cx8d3ehLWrxv1ZFzBjRmKdw8lADHkQ8BRyhRDFc0pMo/3F1MfAXWTGWloodeqWOW7RJ t9jsh2hGwWnzS4b7WABASt6yOLQ+JbGm9cF76LMOCKwZm6MH4SaqNQ93RBODVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732482623; a=rsa-sha256; cv=none; b=qdk2fs7daiEgK2CkDRhS7wm22sP2K2rb7b0D+zX4ebKHqY4h4o5d3No6ddMRSPkC2d8kod x+Etub56ijk1KnbhEQNm8depJOqDIrLVgYsaqtop+HX1e/g2l3y610IheguWIpDCB/H5Hi V4u84J8+bkKkA9DAdl2cYNONMcxZ3UgrnFdyIkpDiiEJwdQPEhfdVbU+HigyBlpXo+xCmm RdPT6pQXiroYlw5IdgurK1AhXD8f53pJ2lV+hb24IMbmGB6tXWEi7ZpmRK33SXokW5P5wX MjrLa79yf0fTF19OkcfqXCGlye4iV6aiQLv4lo2qUrximxbR066xWK3/Yz6Jwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XxM1V6tB1z191B; Sun, 24 Nov 2024 21:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AOLAMpx031827; Sun, 24 Nov 2024 21:10:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AOLAMUk031824; Sun, 24 Nov 2024 21:10:22 GMT (envelope-from git) Date: Sun, 24 Nov 2024 21:10:22 GMT Message-Id: <202411242110.4AOLAMUk031824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: e80419da6cef - main - igc: disable hw.igc.sbp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e80419da6cef3fb6ea1902bd9a250ca21072a42c Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e80419da6cef3fb6ea1902bd9a250ca21072a42c commit e80419da6cef3fb6ea1902bd9a250ca21072a42c Author: Kevin Bowling AuthorDate: 2024-11-24 21:08:54 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 21:08:54 +0000 igc: disable hw.igc.sbp Similar to 548d8a131d536d5f in e1000, disable this by default. MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 5356a6e87a5b..154c25a5a624 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -252,7 +252,7 @@ SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, 0, "Set to true to leave smart power down enabled on newer adapters"); /* Controls whether promiscuous also shows bad packets */ -static int igc_debug_sbp = true; +static int igc_debug_sbp = false; SYSCTL_INT(_hw_igc, OID_AUTO, sbp, CTLFLAG_RDTUN, &igc_debug_sbp, 0, "Show bad packets in promiscuous mode"); @@ -1351,7 +1351,7 @@ igc_if_multi_set(if_ctx_t ctx) if_getflags(ifp) & IFF_ALLMULTI) { reg_rctl |= IGC_RCTL_MPE; reg_rctl &= ~IGC_RCTL_UPE; - } else + } else reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) From nobody Sun Nov 24 22:08:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxNJc3jwxz5dlxZ; Sun, 24 Nov 2024 22:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxNJc3Rxjz4vQ4; Sun, 24 Nov 2024 22:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732486112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=abF/VUdJLX9Lx8FmuLmgOY11Pk1azwyYLQFRkdc7o24=; b=ENhB62h0n7AaRRF1N8aGrmWIakv+FWBr1GriyuTeXwAM4bS+wD/ooC4R3u2zuiOLyJH/g6 KAi6n+y9P4jthi9YtOfAqdg48/I8lN/Aja/L5urmBBw04Qrj8N1SoDaosFRDP809ZrCgY9 TXTFnTbSDFyxCKqwFzKGgEC0Q/jChicQqo+Ji0iSPn7fBS/A5KzmwpiOyq/qYnvJwkEQS+ rdZGLwzwn9q2ZNii8ukJZjb/u5SrgEl5Maw1HA1czyiS/6GMf8cf3WEvYdn21jppETZdDk g8WoEVideLlLjxBECFz/5rlRp0GyNKJiscQYXxftmo4FUUfeg1XKlwWbXgLQjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732486112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=abF/VUdJLX9Lx8FmuLmgOY11Pk1azwyYLQFRkdc7o24=; b=mWtX/pb8kbV/a9qNYudKMDqtjKrglyW4jcUvyPTGLQHlo+ead4DU/oNxmN0TVunyLvZ21n h2U1BVtQ2lxURA37kJMFLrMKGxF5VzPXVTJJVVZ8Di32KutFLdtqXJFe82UavyxAGrDhOs 9krcApVpReUAUDVIEYs9aUjSOH+/JirDDJYl4mFDKtd1SEXj5k4TCiBHqPy9t399xbWiws VVREZxBqApW8XSs9iQNeO0RrLN5UTRnALt7rAXXFw2HoA0DR1axITCsYqXIJ+oBTsrACeV vlqGSA5Y+Z+OeSCGsqom2Q1AwFpMwgXn6rPd9qt48Qh+Pz+D8ZQCt88EjCAiag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732486112; a=rsa-sha256; cv=none; b=KWVs37upM+q+2psrZZ2tm0phPtq6qfn18sxB2z17caizfM3avlsrAay3n6tVZDa6Rs9DZU +APnLX/womBy5i1TWN+djXn98DL+47iwilNlkN9nF1gAucSnGX7I8Imt5W3A1T6CH1DTpa bfrlP/AsnDuNsyj3QyjrZeWDeeDWawMjfZ3AKJBtov2nu4Y0kxxWsedFMutUvdpAV4SMqS QFK7Gan3G82DP/wnsfPpC5iEEg4CBb/EPzIRG48SZnto0o3R+vEADDCWuKc83+vGWgS+CQ Lcbw4FOXwjDic0NgbpdIDcd5Qoe6GVzjgsG5+xa+RVYjxvSKPu8mBbQgmECUtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XxNJc2xJmz1BgX; Sun, 24 Nov 2024 22:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AOM8WJU033672; Sun, 24 Nov 2024 22:08:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AOM8WSe033669; Sun, 24 Nov 2024 22:08:32 GMT (envelope-from git) Date: Sun, 24 Nov 2024 22:08:32 GMT Message-Id: <202411242208.4AOM8WSe033669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 8ea6c1154094 - main - usr.bin/bc: remove OpenBSD derived bc and dc commands List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ea6c115409450ff58a8c6b5e818319d181c6bff Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=8ea6c115409450ff58a8c6b5e818319d181c6bff commit 8ea6c115409450ff58a8c6b5e818319d181c6bff Author: Stefan Eßer AuthorDate: 2024-11-24 21:38:23 +0000 Commit: Stefan Eßer CommitDate: 2024-11-24 21:38:23 +0000 usr.bin/bc: remove OpenBSD derived bc and dc commands In 2020, an improved implementation of the bc and dc commands developed by Gavin D. Howard has been imported into FreeBSD. It has replaced the OpenBSD-derived versions of these commands in all currently supported FreeBSD releases. The OpenBSD versions could still be built using the WITHOUT_GH_BC option. There have been no reports of problems or unexpected deviations from the OpenBSD version for some time, therefore keeping the OpenBSD version is no longer required in FreeBSD. This commit removes the option to build the OpenBSD version and corresponding source files from -CURRENT. No MFC is planned, all currently released FreeBSD versions should retain the build option. The WITHOUT_GH_BC option is no longer accepted and will cause make buildworld to fail. Reviewed by: des, emaste Approved by: des Relnotes: yes Differential Revision: https://reviews.freebsd.org/D46876 --- ObsoleteFiles.inc | 7 + UPDATING | 5 + share/man/man5/src.conf.5 | 6 - share/mk/src.opts.mk | 1 - tools/build/mk/OptionalObsoleteFiles.inc | 8 - tools/build/options/WITHOUT_GH_BC | 5 - usr.bin/Makefile | 5 - usr.bin/bc/Makefile | 14 - usr.bin/bc/Makefile.depend | 17 - usr.bin/bc/bc.1 | 413 ------- usr.bin/bc/bc.library | 272 ----- usr.bin/bc/bc.y | 1214 -------------------- usr.bin/bc/extern.h | 46 - usr.bin/bc/pathnames.h | 20 - usr.bin/bc/scan.l | 368 ------- usr.bin/bc/tty.c | 64 -- usr.bin/dc/Makefile | 12 - usr.bin/dc/Makefile.depend | 18 - usr.bin/dc/bcode.c | 1773 ------------------------------ usr.bin/dc/bcode.h | 103 -- usr.bin/dc/dc.1 | 555 ---------- usr.bin/dc/dc.c | 154 --- usr.bin/dc/extern.h | 63 -- usr.bin/dc/inout.c | 446 -------- usr.bin/dc/mem.c | 140 --- usr.bin/dc/stack.c | 370 ------- usr.bin/dc/tests/Makefile | 6 - usr.bin/dc/tests/bcode.sh | 142 --- usr.bin/dc/tests/inout.sh | 100 -- 29 files changed, 12 insertions(+), 6335 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1378d6b6dcfa..5362ba0e5955 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20241124: library and tests of OpenBSD dc +OLD_FILES+=usr/share/misc/bc.library +OLD_FILES+=usr/tests/usr.bin/dc/Kyuafile +OLD_FILES+=usr/tests/usr.bin/dc/bcode +OLD_FILES+=usr/tests/usr.bin/dc/inout +OLD_DIRS+=usr/tests/usr.bin/dc + # 20241119: rewrite mv tests OLD_FILES+=usr/tests/bin/mv/legacy_test diff --git a/UPDATING b/UPDATING index 1fb14a96880b..2a67a65a92ed 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,11 @@ 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".) +20241124: + The OpenBSD derived bc and dc implementations and the WITHOUT_GH_BC + option that allowed building them instead of the advanced version + imported more than 4 years ago have been removed. + 20241025: The support for the rc_fast_and_loose variable has been removed from rc.subr(8). Users setting rc_fast_and_loose on their systems are diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index a1465b0729a3..88df18b3142e 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -712,12 +712,6 @@ and .Xr ftpd 8 . .It Va WITHOUT_GAMES Do not build games. -.It Va WITHOUT_GH_BC -Install the traditional FreeBSD -.Xr bc 1 -and -.Xr dc 1 -programs instead of the enhanced versions. .It Va WITHOUT_GNU_DIFF Do not build GNU .Xr diff3 1 ; diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index f8877153f17f..f3141884cd00 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -101,7 +101,6 @@ __DEFAULT_YES_OPTIONS = \ FREEBSD_UPDATE \ FTP \ GAMES \ - GH_BC \ GNU_DIFF \ GOOGLETEST \ GPIO \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index e326155b26a4..864057692566 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2071,14 +2071,6 @@ OLD_FILES+=usr/share/man/man8/strfile.8.gz OLD_FILES+=usr/share/man/man8/unstr.8.gz .endif -.if ${MK_GH_BC} == no -OLD_FILES+=usr/share/misc/bc.library -OLD_FILES+=usr/tests/usr.bin/dc/Kyuafile -OLD_FILES+=usr/tests/usr.bin/dc/bcode -OLD_FILES+=usr/tests/usr.bin/dc/inout -OLD_DIRS+=usr/tests/usr.bin/dc -.endif - .if ${MK_GOOGLETEST} == no OLD_FILES+=usr/include/private/gmock/gmock-actions.h OLD_FILES+=usr/include/private/gmock/gmock-cardinalities.h diff --git a/tools/build/options/WITHOUT_GH_BC b/tools/build/options/WITHOUT_GH_BC deleted file mode 100644 index 2618257ec71d..000000000000 --- a/tools/build/options/WITHOUT_GH_BC +++ /dev/null @@ -1,5 +0,0 @@ -Install the traditional FreeBSD -.Xr bc 1 -and -.Xr dc 1 -programs instead of the enhanced versions. diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 3cd91f8019e3..9baa90aab499 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -207,12 +207,7 @@ SUBDIR.${MK_GAMES}+= number SUBDIR.${MK_GAMES}+= pom SUBDIR.${MK_GAMES}+= primes SUBDIR.${MK_GAMES}+= random -.if ${MK_GH_BC} == "yes" SUBDIR+= gh-bc -.else -SUBDIR.${MK_OPENSSL}+= bc -SUBDIR.${MK_OPENSSL}+= dc -.endif .if ${MK_GNU_DIFF} == "no" SUBDIR+= diff3 .endif diff --git a/usr.bin/bc/Makefile b/usr.bin/bc/Makefile deleted file mode 100644 index 098308b4604b..000000000000 --- a/usr.bin/bc/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $OpenBSD: Makefile,v 1.7 2013/09/19 16:12:00 otto Exp $ - -PROG= bc -SRCS= bc.y scan.l tty.c -CFLAGS+= -I. -I${.CURDIR} - -LIBADD= edit - -NO_WMISSING_VARIABLE_DECLARATIONS= - -FILES+= bc.library -FILESDIR=${SHAREDIR}/misc - -.include diff --git a/usr.bin/bc/Makefile.depend b/usr.bin/bc/Makefile.depend deleted file mode 100644 index 7b1781905d71..000000000000 --- a/usr.bin/bc/Makefile.depend +++ /dev/null @@ -1,17 +0,0 @@ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - lib/libedit \ - usr.bin/yacc.host \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/usr.bin/bc/bc.1 b/usr.bin/bc/bc.1 deleted file mode 100644 index 97bb3bf62c56..000000000000 --- a/usr.bin/bc/bc.1 +++ /dev/null @@ -1,413 +0,0 @@ -.\" $OpenBSD: bc.1,v 1.32 2015/11/17 05:45:35 mmcc Exp $ -.\" -.\" Copyright (C) Caldera International Inc. 2001-2002. -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code and documentation 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed or owned by Caldera -.\" International, Inc. -.\" 4. Neither the name of Caldera International, Inc. nor the names of other -.\" contributors may be used to endorse or promote products derived from -.\" this software without specific prior written permission. -.\" -.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA -.\" INTERNATIONAL, INC. 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 CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, -.\" INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -.\" POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd November 21, 2015 -.Dt BC 1 -.Os -.Sh NAME -.Nm bc -.Nd arbitrary-precision arithmetic language and calculator -.Sh SYNOPSIS -.Nm bc -.Op Fl chlv -.Op Fl e Ar expression -.Op Ar file ... -.Sh DESCRIPTION -.Nm -is an interactive processor for a language which resembles -C but provides unlimited precision arithmetic. -It takes input from any expressions on the command line and -any files given, then reads the standard input. -.Pp -Options available: -.Bl -tag -width Ds -.It Fl c -.Nm -is actually a preprocessor for -.Xr dc 1 , -which it invokes automatically, unless the -.Fl c -.Pq compile only -option is present. -In this case the generated -.Xr dc 1 -instructions are sent to the standard output, -instead of being interpreted by a running -.Xr dc 1 -process. -.It Fl e Ar expression , Fl Fl expression Ar expression -Evaluate -.Ar expression . -If multiple -.Fl e -options are specified, they are processed in the order given, -separated by newlines. -.It Fl h , Fl Fl help -Prints usage information. -.It Fl l , Fl Fl mathlib -Allow specification of an arbitrary precision math library. -The definitions in the library are available to command line -expressions. -.It Fl v , Fl Fl version -Prints version information. -.El -.Pp -The syntax for -.Nm -programs is as follows: -.Sq L -means letter a-z; -.Sq E -means expression; -.Sq S -means statement. -As a non-portable extension, it is possible to use long names -in addition to single letter names. -A long name is a sequence starting with a lowercase letter -followed by any number of lowercase letters and digits. -The underscore character -.Pq Sq _ -counts as a letter. -.Pp -Comments -.Bd -unfilled -offset indent -compact -are enclosed in /* and */ -are enclosed in # and the next newline -.Ed -.Pp -The newline is not part of the line comment, -which in itself is a non-portable extension. -.Pp -Names -.Bd -unfilled -offset indent -compact -simple variables: L -array elements: L [ E ] -The words `ibase', `obase', and `scale' -The word `last' or a single dot -.Ed -.Pp -Other operands -.Bd -unfilled -offset indent -compact -arbitrarily long numbers with optional sign and decimal point -( E ) -sqrt ( E ) -length ( E ) number of significant decimal digits -scale ( E ) number of digits right of decimal point -L ( E , ... , E ) -.Ed -.Pp -The sequence -.Sq \e -is ignored within numbers. -.Pp -Operators -.Pp -The following arithmetic and logical operators can be used. -The semantics of the operators is the same as in the C language. -They are listed in order of decreasing precedence. -Operators in the same group have the same precedence. -.Bl -column "= += \-= *= /= %= ^=" "Associativity" "multiply, divide, modulus" -offset indent -.It Sy "Operator" Ta Sy "Associativity" Ta Sy "Description" -.It "++ \-\-" Ta "none" Ta "increment, decrement" -.It "\-" Ta "none" Ta "unary minus" -.It "^" Ta "right" Ta "power" -.It "* / %" Ta "left" Ta "multiply, divide, modulus" -.It "+ \-" Ta "left" Ta "plus, minus" -.It "= += -= *= /= %= ^=" Ta "right" Ta "assignment" -.It "== <= >= != < >" Ta "none" Ta "relational" -.It "!" Ta "none" Ta "boolean not" -.It "&&" Ta "left" Ta "boolean and" -.It "||" Ta "left" Ta "boolean or" -.El -.Pp -Note the following: -.Bl -bullet -offset indent -.It -The relational operators may appear in any expression. -The -.St -p1003.1-2008 -standard only allows them in the conditional expression of an -.Sq if , -.Sq while -or -.Sq for -statement. -.It -The relational operators have a lower precedence than the assignment -operators. -This has the consequence that the expression -.Sy a = b < c -is interpreted as -.Sy (a = b) < c , -which is probably not what the programmer intended. -.It -In contrast with the C language, the relational operators all have -the same precedence, and are non-associative. -The expression -.Sy a < b < c -will produce a syntax error. -.It -The boolean operators (!, && and ||) are non-portable extensions. -.It -The boolean not -(!) operator has much lower precedence than the same operator in the -C language. -This has the consequence that the expression -.Sy !a < b -is interpreted as -.Sy !(a < b) . -Prudent programmers use parentheses when writing expressions involving -boolean operators. -.El -.Pp -Statements -.Bd -unfilled -offset indent -compact -E -{ S ; ... ; S } -if ( E ) S -if ( E ) S else S -while ( E ) S -for ( E ; E ; E ) S -null statement -break -continue -quit -a string of characters, enclosed in double quotes -print E ,..., E -.Ed -.Pp -A string may contain any character, except double quote. -The if statement with an else branch is a non-portable extension. -All three E's in a for statement may be empty. -This is a non-portable extension. -The continue and print statements are also non-portable extensions. -.Pp -The print statement takes a list of comma-separated expressions. -Each expression in the list is evaluated and the computed -value is printed and assigned to the variable `last'. -No trailing newline is printed. -The expression may also be a string enclosed in double quotes. -Within these strings the following escape sequences may be used: -.Sq \ea -for bell (alert), -.Sq \eb -for backspace, -.Sq \ef -for formfeed, -.Sq \en -for newline, -.Sq \er -for carriage return, -.Sq \et -for tab, -.Sq \eq -for double quote and -.Sq \e\e -for backslash. -Any other character following a backslash will be ignored. -Strings will not be assigned to `last'. -.Pp -Function definitions -.Bd -unfilled -offset indent -define L ( L ,..., L ) { - auto L, ... , L - S; ... S - return ( E ) -} -.Ed -.Pp -As a non-portable extension, the opening brace of the define statement -may appear on the next line. -The return statement may also appear in the following forms: -.Bd -unfilled -offset indent -return -return () -return E -.Ed -.Pp -The first two are equivalent to the statement -.Dq return 0 . -The last form is a non-portable extension. -Not specifying a return statement is equivalent to writing -.Dq return (0) . -.Pp -Functions available in the math library, which is loaded by specifying the -.Fl l -flag on the command line -.Pp -.Bl -tag -width j(n,x) -offset indent -compact -.It s(x) -sine -.It c(x) -cosine -.It e(x) -exponential -.It l(x) -log -.It a(x) -arctangent -.It j(n,x) -Bessel function -.El -.Pp -All function arguments are passed by value. -.Pp -The value of a statement that is an expression is printed -unless the main operator is an assignment. -The value printed is assigned to the special variable `last'. -This is a non-portable extension. -A single dot may be used as a synonym for `last'. -Either semicolons or newlines may separate statements. -Assignment to -.Ar scale -influences the number of digits to be retained on arithmetic -operations in the manner of -.Xr dc 1 . -Assignments to -.Ar ibase -or -.Ar obase -set the input and output number radix respectively. -.Pp -The same letter may be used as an array, a function, -and a simple variable simultaneously. -All variables are global to the program. -`Auto' variables are pushed down during function calls. -When using arrays as function arguments -or defining them as automatic variables, -empty square brackets must follow the array name. -.Pp -For example -.Bd -literal -offset indent -scale = 20 -define e(x){ - auto a, b, c, i, s - a = 1 - b = 1 - s = 1 - for(i=1; 1==1; i++){ - a = a*x - b = b*i - c = a/b - if(c == 0) return(s) - s = s+c - } -} -.Ed -.Pp -defines a function to compute an approximate value of -the exponential function and -.Pp -.Dl for(i=1; i<=10; i++) e(i) -.Pp -prints approximate values of the exponential function of -the first ten integers. -.Bd -literal -offset indent -$ bc -l -e 'scale = 500; 2 * a(2^10000)' -e quit -.Ed -.Pp -prints an approximation of pi. -.Sh COMMAND LINE EDITING -.Nm -supports interactive command line editing, via the -.Xr editline 3 -library. -It is enabled by default if input is from a tty. -Previous lines can be recalled and edited with the arrow keys, -and other GNU Emacs-style editing keys may be used as well. -.Pp -The -.Xr editline 3 -library is configured with a -.Pa .editrc -file \- refer to -.Xr editrc 5 -for more information. -.Sh FILES -.Bl -tag -width /usr/share/misc/bc.library -compact -.It Pa /usr/share/misc/bc.library -math library, read when the -.Fl l -option is specified on the command line. -.El -.Sh COMPATIBILITY -The -.Fl q -and -.Fl Fl quiet -options are no-ops for compatibility with some other implementations of -.Nm -and their use is discouraged. -.Sh SEE ALSO -.Xr dc 1 -.Sh STANDARDS -The -.Nm -utility is compliant with the -.St -p1003.1-2008 -specification. -.Pp -The flags -.Op Fl ce , -as well as the parts noted above, -are extensions to that specification. -.Sh HISTORY -The -.Nm -command first appeared in -.At v6 . -A complete rewrite of the -.Nm -command first appeared in -.Ox 3.5 . -.Sh AUTHORS -.An -nosplit -The original version of the -.Nm -command was written by -.An Robert Morris -and -.An Lorinda Cherry . -The current version of the -.Nm -utility was written by -.An Otto Moerbeek . -.Sh BUGS -The -.Ql quit -statement is interpreted when read, not when executed. -.Pp -Some non-portable extensions, as found in the GNU version of the -.Nm -utility are not implemented (yet). diff --git a/usr.bin/bc/bc.library b/usr.bin/bc/bc.library deleted file mode 100644 index 539de20a7e0c..000000000000 --- a/usr.bin/bc/bc.library +++ /dev/null @@ -1,272 +0,0 @@ -/* $OpenBSD: bc.library,v 1.4 2012/03/14 07:35:53 otto Exp $ */ - -/* - * Copyright (C) Caldera International Inc. 2001-2002. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code and documentation 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * 4. Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. 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 CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, - * INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - */ - -scale = 20 -define e(x) { - auto a, b, c, d, e, g, t, w, y, r - - r = ibase - ibase = A - t = scale - scale = 0 - if (x > 0) scale = (0.435*x)/1 - scale = scale + t + length(scale + t) + 1 - - w = 0 - if (x < 0) { - x = -x - w = 1 - } - y = 0 - while (x > 2) { - x = x/2 - y = y + 1 - } - - a = 1 - b = 1 - c = b - d = 1 - e = 1 - for (a = 1; 1 == 1; a++) { - b = b*x - c = c*a + b - d = d*a - g = c/d - if (g == e) { - g = g/1 - while (y--) { - g = g*g - } - scale = t - ibase = r - if (w == 1) return (1/g) - return (g/1) - } - e = g - } -} - -define l(x) { - auto a, b, c, d, e, f, g, u, s, t, r - r = ibase - ibase = A - if (x <= 0) { - a = (1 - 10^scale) - ibase = r - return (a) - } - t = scale - - f = 1 - if (x < 1) { - s = scale(x) - } else { - s = length(x)-scale(x) - } - scale = 0 - a = (2.31*s)/1 /* estimated integer part of the answer */ - s = t + length(a) + 2 /* estimated length of the answer */ - while (x > 2) { - scale = 0 - scale = (length(x) + scale(x))/2 + 1 - if (scale < s) scale = s - x = sqrt(x) - f = f*2 - } - while (x < .5) { - scale = 0 - scale = scale(x)/2 + 1 - if (scale < s) scale = s - x = sqrt(x) - f = f*2 - } - - scale = 0 - scale = t + length(f) + length((1.05*(t+length(f))/1)) + 1 - u = (x - 1)/(x + 1) - s = u*u - scale = t + 2 - b = 2*f - c = b - d = 1 - e = 1 - for (a = 3; 1 == 1 ; a = a + 2) { - b = b*s - c = c*a + d*b - d = d*a - g = c/d - if (g == e) { - scale = t - ibase = r - return (u*c/d) - } - e = g - } -} - -define s(x) { - auto a, b, c, s, t, y, p, n, i, r - r = ibase - ibase = A - t = scale - y = x/.7853 - s = t + length(y) - scale(y) - if (s < t) s = t - scale = s - p = a(1) - - scale = 0 - if (x >= 0) n = (x/(2*p) + 1)/2 - if (x < 0) n = (x/(2*p) - 1)/2 - x = x - 4*n*p - if (n % 2 != 0) x = -x - - scale = t + length(1.2*t) - scale(1.2*t) - y = -x*x - a = x - b = 1 - s = x - for (i =3 ; 1 == 1; i = i + 2) { - a = a*y - b = b*i*(i - 1) - c = a/b - if (c == 0) { - scale = t - ibase = r - return (s/1) - } - s = s + c - } -} - -define c(x) { - auto t, r - r = ibase - ibase = A - t = scale - scale = scale + 1 - x = s(x + 2*a(1)) - scale = t - ibase = r - return (x/1) -} - -define a(x) { - auto a, b, c, d, e, f, g, s, t, r - if (x == 0) return(0) - - r = ibase - ibase = A - if (x == 1) { - if (scale < 52) { - a = .7853981633974483096156608458198757210492923498437764/1 - ibase = r - return (a) - } - } - t = scale - f = 1 - while (x > .5) { - scale = scale + 1 - x = -(1 - sqrt(1. + x*x))/x - f = f*2 - } - while (x < -.5) { - scale = scale + 1 - x = -(1 - sqrt(1. + x*x))/x - f = f*2 - } - s = -x*x - b = f - c = f - d = 1 - e = 1 - for (a = 3; 1 == 1; a = a + 2) { - b = b*s - c = c*a + d*b - d = d*a - g = c/d - if (g == e) { - ibase = r - scale = t - return (x*c/d) - } - e = g - } -} - -define j(n,x) { - auto a, b, c, d, e, g, i, s, k, t, r - - r = ibase - ibase = A - t = scale - k = 1.36*x + 1.16*t - n - k = length(k) - scale(k) - if (k > 0) scale = scale + k - - s = -x*x/4 - if (n < 0) { - n = -n - x = -x - } - a = 1 - c = 1 - for (i = 1; i <= n; i++) { - a = a*x - c = c*2*i - } - b = a - d = 1 - e = 1 - for (i = 1; 1; i++) { - a = a*s - b = b*i*(n + i) + a - c = c*i*(n + i) - g = b/c - if (g == e) { - ibase = r - scale = t - return (g/1) - } - e = g - } -} -/* vim: set filetype=bc shiftwidth=8 noexpandtab: */ diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y deleted file mode 100644 index c270330281a8..000000000000 --- a/usr.bin/bc/bc.y +++ /dev/null @@ -1,1214 +0,0 @@ -%{ -/* $OpenBSD: bc.y,v 1.46 2014/10/14 15:35:18 deraadt Exp $ */ - -/* - * Copyright (c) 2003, Otto Moerbeek - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * This implementation of bc(1) uses concepts from the original 4.4 - * BSD bc(1). The code itself is a complete rewrite, based on the - * Posix defined bc(1) grammar. Other differences include type safe - * usage of pointers to build the tree of emitted code, typed yacc - * rule values, dynamic allocation of all data structures and a - * completely rewritten lexical analyzer using lex(1). - * - * Some effort has been made to make sure that the generated code is - * the same as the code generated by the older version, to provide - * easy regression testing. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "extern.h" -#include "pathnames.h" - -#define BC_VER "1.1-FreeBSD" -#define END_NODE ((ssize_t) -1) -#define CONST_STRING ((ssize_t) -2) -#define ALLOC_STRING ((ssize_t) -3) - -extern char *yytext; -extern FILE *yyin; - -struct tree { - union { - char *astr; - const char *cstr; - } u; - ssize_t index; *** 5631 LINES SKIPPED ***