From nobody Sun Feb 12 07:56:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF0CN4cRvz3q1Xq; Sun, 12 Feb 2023 07:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF0CN46Lxz3K5y; Sun, 12 Feb 2023 07:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676188560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOwlEtxrrF7mA47VyMG8OMj5MzaIL4tUNrSLscxw1Cc=; b=ye/9Y+62C/XqcBVDk4i/rvDspDy+t9XF3KrheOd70jOI2Za0eEM3WI2AAiVcKfl/BHMpSj YTXgWjjQnsU6MUSpdKgWtGvmMw/O47Gm3348vc6xoXRMKkDOJAhkeQRTv0duok4Hqdtbvh Rjli5jXToF2tsv+Ngb9g7S3NGJQo/eEjTyGs1GG99rk41Zf7kChRfhu5QWdBcSgtuS8wzF 09Dn34uQL7tw+t6j1f/VrqAHvkmQDniY3CZfSlFFjL/7HSy3QqEkgBqVaFwSszJ5+PF7YN XgQUlxzhWpgeUDE8xmk9KW4yt84QbjymXbdoefHWGEnOgA6AVzxP81kyI255PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676188560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOwlEtxrrF7mA47VyMG8OMj5MzaIL4tUNrSLscxw1Cc=; b=JnDONj3cdwgZlqxXef95oOPp3nr/cD8ZL7K5lObxL9wrpCf4K8azxDQxtq+L1U0ayQoqNa 9xnVX5O48hpK10O+cyKC8yIVfrFxgPsGWBaitUTVRnRrTAFepRUsyqsCwm+ju+10xXSIne m9CDDxzQpfOq0cbSBLiQ+RgXQxPFVdXYx7hr9DtYAKY0K5mmM4OIKdR9wihrpyFG/qXCk3 5wZAzv4u1jioEJZSuTyp1f8Ws+PPaHs7gG1IdmqNMShd4mhi7wm5b55E5Q1QAgNcGQSkAo kae2rftw6iBcN22lEsbN00rhMzLNoA4m9UnJgRpx/uZXrWR8Ws5dFbvEB1cmyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676188560; a=rsa-sha256; cv=none; b=B0g6q05KZDXDOQa9sssZRTaGOqtiy9Zh2mZXM7sDcGDwUBlr588f/rVbyHEJuyugp9liJz FKF+9viSXVzGuqXHMa+knj12dMMMNTK4gU+QqTebABsrrrUfPX736aU/FfM4KOCcgYQ3hf 9vY8kr5/uKRgr3qcJx6Cvw0iY9QJoARHgX2JFH3EUNHUkWLOzuTrWUwe8siSY71OJmS/6K 1tPgLKAyQ/HBN4WlrBIch3Tw60bQz8D4iPCV4IFlIUxBAQuSdwPelGrs1ZiGP4EUshNmok wAzO/n5RVsEnzIoy0m/lBwBTBb7hcWU19cUHblmh1Y2wLsr4B/d7IDQxyCoKSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PF0CN33M5zWWQ; Sun, 12 Feb 2023 07:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31C7u08I068009; Sun, 12 Feb 2023 07:56:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31C7u0jl068008; Sun, 12 Feb 2023 07:56:00 GMT (envelope-from git) Date: Sun, 12 Feb 2023 07:56:00 GMT Message-Id: <202302120756.31C7u0jl068008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 03abf6cd13bd - stable/13 - rescue: Add fetch(1) to the rescue tool. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 03abf6cd13bdd97c865f5731688cf72931078729 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=03abf6cd13bdd97c865f5731688cf72931078729 commit 03abf6cd13bdd97c865f5731688cf72931078729 Author: John Grafton AuthorDate: 2023-01-29 23:05:15 +0000 Commit: Xin LI CommitDate: 2023-02-12 07:55:02 +0000 rescue: Add fetch(1) to the rescue tool. After a failed upgrade, having fetch(1) on a system that is physically unnreachable would be very useful to download files required to get the OS back up and functional. On my system this adds 589,824 bytes (3.8%) to the binary size. PR: 266224 Reported by: Dan Mahoney Differential Revision: https://reviews.freebsd.org/D38193 (cherry picked from commit ea34aa4780e5a581732520ea579342af94684882) rescue: Fix link order of SSL libraries and fetch. ld.bfd requires libraries to be linked in order. libssl requires libcrypto. libfetch requires libssl. To fix the latter, move fetch up above tar rather than listing the ssl libraries twice. Reviewed by: delphij Fixes: ea34aa4780e5 rescue: Add fetch(1) to the rescue tool. Differential Revision: https://reviews.freebsd.org/D38304 (cherry picked from commit 0f031350f32b8760e0843a6476d67aa21116103b) --- rescue/rescue/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index b9cc740af645..9830bc5bed5c 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -198,10 +198,13 @@ CRUNCH_PROGS_usr.bin+= zstd CRUNCH_ALIAS_zstd= unzstd zstdcat zstdmt CRUNCH_LIBS+= ${LDADD_zstd} +CRUNCH_PROGS_usr.bin+= fetch +CRUNCH_LIBS+= -lfetch + CRUNCH_PROGS_usr.bin+= tar CRUNCH_LIBS+= -larchive .if ${MK_OPENSSL} != "no" -CRUNCH_LIBS+= -lcrypto +CRUNCH_LIBS+= -lssl -lcrypto .endif CRUNCH_LIBS+= -lmd From nobody Sun Feb 12 07:57:10 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF0Dl1rTdz3q1ZX; Sun, 12 Feb 2023 07:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF0Dl1MCFz3Kd3; Sun, 12 Feb 2023 07:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676188631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a3k38XmH5kfB6JkRVPttJ5KodXU/k9lwNWdTR5fsOnw=; b=NcuyddhjAxyhklovpfk2WdBC1aV42r59wU35w6cwNVamyW8yM0xzSdi1mMAEbW1kyiHXnK riTtTlUlc2Ox0+rcAburU01hlIE/Ny8TPzSj4/dnn6Dii7MCGGJuYquoAwvTMxfK3KM+/C v40ttF6YGMxOOoKa6ODxzzb2JCwIGPg/uPIz/bkGtfAJWl9o2z0gPTAEFX8af8lJH2YMfo AYu1GWZdws6KAdoe/SjaY7CrU8oxUWOXU8imbXTU2kktLtrXTx2EBRY3/uF/S1u9qX8IRq qavCjjuBzhEbLPV+5ujbdJByASemdQot807/BdOpDBgY9RCh8ETNXv0fEtGw7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676188631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a3k38XmH5kfB6JkRVPttJ5KodXU/k9lwNWdTR5fsOnw=; b=DUu/c+zNBgATqjQ1ow7SrcuFPKpZrZursVB7f5cuKiweaf+MFh1otXNzNmRQws2Dl0mcaM E1JNFMEFLQuGvMrHU5PPJsZmSoogwOn3GuszzILE3WPRlLMxPh1RpgUZpQybGbJchzCjBS uvSQh75Ct8zpxpwTntV7aUNoSf4pxcZww0I5onQsxxl0pLRDcN9Cm641jM6DE9WcX9bX86 oNs21MJR9sIE156chNVtxR+L4wJtINde+xMuuj+zkCVWabZveUtBTuPsjrkyBxF5UpfoPI bIZEOP+XZeqtdd2fqvx1/EfP70mHEtjBRCtF/fKU6tpLQPzsutmKKufEqbBQyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676188631; a=rsa-sha256; cv=none; b=du0voL2wCopDURJUPm1oIwmueqyYqWPOS+yV3pGa3p8jObDzp+63+ye16cbAyR0CFzfWs/ XCMxM9rl350ENmG58kAYJDBCHnhRJnqQEKs35mJki6H6RFg0UXtffExGsBm2bAXDpTyoNB BGL93b1aD5y2BvF3zy22RU1Zbm8Lfuvj0wkJEmI6/uUMy5YqCMWtooQhaz/QQwuZfRf3FL 30KkYqOKS9CRN0PJG2QCd7gCEyZ8nKyrHnEHWJ8LiV5RWjg/Pn5aBIdD8uHnz4U86FHTNH 53jzQhPmh67cjp1Y6OueruDkl6CmEJVtuAfQXingidqwnzVeeWc6N14B03hXfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PF0Dl0NbgzVwf; Sun, 12 Feb 2023 07:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31C7vATi068259; Sun, 12 Feb 2023 07:57:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31C7vAma068258; Sun, 12 Feb 2023 07:57:10 GMT (envelope-from git) Date: Sun, 12 Feb 2023 07:57:10 GMT Message-Id: <202302120757.31C7vAma068258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 77733aaa51c2 - stable/13 - sbin/ping6: Remove remains of ping6. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 77733aaa51c2d1f40e7a0381c9958d07627a3bb5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=77733aaa51c2d1f40e7a0381c9958d07627a3bb5 commit 77733aaa51c2d1f40e7a0381c9958d07627a3bb5 Author: Xin LI AuthorDate: 2023-01-29 23:21:25 +0000 Commit: Xin LI CommitDate: 2023-02-12 07:56:57 +0000 sbin/ping6: Remove remains of ping6. (cherry picked from commit 195ec47b478a66fd935d59b2d189705f06f601cf) --- sbin/ping6/Makefile.depend.options | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sbin/ping6/Makefile.depend.options b/sbin/ping6/Makefile.depend.options deleted file mode 100644 index a1c8f6278e92..000000000000 --- a/sbin/ping6/Makefile.depend.options +++ /dev/null @@ -1,8 +0,0 @@ -# $FreeBSD$ -# This file is not autogenerated - take care! - -DIRDEPS_OPTIONS= CASPER - -DIRDEPS.CASPER.yes= lib/libcasper/services/cap_dns - -.include From nobody Sun Feb 12 07:59:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF0H61VRpz3q1hS; Sun, 12 Feb 2023 07:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF0H60rJ4z3L3S; Sun, 12 Feb 2023 07:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676188754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qwpTy21gAiv1Pb6a8htm5PWlF5LiL/5lfu3Yd4ZHTQ0=; b=mjWpj9lUQmh7y+kI2B+WNO069X73nkDvaDMgeFh7AAwklYM/XHF+7IEF9LOqA2TYdvRO5Z jaO9HVoq32dqobEm9IVr8dm9oresElOGEtI1YWlmxoj2hWCQEx7Qf9thwyeVTmHEsNplgX qTv3ulJ3betpxYvhBKDAH4nS9MZjgMV62XHOKGfs5wK6r0kiUG6eUNiovvC+eD62Ly/Ufv TDZS2MZsEy4h67swRKjwy1IReImuZG9fGPLB04XfkHnXmOqOYqHBTm0XSkNO062bVBVLaN 6v+VkojYEKX0A2muzr0sGGsqE3eYfOX5mvZe2Sa8O2l1FdBbwKF7M4gVopVWOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676188754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qwpTy21gAiv1Pb6a8htm5PWlF5LiL/5lfu3Yd4ZHTQ0=; b=GtmNTzE96hvfxouWS4RHU8uFqf9w/E24nQM30otelRKOP2NuNBwsnd2KIVArycfulWyBX9 LmgDhMAGomGynKbm3Vur8ccvMslgQ5zZzknX/N8d/gTkwvd1kq3PCfmj2c1pXQdMkKq3RJ eY0T+rNK+1SwfRlzdwpXg0MHupi05h9P8IAzMQX7yN7lKHkfF11GgB6zDLBkinOWkZBt4h 8VfIwlWySehVGJ1ugq0AoEdXi+7ZfrrH82fKp5gfESjFGmQR9SEM0Je+Sx1vj0HxdEfGwN LAmsXWkCDXmLP2yfEKJrfJP1ARqVqV5aA4u50dlF3lq/801A55Hm+IxqjXEFKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676188754; a=rsa-sha256; cv=none; b=klywVii5mQKzI4opcTcgN12O4PW6xYqBvafE03zRjJg1f0WNtMJDtDSwnT/W3G29XRCM0d wdFuo7aNLgtBT1LUgXYu8wrs2jF3aOP6yl5jYaFWs07rcy4ll6ac8lyKN07t+q3bNtejQO KmCBeL4S00+qUOttujtNdRNhAdNowZN1zvATZ7k6ERP5MVYwQGRi8larWiBf23PoIzsS9+ EkK9KGqQ3b+WXaauJxA2aDrQRqyiFg7pVY9NokcElT6OHnXec3ruypZ8wbat4iiv/02Ar0 1bMvYeTxyXBw2aazY+QsDRxtSYDr0G6ahARYWvXRMUn+sB5K/KyDi+b0QEBQtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PF0H56v6vzW7l; Sun, 12 Feb 2023 07:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31C7xD00068595; Sun, 12 Feb 2023 07:59:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31C7xDrt068594; Sun, 12 Feb 2023 07:59:13 GMT (envelope-from git) Date: Sun, 12 Feb 2023 07:59:13 GMT Message-Id: <202302120759.31C7xDrt068594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: ffb598d0953a - stable/12 - rescue: Add fetch(1) to the rescue tool. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ffb598d0953a328b30744ac56e8f1fd0344fd733 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=ffb598d0953a328b30744ac56e8f1fd0344fd733 commit ffb598d0953a328b30744ac56e8f1fd0344fd733 Author: John Grafton AuthorDate: 2023-01-29 23:05:15 +0000 Commit: Xin LI CommitDate: 2023-02-12 07:58:55 +0000 rescue: Add fetch(1) to the rescue tool. After a failed upgrade, having fetch(1) on a system that is physically unnreachable would be very useful to download files required to get the OS back up and functional. On my system this adds 589,824 bytes (3.8%) to the binary size. PR: 266224 Reported by: Dan Mahoney Differential Revision: https://reviews.freebsd.org/D38193 (cherry picked from commit ea34aa4780e5a581732520ea579342af94684882) rescue: Fix link order of SSL libraries and fetch. ld.bfd requires libraries to be linked in order. libssl requires libcrypto. libfetch requires libssl. To fix the latter, move fetch up above tar rather than listing the ssl libraries twice. Reviewed by: delphij Fixes: ea34aa4780e5 rescue: Add fetch(1) to the rescue tool. Differential Revision: https://reviews.freebsd.org/D38304 (cherry picked from commit 0f031350f32b8760e0843a6476d67aa21116103b) --- rescue/rescue/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 6a1f7d9c768e..8faf4d29877b 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -198,10 +198,13 @@ CRUNCH_PROGS_usr.bin+= zstd CRUNCH_ALIAS_zstd= unzstd zstdcat zstdmt CRUNCH_LIBS+= ${LDADD_zstd} +CRUNCH_PROGS_usr.bin+= fetch +CRUNCH_LIBS+= -lfetch + CRUNCH_PROGS_usr.bin+= tar CRUNCH_LIBS+= -larchive .if ${MK_OPENSSL} != "no" -CRUNCH_LIBS+= -lcrypto +CRUNCH_LIBS+= -lssl -lcrypto .endif CRUNCH_LIBS+= -lmd From nobody Mon Feb 13 01:19:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFRMw1rXMz3ptbF; Mon, 13 Feb 2023 01:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFRMw1MpTz3hYb; Mon, 13 Feb 2023 01:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676251196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6a/L03ji6ei7jK3J0YtlzMY6HHruIkxdCvIq5eZ2lQk=; b=N98v7VaMOd/DuW3q3O449nPfg8rNL99fi8G4Eq4mATPAGe9J/FxHmvYcRPq2y261FuTR27 psfrrhKmFbX+lrrt7nTpxpNbUSF/eg/o2ZJanKhRhDPWaI+Qv7uxFMU4M5xYCUaq9iLOuQ E+yLyXNvMBxFeos4skt7jlIFzm5YOhu2lYfe5sxbgDu5eHfyP4jc7bsPiYYp72up+Otsa4 IQJVWf17MCJeWAu/A6h2pXEDUvv7ZLb4PchN4adCM6QRNjLBormgqCy+jXmksO/r1Sh8j2 NXpkAYxufubP1lBZndny9Yakzw8Qe4PMZ2EWRXygFg118lhmHlJEbb/pIa0/rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676251196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6a/L03ji6ei7jK3J0YtlzMY6HHruIkxdCvIq5eZ2lQk=; b=jcGc03r1q5Tqbuba7nAqpsxmtoo6Up+NsEhY/9o3F2+jetCB6uDkmq+idVLzBDdFop3NGQ EaHwj2NZlFlv7lllADSzrhO3CQrScoMKVSnRforFzW0F3tV3A0RWGqufE1n5GS66OvSyVO qz05hpzhX92JTZibojl44kkQ8aO0Mqp+PAhvESYqxjrosY6GdG8EUNs8dncKRAuI/wKBXY 9IRwopT1qq+QbviCcp2sPZQBujlctNT3TddKXHeiN4sMn9IWj2WBxuIpW+Mgug/QKscCY8 +MAxW8LN0yO5EYrM8D4AixUPiYPk46EbuaifL6b8Wc7NIlYbdpL5EnQXTcrGMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676251196; a=rsa-sha256; cv=none; b=hTdyTvUTR+LiGzkTGRjNUqM/2W82qB5CeggXjc98smnxPEwJwgsO28ZkZptdCmaPnYfJTk JuJrmWT5XgfVsmNJvQ79846xr5SHelhRL+uVyiVU4nNdNRF/PqEXBQ9usS3J8wHHju9P4N xbDgUkTIi9oVo3RhQXOq8sN5JmMLymRpqGUllDlMYHEA5SRxmtooTwy+C5PfvL+wXavx5p fpbB51ldT8uE5ekGV/jrnNfTr7H42qi78H9zp9Jtsg8/JX/6GPBhyHvL5RGOvoUI8mGvnN +HBSemX34ZVB/sAUPbRsnpFKb2RVPenmEpmVj4UjEcpURrruqRTwQ3Tpn5melA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFRMw0QLnz10dY; Mon, 13 Feb 2023 01:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31D1JtaK054398; Mon, 13 Feb 2023 01:19:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D1JtG3054397; Mon, 13 Feb 2023 01:19:55 GMT (envelope-from git) Date: Mon, 13 Feb 2023 01:19:55 GMT Message-Id: <202302130119.31D1JtG3054397@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: 59ab4b95129d - stable/13 - ssh: fix SIZEOF_TIME_T #define on i386 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 59ab4b95129dd5d64a52e0822b4fb5621bf65e9c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=59ab4b95129dd5d64a52e0822b4fb5621bf65e9c commit 59ab4b95129dd5d64a52e0822b4fb5621bf65e9c Author: Ed Maste AuthorDate: 2023-02-08 18:31:44 +0000 Commit: Ed Maste CommitDate: 2023-02-13 01:19:51 +0000 ssh: fix SIZEOF_TIME_T #define on i386 Reported by: imp Reviewed by: imp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38443 (cherry picked from commit 1aa9a35f6361cc898e2323e1f2823771eb4161da) --- crypto/openssh/config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 55ad3be64e69..e267ba122719 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -1941,7 +1941,11 @@ #define SIZEOF_SHORT_INT 2 /* The size of `time_t', as computed by sizeof. */ +#ifdef __i386__ +#define SIZEOF_TIME_T 4 +#else #define SIZEOF_TIME_T 8 +#endif /* Define as const if snprintf() can declare const char *fmt */ #define SNPRINTF_CONST const From nobody Mon Feb 13 01:20:31 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFRNb6WVnz3ptq0; Mon, 13 Feb 2023 01:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFRNb5ykLz3hqw; Mon, 13 Feb 2023 01:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676251231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A9WmiFF9Nnb5HY3GtjVcHObxYytbeBqDeyEi48IUHSE=; b=YPgWtZj/wVssymFlQsLFEglp2dYv4ndd/OpHBT2B6dkz6nse1ZToT482Exn0/c3DOGU0GE Upswt0hC6lGf0X0jK8HdL7FmzmoLQNyn9yysgF1YoZBp9tFUHvySaah8SMcfW0xzXGZy0j dSrzHLuZFfy+QMJNla2QBiSCgeOQIXBY1bTEXCKScqNttfjTb/9R9M2XqGlUhW4tP81Qz5 78R47ZDDKv9BfFwotdBtgXmxaF5zPW97J7R73OaPm1M642bhMTQnzoXggrm9MmcjtATel+ z+hDVSR6cXD/wD5Zre1pKKW33ZUTCEEf/2phwzlUx+ncmU0i6+bb8ehACMJxOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676251231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A9WmiFF9Nnb5HY3GtjVcHObxYytbeBqDeyEi48IUHSE=; b=ro4BpMUIyWkY/ik/AwebQQFQFhih11W66Du3/zoF09EQ8pCL0Hl986/tZCrlurCueVnH9d pxGXzUCLjmkcgZsfTTyQAMSV8SndSVli6QQiGRFvXYeL+OAGyBPlMtn2g7fOkty9QNjPsX uUf0doTdkfDovb/fYjtX4tUbzn+gDOChUcclL4xZ3p1b3TAzpbE4EZzp++881N0/5g2k+U n3IVifGVhgvaQpm+RKDL+sPMnEcKTq1am438l8Y732YIwwAFTf3pNZZCTbE9do819VYKO5 IdBc2fqfJKjQG0SZV8C7pTxzq5B2alt3RGNeqJ9u1g/B/kVyynq2bZHk4TKwhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676251231; a=rsa-sha256; cv=none; b=GEjVc5t2Qk/JoFMLWtZvFVUk/32VMF8Kh6Lv77ABA2C4ZUAt4FAfpniiOWBHQo3UC6681r YWVkb+yBhYUfOkEvd01FJXQTiehvO7mZc+hYwa8DD8R1sfwWg+jKmp3G/NLmbMHroiK7vb jv6MtPYC3Hr3AMfO6rlZRJ7YsPavY9aKyXx8E8ktDNMjssG1U0ZVQjcdKpY4DlldRpWMHX biOaRALmNGCqFZ/J4VbIYuEjWMdmPINCQDYDz4apOrES35/oidNqdvAAvN2fReDHJkBD7C e0Pmw31sztq7o2Obywy0ORnZG5RgnDY8vYMQDZhUgSOVwGNkVoc3y5Fk6FR99w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFRNb529czyg3; Mon, 13 Feb 2023 01:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31D1KVHY062948; Mon, 13 Feb 2023 01:20:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D1KVsq062947; Mon, 13 Feb 2023 01:20:31 GMT (envelope-from git) Date: Mon, 13 Feb 2023 01:20:31 GMT Message-Id: <202302130120.31D1KVsq062947@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: d795444930d1 - stable/12 - ssh: fix SIZEOF_TIME_T #define on i386 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: d795444930d17ae2a5c3e44ba0b8f4eb4404118f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d795444930d17ae2a5c3e44ba0b8f4eb4404118f commit d795444930d17ae2a5c3e44ba0b8f4eb4404118f Author: Ed Maste AuthorDate: 2023-02-08 18:31:44 +0000 Commit: Ed Maste CommitDate: 2023-02-13 01:20:24 +0000 ssh: fix SIZEOF_TIME_T #define on i386 Reported by: imp Reviewed by: imp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38443 (cherry picked from commit 1aa9a35f6361cc898e2323e1f2823771eb4161da) (cherry picked from commit 59ab4b95129dd5d64a52e0822b4fb5621bf65e9c) --- crypto/openssh/config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 55ad3be64e69..e267ba122719 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -1941,7 +1941,11 @@ #define SIZEOF_SHORT_INT 2 /* The size of `time_t', as computed by sizeof. */ +#ifdef __i386__ +#define SIZEOF_TIME_T 4 +#else #define SIZEOF_TIME_T 8 +#endif /* Define as const if snprintf() can declare const char *fmt */ #define SNPRINTF_CONST const From nobody Mon Feb 13 10:58:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFhCv0gQ9z3q2ML; Mon, 13 Feb 2023 10:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFhCv05hQz3mp8; Mon, 13 Feb 2023 10:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676285931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKHQIcjbcXQ1sy3GJBmbK9IzIxXRqApV3CprA92w3UY=; b=fBiBS8LwRNM9DwUCVKgZbVxyWSxI1ZD5zkU4HwFfy/FMaAHi7ZI4aebTtGQvgregdPXULj 9OqY2qJXHNG96wa1Yt52lAyvgEuRLDh3HRL2h4roK3XQpoJ22pVbKnrMG5xZdfa54ECUVF K9pWUaOJxG+t+k79u6eLrKygmL91uINEJdhSuAcybIkwjqj+9SgWwHueUKP7vQ+551T2C7 l2+XWIBeSXp07e7eTxP8+OVOJtLLcFa55vuoqRhVRLgV1SiP/NoIJQoap+fjrm4qsiOn68 xvdFnFZi1uKgdDJytDPhujqF8ixsBys10FuvOPKVi9XHJtktToqZxHIMlqhZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676285931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKHQIcjbcXQ1sy3GJBmbK9IzIxXRqApV3CprA92w3UY=; b=CGmeFrrynp5hcI5dCx2DM57TnPnaeI3YkIw2vpRS1cYrGZ7PNtlAxER22mgXzyD+LbuRmD T5Qg0Nba9s/nZBR0JLauEd2Ue4EO8wUQTXuHdsYFRJChflTa6SzoMqQTZZL0V9cKbsoBPK jtkJFilZfYnsl+PPMmpfDArPFR1WnSDCcNK6zw2FouH4G/iiLefQF3y0Ct7Httk7dBLo5z qF9emGD3XOiMmHv5m7helN31x4ovVoZaNQBRpdVlCx2yMCW5pmc43cNrD60Nu7ZJCkpriA fvLgdj6Powzf397fLo5l7SeABaqgrxzk4s2or+Zh8QJvC/ir7/2SE8i7DWo1RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676285931; a=rsa-sha256; cv=none; b=hOvbPFFPafnvSz6oq6fu6swa0zfcaylPFec07Xk7YMFFvNBKphW6nkXGaFZLGG6RyFPbDQ 6g27wVmoPx53uKvKdFDbmOqsVJo6rrUxg2WiJcY5+51CmtwAzZGUHqoMA/5DjtiN/kSU35 Rbc2CCdNQJRS+Bw0Q1ZE/IRHWG6knqs1A5PzE2syPywC4BBiCMy+dEk8BZYXf6VHNIonop TyxQmoosyEVT7i0ZqrSrMScz86EWVhbsUuZlDHyYFWrfhvWC6HOQeihNf+AC4biJr5XHpn ZM+hQFXkAIGVafjf25AvGy7/KEN5RXl1NlnUQFLAWHPyHSAXGJBCZFUUd/BdyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFhCt69L6zFwq; Mon, 13 Feb 2023 10:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31DAwo8P080471; Mon, 13 Feb 2023 10:58:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DAwoQM080470; Mon, 13 Feb 2023 10:58:50 GMT (envelope-from git) Date: Mon, 13 Feb 2023 10:58:50 GMT Message-Id: <202302131058.31DAwoQM080470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Tijl Coosemans Subject: git: 412d15f7268e - stable/13 - local-unbound-setup: Use default root certificates List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 412d15f7268e0662909822b1aef71536a2b285e5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tijl: URL: https://cgit.FreeBSD.org/src/commit/?id=412d15f7268e0662909822b1aef71536a2b285e5 commit 412d15f7268e0662909822b1aef71536a2b285e5 Author: Tijl Coosemans AuthorDate: 2023-01-19 17:13:35 +0000 Commit: Tijl Coosemans CommitDate: 2023-02-13 10:52:20 +0000 local-unbound-setup: Use default root certificates Don't force /etc/ssl/cert.pem. It does not exist by default, only if security/ca_root_nss is installed. Just use the default OpenSSL search locations which are /etc/ssl/cert.pem and /etc/ssl/certs/. The tls-system-cert option was added in Unbound 1.16.0. Reviewed by: zlei MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38243 (cherry picked from commit 8932f7ce1783a10e9ba79c61d54077aa7693552e) --- usr.sbin/unbound/setup/local-unbound-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh index 3be78339b0ba..dc0768a672a6 100755 --- a/usr.sbin/unbound/setup/local-unbound-setup.sh +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh @@ -260,7 +260,7 @@ gen_unbound_conf() { echo " pidfile: ${pidfile}" echo " auto-trust-anchor-file: ${anchor}" if [ "${use_tls}" = "yes" ] ; then - echo " tls-cert-bundle: /etc/ssl/cert.pem" + echo " tls-system-cert: yes" fi echo "" if [ -f "${forward_conf}" ] ; then From nobody Mon Feb 13 11:41:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFj9f1TMsz3qMd2; Mon, 13 Feb 2023 11:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFj9f12bcz3rjk; Mon, 13 Feb 2023 11:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676288518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7E04MHfdHglgGizkawX615DthpOJW9yIK392RhE1KPc=; b=rjnx7L7IpR1G/EoNfayABmKkkbSxsEU2L+IcuVo6jfUlcGXA0HcFnqP0aY7rxcOIedbYdd r5OxVE1pwfkj6kBB8ML4OEIGOYZu4XhS4Mas6ZvtgaAYDO8rWltGh0X3o3ZGJs0DiIHf8i xu4PQHzVaU/BI/VGFAJd5vvXhegEbx32G+afX1BtJjDZ5dn0yc+l1Vm6E9EMLEjHm+uShw 6aV3zxrOJUstGDA94HcdZ03CgsKTb37CxAJNqu4b4p0tl8qouud8Zi6fj9nUjAMpGB1OcO u8aNmYUc2mPKqbfoA7XHe4jbVZQaO8h1uFePBEtvXgcLJMvLS30yCOk1RCNyHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676288518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7E04MHfdHglgGizkawX615DthpOJW9yIK392RhE1KPc=; b=tRwzYAKaAkNk3g0VvKF9wW6Iu4Fy5cx88anrm5f3UnHev8JiLGlOJrSB718TDmEXAjLLKc bgyJh0Zi5+UwbGaydzehSc7ED42h1EABFJ2zXaFopZ0V2kuvbf6L/+H8Hv+zOvbJ+fd6nY x95eWBkFsvdGmdWFgAdZTn9nfCYCIBzzxcRQBz3u4QpIEwXaQYnsEzBJ3WmfJFNnsI2mif SF7vVfPy6Dja4klfiAbm5dxrv1tFq6LcQ/HT4T+tM9gOMAaR+CIUuywctJNK4/CYcDW797 WtTZeR8+yWfQEIRLiYq0FeWVYTS+hAgSZ8dwjqxSIPkQ/twNgJGKEE2Fl4Imbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676288518; a=rsa-sha256; cv=none; b=ZUyNzKtDlGeW/o0JknFe8MtbBHr2U5wqq0p/pz8cU+VTdtJFaJE0pzBSLpqqC2s6DC84D4 FfbNCuYIkW7KEa7PaD90tVW2GTi5GTrXgdqswwu/G5DMY0EldREc7ktv5bUNwFVYURxCzi ksyZ07NqvBNyn/b9abc2NYVwDjY2xtnQiQ4vROSYgMiCU/4r++AhOSFmk2Hw5p3mzn3MId 5YBBWxnyEPHT3mtm7VbxSbOFlIJrdI8h5WPoOP4sTwLHYLwvR3vBz0gcccxW7I5Q3Uiyc3 EqDer6KV0JkEddQ530txUsATiVsETm8m6xnXwdGGdq8zc4e4UfDA5tGAU4UxAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFj9f04qfzH77; Mon, 13 Feb 2023 11:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31DBfvcL051391; Mon, 13 Feb 2023 11:41:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DBfvSX051390; Mon, 13 Feb 2023 11:41:57 GMT (envelope-from git) Date: Mon, 13 Feb 2023 11:41:57 GMT Message-Id: <202302131141.31DBfvSX051390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Tijl Coosemans Subject: git: f73d4bfc1385 - stable/12 - local-unbound-setup: Use default root certificates List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f73d4bfc1385072559659d5cded1a714e797d37b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by tijl: URL: https://cgit.FreeBSD.org/src/commit/?id=f73d4bfc1385072559659d5cded1a714e797d37b commit f73d4bfc1385072559659d5cded1a714e797d37b Author: Tijl Coosemans AuthorDate: 2023-01-19 17:13:35 +0000 Commit: Tijl Coosemans CommitDate: 2023-02-13 11:40:50 +0000 local-unbound-setup: Use default root certificates Don't force /etc/ssl/cert.pem. It does not exist by default, only if security/ca_root_nss is installed. Just use the default OpenSSL search locations which are /etc/ssl/cert.pem and /etc/ssl/certs/. The tls-system-cert option was added in Unbound 1.16.0. Reviewed by: zlei MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38243 (cherry picked from commit 8932f7ce1783a10e9ba79c61d54077aa7693552e) --- usr.sbin/unbound/setup/local-unbound-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh index 0a3b80b18e60..b6fa4112096e 100755 --- a/usr.sbin/unbound/setup/local-unbound-setup.sh +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh @@ -260,7 +260,7 @@ gen_unbound_conf() { echo " pidfile: ${pidfile}" echo " auto-trust-anchor-file: ${anchor}" if [ "${use_tls}" = "yes" ] ; then - echo " tls-cert-bundle: /etc/ssl/cert.pem" + echo " tls-system-cert: yes" fi echo "" if [ -f "${forward_conf}" ] ; then From nobody Mon Feb 13 13:16:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFlH35Ykrz3qXYg; Mon, 13 Feb 2023 13:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFlH35G7Wz45bt; Mon, 13 Feb 2023 13:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676294207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9jXDfheVukxEQ+rTcaOxmiMNxFrBIaoZ5uGehMlUHUY=; b=JYBw2KuJzZuUXRmGjvnZgMvYfT4XdppEEI6n3xoQUaaQzo5xcUOXd0jjusALAuL5yzSNzR t9haZn2XwTfcjprIUlSSrXP17GyNCI/OkB7Np8U/rBbWMLudtfIjSAF7WNXikt6+vA05df whRFtmA6vWzi8KT9y7uJYSj05fjOqnmPP/r+D+rkvhgoCILI/u/WmE/jej8fOv+YHsbfOb NPe66JR9mRpqd2aolpbC93f7sJ6Gs/ydNyoZIn9sw+K4f1mI85LwBr5JBfY2BIe2CPiSmd +YKJZzPGz8Q8px+F8s0FQdH9S+Xnet+3HS18fPMMscDnn2j4MzHH4bOQK7iozQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676294207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9jXDfheVukxEQ+rTcaOxmiMNxFrBIaoZ5uGehMlUHUY=; b=JlUkuoTsSEl/bhsTqMAF6OVokU0Pa4ro+bttpDfDrtilHP818Li9a1km10H2NqK0CxoIhG JXkzt+ubtel6XytBVf9He/ersYUxAftU+ybC6us40h35MN4YhqJzPPr+JInCJM4U7Y8d0F pSG9/u5eOY6PhVtljY6MzEOwNX1/45a9xZ1wpQS+gtgT4wRi1sKr3Uc6/ndwVtWV4Mjp7B gEuXFwMSS48qpPRg7vlJTABt/dksws6l8WmpamP217weQedTi550RsqiPW9y55pJYIlM8q 7uGEZonYNVecpCusBTI4P5mk1IM0VncLiQvnNxNl2rVSv3ybE1dU5J69PmmkGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676294207; a=rsa-sha256; cv=none; b=ITibhFca4PaHvSO36uoFhjRcGJhyKxLvTbE0WNwqIqg4Nt4no3N73pDhOfKljgd9MN92oS NfI0QH2VMVTgCewqlDOHVLSQTcrx27bc6x9a8Cb3+3mcW+yMiIunW/XLp9DfRnwvVSKcsp BEYhDViqKYlVdQ2RsQFMtLKCNfC0MUq+4WocvL9zyMVptrb9jU6yhSMo65E4zgdqBwDEom iZBqBgSmVvRFq6ulo/2j+uX4fWY4T3OwAy0eqLGFB8AEmMu+JNVuyORehG3wvM72ypn4iP VIq/McpBZ1xqcEQtSgSPuAdh4jR7MMr6s0VgcmAdJGv+sCQCNE6yyw0TUq/TCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFlH34Jr3zKPX; Mon, 13 Feb 2023 13:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31DDGlnv081149; Mon, 13 Feb 2023 13:16:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DDGkCc081144; Mon, 13 Feb 2023 13:16:46 GMT (envelope-from git) Date: Mon, 13 Feb 2023 13:16:46 GMT Message-Id: <202302131316.31DDGkCc081144@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: 2f43f145825d - stable/13 - ssh: update to OpenSSH 9.2p1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 2f43f145825d0d8468f583b1686262b0f40c1fe5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2f43f145825d0d8468f583b1686262b0f40c1fe5 commit 2f43f145825d0d8468f583b1686262b0f40c1fe5 Author: Ed Maste AuthorDate: 2023-02-06 21:54:56 +0000 Commit: Ed Maste CommitDate: 2023-02-13 13:16:22 +0000 ssh: update to OpenSSH 9.2p1 Release notes are available at https://www.openssh.com/txt/release-9.2 OpenSSH 9.2 contains fixes for two security problems and a memory safety problem. The memory safety problem is not believed to be exploitable. These fixes have already been committed to OpenSSH 9.1 in FreeBSD. Some other notable items from the release notes: * ssh(1): add a new EnableEscapeCommandline ssh_config(5) option that controls whether the client-side ~C escape sequence that provides a command-line is available. Among other things, the ~C command-line could be used to add additional port-forwards at runtime. * sshd(8): add support for channel inactivity timeouts via a new sshd_config(5) ChannelTimeout directive. This allows channels that have not seen traffic in a configurable interval to be automatically closed. Different timeouts may be applied to session, X11, agent and TCP forwarding channels. * sshd(8): add a sshd_config UnusedConnectionTimeout option to terminate client connections that have no open channels for a length of time. This complements the ChannelTimeout option above. * sshd(8): add a -V (version) option to sshd like the ssh client has. * scp(1), sftp(1): add a -X option to both scp(1) and sftp(1) to allow control over some SFTP protocol parameters: the copy buffer length and the number of in-flight requests, both of which are used during upload/download. Previously these could be controlled in sftp(1) only. This makes them available in both SFTP protocol clients using the same option character sequence. * ssh-keyscan(1): allow scanning of complete CIDR address ranges, e.g. "ssh-keyscan 192.168.0.0/24". If a CIDR range is passed, then it will be expanded to all possible addresses in the range including the all-0s and all-1s addresses. bz#976 * ssh(1): support dynamic remote port forwarding in escape command-line's -R processing. bz#3499 MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit f374ba41f55c1a127303d92d830dd58eef2f5243) --- crypto/openssh/.depend | 8 +- crypto/openssh/.github/ci-status.md | 12 +- crypto/openssh/.github/configs | 43 +- crypto/openssh/.github/setup_ci.sh | 19 +- crypto/openssh/.github/workflows/c-cpp.yml | 155 +- crypto/openssh/.github/workflows/cifuzz.yml | 32 + crypto/openssh/.github/workflows/selfhosted.yml | 94 +- crypto/openssh/.github/workflows/upstream.yml | 29 +- crypto/openssh/.skipped-commit-ids | 2 + crypto/openssh/ChangeLog | 15052 +++++++++---------- crypto/openssh/INSTALL | 2 +- crypto/openssh/Makefile.in | 9 +- crypto/openssh/PROTOCOL | 4 +- crypto/openssh/README | 2 +- crypto/openssh/README.md | 3 +- crypto/openssh/aclocal.m4 | 4 +- crypto/openssh/addr.c | 73 +- crypto/openssh/addr.h | 4 + crypto/openssh/auth-pam.c | 16 +- crypto/openssh/auth-rhosts.c | 4 +- crypto/openssh/auth.c | 11 +- crypto/openssh/channels.c | 246 +- crypto/openssh/channels.h | 24 +- crypto/openssh/clientloop.c | 171 +- crypto/openssh/config.guess | 1206 +- crypto/openssh/config.h | 3 + crypto/openssh/config.sub | 674 +- crypto/openssh/configure.ac | 84 +- crypto/openssh/contrib/redhat/openssh.spec | 2 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/crypto_api.h | 4 +- crypto/openssh/ed25519.c | 2048 ++- crypto/openssh/ed25519.sh | 119 + crypto/openssh/entropy.c | 34 - crypto/openssh/fe25519.c | 337 - crypto/openssh/fe25519.h | 70 - crypto/openssh/ge25519.c | 321 - crypto/openssh/ge25519.h | 43 - crypto/openssh/ge25519_base.data | 858 -- crypto/openssh/install-sh | 422 +- crypto/openssh/kex.c | 6 +- crypto/openssh/misc.c | 97 +- crypto/openssh/misc.h | 11 +- crypto/openssh/moduli | 843 +- crypto/openssh/monitor_wrap.c | 3 +- crypto/openssh/mux.c | 6 +- crypto/openssh/openbsd-compat/arc4random.c | 12 +- crypto/openssh/openbsd-compat/arc4random.h | 10 + crypto/openssh/openbsd-compat/bsd-getentropy.c | 7 +- crypto/openssh/openbsd-compat/bsd-poll.c | 38 +- crypto/openssh/openbsd-compat/bsd-poll.h | 25 +- crypto/openssh/openbsd-compat/bsd-timegm.c | 52 +- crypto/openssh/openbsd-compat/getrrsetbyname.c | 12 +- crypto/openssh/openbsd-compat/openbsd-compat.h | 5 +- crypto/openssh/openbsd-compat/regress/Makefile.in | 7 +- .../openbsd-compat/regress/opensslvertest.c | 2 + crypto/openssh/readconf.c | 14 +- crypto/openssh/readconf.h | 4 +- crypto/openssh/regress/Makefile | 7 +- crypto/openssh/regress/agent-getpeereid.sh | 11 +- crypto/openssh/regress/agent-ptrace.sh | 1 + crypto/openssh/regress/channel-timeout.sh | 91 + crypto/openssh/regress/connection-timeout.sh | 87 + crypto/openssh/regress/dynamic-forward.sh | 127 +- crypto/openssh/regress/hostbased.sh | 4 +- crypto/openssh/regress/krl.sh | 6 +- crypto/openssh/regress/multiplex.sh | 3 +- crypto/openssh/regress/percent.sh | 20 +- crypto/openssh/regress/reexec.sh | 4 +- crypto/openssh/regress/scp-uri.sh | 4 +- crypto/openssh/regress/scp.sh | 51 +- crypto/openssh/regress/scp3.sh | 10 +- crypto/openssh/regress/test-exec.sh | 14 +- crypto/openssh/regress/unittests/hostkeys/Makefile | 4 +- crypto/openssh/regress/unittests/kex/Makefile | 6 +- .../openssh/regress/unittests/kex/test_proposal.c | 83 + crypto/openssh/regress/unittests/kex/tests.c | 4 +- .../openssh/regress/unittests/misc/test_ptimeout.c | 85 + crypto/openssh/regress/unittests/misc/tests.c | 4 +- crypto/openssh/regress/unittests/sshkey/Makefile | 4 +- .../openssh/regress/unittests/sshkey/test_sshkey.c | 4 +- crypto/openssh/regress/unittests/sshsig/Makefile | 4 +- crypto/openssh/regress/yes-head.sh | 4 +- crypto/openssh/sandbox-seccomp-filter.c | 5 +- crypto/openssh/sc25519.c | 308 - crypto/openssh/sc25519.h | 80 - crypto/openssh/scp.1 | 29 +- crypto/openssh/scp.c | 163 +- crypto/openssh/servconf.c | 138 +- crypto/openssh/servconf.h | 10 +- crypto/openssh/serverloop.c | 98 +- crypto/openssh/session.c | 27 +- crypto/openssh/session.h | 4 +- crypto/openssh/sftp-client.c | 25 +- crypto/openssh/sftp-glob.c | 34 +- crypto/openssh/sftp-server.c | 4 +- crypto/openssh/sftp.1 | 18 +- crypto/openssh/sftp.c | 36 +- crypto/openssh/sntrup761.c | 44 +- crypto/openssh/sntrup761.sh | 5 +- crypto/openssh/ssh-agent.1 | 27 +- crypto/openssh/ssh-agent.c | 9 +- crypto/openssh/ssh-dss.c | 284 +- crypto/openssh/ssh-ecdsa-sk.c | 170 +- crypto/openssh/ssh-ecdsa.c | 318 +- crypto/openssh/ssh-ed25519-sk.c | 139 +- crypto/openssh/ssh-ed25519.c | 181 +- crypto/openssh/ssh-keygen.c | 3 +- crypto/openssh/ssh-keyscan.1 | 24 +- crypto/openssh/ssh-keyscan.c | 46 +- crypto/openssh/ssh-rsa.c | 352 +- crypto/openssh/ssh-sk-helper.c | 3 +- crypto/openssh/ssh-xmss.c | 228 +- crypto/openssh/ssh.1 | 5 +- crypto/openssh/ssh.c | 42 +- crypto/openssh/ssh_config.5 | 19 +- crypto/openssh/ssh_namespace.h | 111 +- crypto/openssh/sshbuf.c | 27 +- crypto/openssh/sshbuf.h | 26 +- crypto/openssh/sshconnect.c | 9 +- crypto/openssh/sshd.8 | 8 +- crypto/openssh/sshd.c | 30 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 104 +- crypto/openssh/sshkey-xmss.c | 4 +- crypto/openssh/sshkey-xmss.h | 4 +- crypto/openssh/sshkey.c | 1993 +-- crypto/openssh/sshkey.h | 82 +- crypto/openssh/verify.c | 49 - crypto/openssh/version.h | 6 +- secure/lib/libssh/Makefile | 2 +- 131 files changed, 15622 insertions(+), 13755 deletions(-) diff --git a/crypto/openssh/.depend b/crypto/openssh/.depend index fca83a67c970..5226523aa2ad 100644 --- a/crypto/openssh/.depend +++ b/crypto/openssh/.depend @@ -50,11 +50,9 @@ digest-libc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-c digest-openssl.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h dispatch.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh2.h log.h ssherr.h dispatch.h packet.h openbsd-compat/sys-queue.h compat.h dns.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshkey.h ssherr.h dns.h log.h digest.h -ed25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ge25519.h fe25519.h sc25519.h +ed25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h entropy.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h fatal.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h ssherr.h -fe25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h fe25519.h crypto_api.h -ge25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h fe25519.h crypto_api.h sc25519.h ge25519.h ge25519_base.data groupaccess.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h groupaccess.h match.h log.h ssherr.h gss-genr.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h gss-serv-krb5.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h @@ -108,7 +106,6 @@ sandbox-rlimit.o: includes.h config.h defines.h platform.h openbsd-compat/openbs sandbox-seccomp-filter.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sandbox-solaris.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sandbox-systrace.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -sc25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sc25519.h crypto_api.h scp.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/glob.h xmalloc.h ssh.h atomicio.h pathnames.h log.h ssherr.h misc.h progressmeter.h utf8.h sftp.h sftp-common.h sftp-client.h servconf.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/glob.h openbsd-compat/sys-queue.h xmalloc.h ssh.h log.h ssherr.h sshbuf.h misc.h servconf.h compat.h pathnames.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey .h servconf.o: kex.h mac.h crypto_api.h match.h channels.h groupaccess.h canohost.h packet.h dispatch.h hostfile.h auth.h auth-pam.h audit.h loginrec.h myproposal.h digest.h @@ -137,7 +134,7 @@ ssh-ed25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-c ssh-keygen.o: cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h ssh-keygen.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshkey.h authfile.h sshbuf.h pathnames.h log.h ssherr.h misc.h match.h hostfile.h dns.h ssh.h ssh2.h ssh-pkcs11.h atomicio.h krl.h digest.h utf8.h authfd.h sshsig.h ssh-sk.h sk-api.h cipher.h ssh-keyscan.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h crypto_api.h compat.h myproposal.h packet.h dispatch.h log .h -ssh-keyscan.o: ssherr.h atomicio.h misc.h hostfile.h ssh_api.h ssh2.h dns.h +ssh-keyscan.o: ssherr.h atomicio.h misc.h hostfile.h ssh_api.h ssh2.h dns.h addr.h ssh-keysign.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h log.h ssherr.h sshkey.h ssh.h ssh2.h misc.h sshbuf.h authfile.h msg.h canohost.h pathnames.h readconf.h uidswap.h ssh-pkcs11-client.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh-pkcs11-helper.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h sshbuf.h log.h ssherr.h misc.h sshkey.h authfd.h ssh-pkcs11.h @@ -174,7 +171,6 @@ uidswap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compa umac.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h umac.h misc.h rijndael.h umac128.o: umac.c includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h umac.h misc.h rijndael.h utf8.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h utf8.h -verify.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h xmalloc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h log.h ssherr.h xmss_commons.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmss_fast.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h diff --git a/crypto/openssh/.github/ci-status.md b/crypto/openssh/.github/ci-status.md index 0ad8bf5aaf44..d13bbfa8c038 100644 --- a/crypto/openssh/.github/ci-status.md +++ b/crypto/openssh/.github/ci-status.md @@ -1,4 +1,10 @@ -[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml) -[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml) -[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml) +master : +[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:master) +[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:master) +[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml?query=branch:master) +[![CIFuzz](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh) + +9.1 : +[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_1)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_1) +[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_1)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_1) diff --git a/crypto/openssh/.github/configs b/crypto/openssh/.github/configs index 6bf1ab27f0ca..bdd5ddbdfaf0 100755 --- a/crypto/openssh/.github/configs +++ b/crypto/openssh/.github/configs @@ -9,10 +9,13 @@ # LTESTS config=$1 +if [ "$config" = "" ]; then + config="default" +fi unset CC CFLAGS CPPFLAGS LDFLAGS LTESTS SUDO -TEST_TARGET="tests" +TEST_TARGET="tests compat-tests" LTESTS="" SKIP_LTESTS="" SUDO=sudo # run with sudo by default @@ -108,7 +111,7 @@ case "$config" in kitchensink) CONFIGFLAGS="--with-kerberos5 --with-libedit --with-pam" CONFIGFLAGS="${CONFIGFLAGS} --with-security-key-builtin --with-selinux" - CONFIGFLAGS="${CONFIGFLAGS} --with-cflags=-DSK_DEBUG" + CFLAGS="-DSK_DEBUG -DSANDBOX_SECCOMP_FILTER_DEBUG" ;; hardenedmalloc) CONFIGFLAGS="--with-ldflags=-lhardened_malloc" @@ -141,6 +144,11 @@ case "$config" in ;; openssl-*) LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl --with-rpath=-Wl,-rpath," + # OpenSSL 1.1.1 specifically has a bug in its RNG that breaks reexec + # fallback. See https://bugzilla.mindrot.org/show_bug.cgi?id=3483 + if [ "$config" = "openssl-1.1.1" ]; then + SKIP_LTESTS="reexec" + fi ;; selinux) CONFIGFLAGS="--with-selinux" @@ -152,7 +160,7 @@ case "$config" in LIBCRYPTOFLAGS="--without-openssl" TEST_TARGET=t-exec ;; - valgrind-[1-4]|valgrind-unit) + valgrind-[1-5]|valgrind-unit) # rlimit sandbox and FORTIFY_SOURCE confuse Valgrind. CONFIGFLAGS="--without-sandbox --without-hardening" CONFIGFLAGS="$CONFIGFLAGS --with-cppflags=-D_FORTIFY_SOURCE=0" @@ -161,16 +169,19 @@ case "$config" in export TEST_SSH_ELAPSED_TIMES # Valgrind slows things down enough that the agent timeout test # won't reliably pass, and the unit tests run longer than allowed - # by github so split into three separate tests. - tests2="rekey integrity try-ciphers" + # by github so split into separate tests. + tests2="integrity try-ciphers" tests3="krl forward-control sshsig agent-restrict kextype sftp" tests4="cert-userkey cert-hostkey kextype sftp-perm keygen-comment percent" + tests5="rekey" case "$config" in valgrind-1) - # All tests except agent-timeout (which is flaky under valgrind) + # All tests except agent-timeout (which is flaky under valgrind), + # connection-timeout (which doesn't work since it's so slow) # and hostbased (since valgrind won't let ssh exec keysign). # Slow ones are run separately to increase parallelism. - SKIP_LTESTS="agent-timeout hostbased ${tests2} ${tests3} ${tests4}" + SKIP_LTESTS="agent-timeout connection-timeout hostbased" + SKIP_LTESTS="$SKIP_LTESTS ${tests2} ${tests3} ${tests4} ${tests5}" ;; valgrind-2) LTESTS="${tests2}" @@ -181,6 +192,9 @@ case "$config" in valgrind-4) LTESTS="${tests4}" ;; + valgrind-5) + LTESTS="${tests5}" + ;; valgrind-unit) TEST_TARGET="unit USE_VALGRIND=1" ;; @@ -210,6 +224,10 @@ case "${TARGET_HOST}" in TEST_TARGET="t-exec TEST_SHELL=bash" SKIP_LTESTS="rekey sftp" ;; + debian-riscv64) + # This machine is fairly slow, so skip the unit tests. + TEST_TARGET="t-exec" + ;; dfly58*|dfly60*) # scp 3-way connection hangs on these so skip until sorted. SKIP_LTESTS=scp3 @@ -227,12 +245,15 @@ case "${TARGET_HOST}" in # test that relies on one. # Also, Minix seems to be very limited in the number of select() # calls that can be operating concurrently, so prune additional tests for that. - T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse connect - connect-uri exit-status forward-control forwarding hostkey-agent - key-options keyscan knownhosts-command login-timeout multiplex + T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse + connect connect-uri exit-status forwarding hostkey-agent + key-options keyscan knownhosts-command login-timeout reconfigure reexec rekey scp scp-uri scp3 sftp sftp-badcmds sftp-batch sftp-cmds sftp-glob sftp-perm sftp-uri stderr-data transfer" + # Unix domain sockets don't work quite like we expect, so also skip any tests + # that use multiplexing. + T="$T connection-timeout dynamic-forward forward-control multiplex" SKIP_LTESTS="$(echo $T)" TEST_TARGET=t-exec SUDO="" @@ -260,6 +281,8 @@ esac case "`./config.guess`" in *cygwin) SUDO="" + # Don't run compat tests on cygwin as they don't currently compile. + TEST_TARGET="tests" ;; *-darwin*) # Unless specified otherwise, build without OpenSSL on Mac OS since diff --git a/crypto/openssh/.github/setup_ci.sh b/crypto/openssh/.github/setup_ci.sh index 044c4d1292b1..e4480e614f31 100755 --- a/crypto/openssh/.github/setup_ci.sh +++ b/crypto/openssh/.github/setup_ci.sh @@ -139,16 +139,29 @@ if [ "yes" = "$INSTALL_FIDO_PPA" ]; then sudo apt-add-repository -y ppa:yubico/stable fi -if [ "x" != "x$PACKAGES" ]; then +tries=3 +while [ ! -z "$PACKAGES" ] && [ "$tries" -gt "0" ]; do case "$PACKAGER" in apt) sudo apt update -qq - sudo apt install -qy $PACKAGES + if sudo apt install -qy $PACKAGES; then + PACKAGES="" + fi ;; setup) - /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,` + if /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`; then + PACKAGES="" + fi ;; esac + if [ ! -z "$PACKAGES" ]; then + sleep 90 + fi + tries=$(($tries - 1)) +done +if [ ! -z "$PACKAGES" ]; then + echo "Package installation failed." + exit 1 fi if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then diff --git a/crypto/openssh/.github/workflows/c-cpp.yml b/crypto/openssh/.github/workflows/c-cpp.yml index 3cd1188fc572..e6ea49550f71 100644 --- a/crypto/openssh/.github/workflows/c-cpp.yml +++ b/crypto/openssh/.github/workflows/c-cpp.yml @@ -2,11 +2,9 @@ name: C/C++ CI on: push: - branches: [ master, ci, V_9_0 ] - paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', 'Makefile.in', 'configure.ac' ] + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] pull_request: - branches: [ master ] - paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', 'Makefile.in', 'configure.ac' ] + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] jobs: ci: @@ -15,104 +13,109 @@ jobs: fail-fast: false matrix: # First we test all OSes in the default configuration. - os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022] - configs: [default] + target: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022] + config: [default] # Then we include any extra configs we want to test for specific VMs. # Valgrind slows things down quite a bit, so start them first. include: - - { os: windows-2019, configs: cygwin-release } - - { os: windows-2022, configs: cygwin-release } - - { os: ubuntu-20.04, configs: valgrind-1 } - - { os: ubuntu-20.04, configs: valgrind-2 } - - { os: ubuntu-20.04, configs: valgrind-3 } - - { os: ubuntu-20.04, configs: valgrind-4 } - - { os: ubuntu-20.04, configs: valgrind-unit } - - { os: ubuntu-20.04, configs: c89 } - - { os: ubuntu-20.04, configs: clang-6.0 } - - { os: ubuntu-20.04, configs: clang-8 } - - { os: ubuntu-20.04, configs: clang-9 } - - { os: ubuntu-20.04, configs: clang-10 } - - { os: ubuntu-20.04, configs: clang-11 } - - { os: ubuntu-20.04, configs: clang-12-Werror } - - { os: ubuntu-20.04, configs: clang-sanitize-address } - - { os: ubuntu-20.04, configs: clang-sanitize-undefined } - - { os: ubuntu-20.04, configs: gcc-sanitize-address } - - { os: ubuntu-20.04, configs: gcc-sanitize-undefined } - - { os: ubuntu-20.04, configs: gcc-7 } - - { os: ubuntu-20.04, configs: gcc-8 } - - { os: ubuntu-20.04, configs: gcc-10 } - - { os: ubuntu-20.04, configs: gcc-11-Werror } - - { os: ubuntu-20.04, configs: pam } - - { os: ubuntu-20.04, configs: kitchensink } - - { os: ubuntu-20.04, configs: hardenedmalloc } - - { os: ubuntu-20.04, configs: tcmalloc } - - { os: ubuntu-20.04, configs: musl } - - { os: ubuntu-latest, configs: libressl-master } - - { os: ubuntu-latest, configs: libressl-2.2.9 } - - { os: ubuntu-latest, configs: libressl-2.8.3 } - - { os: ubuntu-latest, configs: libressl-3.0.2 } - - { os: ubuntu-latest, configs: libressl-3.2.6 } - - { os: ubuntu-latest, configs: libressl-3.3.6 } - - { os: ubuntu-latest, configs: libressl-3.4.3 } - - { os: ubuntu-latest, configs: libressl-3.5.3 } - - { os: ubuntu-latest, configs: openssl-master } - - { os: ubuntu-latest, configs: openssl-noec } - - { os: ubuntu-latest, configs: openssl-1.0.1 } - - { os: ubuntu-latest, configs: openssl-1.0.1u } - - { os: ubuntu-latest, configs: openssl-1.0.2u } - - { os: ubuntu-latest, configs: openssl-1.1.0h } - - { os: ubuntu-latest, configs: openssl-1.1.1 } - - { os: ubuntu-latest, configs: openssl-1.1.1k } - - { os: ubuntu-latest, configs: openssl-1.1.1n } - - { os: ubuntu-latest, configs: openssl-1.1.1p } - - { os: ubuntu-latest, configs: openssl-3.0.0 } - - { os: ubuntu-latest, configs: openssl-3.0.5 } - - { os: ubuntu-latest, configs: openssl-1.1.1_stable } # stable branch - - { os: ubuntu-latest, configs: openssl-3.0 } # stable branch - - { os: ubuntu-22.04, configs: pam } - - { os: ubuntu-22.04, configs: krb5 } - - { os: ubuntu-22.04, configs: heimdal } - - { os: ubuntu-22.04, configs: libedit } - - { os: ubuntu-22.04, configs: sk } - - { os: ubuntu-22.04, configs: selinux } - - { os: ubuntu-22.04, configs: kitchensink } - - { os: ubuntu-22.04, configs: without-openssl } - - { os: macos-11, configs: pam } - - { os: macos-12, configs: pam } - runs-on: ${{ matrix.os }} + - { target: windows-2019, config: cygwin-release } + - { target: windows-2022, config: cygwin-release } + - { target: ubuntu-20.04, config: valgrind-1 } + - { target: ubuntu-20.04, config: valgrind-2 } + - { target: ubuntu-20.04, config: valgrind-3 } + - { target: ubuntu-20.04, config: valgrind-4 } + - { target: ubuntu-20.04, config: valgrind-5 } + - { target: ubuntu-20.04, config: valgrind-unit } + - { target: ubuntu-20.04, config: c89 } + - { target: ubuntu-20.04, config: clang-6.0 } + - { target: ubuntu-20.04, config: clang-8 } + - { target: ubuntu-20.04, config: clang-9 } + - { target: ubuntu-20.04, config: clang-10 } + - { target: ubuntu-20.04, config: clang-11 } + - { target: ubuntu-20.04, config: clang-12-Werror } + - { target: ubuntu-20.04, config: clang-sanitize-address } + - { target: ubuntu-20.04, config: clang-sanitize-undefined } + - { target: ubuntu-20.04, config: gcc-sanitize-address } + - { target: ubuntu-20.04, config: gcc-sanitize-undefined } + - { target: ubuntu-20.04, config: gcc-7 } + - { target: ubuntu-20.04, config: gcc-8 } + - { target: ubuntu-20.04, config: gcc-10 } + - { target: ubuntu-20.04, config: gcc-11-Werror } + - { target: ubuntu-20.04, config: pam } + - { target: ubuntu-20.04, config: kitchensink } + - { target: ubuntu-20.04, config: hardenedmalloc } + - { target: ubuntu-20.04, config: tcmalloc } + - { target: ubuntu-20.04, config: musl } + - { target: ubuntu-latest, config: libressl-master } + - { target: ubuntu-latest, config: libressl-2.2.9 } + - { target: ubuntu-latest, config: libressl-2.8.3 } + - { target: ubuntu-latest, config: libressl-3.0.2 } + - { target: ubuntu-latest, config: libressl-3.2.6 } + - { target: ubuntu-latest, config: libressl-3.3.6 } + - { target: ubuntu-latest, config: libressl-3.4.3 } + - { target: ubuntu-latest, config: libressl-3.5.3 } + - { target: ubuntu-latest, config: libressl-3.6.1 } + - { target: ubuntu-latest, config: libressl-3.7.0 } + - { target: ubuntu-latest, config: openssl-master } + - { target: ubuntu-latest, config: openssl-noec } + - { target: ubuntu-latest, config: openssl-1.0.1 } + - { target: ubuntu-latest, config: openssl-1.0.1u } + - { target: ubuntu-latest, config: openssl-1.0.2u } + - { target: ubuntu-latest, config: openssl-1.1.0h } + - { target: ubuntu-latest, config: openssl-1.1.1 } + - { target: ubuntu-latest, config: openssl-1.1.1k } + - { target: ubuntu-latest, config: openssl-1.1.1n } + - { target: ubuntu-latest, config: openssl-1.1.1q } + - { target: ubuntu-latest, config: openssl-1.1.1s } + - { target: ubuntu-latest, config: openssl-3.0.0 } + - { target: ubuntu-latest, config: openssl-3.0.5 } + - { target: ubuntu-latest, config: openssl-3.0.7 } + - { target: ubuntu-latest, config: openssl-1.1.1_stable } + - { target: ubuntu-latest, config: openssl-3.0 } # stable branch + - { target: ubuntu-22.04, config: pam } + - { target: ubuntu-22.04, config: krb5 } + - { target: ubuntu-22.04, config: heimdal } + - { target: ubuntu-22.04, config: libedit } + - { target: ubuntu-22.04, config: sk } + - { target: ubuntu-22.04, config: selinux } + - { target: ubuntu-22.04, config: kitchensink } + - { target: ubuntu-22.04, config: without-openssl } + - { target: macos-11, config: pam } + - { target: macos-12, config: pam } + runs-on: ${{ matrix.target }} steps: - name: set cygwin git params - if: ${{ startsWith(matrix.os, 'windows') }} + if: ${{ startsWith(matrix.target, 'windows') }} run: git config --global core.autocrlf input - name: install cygwin - if: ${{ startsWith(matrix.os, 'windows') }} + if: ${{ startsWith(matrix.target, 'windows') }} uses: cygwin/cygwin-install-action@master - - uses: actions/checkout@v2 + - uses: actions/checkout@main - name: setup CI system - run: sh ./.github/setup_ci.sh ${{ matrix.configs }} + run: sh ./.github/setup_ci.sh ${{ matrix.config }} - name: autoreconf run: sh -c autoreconf - name: configure - run: sh ./.github/configure.sh ${{ matrix.configs }} + run: sh ./.github/configure.sh ${{ matrix.config }} - name: save config - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-config + name: ${{ matrix.target }}-${{ matrix.config }}-config path: config.h - name: make clean run: make clean - name: make run: make -j2 - name: make tests - run: sh ./.github/run_test.sh ${{ matrix.configs }} + run: sh ./.github/run_test.sh ${{ matrix.config }} env: TEST_SSH_UNSAFE_PERMISSIONS: 1 TEST_SSH_HOSTBASED_AUTH: yes - name: save logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-logs + name: ${{ matrix.target }}-${{ matrix.config }}-logs path: | config.h config.log diff --git a/crypto/openssh/.github/workflows/cifuzz.yml b/crypto/openssh/.github/workflows/cifuzz.yml new file mode 100644 index 000000000000..7ca8c4719b61 --- /dev/null +++ b/crypto/openssh/.github/workflows/cifuzz.yml @@ -0,0 +1,32 @@ +name: CIFuzz +on: + push: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] + pull_request: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] + +jobs: + Fuzzing: + if: github.repository != 'openssh/openssh-portable-selfhosted' + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'openssh' + dry-run: false + language: c++ + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'openssh' + fuzz-seconds: 600 + dry-run: false + language: c++ + - name: Upload Crash + uses: actions/upload-artifact@main + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts diff --git a/crypto/openssh/.github/workflows/selfhosted.yml b/crypto/openssh/.github/workflows/selfhosted.yml index c4bd1d9b24f7..50bc9fffb723 100644 --- a/crypto/openssh/.github/workflows/selfhosted.yml +++ b/crypto/openssh/.github/workflows/selfhosted.yml @@ -2,37 +2,35 @@ name: C/C++ CI self-hosted on: push: - branches: [ master, ci, V_9_0 ] - paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', 'Makefile.in', 'configure.ac' ] + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] jobs: selfhosted: if: github.repository == 'openssh/openssh-portable-selfhosted' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.host }} + timeout-minutes: 600 env: - TARGET_HOST: ${{ matrix.os }} + HOST: ${{ matrix.host }} + TARGET_HOST: ${{ matrix.target }} + TARGET_CONFIG: ${{ matrix.config }} strategy: fail-fast: false # We use a matrix in two parts: firstly all of the VMs are tested with the - # default config. "os" corresponds to a label associated with the worker. + # default config. "target" corresponds to a label associated with the + # worker. The default is an ephemeral VM running under libvirt. matrix: - os: - - aix51 - - ARM - - ARM64 + target: - alpine - debian-i386 - - debian-riscv64 - dfly30 - dfly48 - dfly58 - dfly60 + - dfly62 - fbsd10 - fbsd12 - fbsd13 - # - hurd - minix3 - # - nbsd2 - nbsd3 - nbsd4 - nbsd8 @@ -42,62 +40,71 @@ jobs: - obsd69 - obsd70 - obsdsnap + - obsdsnap-i386 - openindiana - - openwrt-mips - - openwrt-mipsel - # - rocky84 - sol10 - sol11 - - win10 - configs: + config: - default - # Then we include any extra configs we want to test for specific VMs. + host: + - libvirt include: - - { os: ARM64, configs: pam } - - { os: debian-i386, configs: pam } - - { os: dfly30, configs: without-openssl} - - { os: dfly48, configs: pam } - - { os: dfly58, configs: pam } - - { os: dfly60, configs: pam } - - { os: fbsd10, configs: pam } - - { os: fbsd12, configs: pam } - - { os: fbsd13, configs: pam } - - { os: nbsd8, configs: pam } - - { os: nbsd9, configs: pam } - - { os: openindiana, configs: pam } - # - { os: rocky84, configs: pam } - - { os: sol10, configs: pam } - - { os: sol11, configs: pam-krb5 } - - { os: sol11, configs: sol64 } - # - { os: sol11, configs: sol64-pam } - - { os: win10, configs: cygwin-release } + # Then we include extra libvirt test configs. + - { target: aix51, config: default, host: libvirt } + - { target: debian-i386, config: pam, host: libvirt } + - { target: dfly30, config: without-openssl, host: libvirt} + - { target: dfly48, config: pam ,host: libvirt } + - { target: dfly58, config: pam, host: libvirt } + - { target: dfly60, config: pam, host: libvirt } + - { target: dfly62, config: pam, host: libvirt } + - { target: fbsd10, config: pam, host: libvirt } + - { target: fbsd12, config: pam, host: libvirt } + - { target: fbsd13, config: pam, host: libvirt } + - { target: nbsd8, config: pam, host: libvirt } + - { target: nbsd9, config: pam, host: libvirt } + - { target: openindiana, config: pam, host: libvirt } + - { target: sol10, config: pam, host: libvirt } + - { target: sol11, config: pam-krb5, host: libvirt } + - { target: sol11, config: sol64, host: libvirt } + # VMs with persistent disks that have their own runner. + - { target: win10, config: default, host: win10 } + - { target: win10, config: cygwin-release, host: win10 } + # Physical hosts, with either native runners or remote via ssh. + - { target: ARM, config: default, host: ARM } + - { target: ARM64, config: default, host: ARM64 } + - { target: ARM64, config: pam, host: ARM64 } + - { target: debian-riscv64, config: default, host: debian-riscv64 } + - { target: openwrt-mips, config: default, host: openwrt-mips } + - { target: openwrt-mipsel, config: default, host: openwrt-mipsel } steps: - name: shutdown VM if running run: vmshutdown - - uses: actions/checkout@v2 + working-directory: ${{ runner.temp }} + - uses: actions/checkout@main - name: autoreconf run: autoreconf - name: startup VM run: vmstartup + working-directory: ${{ runner.temp }} - name: configure - run: vmrun ./.github/configure.sh ${{ matrix.configs }} + run: vmrun ./.github/configure.sh ${{ matrix.config }} - name: save config - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-config + name: ${{ matrix.target }}-${{ matrix.config }}-config path: config.h - name: make clean run: vmrun make clean - name: make run: vmrun make - name: make tests - run: vmrun ./.github/run_test.sh ${{ matrix.configs }} + run: vmrun ./.github/run_test.sh ${{ matrix.config }} timeout-minutes: 600 - name: save logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-logs + name: ${{ matrix.target }}-${{ matrix.config }}-logs path: | config.h config.log @@ -106,3 +113,4 @@ jobs: - name: shutdown VM if: always() run: vmshutdown + working-directory: ${{ runner.temp }} diff --git a/crypto/openssh/.github/workflows/upstream.yml b/crypto/openssh/.github/workflows/upstream.yml index 3cec069ede74..1e2c2acb7ac0 100644 --- a/crypto/openssh/.github/workflows/upstream.yml +++ b/crypto/openssh/.github/workflows/upstream.yml @@ -2,46 +2,51 @@ name: Upstream self-hosted on: push: - branches: [ master, ci ] + branches: [ master ] paths: [ '**.c', '**.h', '.github/**' ] jobs: selfhosted: if: github.repository == 'openssh/openssh-portable-selfhosted' - runs-on: ${{ matrix.os }} + runs-on: 'libvirt' env: - TARGET_HOST: ${{ matrix.os }} + HOST: 'libvirt' + TARGET_HOST: ${{ matrix.target }} + TARGET_CONFIG: ${{ matrix.config }} strategy: fail-fast: false matrix: - os: [ obsdsnap, obsdsnap-i386 ] - configs: [ default, without-openssl, ubsan ] + target: [ obsdsnap, obsdsnap-i386 ] + config: [ default, without-openssl, ubsan ] steps: - - uses: actions/checkout@v2 - name: shutdown VM if running run: vmshutdown + working-directory: ${{ runner.temp }} + - uses: actions/checkout@main - name: startup VM run: vmstartup + working-directory: ${{ runner.temp }} - name: update source run: vmrun "cd /usr/src && cvs up -dPA usr.bin/ssh regress/usr.bin/ssh" - name: make clean - run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean && cd /usr/src/regress/usr.bin/ssh && make obj && make clean" + run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean && cd /usr/src/regress/usr.bin/ssh && make obj && make clean && sudo chmod -R g-w /usr/src /usr/obj" - name: make - run: vmrun "cd /usr/src/usr.bin/ssh && case ${{ matrix.configs }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac" + run: vmrun "cd /usr/src/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac" - name: make install run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install" - name: make tests` - run: vmrun "cd /usr/src/regress/usr.bin/ssh && case ${{ matrix.configs }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac" + run: vmrun "cd /usr/src/regress/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac" env: SUDO: sudo timeout-minutes: 300 - name: save logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-logs + name: ${{ matrix.target }}-${{ matrix.config }}-logs path: | - /usr/obj/regress/usr.bin/ssh/*.log + /usr/obj/regress/usr.bin/ssh/obj/*.log - name: shutdown VM if: always() run: vmshutdown + working-directory: ${{ runner.temp }} diff --git a/crypto/openssh/.skipped-commit-ids b/crypto/openssh/.skipped-commit-ids index b639678939dd..59e80518acf2 100644 --- a/crypto/openssh/.skipped-commit-ids +++ b/crypto/openssh/.skipped-commit-ids @@ -25,6 +25,8 @@ cc12a9029833d222043aecd252d654965c351a69 moduli-gen Makefile 7ac6c252d2a5be8fbad4c66d9d35db507c9dac5b moduli update 6b52cd2b637f3d29ef543f0ce532a2bce6d86af5 makefile change f9a0726d957cf10692a231996a1f34e7f9cdfeb0 moduli update +1e0a2692b7e20b126dda60bf04999d1d30d959d8 sshd relinking makefile changes +e1dc11143f83082e3154d6094f9136d0dc2637ad more relinking makefile tweaks Old upstream tree: diff --git a/crypto/openssh/ChangeLog b/crypto/openssh/ChangeLog index 02e11b023ca0..4251831a1732 100644 --- a/crypto/openssh/ChangeLog +++ b/crypto/openssh/ChangeLog @@ -1,11314 +1,11196 @@ -commit 0ffb46f2ee2ffcc4daf45ee679e484da8fcf338c +commit 6dfb65de949cdd0a5d198edee9a118f265924f33 Author: Damien Miller -Date: Tue Oct 4 01:51:42 2022 +1100 +Date: Thu Feb 2 23:21:54 2023 +1100 - update .depend + crank versions in RPM specs -commit 657e676ff696c7bb787bffb0e249ea1be3b474e1 +commit d07cfb11a0ca574eb68a3931d8c46fbe862a2021 Author: Damien Miller -Date: Tue Oct 4 01:45:52 2022 +1100 +Date: Thu Feb 2 23:21:45 2023 +1100 - update release notes URL + update version in README -commit f059da2b29840c0f048448809c317ce2ae014da7 +commit 9fe207565b4ab0fe5d1ac5bb85e39188d96fb214 Author: Damien Miller -Date: Tue Oct 4 01:45:41 2022 +1100 +Date: Thu Feb 2 23:17:49 2023 +1100 - crank versions in RPM spec files + adapt compat_kex_proposal() test to portable -commit b51f3f172d87cbdb80ca4eb7b2149e56a7647557 +commit 903c556b938fff2d7bff8da2cc460254430963c5 Author: djm@openbsd.org -Date: Mon Sep 26 22:18:40 2022 +0000 +Date: Thu Feb 2 12:12:52 2023 +0000 - upstream: openssh-9.1 + upstream: test compat_kex_proposal(); by dtucker@ - OpenBSD-Commit-ID: 5a467b2ee81da01a86adf1ad93b62b1728494e56 + OpenBSD-Regress-ID: 0e404ee264db546f9fdbf53390689ab5f8d38bf2 -commit 4cf8d0c0f3030f594a238bab21a0695735515487 +commit 405fba71962dec8409c0c962408e09049e5624b5 Author: dtucker@openbsd.org -Date: Wed Sep 21 22:26:50 2022 +0000 +Date: Thu Jan 19 07:53:45 2023 +0000 - upstream: Fix typo. From AlexanderStohr via github PR#343. + upstream: Check if we can copy sshd or need to use sudo to do so - OpenBSD-Commit-ID: a134c9b4039e48803fc6a87f955b0f4a03181497 + during reexec test. Skip test if neither can work. Patch from anton@, tweaks + from me. + + OpenBSD-Regress-ID: 731b96ae74d02d5744e1f1a8e51d09877ffd9b6d -commit 8179fed3264d5919899900ed8881d5f9bb57ca33 +commit b2a2a8f69fd7737ea17dc044353c514f2f962f35 Author: djm@openbsd.org -Date: Mon Sep 19 21:39:16 2022 +0000 +Date: Thu Feb 2 12:10:22 2023 +0000 - upstream: add RequiredRSASize to the list of keywords accepted by + upstream: openssh-9.2 - -o; spotted by jmc@ + OpenBSD-Commit-ID: f7389f32413c74d6e2055f05cf65e7082de03923 + +commit 12da7823336434a403f25c7cc0c2c6aed0737a35 +Author: djm@openbsd.org +Date: Thu Feb 2 12:10:05 2023 +0000 + + upstream: fix double-free caused by compat_kex_proposal(); bz3522 - OpenBSD-Commit-ID: fe871408cf6f9d3699afeda876f8adbac86a035e + by dtucker@, ok me + + OpenBSD-Commit-ID: 2bfc37cd2d41f67dad64c17a64cf2cd3806a5c80 -commit 5f954929e9f173dd1e279e07d0e8b14fa845814d -Author: Damien Miller -Date: Mon Sep 19 20:59:34 2022 +1000 +commit 79efd95ab5ff99f4cb3a955e2d713b3f54fb807e +Author: Darren Tucker +Date: Wed Feb 1 17:17:26 2023 +1100 - no need for glob.h here + Skip connection-timeout test on minix3. - it also causes portability problems + Minix 3's Unix domain sockets don't seem to work the way we expect, so + skip connection-timeout test on that platform. While there, group + together all similarly skipped tests and explicitly comment. -commit 03d94a47207d58b3db37eba4f87eb6ae5a63168a +commit 6b508c4e039619842bcf5a16f8a6b08dd6bec44a *** 38721 LINES SKIPPED *** From nobody Mon Feb 13 13:59:27 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFmDH6CT7z3r76p; Mon, 13 Feb 2023 13:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFmDH5h52z4CQH; Mon, 13 Feb 2023 13:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676296767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5SNOR1Lb0mq7gmuChHK0pDauK4D4DdGeL38+a25efBc=; b=n2f6DvGmej2pJTARUIl1G6+LWIAm9Ou3okO7QXnOiCLQ/+T4a7aWXZx442rN8O1HvGfSIT 4Tf/L2fqoqzUYtuYtTvO0iiw7shIPtw/DG7UNwOSTtTyPuq95nmeNJWnOSkibEvunVZt/D 3bszihwmegT9qJl7Brjk0WrtKeHM3AuaTfjegwwnvzJX259dm9DFOYZ9cNCAbaxWogwaE2 dkHN06rAc8KYTxw7MqSaDcxIyD4dkY14Xp6alv7CRz2ultT1C5ZpkkgvMmjDBOSeUstUU+ dfoKZ/GYXsMPvvBiFZt8gRj7VcgzjaghlNOlcdj4RtCK8UKqYYFmTWfTlvppEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676296767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5SNOR1Lb0mq7gmuChHK0pDauK4D4DdGeL38+a25efBc=; b=hjODj9GDGw3+Q9evAa5H1Fua7jxBttklsir4FJrdoGd38qivr3d/CoF4sJetHjwFZ6Z4Qr x8TYvGqlP0eT1CcZwM0Q+beNLjoL18/cs/yyhvEZw2ojBjGY4Pay0kazeQOBSaPilOwoYk WCN8XFlKlwquAeHjJQA+xxwv3EYLNQ7nDgfY0uEoVjAY5DU4xRCM/+4xryrzLxJ+LaAftr VNdpnWCfceln9MzvnKR3Le2YnUb1L9LL5hwY1sWXTcLOEuK740rXFZ1XORIHuyk+K5GRTs 4P2HOo/d8pwalJLvcFCjE8TXwSt87Ffn7K2ZDpFScNxBmB2+KwzKhdtEVN/qug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676296767; a=rsa-sha256; cv=none; b=EiV5+euLjp7FWBy3z2L7aRjeI5C++O6k3j1ETjUjyGWhFcdhvwJeugeC6qMbxU4/zNy/qq 9GFJMRY3zBWxBalIX00BQpgQHJmxMRzXBjC3s/39jx/iakumgmAI4ySQnXOe77RuXTxesG VXyF/xtrMHw827LmKjnL8CvdUa9QAGYnFkaFGy/PIuxQ2i4ooHQdSXaG2P/A+Up6YNMR+T rUjqzNRunTvSiBG0AZk6DfSfCT8M0OM6VsoR2Y6vsnspT08f0IXBQHOIEf/3OEzInBcKdh hm7l2ETaqgW/1bOofqNdOQSIs9XdnUmSKUctnbm28GRlUSadZ4yGzJqi6U7yHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFmDH4SSLzLLN; Mon, 13 Feb 2023 13:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31DDxRsR038299; Mon, 13 Feb 2023 13:59:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DDxRbx038298; Mon, 13 Feb 2023 13:59:27 GMT (envelope-from git) Date: Mon, 13 Feb 2023 13:59:27 GMT Message-Id: <202302131359.31DDxRbx038298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: eab9ed3d48e0 - stable/13 - tzcode: Resurrect tzsetwall(3) with a deprecation warning. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: eab9ed3d48e0842f3114d8582a4c2868a354190b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=eab9ed3d48e0842f3114d8582a4c2868a354190b commit eab9ed3d48e0842f3114d8582a4c2868a354190b Author: Dag-Erling Smørgrav AuthorDate: 2023-02-09 18:35:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-13 13:58:41 +0000 tzcode: Resurrect tzsetwall(3) with a deprecation warning. This function has been around since 4.4BSD but was dropped upstream in 2020. This went unnoticed when tzcode was updated. Bring it back, but prepare for removing it before 14.0 is released. PR: 269445 MFC after: 3 days Reported by: val@packett.cool Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38445 (cherry picked from commit 71e0c8906e1a4ff774f8ae810aeb94af039eedb7) --- contrib/tzcode/localtime.c | 21 +++++++++++++++++++-- lib/libc/gen/tzset.3 | 14 +++++++++----- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index 1b52e26a5faf..a8beaf47319a 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -1517,9 +1517,8 @@ zoneinit(struct state *sp, char const *name) } static void -tzset_unlocked(void) +tzset_unlocked_name(char const *name) { - char const *name = getenv("TZ"); struct state *sp = lclptr; int lcl = name ? strlen(name) < sizeof lcl_TZname : -1; if (lcl < 0 @@ -1541,6 +1540,12 @@ tzset_unlocked(void) lcl_is_set = lcl; } +static void +tzset_unlocked(void) +{ + tzset_unlocked_name(getenv("TZ")); +} + void tzset(void) { @@ -1550,6 +1555,18 @@ tzset(void) unlock(); } +void +freebsd13_tzsetwall(void) +{ + if (lock() != 0) + return; + tzset_unlocked_name(NULL); + unlock(); +} +__sym_compat(tzsetwall, freebsd13_tzsetwall, FBSD_1.0); +__warn_references(tzsetwall, + "warning: tzsetwall() is deprecated, use tzset() instead."); + static void gmtcheck(void) { diff --git a/lib/libc/gen/tzset.3 b/lib/libc/gen/tzset.3 index ddeb40585f33..788a6259b727 100644 --- a/lib/libc/gen/tzset.3 +++ b/lib/libc/gen/tzset.3 @@ -31,7 +31,7 @@ .\" @(#)tzset.3 8.2 (Berkeley) 11/17/93 .\" $FreeBSD$ .\" -.Dd November 17, 1993 +.Dd February 8, 2023 .Dt TZSET 3 .Os .Sh NAME @@ -102,10 +102,14 @@ is used. .Pp The .Fn tzsetwall -function -sets things up so that -.Xr localtime 3 -returns the best available approximation of local wall clock time. +function is equivalent to calling +.Fn tzset +with the +.Ev TZ +environment variable unset. +It is deprecated and may not be available in +.Fx 14.0 +and later. .Sh SPECIFICATION FORMAT When .Ev TZ From nobody Mon Feb 13 23:44:52 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG1Cm3ZNyz3r8lc; Mon, 13 Feb 2023 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PG1Cm30bvz3h7d; Mon, 13 Feb 2023 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676331892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUI3dS9e1ZChFCeWWt1LTL+vGivhReWLo91XJ3XYAVY=; b=KKOmxcom9nPZy4YvLj1HWylCUQZXhEGRqP53zGtgck7gSBjanq6hekLq9BuL0DzqHmclEw 4+mqBkxqEtclkMox+ORfhF8YjB2B/EL+j38oU+U2F1eqKv0qv6CHOTvwix9QNs00DU5S46 13vzMj45s83xRWtIlDfAUuW1g+zXJRmdUlBBbh7lgJ94UAWL0IY/P0cPdZJNPVNLNFp3BY bfIN/izJX6CroqgIF2KiDq9/5VMq0MXuwE1qwGI9djbWhPKCvRzFv2AD4FU+r/0ElGwSIS 2MiyipgqI+SHmeUTZ8Hyf0Pf33+km0ih6KnLeaIsfDCv7ojLlky+5SkGrAN6cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676331892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUI3dS9e1ZChFCeWWt1LTL+vGivhReWLo91XJ3XYAVY=; b=fomc6xk5bc2qCv6uvmizRexKhNhfN3rRq1M0iQ0mKEgmmfeZgg6e5xnBCNNW/ELUIpj6On an83og+JHhqlgE6+m1J3Ec4A72/SuptWfGOh4HN23AlmuaWbyBU99LzpMfaI9r5+lcBx7P QOTXK5pMoovbC4yGEkF3ZTF9OPFs3E35mGi2bcRHx/ADvAksp9zmk4tqkSOQPf4zlqrwsB 76d8tLR/5wO8HgIrjNehXmto14y9fioeRXvecCs2ikTzGQsPBQQp7jl+HbT7aP+Yn8f15F +ijKtssy9to9IzpDZkt1kDgfyuhKhRgSEIjmevOoNA55cUYE7SU4ecQKLsoO6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676331892; a=rsa-sha256; cv=none; b=iAS/PA8VOQR8PFM1x8K1nPCeyB8zXVJ8KuYK4y+EbPhAy7IWlRl14s7dclHDeocHYafo/n 8ShnXH9fn+uBDuwkAuh6m+qtDNxlBQ4/q6fi7/C7hXvT0wZfWbF4wrn3VGenXuoHrc5GXi wtk2H5apUGWM10FGec8JCLEkx1ym0XOgTXNo3w+lPWV4yH7xmMgsmhndUB3A6WTi950RlH ydxDYNXSOa3WHGVS5R56KwTYAjsyjhCQ50NTvPF9NZTDmginG/ScUPmfiZoF1+RXzel5O9 h1sUA7hlLKMi/oloXCGz3C36mp4MhDgfnIhIv8vlqpIemElnKd7UATG2/AF/jA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PG1Cm23szzd1y; Mon, 13 Feb 2023 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31DNiqcR086305; Mon, 13 Feb 2023 23:44:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DNiqEU086304; Mon, 13 Feb 2023 23:44:52 GMT (envelope-from git) Date: Mon, 13 Feb 2023 23:44:52 GMT Message-Id: <202302132344.31DNiqEU086304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 65bab39e140f - stable/13 - ahci: increase timout List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 65bab39e140f97cace92a2923e50c6b654b02e22 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=65bab39e140f97cace92a2923e50c6b654b02e22 commit 65bab39e140f97cace92a2923e50c6b654b02e22 Author: Mariusz Zaborski AuthorDate: 2023-02-10 15:56:04 +0000 Commit: Mariusz Zaborski CommitDate: 2023-02-13 23:45:01 +0000 ahci: increase timout For some devices, like Marvell 88SE9230, it takes more time to connect to the device. This patch introduces a special flag that extends the timeout from around 100ms to around 500ms. This change is based on the work of: Peter Eriksson PR: 243401 Reviewed by: imp Tested by: dch MFC after: 3 days Sponsored by: Equinix Sponsored by: SkunkWerks, GmbH Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38413 (cherry picked from commit f08ac4cb14c1c0740346a4363f82e1e1367c2bad) --- sys/dev/ahci/ahci.c | 12 ++++++++---- sys/dev/ahci/ahci.h | 4 +++- sys/dev/ahci/ahci_pci.c | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index f5227f5e7147..45171a34cfbf 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -2605,10 +2605,14 @@ static int ahci_sata_connect(struct ahci_channel *ch) { u_int32_t status; - int timeout, found = 0; + int timeout, timeoutslot, found = 0; - /* Wait up to 100ms for "connect well" */ - for (timeout = 0; timeout < 1000 ; timeout++) { + /* + * Wait for "connect well", up to 100ms by default and + * up to 500ms for devices with the SLOWDEV quirk. + */ + timeoutslot = ((ch->quirks & AHCI_Q_SLOWDEV) ? 5000 : 1000); + for (timeout = 0; timeout < timeoutslot; timeout++) { status = ATA_INL(ch->r_mem, AHCI_P_SSTS); if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) found = 1; @@ -2627,7 +2631,7 @@ ahci_sata_connect(struct ahci_channel *ch) break; DELAY(100); } - if (timeout >= 1000 || !found) { + if (timeout >= timeoutslot || !found) { if (bootverbose) { device_printf(ch->dev, "SATA connect timeout time=%dus status=%08x\n", diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h index 472f9845117d..e28c02d6678e 100644 --- a/sys/dev/ahci/ahci.h +++ b/sys/dev/ahci/ahci.h @@ -621,6 +621,7 @@ enum ahci_err_type { #define AHCI_Q_NOCCS 0x00400000 #define AHCI_Q_NOAUX 0x00800000 #define AHCI_Q_IOMMU_BUSWIDE 0x01000000 +#define AHCI_Q_SLOWDEV 0x02000000 #define AHCI_Q_BIT_STRING \ "\020" \ @@ -648,7 +649,8 @@ enum ahci_err_type { "\026MRVL_SR_DEL" \ "\027NOCCS" \ "\030NOAUX" \ - "\031IOMMU_BUSWIDE" + "\031IOMMU_BUSWIDE" \ + "\032SLOWDEV" int ahci_attach(device_t dev); int ahci_detach(device_t dev); diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 3671efcb8e22..b5cbc044d9f0 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -292,7 +292,7 @@ static const struct { {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG | AHCI_Q_IOMMU_BUSWIDE}, {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_ALTSIG | - AHCI_Q_IOMMU_BUSWIDE}, + AHCI_Q_IOMMU_BUSWIDE | AHCI_Q_SLOWDEV}, {0x92351b4b, 0x00, "Marvell 88SE9235", 0}, {0x06201103, 0x00, "HighPoint RocketRAID 620", 0}, {0x06201b4b, 0x00, "HighPoint RocketRAID 620", 0}, From nobody Tue Feb 14 12:32:18 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGLFH19hfz3rtVX; Tue, 14 Feb 2023 12:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGLFH0mccz3tfs; Tue, 14 Feb 2023 12:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676377939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTYbPCNQML84QuDeC1yrXlJfKpVa2o30wGqfwC+luXg=; b=CA/rV/Sa4n4YXN7TrV3qjFWkH3Z2+kdGvafjplnB5fbh42nHgKsIeMOsGfRDrA7z/4fgw7 SjZKJC8Z5y+Dw38Rc97bJpQN2etrjGkJq0ylF488XjyqZBQn4KFF11FhKdzAfWuS9q++Dr FLvTtwhnPr4gABxkZ8y8AnwbmwfS398PaVVbMSIiXPFzmc/FE4KXOeLh2zL2fLmhRNMqI6 oXCmUwfeqPbeGoDmXNkAnm/R49aD3dkQllw9+DPTCRBv0+tYgiAD7AaaldFtzTLV5tlcIv bUkThWyrG1hJJEahaNAzRlQ0FRG4hBsgw6TYzEoAeESsQQdXlGUJ2afi15PaCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676377939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTYbPCNQML84QuDeC1yrXlJfKpVa2o30wGqfwC+luXg=; b=f4PxCxlwtxzAVRhevL8xGqQadYTMeBO3Em0UqZbtXXxVgDoKqGloLbSQ5aZkdGiAbbSrin U8ppDQIQzOfvUEK8P9ZdDFdFyRJD0WXOfAk55dwejz+Ym77TDgzanqRxxi3W9ZK2ropD24 T65C9/M0PeGWhTA89XSTP5qCI4YyaME8+VWT00UN0L+jbiCUKSbkie7CmgNuphPqleowLC Dx8Qhx///CaCThS00wBVfA4G3ZM5xHyIZmDu5Y7eqaubBRlg7iXgYgPGd0UFj2aWGMGJAc 8U7zRR30103gHB9x5S1NB8XUYeHr1a0tHkpTTvzfylGgyMdNxo7Lq4vv76bKOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676377939; a=rsa-sha256; cv=none; b=hxykezD/aoc+8qj+SwabdmAg6NcwG2QygAyXdmon1kx+x5R0BWz1CAA3A3k5crQZUlb5Uq DiZkgw2Zd8p/X75WC4BOMObIT7wvJ0HC3l8g09gtfqAHFNKRwkLmpI6/Qrc28rziX0lxFv RSeHipA3HvVhvTDue7LslIu+oFy0FDPX8vVNOcu8mdMIGa36TSEN1NTUSwGTsStQmoaghF HdWVZBCmaydIgv+JPDQQ6UieRfOOEM/NC/uXFRf838ekO1rrIWsz6l8kjs9CYmWSAGw99X DvgHykitSTw4XYzxlcKdvswNtBC+Tm7f5/qbyHLY+Kno02Dxb0h4oqudJKKXMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGLFG6ybfzyn3; Tue, 14 Feb 2023 12:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31ECWImq085057; Tue, 14 Feb 2023 12:32:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ECWI93085056; Tue, 14 Feb 2023 12:32:18 GMT (envelope-from git) Date: Tue, 14 Feb 2023 12:32:18 GMT Message-Id: <202302141232.31ECWI93085056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: acaed6b1e285 - stable/13 - netlink: add headers installation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: acaed6b1e2859cb6726e35e8c937b192c16a95c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=acaed6b1e2859cb6726e35e8c937b192c16a95c8 commit acaed6b1e2859cb6726e35e8c937b192c16a95c8 Author: Alexander V. Chernikov AuthorDate: 2022-10-01 16:31:58 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-14 12:32:03 +0000 netlink: add headers installation (cherry picked from commit 11ca01e9aa479559da240ceba17fdcdf2d1e97c3) --- include/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/Makefile b/include/Makefile index 490b430d94c6..879a7c48f6df 100644 --- a/include/Makefile +++ b/include/Makefile @@ -41,7 +41,7 @@ LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ syslog.h ucontext.h LDIRS= geom net net80211 netgraph netinet netinet6 \ - netipsec netsmb nfs nfsclient nfsserver sys vm + netipsec netlink netsmb nfs nfsclient nfsserver sys vm LSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ @@ -59,6 +59,7 @@ LSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ netinet/cc \ netinet/netdump \ netinet/tcp_stacks \ + netlink/route \ security/mac_biba security/mac_bsdextended security/mac_lomac \ security/mac_mls security/mac_partition \ security/mac_veriexec \ From nobody Tue Feb 14 18:33:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGVGK1nLmz3ppbh; Tue, 14 Feb 2023 18:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGVGK16tYz3l8Z; Tue, 14 Feb 2023 18:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G3yoPsD4UNvCwLZowvVRrBoBIOoCpuDka3cNfSS836w=; b=xpRMU5pxpjw0zoctHrBW6AvZrJN54h+wVKOU9honqzIwl1w+EJjN+GXrqXc/Y6crQkNW8j ZK6WR9lCzNY8opFm/S0/fT/SfS+iXtyTq4MJkTO9p4decYZFsSV3wG/n5dfB/H8iZ1j8vN h4tqaUbnyRUylNpkKKpUXeIA5GuVK2r02OV3CDC6OO1SMQT+KPz2JVxehqnuMWRhk2knVE o53WvxQHmz0Ud4+UcCff9UcjpOXDutcA3xPXF9D0iycShxEEY9cspk96fzL5Wiknd10SsG /+YVbqkURzcLv8i5bLkRRLSP1Z91M/pTryIvUhFih0P5Wk7GKe+soDW0tXuMrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G3yoPsD4UNvCwLZowvVRrBoBIOoCpuDka3cNfSS836w=; b=DfNFDlAzpjRPjsgLgD+KV0iW6y84nCwZOVQ25wISx2k8qSwLSP7o34FkAEPlZKjjMfUe+I l5SZDHxuz1dJwUjPOQ8pEkXsMybgkIs0w2ccGI2GtJByYzZga20QsYPyfUfN08Qjv/d/WS I3btwvzmF0FhWTmqa+CIGT6uPTJ4FT4KsC32h9kC78uoLiyoQ+aQMtSjrKxM1sspUhFNWW ZOmJlfogRxzdidC29oyWZyaw8WH0BgJjXCyxch0P8GBy8jUAlgQMDtBwmoxUD0Pfg3+R2F Uz4RxxYLhBDYC/ptDJfmAv0ir2cYxvUB0ptpP93kGiZtlgEiemzkHetyNuo5iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399625; a=rsa-sha256; cv=none; b=aeQ3ePUejNxsExklR7RnT/CTEe0fG6euTnEpL78am8bCDgeViiGRF1GgY+MnYT04mI63jq oW787qltuab62u1nJHPMKr5vXnxMgrJehQIkchkBLmUMP5UgLcczcMyIZ/WxTyIGv+9t1m V9k2XOgmO01o/6MYeGqflz9StVSLfkk9TdgcpaLlGgzIV71uAUGgBzqYyveRLeAaZ4VdOm zECBzDNC9SnwO0jS6EN1dKnwaJTSAoHLN3d46NKkrba+VtUbZtxPUCGdZYIAX0R4R2uUy6 LHnVW2tOCdj85mSEMBB/bRctDbMgYd3GMo4Gl7cz6QEUenCO1899PqYWWWu/Sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGVGK088Sz18Rg; Tue, 14 Feb 2023 18:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EIXiRI001806; Tue, 14 Feb 2023 18:33:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EIXi3d001805; Tue, 14 Feb 2023 18:33:44 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:33:44 GMT Message-Id: <202302141833.31EIXi3d001805@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: 75b5693ed73e - stable/13 - heimdal: Resolve hdb_free_entry() SIGSEGV/SIGILL List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 75b5693ed73e4abb6dbb90affbf3ba56c4cdfdc4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=75b5693ed73e4abb6dbb90affbf3ba56c4cdfdc4 commit 75b5693ed73e4abb6dbb90affbf3ba56c4cdfdc4 Author: Cy Schubert AuthorDate: 2023-02-07 15:46:59 +0000 Commit: Cy Schubert CommitDate: 2023-02-14 18:32:26 +0000 heimdal: Resolve hdb_free_entry() SIGSEGV/SIGILL When the client sends kadmind a create principal (kadm_create) request kadm_s_create_principal() returns an error before zeroing out ent (an hdb entry structure wrapper -- hdb_entry_ex), resulting in a NULL reference. Fix obtained from upstream commit 35ea4955a. PR: 268059 Reported by: Robert Morris Obtained from: Heimdal commit 35ea4955a (cherry picked from commit 6a70e0b4cdc606931555cdc59dc6c8d4a3ab4e3e) --- crypto/heimdal/lib/kadm5/create_s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/kadm5/create_s.c b/crypto/heimdal/lib/kadm5/create_s.c index 04312c024ed3..1033ca103239 100644 --- a/crypto/heimdal/lib/kadm5/create_s.c +++ b/crypto/heimdal/lib/kadm5/create_s.c @@ -65,6 +65,7 @@ create_principal(kadm5_server_context *context, kadm5_principal_ent_rec defrec, *defent; uint32_t def_mask; + memset(ent, 0, sizeof(*ent)); if((mask & required_mask) != required_mask) return KADM5_BAD_MASK; if((mask & forbidden_mask)) @@ -72,7 +73,6 @@ create_principal(kadm5_server_context *context, if((mask & KADM5_POLICY) && strcmp(princ->policy, "default")) /* XXX no real policies for now */ return KADM5_UNK_POLICY; - memset(ent, 0, sizeof(*ent)); ret = krb5_copy_principal(context->context, princ->principal, &ent->entry.principal); if(ret) From nobody Tue Feb 14 18:33:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGVGL2cqcz3ppf1; Tue, 14 Feb 2023 18:33:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGVGL2JSlz3lYk; Tue, 14 Feb 2023 18:33:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gLVkf3yH+lP1l/QuMYgrG48L8vqqpbaC5LuRRP6VKeA=; b=Xvwc9GyensM9xtljE09zBOQC/UtZgWfDUHLH9iXsGa/ec7VhmFWB0aJ1I+gkt8bfmhu/Zh ihv0ccyryH29XVzwM3jWbhbwHynBAXzFvevUQxvuaqWEsgAWyAk+SBnl8R6H53IlhnF54g lmEDC59aUTdyAcd9/15n8mTQiDLMcvH94IthT85LS9GwkdIBC9QuwiD5mcFCeF1gcfFBuZ NdiVmKFFCw8dfLf0whG+QMy+oOBoQ7mOiJcssbPFEygvqv/aKgpAap/slyRq2IycbF/fP8 dINzS5o1VoS6KZGkRFWDYogbkZ1K4DZXzfj0sYdlNekxpAPgyfVfIB6RxsXqDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gLVkf3yH+lP1l/QuMYgrG48L8vqqpbaC5LuRRP6VKeA=; b=YDJ0TIYSVTZiY8nllbUI417lasm5jQRStl6kSe6MrMk+kOZEO3vmiY39RlvqpctL8Z0GSm 7TlSKOLP8vximCa/JjgprOCRq0hKhsoSe9+8pR/nYfMuQp1LdseQwT//SzPKDOWtAJ2ynF eq0Dex+6v2JJ3GvIR3UFMokG8d10RpwTn+5hth4SG6gLk16I9Fq+iw+4Ie8078JpsZN1ny wGW1WuYEgl/dKb0kkLCkoPlcEggPzZwXIU1UlLGMDooL3WU+LDdAvg1/vbo2xQBDqeDTJq p7kO6jVu/V8JryigclYqotJkJhkQkE3YT3llw+A95THa8hE/iX3obUgWjx6mpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399626; a=rsa-sha256; cv=none; b=mKhcZ3AeJWHPnfEZVg17zMbItGKEvqVE682w4tQY5D0LMCaeNQTl7UfGiGSkikZDUVhBRU qSrpruKk2Gtfw9VK5ouond9yrBBm1AKB+tDsRPzP9F0E5POtx3fe2i0zepowOcRBbaIEYc Vzi6fco5yForoX1mfnlvLmgBLU9Bkf1rYMf7BtxJRbaSLXk/2e0Dn3F2jis6wquSiGy1oU w1f1PAoizpmBYBvCE2T6LNY5rxIOUNp7LK2wcv4aUiANwWqwclr1HG6BKmf5AaC4V+TZ8l sOs7bnHxUviYif+NDLaXUga0ACrHl4Hweb3CUn24KwX6xZ9N2rmd61Qcl6bxLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGVGL1F5Cz18Pb; Tue, 14 Feb 2023 18:33:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EIXk3E001830; Tue, 14 Feb 2023 18:33:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EIXkwO001829; Tue, 14 Feb 2023 18:33:46 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:33:46 GMT Message-Id: <202302141833.31EIXkwO001829@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: 26ba9518ffec - stable/13 - unbound: Vendor import 1.17.1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 26ba9518ffeccd0b64d2f610e731989193844814 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=26ba9518ffeccd0b64d2f610e731989193844814 commit 26ba9518ffeccd0b64d2f610e731989193844814 Author: Cy Schubert AuthorDate: 2023-01-15 05:39:31 +0000 Commit: Cy Schubert CommitDate: 2023-02-14 18:32:39 +0000 unbound: Vendor import 1.17.1 Release notes at https://www.nlnetlabs.nl/news/2023/Jan/12/unbound-1.17.1-released/. Merge commit '7699e1386a16236002b26107ffd2dcbde375e197' into main (cherry picked from commit 1838dec31895fd4752fa8631322ab93be0705a66) --- contrib/unbound/Makefile.in | 4 +- contrib/unbound/README.md | 1 + contrib/unbound/cachedb/cachedb.c | 21 ++- contrib/unbound/configure | 25 +-- contrib/unbound/configure.ac | 5 +- contrib/unbound/contrib/unbound.service.in | 5 +- contrib/unbound/daemon/cachedump.c | 9 +- contrib/unbound/daemon/daemon.c | 91 ++++++++- contrib/unbound/daemon/daemon.h | 6 + contrib/unbound/daemon/remote.c | 16 +- contrib/unbound/daemon/worker.c | 21 ++- contrib/unbound/daemon/worker.h | 4 +- contrib/unbound/doc/Changelog | 86 +++++++++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf.in | 18 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 10 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 36 +++- contrib/unbound/edns-subnet/subnetmod.c | 11 ++ contrib/unbound/iterator/iter_utils.c | 2 + contrib/unbound/iterator/iterator.c | 7 +- contrib/unbound/iterator/iterator.h | 10 +- contrib/unbound/libunbound/context.c | 1 + contrib/unbound/libunbound/context.h | 6 + contrib/unbound/libunbound/libunbound.c | 39 +++- contrib/unbound/libunbound/libworker.c | 1 + contrib/unbound/libunbound/unbound-event.h | 3 +- contrib/unbound/services/authzone.c | 1 + contrib/unbound/services/cache/dns.c | 8 + contrib/unbound/sldns/rrdef.h | 4 +- contrib/unbound/smallapp/unbound-control.c | 12 +- .../09-unbound-control.tdir/conf.bad_credentials | 5 + .../conf.spoofed_credentials | 5 + .../unbound/testdata/cachedb_servfail_cname.crpl | 181 ++++++++++++++++++ .../testdata/serve_expired_cached_servfail.rpl | 130 +++++++++++++ .../unbound/testdata/subnet_cached_servfail.crpl | 167 +++++++++++++++++ contrib/unbound/util/config_file.c | 9 + contrib/unbound/util/config_file.h | 7 + contrib/unbound/util/configlexer.lex | 3 + contrib/unbound/util/configparser.y | 34 +++- contrib/unbound/util/iana_ports.inc | 1 + contrib/unbound/util/netevent.c | 30 ++- contrib/unbound/util/tube.c | 53 ++++-- usr.sbin/unbound/config.h | 204 +++++++++++++++++---- 48 files changed, 1169 insertions(+), 139 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index e7c76c2588aa..bc021aa1eb00 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -616,7 +616,7 @@ install-all: all $(PYTHONMOD_INSTALL) $(PYUNBOUND_INSTALL) $(UNBOUND_EVENT_INSTA $(INSTALL) -c -m 644 doc/unbound.conf.5 $(DESTDIR)$(mandir)/man5 $(INSTALL) -c -m 644 doc/unbound-host.1 $(DESTDIR)$(mandir)/man1 $(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup - if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi + if test ! -e "$(DESTDIR)$(configfile)"; then $(INSTALL) -d `dirname "$(DESTDIR)$(configfile)"`; $(INSTALL) -c -m 644 doc/example.conf "$(DESTDIR)$(configfile)"; fi pythonmod-uninstall: rm -f -- $(DESTDIR)$(PYTHON_SITE_PKG)/unboundmodule.py @@ -645,7 +645,7 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) $(UNBOUND_EVENT_UNINSTA rm -f -- $(DESTDIR)$(includedir)/unbound.h $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libunbound.la @echo - @echo "You still need to remove "`dirname $(DESTDIR)$(configfile)`" , $(DESTDIR)$(configfile) by hand" + @echo "You still need to remove "`dirname "$(DESTDIR)$(configfile)"`" , $(DESTDIR)$(configfile) by hand" iana_update: curl -o port-numbers.tmp https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index d1bbcf2b7797..c3d9bc2492ef 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -4,6 +4,7 @@ [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) +[![Mastodon Follow](https://img.shields.io/mastodon/follow/109262826617293067?domain=https%3A%2F%2Ffosstodon.org&style=social)](https://fosstodon.org/@nlnetlabs) Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards. If you diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index b07743d85259..245daa986967 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -390,6 +390,15 @@ prep_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(!qstate->return_msg || !qstate->return_msg->rep) return 0; + /* do not store failures like SERVFAIL in the cachedb, this avoids + * overwriting expired, valid, content with broken content. */ + if(FLAGS_GET_RCODE(qstate->return_msg->rep->flags) != + LDNS_RCODE_NOERROR && + FLAGS_GET_RCODE(qstate->return_msg->rep->flags) != + LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(qstate->return_msg->rep->flags) != + LDNS_RCODE_YXDOMAIN) + return 0; /* We don't store the reply if its TTL is 0 unless serve-expired is * enabled. Such a reply won't be reusable and simply be a waste for * the backend. It's also compatible with the default behavior of @@ -542,10 +551,16 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) verbose(VERB_ALGO, "cachedb msg expired"); /* If serve-expired is enabled, we still use an expired message * setting the TTL to 0. */ - if(qstate->env->cfg->serve_expired) - adjust = -1; - else + if(!qstate->env->cfg->serve_expired || + (FLAGS_GET_RCODE(qstate->return_msg->rep->flags) + != LDNS_RCODE_NOERROR && + FLAGS_GET_RCODE(qstate->return_msg->rep->flags) + != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(qstate->return_msg->rep->flags) + != LDNS_RCODE_YXDOMAIN)) return 0; /* message expired */ + else + adjust = -1; } verbose(VERB_ALGO, "cachedb msg adjusted down by %d", (int)adjust); adjust_msg_ttl(qstate->return_msg, adjust); diff --git a/contrib/unbound/configure b/contrib/unbound/configure index a2837d18553b..5823e49f2f80 100755 --- a/contrib/unbound/configure +++ b/contrib/unbound/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.17.0. +# Generated by GNU Autoconf 2.69 for unbound 1.17.1. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.17.0' -PACKAGE_STRING='unbound 1.17.0' +PACKAGE_VERSION='1.17.1' +PACKAGE_STRING='unbound 1.17.1' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -1477,7 +1477,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.17.0 to adapt to many kinds of systems. +\`configure' configures unbound 1.17.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1543,7 +1543,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.17.0:";; + short | recursive ) echo "Configuration of unbound 1.17.1:";; esac cat <<\_ACEOF @@ -1785,7 +1785,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.17.0 +unbound configure 1.17.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2494,7 +2494,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.17.0, which was +It was created by unbound $as_me 1.17.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2846,11 +2846,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=17 -UNBOUND_VERSION_MICRO=0 +UNBOUND_VERSION_MICRO=1 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=20 +LIBUNBOUND_REVISION=21 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2938,6 +2938,7 @@ LIBUNBOUND_AGE=1 # 1.16.2 had 9:18:1 # 1.16.3 had 9:19:1 # 1.17.0 had 9:20:1 +# 1.17.1 had 9:21:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -22085,7 +22086,7 @@ _ACEOF -version=1.17.0 +version=1.17.1 date=`date +'%b %e, %Y'` @@ -22604,7 +22605,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.17.0, which was +This file was extended by unbound $as_me 1.17.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22670,7 +22671,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.17.0 +unbound config.status 1.17.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/contrib/unbound/configure.ac b/contrib/unbound/configure.ac index 57cc7e604b1e..2c7583310f20 100644 --- a/contrib/unbound/configure.ac +++ b/contrib/unbound/configure.ac @@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[17]) -m4_define([VERSION_MICRO],[0]) +m4_define([VERSION_MICRO],[1]) AC_INIT([unbound],m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]),[unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues],[unbound]) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=20 +LIBUNBOUND_REVISION=21 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -106,6 +106,7 @@ LIBUNBOUND_AGE=1 # 1.16.2 had 9:18:1 # 1.16.3 had 9:19:1 # 1.17.0 had 9:20:1 +# 1.17.1 had 9:21:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary diff --git a/contrib/unbound/contrib/unbound.service.in b/contrib/unbound/contrib/unbound.service.in index ada5fac9c224..5a05c525170f 100644 --- a/contrib/unbound/contrib/unbound.service.in +++ b/contrib/unbound/contrib/unbound.service.in @@ -42,9 +42,8 @@ [Unit] Description=Validating, recursive, and caching DNS resolver Documentation=man:unbound(8) -After=network-online.target -Before=nss-lookup.target -Wants=network-online.target nss-lookup.target +After=network.target +Before=network-online.target nss-lookup.target [Install] WantedBy=multi-user.target diff --git a/contrib/unbound/daemon/cachedump.c b/contrib/unbound/daemon/cachedump.c index baf8008ea80f..943eb63f326c 100644 --- a/contrib/unbound/daemon/cachedump.c +++ b/contrib/unbound/daemon/cachedump.c @@ -387,7 +387,7 @@ move_into_cache(struct ub_packed_rrset_key* k, struct rrset_ref ref; uint8_t* p; - ak = alloc_special_obtain(&worker->alloc); + ak = alloc_special_obtain(worker->alloc); if(!ak) { log_warn("error out of memory"); return 0; @@ -398,7 +398,7 @@ move_into_cache(struct ub_packed_rrset_key* k, ak->rk.dname = (uint8_t*)memdup(k->rk.dname, k->rk.dname_len); if(!ak->rk.dname) { log_warn("error out of memory"); - ub_packed_rrset_parsedelete(ak, &worker->alloc); + ub_packed_rrset_parsedelete(ak, worker->alloc); return 0; } s = sizeof(*ad) + (sizeof(size_t) + sizeof(uint8_t*) + @@ -408,7 +408,7 @@ move_into_cache(struct ub_packed_rrset_key* k, ad = (struct packed_rrset_data*)malloc(s); if(!ad) { log_warn("error out of memory"); - ub_packed_rrset_parsedelete(ak, &worker->alloc); + ub_packed_rrset_parsedelete(ak, worker->alloc); return 0; } p = (uint8_t*)ad; @@ -431,7 +431,8 @@ move_into_cache(struct ub_packed_rrset_key* k, ref.key = ak; ref.id = ak->id; (void)rrset_cache_update(worker->env.rrset_cache, &ref, - &worker->alloc, *worker->env.now); + worker->alloc, *worker->env.now); + return 1; } diff --git a/contrib/unbound/daemon/daemon.c b/contrib/unbound/daemon/daemon.c index 71091133a487..193608d40e05 100644 --- a/contrib/unbound/daemon/daemon.c +++ b/contrib/unbound/daemon/daemon.c @@ -488,6 +488,27 @@ static int daemon_get_shufport(struct daemon* daemon, int* shufport) return avail; } +/** + * Clear and delete per-worker alloc caches, and free memory maintained in + * superalloc. + * The rrset and message caches must be empty at the time of call. + * @param daemon: the daemon that maintains the alloc caches to be cleared. + */ +static void +daemon_clear_allocs(struct daemon* daemon) +{ + int i; + + for(i=0; inum; i++) { + alloc_clear(daemon->worker_allocs[i]); + free(daemon->worker_allocs[i]); + } + free(daemon->worker_allocs); + daemon->worker_allocs = NULL; + + alloc_clear_special(&daemon->superalloc); +} + /** * Allocate empty worker structures. With backptr and thread-number, * from 0..numthread initialised. Used as user arguments to new threads. @@ -540,6 +561,21 @@ daemon_create_workers(struct daemon* daemon) /* the above is not ports/numthr, due to rounding */ fatal_exit("could not create worker"); } + /* create per-worker alloc caches if not reusing existing ones. */ + if(!daemon->worker_allocs) { + daemon->worker_allocs = (struct alloc_cache**)calloc( + (size_t)daemon->num, sizeof(struct alloc_cache*)); + if(!daemon->worker_allocs) + fatal_exit("could not allocate worker allocs"); + for(i=0; inum; i++) { + struct alloc_cache* alloc = calloc(1, + sizeof(struct alloc_cache)); + if (!alloc) + fatal_exit("could not allocate worker alloc"); + alloc_init(alloc, &daemon->superalloc, i); + daemon->worker_allocs[i] = alloc; + } + } free(shufport); } @@ -771,6 +807,7 @@ daemon_fork(struct daemon* daemon) /* Shutdown SHM */ shm_main_shutdown(daemon); + daemon->reuse_cache = daemon->workers[0]->reuse_cache; daemon->need_to_exit = daemon->workers[0]->need_to_exit; } @@ -785,9 +822,16 @@ daemon_cleanup(struct daemon* daemon) log_thread_set(NULL); /* clean up caches because * a) RRset IDs will be recycled after a reload, causing collisions - * b) validation config can change, thus rrset, msg, keycache clear */ - slabhash_clear(&daemon->env->rrset_cache->table); - slabhash_clear(daemon->env->msg_cache); + * b) validation config can change, thus rrset, msg, keycache clear + * + * If we are trying to keep the cache as long as possible, we should + * defer the cleanup until we know whether the new configuration allows + * the reuse. (If we're exiting, cleanup should be done here). */ + if(!daemon->reuse_cache || daemon->need_to_exit) { + slabhash_clear(&daemon->env->rrset_cache->table); + slabhash_clear(daemon->env->msg_cache); + } + daemon->old_num = daemon->num; /* save the current num */ local_zones_delete(daemon->local_zones); daemon->local_zones = NULL; respip_set_delete(daemon->respip_set); @@ -802,8 +846,13 @@ daemon_cleanup(struct daemon* daemon) worker_delete(daemon->workers[i]); free(daemon->workers); daemon->workers = NULL; + /* Unless we're trying to keep the cache, worker alloc_caches should be + * cleared and freed here. We do this after deleting workers to + * guarantee that the alloc caches are valid throughout the lifetime + * of workers. */ + if(!daemon->reuse_cache || daemon->need_to_exit) + daemon_clear_allocs(daemon); daemon->num = 0; - alloc_clear_special(&daemon->superalloc); #ifdef USE_DNSTAP dt_delete(daemon->dtenv); daemon->dtenv = NULL; @@ -900,8 +949,42 @@ daemon_delete(struct daemon* daemon) void daemon_apply_cfg(struct daemon* daemon, struct config_file* cfg) { + int new_num = cfg->num_threads?cfg->num_threads:1; + daemon->cfg = cfg; config_apply(cfg); + + /* If this is a reload and we deferred the decision on whether to + * reuse the alloc, RRset, and message caches, then check to see if + * it's safe to keep the caches: + * - changing the number of threads is obviously incompatible with + * keeping the per-thread alloc caches. It also means we have to + * clear RRset and message caches. (note that 'new_num' may be + * adjusted in daemon_create_workers, but for our purpose we can + * simply compare it with 'old_num'; if they are equal here, + * 'new_num' won't be adjusted to a different value than 'old_num'). + * - changing RRset cache size effectively clears any remaining cache + * entries. We could keep their keys in alloc caches, but it would + * be more consistent with the sense of the change to clear allocs + * and free memory. To do so we also have to clear message cache. + * - only changing message cache size does not necessarily affect + * RRset or alloc cache. But almost all new subsequent queries will + * require recursive resolution anyway, so it doesn't help much to + * just keep RRset and alloc caches. For simplicity we clear/free + * the other two, too. */ + if(daemon->worker_allocs && + (new_num != daemon->old_num || + !slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size, + cfg->msg_cache_slabs) || + !slabhash_is_size(&daemon->env->rrset_cache->table, + cfg->rrset_cache_size, cfg->rrset_cache_slabs))) + { + log_warn("cannot reuse caches due to critical config change"); + slabhash_clear(&daemon->env->rrset_cache->table); + slabhash_clear(daemon->env->msg_cache); + daemon_clear_allocs(daemon); + } + if(!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size, cfg->msg_cache_slabs)) { slabhash_delete(daemon->env->msg_cache); diff --git a/contrib/unbound/daemon/daemon.h b/contrib/unbound/daemon/daemon.h index 58713e9ce466..57665446d41b 100644 --- a/contrib/unbound/daemon/daemon.h +++ b/contrib/unbound/daemon/daemon.h @@ -99,8 +99,12 @@ struct daemon { void* listen_sslctx, *connect_sslctx; /** num threads allocated */ int num; + /** num threads allocated in the previous config or 0 at first */ + int old_num; /** the worker entries */ struct worker** workers; + /** per-worker allocation cache */ + struct alloc_cache **worker_allocs; /** do we need to exit unbound (or is it only a reload?) */ int need_to_exit; /** master random table ; used for port div between threads on reload*/ @@ -140,6 +144,8 @@ struct daemon { /** the dnscrypt environment */ struct dnsc_env* dnscenv; #endif + /** reuse existing cache on reload if other conditions allow it. */ + int reuse_cache; }; /** diff --git a/contrib/unbound/daemon/remote.c b/contrib/unbound/daemon/remote.c index 7d4a414002ac..7c5a036f343d 100644 --- a/contrib/unbound/daemon/remote.c +++ b/contrib/unbound/daemon/remote.c @@ -105,8 +105,6 @@ /** what to put on statistics lines between var and value, ": " or "=" */ #define SQ "=" -/** if true, inhibits a lot of =0 lines from the stats output */ -static const int inhibit_zero = 1; /** subtract timers and the values do not overflow or become negative */ static void @@ -684,8 +682,9 @@ do_stop(RES* ssl, struct worker* worker) /** do the reload command */ static void -do_reload(RES* ssl, struct worker* worker) +do_reload(RES* ssl, struct worker* worker, int reuse_cache) { + worker->reuse_cache = reuse_cache; worker->need_to_exit = 0; comm_base_exit(worker->base); send_ok(ssl); @@ -920,7 +919,7 @@ print_hist(RES* ssl, struct ub_stats_info* s) /** print extended stats */ static int -print_ext(RES* ssl, struct ub_stats_info* s) +print_ext(RES* ssl, struct ub_stats_info* s, int inhibit_zero) { int i; char nm[32]; @@ -1129,7 +1128,7 @@ do_stats(RES* ssl, struct worker* worker, int reset) return; if(!print_hist(ssl, &total)) return; - if(!print_ext(ssl, &total)) + if(!print_ext(ssl, &total, daemon->cfg->stat_inhibit_zero)) return; } } @@ -1963,6 +1962,8 @@ do_flush_name(RES* ssl, struct worker* w, char* arg) do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_PTR, LDNS_RR_CLASS_IN); do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_SRV, LDNS_RR_CLASS_IN); do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_NAPTR, LDNS_RR_CLASS_IN); + do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_SVCB, LDNS_RR_CLASS_IN); + do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_HTTPS, LDNS_RR_CLASS_IN); free(nm); send_ok(ssl); @@ -3029,8 +3030,11 @@ execute_cmd(struct daemon_remote* rc, RES* ssl, char* cmd, if(cmdcmp(p, "stop", 4)) { do_stop(ssl, worker); return; + } else if(cmdcmp(p, "reload_keep_cache", 17)) { + do_reload(ssl, worker, 1); + return; } else if(cmdcmp(p, "reload", 6)) { - do_reload(ssl, worker); + do_reload(ssl, worker, 0); return; } else if(cmdcmp(p, "stats_noreset", 13)) { do_stats(ssl, worker, 0); diff --git a/contrib/unbound/daemon/worker.c b/contrib/unbound/daemon/worker.c index caefad621409..99dcf9940004 100644 --- a/contrib/unbound/daemon/worker.c +++ b/contrib/unbound/daemon/worker.c @@ -133,7 +133,7 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker), rrset = slabhash_get_mem(&worker->env.rrset_cache->table); infra = infra_get_mem(worker->env.infra_cache); mesh = mesh_get_mem(worker->env.mesh); - ac = alloc_get_mem(&worker->alloc); + ac = alloc_get_mem(worker->alloc); superac = alloc_get_mem(&worker->daemon->superalloc); anch = anchors_get_mem(worker->env.anchors); iter = 0; @@ -623,6 +623,14 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, if(worker->env.cfg->serve_expired_ttl && rep->serve_expired_ttl < timenow) return 0; + /* Ignore expired failure answers */ + if(FLAGS_GET_RCODE(rep->flags) != + LDNS_RCODE_NOERROR && + FLAGS_GET_RCODE(rep->flags) != + LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(rep->flags) != + LDNS_RCODE_YXDOMAIN) + return 0; if(!rrset_array_lock(rep->ref, rep->rrset_count, 0)) return 0; *is_expired_answer = 1; @@ -730,8 +738,6 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, goto bail_out; } } else { - /* We don't check the global ede as this is a warning, not - * an error */ if (*is_expired_answer == 1 && worker->env.cfg->ede_serve_expired && worker->env.cfg->ede) { EDNS_OPT_LIST_APPEND_EDE(&edns->opt_list_out, @@ -2059,15 +2065,14 @@ worker_init(struct worker* worker, struct config_file *cfg, } server_stats_init(&worker->stats, cfg); - alloc_init(&worker->alloc, &worker->daemon->superalloc, - worker->thread_num); - alloc_set_id_cleanup(&worker->alloc, &worker_alloc_cleanup, worker); + worker->alloc = worker->daemon->worker_allocs[worker->thread_num]; + alloc_set_id_cleanup(worker->alloc, &worker_alloc_cleanup, worker); worker->env = *worker->daemon->env; comm_base_timept(worker->base, &worker->env.now, &worker->env.now_tv); worker->env.worker = worker; worker->env.worker_base = worker->base; worker->env.send_query = &worker_send_query; - worker->env.alloc = &worker->alloc; + worker->env.alloc = worker->alloc; worker->env.outnet = worker->back; worker->env.rnd = worker->rndstate; /* If case prefetch is triggered, the corresponding mesh will clear @@ -2211,7 +2216,7 @@ worker_delete(struct worker* worker) #endif /* USE_DNSTAP */ comm_base_delete(worker->base); ub_randfree(worker->rndstate); - alloc_clear(&worker->alloc); + /* don't touch worker->alloc, as it's maintained in daemon */ regional_destroy(worker->env.scratch); regional_destroy(worker->scratchpad); free(worker); diff --git a/contrib/unbound/daemon/worker.h b/contrib/unbound/daemon/worker.h index 3fb52abd9d87..ab2fc728d274 100644 --- a/contrib/unbound/daemon/worker.h +++ b/contrib/unbound/daemon/worker.h @@ -118,7 +118,7 @@ struct worker { /** do we need to restart or quit (on signal) */ int need_to_exit; /** allocation cache for this thread */ - struct alloc_cache alloc; + struct alloc_cache *alloc; /** per thread statistics */ struct ub_server_stats stats; /** thread scratch regional */ @@ -131,6 +131,8 @@ struct worker { /** dnstap environment, changed for this thread */ struct dt_env dtenv; #endif + /** reuse existing cache on reload if other conditions allow it. */ + int reuse_cache; }; /** diff --git a/contrib/unbound/doc/Changelog b/contrib/unbound/doc/Changelog index 727d1543ea4e..899026352434 100644 --- a/contrib/unbound/doc/Changelog +++ b/contrib/unbound/doc/Changelog @@ -1,7 +1,93 @@ +5 January 2023: Wouter + - Tag for 1.17.1 release. + +2 January 2023: Wouter + - Fix windows compile for libunbound subprocess reap comm point closes. + - Update github workflows to use checkout v3. + +14 December 2022: George + - Merge #569 from JINMEI Tatuya: add keep-cache option to + 'unbound-control reload' to keep caches. + +13 December 2022: George + - Expose 'statistics-inhibit-zero' as a configuration option; the + default value retains Unbound's behavior. + - Expose 'max-sent-count' as a configuration option; the + default value retains Unbound's behavior. + - Merge #461 from Christian Allred: Add max-query-restarts option. + Exposes an internal configuration but the default value retains + Unbound's behavior. + +13 December 2022: Wouter + - Merge #808: Wrap Makefile script's directory variables in quotes. + - Fix to wrap Makefile scripts directory in quotes for uninstall. + +1 December 2022: Wouter + - Fix #773: When used with systemd-networkd, unbound does not start + until systemd-networkd-wait-online.service times out. + +30 November 2022: George + - Add SVCB and HTTPS to the types removed by 'unbound-control flush'. + - Clear documentation for interactivity between the subnet module and + the serve-expired and prefetch configuration options. + +30 November 2022: Wouter + - Fix #782: Segmentation fault in stats.c:404. + +28 November 2022: Wouter + - Fix for the ignore of tcp events for closed comm points, preserve + the use after free protection features. + +23 November 2022: Philip + - Merge #720 from jonathangray: fix use after free when + WSACreateEvent() fails. + +22 November 2022: George + - Ignore expired error responses. + +11 November 2022: Wouter + - Fix #779: [doc] Missing documention in ub_resolve_event() for + callback parameter was_ratelimited. + +9 November 2022: George + - Complementary fix for distutils.sysconfig deprecation in Python 3.10 + to commit 62c5039ab9da42713e006e840b7578e01d66e7f2. + +8 November 2022: Wouter + - Fix to ignore tcp events for closed comm points. + - Fix to make sure to not read again after a tcp comm point is closed. + - Fix #775: libunbound: subprocess reap causes parent process reap + to hang. + - iana portlist update. + +21 October 2022: George + - Merge #767 from jonathangray: consistently use IPv4/IPv6 in + unbound.conf.5. + +21 October 2022: Wouter + - Fix that cachedb does not store failures in the external cache. + +18 October 2022: George + - Clarify the use of MAX_SENT_COUNT in the iterator code. + +17 October 2022: Wouter + - testcode/dohclient sets log identity to its name. + +14 October 2022: Wouter + - Merge #768 from fobser: Arithmetic on a pointer to void is a GNU + extension. + - In unit test, print python script name list correctly. + +13 October 2022: Wouter + - Tag for 1.17.0 release. The code repository continues with 1.17.1. + 11 October 2022: George - Fix PROXYv2 header read for TCP connections when no proxied addresses are provided. +7 October 2022: Wouter + - Tag for 1.17.0rc1 release. + 7 October 2022: George - Fix to stop possible loops in the tcp reuse code (write_wait list and tcp_wait list). Based on analysis and patch from Prad Seniappan diff --git a/contrib/unbound/doc/README b/contrib/unbound/doc/README index 88444a5e3c99..faab92bcb077 100644 --- a/contrib/unbound/doc/README +++ b/contrib/unbound/doc/README @@ -1,4 +1,4 @@ -README for Unbound 1.17.0 +README for Unbound 1.17.1 Copyright 2007 NLnet Labs http://unbound.net diff --git a/contrib/unbound/doc/example.conf.in b/contrib/unbound/doc/example.conf.in index df0b2a1fb2c0..8cf3d868285e 100644 --- a/contrib/unbound/doc/example.conf.in +++ b/contrib/unbound/doc/example.conf.in @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.17.0. +# See unbound.conf(5) man page, version 1.17.1. # # this is a comment. @@ -35,9 +35,14 @@ server: # statistics-cumulative: no # enable extended statistics (query types, answer codes, status) - # printed from unbound-control. default off, because of speed. + # printed from unbound-control. Default off, because of speed. # extended-statistics: no + # Inhibits selected extended statistics (qtype, qclass, qopcode, rcode, + # rpz-actions) from printing if their value is 0. + # Default on. + # statistics-inhibit-zero: yes + # number of threads to create. 1 disables threading. # num-threads: 1 @@ -173,6 +178,15 @@ server: # a throwaway response (also timeouts) is received. # outbound-msg-retry: 5 + # Hard limit on the number of outgoing queries Unbound will make while + # resolving a name, making sure large NS sets do not loop. + # It resets on query restarts (e.g., CNAME) and referrals. + # max-sent-count: 32 + + # Hard limit on the number of times Unbound is allowed to restart a + # query upon encountering a CNAME record. + # max-query-restarts: 11 + # msec for waiting for an unknown server to reply. Increase if you # are behind a slow satellite link, to eg. 1128. # unknown-server-time-limit: 376 diff --git a/contrib/unbound/doc/libunbound.3.in b/contrib/unbound/doc/libunbound.3.in index b87289e0d764..19a213e1aa6f 100644 --- a/contrib/unbound/doc/libunbound.3.in +++ b/contrib/unbound/doc/libunbound.3.in @@ -1,4 +1,4 @@ -.TH "libunbound" "3" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "libunbound" "3" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" libunbound.3 -- unbound library functions manual .\" @@ -44,7 +44,7 @@ .B ub_ctx_zone_remove, .B ub_ctx_data_add, .B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.17.0 functions. +\- Unbound DNS validating resolver 1.17.1 functions. .SH "SYNOPSIS" .B #include .LP diff --git a/contrib/unbound/doc/unbound-anchor.8.in b/contrib/unbound/doc/unbound-anchor.8.in index dc61b72dadb4..9bba2522a19c 100644 --- a/contrib/unbound/doc/unbound-anchor.8.in +++ b/contrib/unbound/doc/unbound-anchor.8.in @@ -1,4 +1,4 @@ -.TH "unbound-anchor" "8" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound-anchor" "8" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound-anchor.8 -- unbound anchor maintenance utility manual .\" diff --git a/contrib/unbound/doc/unbound-checkconf.8.in b/contrib/unbound/doc/unbound-checkconf.8.in index ba6c334c7c78..128f1cebd94b 100644 --- a/contrib/unbound/doc/unbound-checkconf.8.in +++ b/contrib/unbound/doc/unbound-checkconf.8.in @@ -1,4 +1,4 @@ -.TH "unbound-checkconf" "8" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound-checkconf" "8" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound-checkconf.8 -- unbound configuration checker manual .\" diff --git a/contrib/unbound/doc/unbound-control.8.in b/contrib/unbound/doc/unbound-control.8.in index 3841b9737f4e..10be612fe20e 100644 --- a/contrib/unbound/doc/unbound-control.8.in +++ b/contrib/unbound/doc/unbound-control.8.in @@ -1,4 +1,4 @@ -.TH "unbound-control" "8" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound-control" "8" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound-control.8 -- unbound remote control manual .\" @@ -54,6 +54,12 @@ Stop the server. The server daemon exits. .B reload Reload the server. This flushes the cache and reads the config file fresh. .TP +.B reload_keep_cache +Reload the server but try to keep the RRset and message cache if +(re)configuration allows for it. +That means the caches sizes and the number of threads must not change between +reloads. +.TP .B verbosity \fInumber Change verbosity value for logging. Same values as \fBverbosity\fR keyword in \fIunbound.conf\fR(5). This new setting lasts until the server is issued @@ -130,7 +136,7 @@ name specified. .TP .B flush \fIname Remove the name from the cache. Removes the types -A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV and NAPTR. +A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV, NAPTR, SVCB and HTTPS. Because that is fast to do. Other record types can be removed using .B flush_type or diff --git a/contrib/unbound/doc/unbound-host.1.in b/contrib/unbound/doc/unbound-host.1.in index 8371084c575b..0af5777f0492 100644 --- a/contrib/unbound/doc/unbound-host.1.in +++ b/contrib/unbound/doc/unbound-host.1.in @@ -1,4 +1,4 @@ -.TH "unbound\-host" "1" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound\-host" "1" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound-host.1 -- unbound DNS lookup utility .\" diff --git a/contrib/unbound/doc/unbound.8.in b/contrib/unbound/doc/unbound.8.in index ac61b0f7a10c..498690805c85 100644 --- a/contrib/unbound/doc/unbound.8.in +++ b/contrib/unbound/doc/unbound.8.in @@ -1,4 +1,4 @@ -.TH "unbound" "8" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound" "8" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound.8 -- unbound manual .\" @@ -9,7 +9,7 @@ .\" .SH "NAME" .B unbound -\- Unbound DNS validating resolver 1.17.0. +\- Unbound DNS validating resolver 1.17.1. .SH "SYNOPSIS" .B unbound .RB [ \-h ] diff --git a/contrib/unbound/doc/unbound.conf.5.in b/contrib/unbound/doc/unbound.conf.5.in index 6c021b900d89..3844d52551c6 100644 --- a/contrib/unbound/doc/unbound.conf.5.in +++ b/contrib/unbound/doc/unbound.conf.5.in @@ -1,4 +1,4 @@ -.TH "unbound.conf" "5" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound.conf" "5" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound.conf.5 -- unbound.conf manual .\" @@ -112,6 +112,14 @@ If enabled, extended statistics are printed from \fIunbound\-control\fR(8). Default is off, because keeping track of more statistics takes time. The counters are listed in \fIunbound\-control\fR(8). .TP +.B statistics\-inhibit\-zero: \fI +If enabled, selected extended statistics with a value of 0 are inhibited from +printing with \fIunbound\-control\fR(8). +These are query types, query classes, query opcodes, answer rcodes +(except NOERROR, FORMERR, SERVFAIL, NXDOMAIN, NOTIMPL, REFUSED) and +RPZ actions. +Default is on. +.TP .B num\-threads: \fI The number of threads to create to serve clients. Use 1 for no threading. .TP @@ -349,7 +357,7 @@ ip\-transparent option is also available. The value of the Differentiated Services Codepoint (DSCP) in the differentiated services field (DS) of the outgoing IP packet headers. The field replaces the outdated IPv4 Type-Of-Service field and the -IPV6 traffic class field. +IPv6 traffic class field. .TP .B rrset\-cache\-size: \fI Number of bytes size of the RRset cache. Default is 4 megabytes. @@ -416,7 +424,7 @@ Enable or disable whether ip4 queries are answered or issued. Default is yes. Enable or disable whether ip6 queries are answered or issued. Default is yes. If disabled, queries are not answered on IPv6, and queries are not sent on IPv6 to the internet nameservers. With this option you can disable the -ipv6 transport for sending DNS traffic, it does not impact the contents of +IPv6 transport for sending DNS traffic, it does not impact the contents of the DNS traffic, which may have ip4 and ip6 addresses in it. .TP .B prefer\-ip4: \fI @@ -1671,7 +1679,7 @@ This specifies the action data for \fIresponse-ip\fR with action being to redirect as specified by "\fIresource record string\fR". "Resource record string" is similar to that of \fIaccess-control-tag-action\fR, but it must be of either AAAA, A or CNAME types. -If the IP-netblock is an IPv6/IPV4 prefix, the record +If the IP-netblock is an IPv6/IPv4 prefix, the record must be AAAA/A respectively, unless it is a CNAME (which can be used for both versions of IP netblocks). If it is CNAME there must not be more than one \fIresponse-ip-data\fR for the same IP-netblock. @@ -1820,6 +1828,21 @@ If a forward/stub zone is used, this is the number of retries per nameserver in the zone. Default is 5. .TP 5 +.B max\-sent\-count: \fI +Hard limit on the number of outgoing queries Unbound will make while resolving +a name, making sure large NS sets do not loop. +Results in SERVFAIL when reached. +It resets on query restarts (e.g., CNAME) and referrals. +Default is 32. +.TP 5 +.B max\-query\-restarts: \fI +Hard limit on the number of times Unbound is allowed to restart a query upon +encountering a CNAME record. +Results in SERVFAIL when reached. +Changing this value needs caution as it can allow long CNAME chains to be +accepted, where Unbound needs to verify (resolve) each link individually. +Default is 11. +.TP 5 .B fast\-server\-permil: \fI Specify how many times out of 1000 to pick from the set of fastest servers. 0 turns the feature off. A value of 900 would pick from the fastest @@ -1853,7 +1876,7 @@ errors. Default is "no". When the \fBval-log-level\fR option is also set to \fB2\fR, responses with Extended DNS Errors concerning DNSSEC failures that are not served from cache, will also contain a descriptive text message about the reason for the failure. -.TP +.TP 5 *** 1646 LINES SKIPPED *** From nobody Tue Feb 14 18:33:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGVGM3tKQz3pprn; Tue, 14 Feb 2023 18:33:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGVGM39g8z3lj7; Tue, 14 Feb 2023 18:33:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1dKkBbRDgkXypLR2b3PLNFijd/7izvx5eiUm1IjJq4=; b=EsKLnLMkE9aER6xHDDCnW7ARy5j0E2NcOiv5KwaeBzLY9EahreWYt5qMw3KqvPPnbAU9Kv luCneWSvd1dv2UOPkrxGseVkReVt2n2eiR710Yehusa2D65U9WBrna17FE7cFrAq95wj5R mHgTjcKUvHJ7G8bqc0CipyhNXaDIXnBARiwLfOX6uL1VcoWcw+IX+u60o4QkTUMKSHwhnb LuDR767xD+/efmuOEnLD/TCMAEAqp8WWF0QNXWJyWGinH9IOIZtKwSyg/0gHkH15Fp9mkw er++jN8CVFt/8Cxf05W+TBecm/7qTJB0R96QPEw4OglEQQF2j37Z5hh7uJq8Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1dKkBbRDgkXypLR2b3PLNFijd/7izvx5eiUm1IjJq4=; b=GwEC9WqaxO7LU0xWOhg3qrUAwrU2/ESahmTmpadqWyJtIAZ0cXbdfMsB1+tVMthKmYEzmN Ypxttbpym7aQ9lsn0zbQ+vtBy0t6U4zTu4GlP3S3E7r3zo3OK+bU9LUgEL7aZpeBCael8/ dB+iuZR5rU9r/YO+f35iL3SZ61L2kCqYeStu9wGQI0pbN+HmsMmehdZpXboYXAGdL2SApo 6oT9n5IEPgIJJNlaUMxpfIifr40EH9ghh9/ctsrWxhb0auwPLk/GEma0OMOSYAWknDcP3X HuBOnnVm4vnRvr6DHJqlxp/ntWKJH6mcQxIlthQzYXR0MCofSzGmOhPkwLsi5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399627; a=rsa-sha256; cv=none; b=IbmxgkZWVpGPy3ScHdjEAjxJPXxYU1CMTd/XJQ/KE1yCTGtuSS92Bngs3GRlzq0OPcTAhs sEkNxFvkr95tCA+Gu22U+P56lpyQk+/L8lEOe5wCvKWdzAp8XAPufnn5IJUvbHnh2ONtGU NcZRr/JUfFtV1U8zRqT8rO90rL2mxuBY/C0KJX4MSaU/JWHGNYZwXbOUEGFNNDIS4C+AsI gvVqSPDhLpulGz1P3sCC2BMsjwy35XVijGDPHmzX+Mfb5H9YQ+1LPffrTNKzYnKUBUgH6x 5gtYTgvGFhBLK6YI5oK3RfXHrNVDElrM7KopKqfASVdpVdTs7+ynrcPqrmPuvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGVGM2BQlz18Zk; Tue, 14 Feb 2023 18:33:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EIXlk4001856; Tue, 14 Feb 2023 18:33:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EIXlsd001855; Tue, 14 Feb 2023 18:33:47 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:33:47 GMT Message-Id: <202302141833.31EIXlsd001855@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: 9f9f2a1270c5 - stable/13 - unbound: Fix config.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 9f9f2a1270c510b33e1e50b1bac09ebe10bbb974 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9f9f2a1270c510b33e1e50b1bac09ebe10bbb974 commit 9f9f2a1270c510b33e1e50b1bac09ebe10bbb974 Author: Cy Schubert AuthorDate: 2023-01-15 06:55:05 +0000 Commit: Cy Schubert CommitDate: 2023-02-14 18:32:39 +0000 unbound: Fix config.h FreeBSD src does not support HAVE_DECL_EVSIGNAL_ASSIGN. While reviewing the new config.h after regenerating it, this definition was not removed. Updating config.h is a manual process of configuring the port and copying/merging the generated config.h into src. This definition was missed and not removed (#undef'd). Fixes: 1838dec31895fd4752fa8631322ab93be0705a66 (cherry picked from commit 06b93ef8cda227d755d7f6cfa95d08c0ccc9dc2d) --- usr.sbin/unbound/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/unbound/config.h b/usr.sbin/unbound/config.h index 7ea0d3151ac5..bd36bb7573f8 100644 --- a/usr.sbin/unbound/config.h +++ b/usr.sbin/unbound/config.h @@ -117,7 +117,7 @@ /* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if you don't. */ -#define HAVE_DECL_EVSIGNAL_ASSIGN 1 +/* #undef HAVE_DECL_EVSIGNAL_ASSIGN */ /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you don't. */ From nobody Tue Feb 14 18:33:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGVGN5phyz3pq2N; Tue, 14 Feb 2023 18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGVGN4S05z3ljn; Tue, 14 Feb 2023 18: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=1676399628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qb6RF1VZ02Ru1LsjD+khDcIU5TmNYrEksJed/drxrcA=; b=sUWLkAc7nBuykdUb83mNTemmqkPGq2VTAUj+tyUqlEHlD5WEWcfwjBaiR6nepmAAQtoXod zGrOlIF8fbxeoyRf7CnalM+ABjIIVv3PfEUQkYKisSu2xqu87JgzMJZfL8C9xmsmPEH3rG a/5FSlTQRU+fto5+B8mBzlmcAbeuSkRf63dmLLY5tojgpcqsdSbgPcQd7Z7PmZBvZWjwV8 drOQGFaL2ZBzS/v7ZHzce5ip6wvLeiMNYTquDm2+fdRI0/XzkanZLc7SL4szQyxEAdNbe3 6yzwBR9O079MjZC4Y6Xrr8RgyvzmAaoDc+s0BYCYNFh2zb5J+QfQzf8ULB2bEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qb6RF1VZ02Ru1LsjD+khDcIU5TmNYrEksJed/drxrcA=; b=BKgOpAnQ6HKSgljMH58FH4BYFmzGaU6z2+KK3LD7Ss17TB16M+P1VV/i9aPe97k1qrSFoL nUKnGoRFbIeJeJwybppi9Zdtpqb6YE5mEifisXk7dwNCFhnsckPBDyulHXvy2JlCu2P/jw VrDXx4grBXjBTonhZLjMYrLatNbTdqa+yF9S9aP8mHgw6vJlPFmzRlyWf++tgutX0irXIO 6fySeW3Vl9asNwB6ymYOTRo/vgjZz6iUTJ31QZPheLU9iGPAnx9iQRfftGDGuN8OL6D0n1 Gwl7K7s9Xso45z7vNaB8y5QfMOidorJqTj78PkSn58fGX71BFjxUssd2Av7H7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399628; a=rsa-sha256; cv=none; b=ZimfP8fB0sIO5Am9v/3Ut6rFHOHhCVP8RaDlvVD4h1A++HNMxhyT5blbR8NfP1DTU0VI9Z SnlHihVtt0/EPciWp0nJ/3BJDZMcJc2/dJtx7YPDfTv131u3neKUwZYpQMYzk0cE25tC0f 8doFfSCW3sgcu3RryxR+EqqZFwaf3sFWVJLfC7bO7qviKeLWclC247ixIUIEdy5qw+SVKh ImqwwmUz/zl3GKPOopWOw+hsbD0Rbfv+5m158FUaZXnHdfFGtiDw3niwQKB0OIk/ldzw5a 6nNIkkz9jaD9qKp3LT3/EB5PJNhmuLq0xYagcX9prkBUB/LE0SxSHMOB3tCpxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGVGN36Thz17h3; Tue, 14 Feb 2023 18:33:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EIXmh9001888; Tue, 14 Feb 2023 18:33:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EIXmu0001887; Tue, 14 Feb 2023 18:33:48 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:33:48 GMT Message-Id: <202302141833.31EIXmu0001887@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: e0c3f2a1e296 - stable/13 - unbound: Fix config file path List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: e0c3f2a1e2961b5e4813399bf2a4bea467d2c301 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e0c3f2a1e2961b5e4813399bf2a4bea467d2c301 commit e0c3f2a1e2961b5e4813399bf2a4bea467d2c301 Author: Juraj Lutter AuthorDate: 2023-01-17 17:25:47 +0000 Commit: Cy Schubert CommitDate: 2023-02-14 18:32:39 +0000 unbound: Fix config file path Commit 1838dec31895fd4752fa8631322ab93be0705a66 changed the config file path to /usr/local/etc/unbound/unbound.conf which is wrong for unbound in base. Reported by: Ihor Antonov Reviewed by: zlei Approved by: zlei Differential Revision: https://reviews.freebsd.org/D38106 Fixes: 1838dec31895fd4752fa8631322ab93be0705a66 (cherry picked from commit 1d577bedbae80ced38ccb834e6835e5fd98bc411) --- usr.sbin/unbound/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/unbound/config.h b/usr.sbin/unbound/config.h index bd36bb7573f8..2068cbfe7295 100644 --- a/usr.sbin/unbound/config.h +++ b/usr.sbin/unbound/config.h @@ -21,7 +21,7 @@ #define CONFCMDLINE "--with-ssl=/usr --with-libexpat=/usr --disable-dnscrypt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-libevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pthreads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --build=freebsd" /* Pathname to the Unbound configuration file */ -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" +#define CONFIGFILE "/var/unbound/unbound.conf" /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work */ From nobody Tue Feb 14 18:35:12 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGVJ10N83z3pq0h; Tue, 14 Feb 2023 18:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGVJ06yqNz3mbD; Tue, 14 Feb 2023 18:35:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dhvau4MiBYQM7JP7Mwtd76z2uTaZ25a8lA4UzSh3TDU=; b=eQvrqwP4yFwhnZBjU/OgM4yiw45wjwSLXE/fQePsyx4XG2Xs0EOoGst6ur5V2samgkzUBE LgxO7ML25CyeH7GuXS+6u8UzkwX1J/fXyPBK1szn1UGAZ51R7W/7VQKzfaidC+AXARUvAY VQaAnfD+Z9+EjHFNcr3WDDXMAMaHFiQ/gJOxC+0TpML/Lhy1cjkCFamE3pyvIc+WI1JCI5 ueH9lp50U1gSuxnXIWAG4CQ5L0QaKymJslkwtKBPHSQO5LVWr2UNtWawd8dWM/Ekjncjnp yJrxQD5j+t5QU7p/3ybYSbCfXov2bB0o91wbn9GuxUq/H3ZX3byL0DarZUWOQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dhvau4MiBYQM7JP7Mwtd76z2uTaZ25a8lA4UzSh3TDU=; b=m7vuYXr+/aUH+sYx1zre3I/V9QnEttSdFit3NgCRC2T7lnVoyAFMKYR4M7h+yaQsMtyfJw sbjWrOn9iuwkxCLOIxur4Y46eYx/g+FZvo5KYgxmTNkeGZyJFC5LtiwG5jYcJCnKCiV1D5 U9wJVqWM4IfjT/nrl/JbcKM/IyxWwtakprvCHywrVDuD3CrwdGban63NoyQ4aZ/aoX2Daw h1pcMmCF13Mi3HJeKhSv+z8EvSbJRBvbUnkus6iCZVGDCOdlzivpSXJZpd4q9Lj1+CWeHi GnoN9jN59Q+ymxu5Wj7lb5zKk1XSNNd76IpDzM5TUjTW8LV59DGX2FFyihzXrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399713; a=rsa-sha256; cv=none; b=S3B1Cudy3ksHNgYB9bBvPIi9H2fMA1KKrzIhMar1ab3oi5YPzU4sxxyIMgMvtDPd/xzHtV oQtX8EvQMMQ024ZS816y13ZB721mJme/flDcQ3gKi2GtQfgjmvQczErZK7S3YDn6qZ4j4b fYnAX2nn/CSlWL+6MT3tU6Rlld7NgfiglaSIFd13Phav7svYAqEXDJ9L5DpPj9txyzzRmz cGbS5SbiAt+Qvt8Z3wWxOPN5ujWe2l58lKnljXqIwoXBr5P10l/kYrG0uhlXHsUSO3kchf b73KAQWaQ9nkwazUnnOllAKqRSX8erLc9wp65Iv+TzUYVTqzVHou435OI+zR1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGVJ061Jmz18Ls; Tue, 14 Feb 2023 18:35:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EIZCvp002200; Tue, 14 Feb 2023 18:35:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EIZC9T002199; Tue, 14 Feb 2023 18:35:12 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:35:12 GMT Message-Id: <202302141835.31EIZC9T002199@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: 8d5dfe721e0f - stable/12 - heimdal: Resolve hdb_free_entry() SIGSEGV/SIGILL List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: 8d5dfe721e0f52a2c2379c08356706b05f862927 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=8d5dfe721e0f52a2c2379c08356706b05f862927 commit 8d5dfe721e0f52a2c2379c08356706b05f862927 Author: Cy Schubert AuthorDate: 2023-02-07 15:46:59 +0000 Commit: Cy Schubert CommitDate: 2023-02-14 18:34:27 +0000 heimdal: Resolve hdb_free_entry() SIGSEGV/SIGILL When the client sends kadmind a create principal (kadm_create) request kadm_s_create_principal() returns an error before zeroing out ent (an hdb entry structure wrapper -- hdb_entry_ex), resulting in a NULL reference. Fix obtained from upstream commit 35ea4955a. PR: 268059 Reported by: Robert Morris Obtained from: Heimdal commit 35ea4955a (cherry picked from commit 6a70e0b4cdc606931555cdc59dc6c8d4a3ab4e3e) --- crypto/heimdal/lib/kadm5/create_s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/kadm5/create_s.c b/crypto/heimdal/lib/kadm5/create_s.c index 04312c024ed3..1033ca103239 100644 --- a/crypto/heimdal/lib/kadm5/create_s.c +++ b/crypto/heimdal/lib/kadm5/create_s.c @@ -65,6 +65,7 @@ create_principal(kadm5_server_context *context, kadm5_principal_ent_rec defrec, *defent; uint32_t def_mask; + memset(ent, 0, sizeof(*ent)); if((mask & required_mask) != required_mask) return KADM5_BAD_MASK; if((mask & forbidden_mask)) @@ -72,7 +73,6 @@ create_principal(kadm5_server_context *context, if((mask & KADM5_POLICY) && strcmp(princ->policy, "default")) /* XXX no real policies for now */ return KADM5_UNK_POLICY; - memset(ent, 0, sizeof(*ent)); ret = krb5_copy_principal(context->context, princ->principal, &ent->entry.principal); if(ret) From nobody Tue Feb 14 18:35:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGVJ21DjPz3ppfQ; Tue, 14 Feb 2023 18:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGVJ20d48z3mKl; Tue, 14 Feb 2023 18:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=alSrfIblynHm7gxTjm9cPnqUmP7DK8LqwWRluA9y+tE=; b=QmfdQmOlJycYY5B9FB6ji7zgKLnDG9MSEhP8lLHAkkYP1p0F0XG4oI7EsuvH6fLI/Yfizn RMeSPPPMgGyjpUOU7/lwE02mQgZ9FE61oxZe4FVj2tjMs0EOYeirhnQ4vu21hjIl4fO9qy QPEYf3cMNtQn46WqhxwFI4RrakLljSvZGjUMuXAaR3q1WjEf7Ds3QB85vG7Im7U+fBymoS 3VGhIsYEq/NUb5ZSHBl8C8cOqzWDK/495DFjWp1P9qgeaTDtPC7YTMaNzpMWHnkhzWQpw/ KDCKRBkPjvOOkBRup+V7+1elaXOyGKKWiV5s34aoFaTAEWY5PFH4EvEVurJH7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=alSrfIblynHm7gxTjm9cPnqUmP7DK8LqwWRluA9y+tE=; b=X0ozfHZZNkyiMsn0tEj1TyPUF8TTPq4i7tsUyd1rzvObtmhJ9o4r+P7PAKWZ1x4AkcsjWz JlEatdbZyGXUPJv11e3IoupCXrQYVMKLACcDi0os+YdnM7jseTyQEOOSFxJi9+03nlZvm/ QWfwNVZ4ycg/KNQEDxyR87j1d5cmH00o4FdSWn9HGT8jf937B8YqVVAQaPyNcmPLvsHsLO i01eE8e6AUbDAozApsf6M2ESPsOC2ZnRFLD5+di20ctZrkGjP/lttbBDc6nWXtXP4hhnsu sMW/vVlcUHAmcByyoMBEfa9sSK7oiOClatzbppiBI9Mvs7NPxkkhxmzMhHG6qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399714; a=rsa-sha256; cv=none; b=GCxBsbQx8G0T0Zl9LLQWZjjUyLns0aQ922REnRFl3IS7h8Ney5i9IMKD9iNCACoJq7p0N/ D3gVgeB8q2AwIBjoeJZr3L29Kiz/abQOKYPiBz+asg3Z0pUvUJXvufggE54fRB0T/trBZ9 XaBMFeQpocEu8fkCeM3ss2zO65r7M6rbJjwSjVNL7P+FaPtZmeshVgrzfXTpHTTnAZ7Zvp eZlvCFALUnrKULX5sZJMKaNIFBtdo/xgivKD5CLfFYJ4OcQny5fhYDTOq3LKOmFwRvters yqZESA0WRBAGCHrFbVRkItqqbOs+G2vfnPtuNqN3KEQ51Wu3EKrAowUlyKywJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGVJ16nC0z18Pc; Tue, 14 Feb 2023 18:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EIZDsm002230; Tue, 14 Feb 2023 18:35:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EIZDQU002227; Tue, 14 Feb 2023 18:35:13 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:35:13 GMT Message-Id: <202302141835.31EIZDQU002227@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: 7c8cb91e0087 - stable/12 - unbound: Vendor import 1.17.1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: 7c8cb91e00877c3c56e69dde0800d8d883c09d42 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7c8cb91e00877c3c56e69dde0800d8d883c09d42 commit 7c8cb91e00877c3c56e69dde0800d8d883c09d42 Author: Cy Schubert AuthorDate: 2023-01-15 05:39:31 +0000 Commit: Cy Schubert CommitDate: 2023-02-14 18:34:39 +0000 unbound: Vendor import 1.17.1 Release notes at https://www.nlnetlabs.nl/news/2023/Jan/12/unbound-1.17.1-released/. Merge commit '7699e1386a16236002b26107ffd2dcbde375e197' into main (cherry picked from commit 1838dec31895fd4752fa8631322ab93be0705a66) --- contrib/unbound/Makefile.in | 4 +- contrib/unbound/README.md | 1 + contrib/unbound/cachedb/cachedb.c | 21 ++- contrib/unbound/configure | 25 +-- contrib/unbound/configure.ac | 5 +- contrib/unbound/contrib/unbound.service.in | 5 +- contrib/unbound/daemon/cachedump.c | 9 +- contrib/unbound/daemon/daemon.c | 91 ++++++++- contrib/unbound/daemon/daemon.h | 6 + contrib/unbound/daemon/remote.c | 16 +- contrib/unbound/daemon/worker.c | 21 ++- contrib/unbound/daemon/worker.h | 4 +- contrib/unbound/doc/Changelog | 86 +++++++++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf.in | 18 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 10 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 36 +++- contrib/unbound/edns-subnet/subnetmod.c | 11 ++ contrib/unbound/iterator/iter_utils.c | 2 + contrib/unbound/iterator/iterator.c | 7 +- contrib/unbound/iterator/iterator.h | 10 +- contrib/unbound/libunbound/context.c | 1 + contrib/unbound/libunbound/context.h | 6 + contrib/unbound/libunbound/libunbound.c | 39 +++- contrib/unbound/libunbound/libworker.c | 1 + contrib/unbound/libunbound/unbound-event.h | 3 +- contrib/unbound/services/authzone.c | 1 + contrib/unbound/services/cache/dns.c | 8 + contrib/unbound/sldns/rrdef.h | 4 +- contrib/unbound/smallapp/unbound-control.c | 12 +- .../09-unbound-control.tdir/conf.bad_credentials | 5 + .../conf.spoofed_credentials | 5 + .../unbound/testdata/cachedb_servfail_cname.crpl | 181 ++++++++++++++++++ .../testdata/serve_expired_cached_servfail.rpl | 130 +++++++++++++ .../unbound/testdata/subnet_cached_servfail.crpl | 167 +++++++++++++++++ contrib/unbound/util/config_file.c | 9 + contrib/unbound/util/config_file.h | 7 + contrib/unbound/util/configlexer.lex | 3 + contrib/unbound/util/configparser.y | 34 +++- contrib/unbound/util/iana_ports.inc | 1 + contrib/unbound/util/netevent.c | 30 ++- contrib/unbound/util/tube.c | 53 ++++-- usr.sbin/unbound/config.h | 204 +++++++++++++++++---- 48 files changed, 1169 insertions(+), 139 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index e7c76c2588aa..bc021aa1eb00 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -616,7 +616,7 @@ install-all: all $(PYTHONMOD_INSTALL) $(PYUNBOUND_INSTALL) $(UNBOUND_EVENT_INSTA $(INSTALL) -c -m 644 doc/unbound.conf.5 $(DESTDIR)$(mandir)/man5 $(INSTALL) -c -m 644 doc/unbound-host.1 $(DESTDIR)$(mandir)/man1 $(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup - if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi + if test ! -e "$(DESTDIR)$(configfile)"; then $(INSTALL) -d `dirname "$(DESTDIR)$(configfile)"`; $(INSTALL) -c -m 644 doc/example.conf "$(DESTDIR)$(configfile)"; fi pythonmod-uninstall: rm -f -- $(DESTDIR)$(PYTHON_SITE_PKG)/unboundmodule.py @@ -645,7 +645,7 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) $(UNBOUND_EVENT_UNINSTA rm -f -- $(DESTDIR)$(includedir)/unbound.h $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libunbound.la @echo - @echo "You still need to remove "`dirname $(DESTDIR)$(configfile)`" , $(DESTDIR)$(configfile) by hand" + @echo "You still need to remove "`dirname "$(DESTDIR)$(configfile)"`" , $(DESTDIR)$(configfile) by hand" iana_update: curl -o port-numbers.tmp https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index d1bbcf2b7797..c3d9bc2492ef 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -4,6 +4,7 @@ [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) +[![Mastodon Follow](https://img.shields.io/mastodon/follow/109262826617293067?domain=https%3A%2F%2Ffosstodon.org&style=social)](https://fosstodon.org/@nlnetlabs) Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards. If you diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index b07743d85259..245daa986967 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -390,6 +390,15 @@ prep_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(!qstate->return_msg || !qstate->return_msg->rep) return 0; + /* do not store failures like SERVFAIL in the cachedb, this avoids + * overwriting expired, valid, content with broken content. */ + if(FLAGS_GET_RCODE(qstate->return_msg->rep->flags) != + LDNS_RCODE_NOERROR && + FLAGS_GET_RCODE(qstate->return_msg->rep->flags) != + LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(qstate->return_msg->rep->flags) != + LDNS_RCODE_YXDOMAIN) + return 0; /* We don't store the reply if its TTL is 0 unless serve-expired is * enabled. Such a reply won't be reusable and simply be a waste for * the backend. It's also compatible with the default behavior of @@ -542,10 +551,16 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) verbose(VERB_ALGO, "cachedb msg expired"); /* If serve-expired is enabled, we still use an expired message * setting the TTL to 0. */ - if(qstate->env->cfg->serve_expired) - adjust = -1; - else + if(!qstate->env->cfg->serve_expired || + (FLAGS_GET_RCODE(qstate->return_msg->rep->flags) + != LDNS_RCODE_NOERROR && + FLAGS_GET_RCODE(qstate->return_msg->rep->flags) + != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(qstate->return_msg->rep->flags) + != LDNS_RCODE_YXDOMAIN)) return 0; /* message expired */ + else + adjust = -1; } verbose(VERB_ALGO, "cachedb msg adjusted down by %d", (int)adjust); adjust_msg_ttl(qstate->return_msg, adjust); diff --git a/contrib/unbound/configure b/contrib/unbound/configure index a2837d18553b..5823e49f2f80 100755 --- a/contrib/unbound/configure +++ b/contrib/unbound/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.17.0. +# Generated by GNU Autoconf 2.69 for unbound 1.17.1. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.17.0' -PACKAGE_STRING='unbound 1.17.0' +PACKAGE_VERSION='1.17.1' +PACKAGE_STRING='unbound 1.17.1' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -1477,7 +1477,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.17.0 to adapt to many kinds of systems. +\`configure' configures unbound 1.17.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1543,7 +1543,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.17.0:";; + short | recursive ) echo "Configuration of unbound 1.17.1:";; esac cat <<\_ACEOF @@ -1785,7 +1785,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.17.0 +unbound configure 1.17.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2494,7 +2494,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.17.0, which was +It was created by unbound $as_me 1.17.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2846,11 +2846,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=17 -UNBOUND_VERSION_MICRO=0 +UNBOUND_VERSION_MICRO=1 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=20 +LIBUNBOUND_REVISION=21 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2938,6 +2938,7 @@ LIBUNBOUND_AGE=1 # 1.16.2 had 9:18:1 # 1.16.3 had 9:19:1 # 1.17.0 had 9:20:1 +# 1.17.1 had 9:21:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -22085,7 +22086,7 @@ _ACEOF -version=1.17.0 +version=1.17.1 date=`date +'%b %e, %Y'` @@ -22604,7 +22605,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.17.0, which was +This file was extended by unbound $as_me 1.17.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22670,7 +22671,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.17.0 +unbound config.status 1.17.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/contrib/unbound/configure.ac b/contrib/unbound/configure.ac index 57cc7e604b1e..2c7583310f20 100644 --- a/contrib/unbound/configure.ac +++ b/contrib/unbound/configure.ac @@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[17]) -m4_define([VERSION_MICRO],[0]) +m4_define([VERSION_MICRO],[1]) AC_INIT([unbound],m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]),[unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues],[unbound]) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=20 +LIBUNBOUND_REVISION=21 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -106,6 +106,7 @@ LIBUNBOUND_AGE=1 # 1.16.2 had 9:18:1 # 1.16.3 had 9:19:1 # 1.17.0 had 9:20:1 +# 1.17.1 had 9:21:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary diff --git a/contrib/unbound/contrib/unbound.service.in b/contrib/unbound/contrib/unbound.service.in index ada5fac9c224..5a05c525170f 100644 --- a/contrib/unbound/contrib/unbound.service.in +++ b/contrib/unbound/contrib/unbound.service.in @@ -42,9 +42,8 @@ [Unit] Description=Validating, recursive, and caching DNS resolver Documentation=man:unbound(8) -After=network-online.target -Before=nss-lookup.target -Wants=network-online.target nss-lookup.target +After=network.target +Before=network-online.target nss-lookup.target [Install] WantedBy=multi-user.target diff --git a/contrib/unbound/daemon/cachedump.c b/contrib/unbound/daemon/cachedump.c index baf8008ea80f..943eb63f326c 100644 --- a/contrib/unbound/daemon/cachedump.c +++ b/contrib/unbound/daemon/cachedump.c @@ -387,7 +387,7 @@ move_into_cache(struct ub_packed_rrset_key* k, struct rrset_ref ref; uint8_t* p; - ak = alloc_special_obtain(&worker->alloc); + ak = alloc_special_obtain(worker->alloc); if(!ak) { log_warn("error out of memory"); return 0; @@ -398,7 +398,7 @@ move_into_cache(struct ub_packed_rrset_key* k, ak->rk.dname = (uint8_t*)memdup(k->rk.dname, k->rk.dname_len); if(!ak->rk.dname) { log_warn("error out of memory"); - ub_packed_rrset_parsedelete(ak, &worker->alloc); + ub_packed_rrset_parsedelete(ak, worker->alloc); return 0; } s = sizeof(*ad) + (sizeof(size_t) + sizeof(uint8_t*) + @@ -408,7 +408,7 @@ move_into_cache(struct ub_packed_rrset_key* k, ad = (struct packed_rrset_data*)malloc(s); if(!ad) { log_warn("error out of memory"); - ub_packed_rrset_parsedelete(ak, &worker->alloc); + ub_packed_rrset_parsedelete(ak, worker->alloc); return 0; } p = (uint8_t*)ad; @@ -431,7 +431,8 @@ move_into_cache(struct ub_packed_rrset_key* k, ref.key = ak; ref.id = ak->id; (void)rrset_cache_update(worker->env.rrset_cache, &ref, - &worker->alloc, *worker->env.now); + worker->alloc, *worker->env.now); + return 1; } diff --git a/contrib/unbound/daemon/daemon.c b/contrib/unbound/daemon/daemon.c index 71091133a487..193608d40e05 100644 --- a/contrib/unbound/daemon/daemon.c +++ b/contrib/unbound/daemon/daemon.c @@ -488,6 +488,27 @@ static int daemon_get_shufport(struct daemon* daemon, int* shufport) return avail; } +/** + * Clear and delete per-worker alloc caches, and free memory maintained in + * superalloc. + * The rrset and message caches must be empty at the time of call. + * @param daemon: the daemon that maintains the alloc caches to be cleared. + */ +static void +daemon_clear_allocs(struct daemon* daemon) +{ + int i; + + for(i=0; inum; i++) { + alloc_clear(daemon->worker_allocs[i]); + free(daemon->worker_allocs[i]); + } + free(daemon->worker_allocs); + daemon->worker_allocs = NULL; + + alloc_clear_special(&daemon->superalloc); +} + /** * Allocate empty worker structures. With backptr and thread-number, * from 0..numthread initialised. Used as user arguments to new threads. @@ -540,6 +561,21 @@ daemon_create_workers(struct daemon* daemon) /* the above is not ports/numthr, due to rounding */ fatal_exit("could not create worker"); } + /* create per-worker alloc caches if not reusing existing ones. */ + if(!daemon->worker_allocs) { + daemon->worker_allocs = (struct alloc_cache**)calloc( + (size_t)daemon->num, sizeof(struct alloc_cache*)); + if(!daemon->worker_allocs) + fatal_exit("could not allocate worker allocs"); + for(i=0; inum; i++) { + struct alloc_cache* alloc = calloc(1, + sizeof(struct alloc_cache)); + if (!alloc) + fatal_exit("could not allocate worker alloc"); + alloc_init(alloc, &daemon->superalloc, i); + daemon->worker_allocs[i] = alloc; + } + } free(shufport); } @@ -771,6 +807,7 @@ daemon_fork(struct daemon* daemon) /* Shutdown SHM */ shm_main_shutdown(daemon); + daemon->reuse_cache = daemon->workers[0]->reuse_cache; daemon->need_to_exit = daemon->workers[0]->need_to_exit; } @@ -785,9 +822,16 @@ daemon_cleanup(struct daemon* daemon) log_thread_set(NULL); /* clean up caches because * a) RRset IDs will be recycled after a reload, causing collisions - * b) validation config can change, thus rrset, msg, keycache clear */ - slabhash_clear(&daemon->env->rrset_cache->table); - slabhash_clear(daemon->env->msg_cache); + * b) validation config can change, thus rrset, msg, keycache clear + * + * If we are trying to keep the cache as long as possible, we should + * defer the cleanup until we know whether the new configuration allows + * the reuse. (If we're exiting, cleanup should be done here). */ + if(!daemon->reuse_cache || daemon->need_to_exit) { + slabhash_clear(&daemon->env->rrset_cache->table); + slabhash_clear(daemon->env->msg_cache); + } + daemon->old_num = daemon->num; /* save the current num */ local_zones_delete(daemon->local_zones); daemon->local_zones = NULL; respip_set_delete(daemon->respip_set); @@ -802,8 +846,13 @@ daemon_cleanup(struct daemon* daemon) worker_delete(daemon->workers[i]); free(daemon->workers); daemon->workers = NULL; + /* Unless we're trying to keep the cache, worker alloc_caches should be + * cleared and freed here. We do this after deleting workers to + * guarantee that the alloc caches are valid throughout the lifetime + * of workers. */ + if(!daemon->reuse_cache || daemon->need_to_exit) + daemon_clear_allocs(daemon); daemon->num = 0; - alloc_clear_special(&daemon->superalloc); #ifdef USE_DNSTAP dt_delete(daemon->dtenv); daemon->dtenv = NULL; @@ -900,8 +949,42 @@ daemon_delete(struct daemon* daemon) void daemon_apply_cfg(struct daemon* daemon, struct config_file* cfg) { + int new_num = cfg->num_threads?cfg->num_threads:1; + daemon->cfg = cfg; config_apply(cfg); + + /* If this is a reload and we deferred the decision on whether to + * reuse the alloc, RRset, and message caches, then check to see if + * it's safe to keep the caches: + * - changing the number of threads is obviously incompatible with + * keeping the per-thread alloc caches. It also means we have to + * clear RRset and message caches. (note that 'new_num' may be + * adjusted in daemon_create_workers, but for our purpose we can + * simply compare it with 'old_num'; if they are equal here, + * 'new_num' won't be adjusted to a different value than 'old_num'). + * - changing RRset cache size effectively clears any remaining cache + * entries. We could keep their keys in alloc caches, but it would + * be more consistent with the sense of the change to clear allocs + * and free memory. To do so we also have to clear message cache. + * - only changing message cache size does not necessarily affect + * RRset or alloc cache. But almost all new subsequent queries will + * require recursive resolution anyway, so it doesn't help much to + * just keep RRset and alloc caches. For simplicity we clear/free + * the other two, too. */ + if(daemon->worker_allocs && + (new_num != daemon->old_num || + !slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size, + cfg->msg_cache_slabs) || + !slabhash_is_size(&daemon->env->rrset_cache->table, + cfg->rrset_cache_size, cfg->rrset_cache_slabs))) + { + log_warn("cannot reuse caches due to critical config change"); + slabhash_clear(&daemon->env->rrset_cache->table); + slabhash_clear(daemon->env->msg_cache); + daemon_clear_allocs(daemon); + } + if(!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size, cfg->msg_cache_slabs)) { slabhash_delete(daemon->env->msg_cache); diff --git a/contrib/unbound/daemon/daemon.h b/contrib/unbound/daemon/daemon.h index 58713e9ce466..57665446d41b 100644 --- a/contrib/unbound/daemon/daemon.h +++ b/contrib/unbound/daemon/daemon.h @@ -99,8 +99,12 @@ struct daemon { void* listen_sslctx, *connect_sslctx; /** num threads allocated */ int num; + /** num threads allocated in the previous config or 0 at first */ + int old_num; /** the worker entries */ struct worker** workers; + /** per-worker allocation cache */ + struct alloc_cache **worker_allocs; /** do we need to exit unbound (or is it only a reload?) */ int need_to_exit; /** master random table ; used for port div between threads on reload*/ @@ -140,6 +144,8 @@ struct daemon { /** the dnscrypt environment */ struct dnsc_env* dnscenv; #endif + /** reuse existing cache on reload if other conditions allow it. */ + int reuse_cache; }; /** diff --git a/contrib/unbound/daemon/remote.c b/contrib/unbound/daemon/remote.c index 7d4a414002ac..7c5a036f343d 100644 --- a/contrib/unbound/daemon/remote.c +++ b/contrib/unbound/daemon/remote.c @@ -105,8 +105,6 @@ /** what to put on statistics lines between var and value, ": " or "=" */ #define SQ "=" -/** if true, inhibits a lot of =0 lines from the stats output */ -static const int inhibit_zero = 1; /** subtract timers and the values do not overflow or become negative */ static void @@ -684,8 +682,9 @@ do_stop(RES* ssl, struct worker* worker) /** do the reload command */ static void -do_reload(RES* ssl, struct worker* worker) +do_reload(RES* ssl, struct worker* worker, int reuse_cache) { + worker->reuse_cache = reuse_cache; worker->need_to_exit = 0; comm_base_exit(worker->base); send_ok(ssl); @@ -920,7 +919,7 @@ print_hist(RES* ssl, struct ub_stats_info* s) /** print extended stats */ static int -print_ext(RES* ssl, struct ub_stats_info* s) +print_ext(RES* ssl, struct ub_stats_info* s, int inhibit_zero) { int i; char nm[32]; @@ -1129,7 +1128,7 @@ do_stats(RES* ssl, struct worker* worker, int reset) return; if(!print_hist(ssl, &total)) return; - if(!print_ext(ssl, &total)) + if(!print_ext(ssl, &total, daemon->cfg->stat_inhibit_zero)) return; } } @@ -1963,6 +1962,8 @@ do_flush_name(RES* ssl, struct worker* w, char* arg) do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_PTR, LDNS_RR_CLASS_IN); do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_SRV, LDNS_RR_CLASS_IN); do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_NAPTR, LDNS_RR_CLASS_IN); + do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_SVCB, LDNS_RR_CLASS_IN); + do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_HTTPS, LDNS_RR_CLASS_IN); free(nm); send_ok(ssl); @@ -3029,8 +3030,11 @@ execute_cmd(struct daemon_remote* rc, RES* ssl, char* cmd, if(cmdcmp(p, "stop", 4)) { do_stop(ssl, worker); return; + } else if(cmdcmp(p, "reload_keep_cache", 17)) { + do_reload(ssl, worker, 1); + return; } else if(cmdcmp(p, "reload", 6)) { - do_reload(ssl, worker); + do_reload(ssl, worker, 0); return; } else if(cmdcmp(p, "stats_noreset", 13)) { do_stats(ssl, worker, 0); diff --git a/contrib/unbound/daemon/worker.c b/contrib/unbound/daemon/worker.c index caefad621409..99dcf9940004 100644 --- a/contrib/unbound/daemon/worker.c +++ b/contrib/unbound/daemon/worker.c @@ -133,7 +133,7 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker), rrset = slabhash_get_mem(&worker->env.rrset_cache->table); infra = infra_get_mem(worker->env.infra_cache); mesh = mesh_get_mem(worker->env.mesh); - ac = alloc_get_mem(&worker->alloc); + ac = alloc_get_mem(worker->alloc); superac = alloc_get_mem(&worker->daemon->superalloc); anch = anchors_get_mem(worker->env.anchors); iter = 0; @@ -623,6 +623,14 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, if(worker->env.cfg->serve_expired_ttl && rep->serve_expired_ttl < timenow) return 0; + /* Ignore expired failure answers */ + if(FLAGS_GET_RCODE(rep->flags) != + LDNS_RCODE_NOERROR && + FLAGS_GET_RCODE(rep->flags) != + LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(rep->flags) != + LDNS_RCODE_YXDOMAIN) + return 0; if(!rrset_array_lock(rep->ref, rep->rrset_count, 0)) return 0; *is_expired_answer = 1; @@ -730,8 +738,6 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, goto bail_out; } } else { - /* We don't check the global ede as this is a warning, not - * an error */ if (*is_expired_answer == 1 && worker->env.cfg->ede_serve_expired && worker->env.cfg->ede) { EDNS_OPT_LIST_APPEND_EDE(&edns->opt_list_out, @@ -2059,15 +2065,14 @@ worker_init(struct worker* worker, struct config_file *cfg, } server_stats_init(&worker->stats, cfg); - alloc_init(&worker->alloc, &worker->daemon->superalloc, - worker->thread_num); - alloc_set_id_cleanup(&worker->alloc, &worker_alloc_cleanup, worker); + worker->alloc = worker->daemon->worker_allocs[worker->thread_num]; + alloc_set_id_cleanup(worker->alloc, &worker_alloc_cleanup, worker); worker->env = *worker->daemon->env; comm_base_timept(worker->base, &worker->env.now, &worker->env.now_tv); worker->env.worker = worker; worker->env.worker_base = worker->base; worker->env.send_query = &worker_send_query; - worker->env.alloc = &worker->alloc; + worker->env.alloc = worker->alloc; worker->env.outnet = worker->back; worker->env.rnd = worker->rndstate; /* If case prefetch is triggered, the corresponding mesh will clear @@ -2211,7 +2216,7 @@ worker_delete(struct worker* worker) #endif /* USE_DNSTAP */ comm_base_delete(worker->base); ub_randfree(worker->rndstate); - alloc_clear(&worker->alloc); + /* don't touch worker->alloc, as it's maintained in daemon */ regional_destroy(worker->env.scratch); regional_destroy(worker->scratchpad); free(worker); diff --git a/contrib/unbound/daemon/worker.h b/contrib/unbound/daemon/worker.h index 3fb52abd9d87..ab2fc728d274 100644 --- a/contrib/unbound/daemon/worker.h +++ b/contrib/unbound/daemon/worker.h @@ -118,7 +118,7 @@ struct worker { /** do we need to restart or quit (on signal) */ int need_to_exit; /** allocation cache for this thread */ - struct alloc_cache alloc; + struct alloc_cache *alloc; /** per thread statistics */ struct ub_server_stats stats; /** thread scratch regional */ @@ -131,6 +131,8 @@ struct worker { /** dnstap environment, changed for this thread */ struct dt_env dtenv; #endif + /** reuse existing cache on reload if other conditions allow it. */ + int reuse_cache; }; /** diff --git a/contrib/unbound/doc/Changelog b/contrib/unbound/doc/Changelog index 727d1543ea4e..899026352434 100644 --- a/contrib/unbound/doc/Changelog +++ b/contrib/unbound/doc/Changelog @@ -1,7 +1,93 @@ +5 January 2023: Wouter + - Tag for 1.17.1 release. + +2 January 2023: Wouter + - Fix windows compile for libunbound subprocess reap comm point closes. + - Update github workflows to use checkout v3. + +14 December 2022: George + - Merge #569 from JINMEI Tatuya: add keep-cache option to + 'unbound-control reload' to keep caches. + +13 December 2022: George + - Expose 'statistics-inhibit-zero' as a configuration option; the + default value retains Unbound's behavior. + - Expose 'max-sent-count' as a configuration option; the + default value retains Unbound's behavior. + - Merge #461 from Christian Allred: Add max-query-restarts option. + Exposes an internal configuration but the default value retains + Unbound's behavior. + +13 December 2022: Wouter + - Merge #808: Wrap Makefile script's directory variables in quotes. + - Fix to wrap Makefile scripts directory in quotes for uninstall. + +1 December 2022: Wouter + - Fix #773: When used with systemd-networkd, unbound does not start + until systemd-networkd-wait-online.service times out. + +30 November 2022: George + - Add SVCB and HTTPS to the types removed by 'unbound-control flush'. + - Clear documentation for interactivity between the subnet module and + the serve-expired and prefetch configuration options. + +30 November 2022: Wouter + - Fix #782: Segmentation fault in stats.c:404. + +28 November 2022: Wouter + - Fix for the ignore of tcp events for closed comm points, preserve + the use after free protection features. + +23 November 2022: Philip + - Merge #720 from jonathangray: fix use after free when + WSACreateEvent() fails. + +22 November 2022: George + - Ignore expired error responses. + +11 November 2022: Wouter + - Fix #779: [doc] Missing documention in ub_resolve_event() for + callback parameter was_ratelimited. + +9 November 2022: George + - Complementary fix for distutils.sysconfig deprecation in Python 3.10 + to commit 62c5039ab9da42713e006e840b7578e01d66e7f2. + +8 November 2022: Wouter + - Fix to ignore tcp events for closed comm points. + - Fix to make sure to not read again after a tcp comm point is closed. + - Fix #775: libunbound: subprocess reap causes parent process reap + to hang. + - iana portlist update. + +21 October 2022: George + - Merge #767 from jonathangray: consistently use IPv4/IPv6 in + unbound.conf.5. + +21 October 2022: Wouter + - Fix that cachedb does not store failures in the external cache. + +18 October 2022: George + - Clarify the use of MAX_SENT_COUNT in the iterator code. + +17 October 2022: Wouter + - testcode/dohclient sets log identity to its name. + +14 October 2022: Wouter + - Merge #768 from fobser: Arithmetic on a pointer to void is a GNU + extension. + - In unit test, print python script name list correctly. + +13 October 2022: Wouter + - Tag for 1.17.0 release. The code repository continues with 1.17.1. + 11 October 2022: George - Fix PROXYv2 header read for TCP connections when no proxied addresses are provided. +7 October 2022: Wouter + - Tag for 1.17.0rc1 release. + 7 October 2022: George - Fix to stop possible loops in the tcp reuse code (write_wait list and tcp_wait list). Based on analysis and patch from Prad Seniappan diff --git a/contrib/unbound/doc/README b/contrib/unbound/doc/README index 88444a5e3c99..faab92bcb077 100644 --- a/contrib/unbound/doc/README +++ b/contrib/unbound/doc/README @@ -1,4 +1,4 @@ -README for Unbound 1.17.0 +README for Unbound 1.17.1 Copyright 2007 NLnet Labs http://unbound.net diff --git a/contrib/unbound/doc/example.conf.in b/contrib/unbound/doc/example.conf.in index df0b2a1fb2c0..8cf3d868285e 100644 --- a/contrib/unbound/doc/example.conf.in +++ b/contrib/unbound/doc/example.conf.in @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.17.0. +# See unbound.conf(5) man page, version 1.17.1. # # this is a comment. @@ -35,9 +35,14 @@ server: # statistics-cumulative: no # enable extended statistics (query types, answer codes, status) - # printed from unbound-control. default off, because of speed. + # printed from unbound-control. Default off, because of speed. # extended-statistics: no + # Inhibits selected extended statistics (qtype, qclass, qopcode, rcode, + # rpz-actions) from printing if their value is 0. + # Default on. + # statistics-inhibit-zero: yes + # number of threads to create. 1 disables threading. # num-threads: 1 @@ -173,6 +178,15 @@ server: # a throwaway response (also timeouts) is received. # outbound-msg-retry: 5 + # Hard limit on the number of outgoing queries Unbound will make while + # resolving a name, making sure large NS sets do not loop. + # It resets on query restarts (e.g., CNAME) and referrals. + # max-sent-count: 32 + + # Hard limit on the number of times Unbound is allowed to restart a + # query upon encountering a CNAME record. + # max-query-restarts: 11 + # msec for waiting for an unknown server to reply. Increase if you # are behind a slow satellite link, to eg. 1128. # unknown-server-time-limit: 376 diff --git a/contrib/unbound/doc/libunbound.3.in b/contrib/unbound/doc/libunbound.3.in index b87289e0d764..19a213e1aa6f 100644 --- a/contrib/unbound/doc/libunbound.3.in +++ b/contrib/unbound/doc/libunbound.3.in @@ -1,4 +1,4 @@ -.TH "libunbound" "3" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "libunbound" "3" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" libunbound.3 -- unbound library functions manual .\" @@ -44,7 +44,7 @@ .B ub_ctx_zone_remove, .B ub_ctx_data_add, .B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.17.0 functions. +\- Unbound DNS validating resolver 1.17.1 functions. .SH "SYNOPSIS" .B #include .LP diff --git a/contrib/unbound/doc/unbound-anchor.8.in b/contrib/unbound/doc/unbound-anchor.8.in index dc61b72dadb4..9bba2522a19c 100644 --- a/contrib/unbound/doc/unbound-anchor.8.in +++ b/contrib/unbound/doc/unbound-anchor.8.in @@ -1,4 +1,4 @@ -.TH "unbound-anchor" "8" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound-anchor" "8" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound-anchor.8 -- unbound anchor maintenance utility manual .\" diff --git a/contrib/unbound/doc/unbound-checkconf.8.in b/contrib/unbound/doc/unbound-checkconf.8.in index ba6c334c7c78..128f1cebd94b 100644 --- a/contrib/unbound/doc/unbound-checkconf.8.in +++ b/contrib/unbound/doc/unbound-checkconf.8.in @@ -1,4 +1,4 @@ -.TH "unbound-checkconf" "8" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound-checkconf" "8" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound-checkconf.8 -- unbound configuration checker manual .\" diff --git a/contrib/unbound/doc/unbound-control.8.in b/contrib/unbound/doc/unbound-control.8.in index 3841b9737f4e..10be612fe20e 100644 --- a/contrib/unbound/doc/unbound-control.8.in +++ b/contrib/unbound/doc/unbound-control.8.in @@ -1,4 +1,4 @@ -.TH "unbound-control" "8" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound-control" "8" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound-control.8 -- unbound remote control manual .\" @@ -54,6 +54,12 @@ Stop the server. The server daemon exits. .B reload Reload the server. This flushes the cache and reads the config file fresh. .TP +.B reload_keep_cache +Reload the server but try to keep the RRset and message cache if +(re)configuration allows for it. +That means the caches sizes and the number of threads must not change between +reloads. +.TP .B verbosity \fInumber Change verbosity value for logging. Same values as \fBverbosity\fR keyword in \fIunbound.conf\fR(5). This new setting lasts until the server is issued @@ -130,7 +136,7 @@ name specified. .TP .B flush \fIname Remove the name from the cache. Removes the types -A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV and NAPTR. +A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV, NAPTR, SVCB and HTTPS. Because that is fast to do. Other record types can be removed using .B flush_type or diff --git a/contrib/unbound/doc/unbound-host.1.in b/contrib/unbound/doc/unbound-host.1.in index 8371084c575b..0af5777f0492 100644 --- a/contrib/unbound/doc/unbound-host.1.in +++ b/contrib/unbound/doc/unbound-host.1.in @@ -1,4 +1,4 @@ -.TH "unbound\-host" "1" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound\-host" "1" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound-host.1 -- unbound DNS lookup utility .\" diff --git a/contrib/unbound/doc/unbound.8.in b/contrib/unbound/doc/unbound.8.in index ac61b0f7a10c..498690805c85 100644 --- a/contrib/unbound/doc/unbound.8.in +++ b/contrib/unbound/doc/unbound.8.in @@ -1,4 +1,4 @@ -.TH "unbound" "8" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound" "8" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound.8 -- unbound manual .\" @@ -9,7 +9,7 @@ .\" .SH "NAME" .B unbound -\- Unbound DNS validating resolver 1.17.0. +\- Unbound DNS validating resolver 1.17.1. .SH "SYNOPSIS" .B unbound .RB [ \-h ] diff --git a/contrib/unbound/doc/unbound.conf.5.in b/contrib/unbound/doc/unbound.conf.5.in index 6c021b900d89..3844d52551c6 100644 --- a/contrib/unbound/doc/unbound.conf.5.in +++ b/contrib/unbound/doc/unbound.conf.5.in @@ -1,4 +1,4 @@ -.TH "unbound.conf" "5" "Oct 13, 2022" "NLnet Labs" "unbound 1.17.0" +.TH "unbound.conf" "5" "Jan 12, 2023" "NLnet Labs" "unbound 1.17.1" .\" .\" unbound.conf.5 -- unbound.conf manual .\" @@ -112,6 +112,14 @@ If enabled, extended statistics are printed from \fIunbound\-control\fR(8). Default is off, because keeping track of more statistics takes time. The counters are listed in \fIunbound\-control\fR(8). .TP +.B statistics\-inhibit\-zero: \fI +If enabled, selected extended statistics with a value of 0 are inhibited from +printing with \fIunbound\-control\fR(8). +These are query types, query classes, query opcodes, answer rcodes +(except NOERROR, FORMERR, SERVFAIL, NXDOMAIN, NOTIMPL, REFUSED) and +RPZ actions. +Default is on. +.TP .B num\-threads: \fI The number of threads to create to serve clients. Use 1 for no threading. .TP @@ -349,7 +357,7 @@ ip\-transparent option is also available. The value of the Differentiated Services Codepoint (DSCP) in the differentiated services field (DS) of the outgoing IP packet headers. The field replaces the outdated IPv4 Type-Of-Service field and the -IPV6 traffic class field. +IPv6 traffic class field. .TP .B rrset\-cache\-size: \fI Number of bytes size of the RRset cache. Default is 4 megabytes. @@ -416,7 +424,7 @@ Enable or disable whether ip4 queries are answered or issued. Default is yes. Enable or disable whether ip6 queries are answered or issued. Default is yes. If disabled, queries are not answered on IPv6, and queries are not sent on IPv6 to the internet nameservers. With this option you can disable the -ipv6 transport for sending DNS traffic, it does not impact the contents of +IPv6 transport for sending DNS traffic, it does not impact the contents of the DNS traffic, which may have ip4 and ip6 addresses in it. .TP .B prefer\-ip4: \fI @@ -1671,7 +1679,7 @@ This specifies the action data for \fIresponse-ip\fR with action being to redirect as specified by "\fIresource record string\fR". "Resource record string" is similar to that of \fIaccess-control-tag-action\fR, but it must be of either AAAA, A or CNAME types. -If the IP-netblock is an IPv6/IPV4 prefix, the record +If the IP-netblock is an IPv6/IPv4 prefix, the record must be AAAA/A respectively, unless it is a CNAME (which can be used for both versions of IP netblocks). If it is CNAME there must not be more than one \fIresponse-ip-data\fR for the same IP-netblock. @@ -1820,6 +1828,21 @@ If a forward/stub zone is used, this is the number of retries per nameserver in the zone. Default is 5. .TP 5 +.B max\-sent\-count: \fI +Hard limit on the number of outgoing queries Unbound will make while resolving +a name, making sure large NS sets do not loop. +Results in SERVFAIL when reached. +It resets on query restarts (e.g., CNAME) and referrals. +Default is 32. +.TP 5 +.B max\-query\-restarts: \fI +Hard limit on the number of times Unbound is allowed to restart a query upon +encountering a CNAME record. +Results in SERVFAIL when reached. +Changing this value needs caution as it can allow long CNAME chains to be +accepted, where Unbound needs to verify (resolve) each link individually. +Default is 11. +.TP 5 .B fast\-server\-permil: \fI Specify how many times out of 1000 to pick from the set of fastest servers. 0 turns the feature off. A value of 900 would pick from the fastest @@ -1853,7 +1876,7 @@ errors. Default is "no". When the \fBval-log-level\fR option is also set to \fB2\fR, responses with Extended DNS Errors concerning DNSSEC failures that are not served from cache, will also contain a descriptive text message about the reason for the failure. -.TP +.TP 5 *** 1646 LINES SKIPPED *** From nobody Tue Feb 14 18:35:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGVJ337ptz3ppwl; Tue, 14 Feb 2023 18:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGVJ31KM2z3mgs; Tue, 14 Feb 2023 18:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=goLuP2Ts+fd1PM0abS00tgX9EFiFKQFhOm8+x/k12eQ=; b=JoU11MeyxnyhVIUrVgBndFbkByw8/IQKgdDyw3nlqZDM8j5hb2D3H2/uPFO+Btai39NhIi dvbqXhnf/C1I332F9HtILBuEfDtgwFEetrYD68D+agYSZdTH4hypEuOanSG2ormVUFi18X Bh85mzaozG4j7ULG6K2ti+trTDRvZhHjoCmD63jwkt+Ykx4dKiFZ+6yGmCmVkC5Uz5fxxy m+S8gARmKxDpdUSaUc8pEOLcUs5sgGQN+HRzAtQtQ18xEfiCKU4IXVe0+wPjQ9Gh1ANB/v 47nHV/7arEuEC/BCnd5bAZ3aQomix40LG6dSJu+KCqgqn/K9tMu8rPkot7rbQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=goLuP2Ts+fd1PM0abS00tgX9EFiFKQFhOm8+x/k12eQ=; b=t3jypyuXKA5Jdf0Qq5qBQo3jo1ep9MgLlgqSjHrVntnOsDpKcmzEDlF/Bi8rSQ8gUTvKLg xebvVG2jUYvDBZ3sxgaY4gHF5xbo9u/gPja6eM7R0wijM03JcNMJDNJ0qWj4r80RqXi46O qTt36I+GAQglfq1Sqg1MJ5Pv1y0KoVZBgZ2eaedT6vLqby5r8CzSBxqQV+ncB7b3aGo/VB n7j/KjiUdWhbMNZJ9FtNFiyLTpLCyGSMYZbEDemLMuUPWZJV1Phdbsd3vm92VMupAi/lgc vQn18NWCOsfyTcGrO4zRFPKZ+e0JyxpkESLf5PeH1u49H11dOVNNl3b6EopQSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399715; a=rsa-sha256; cv=none; b=c0//jlUMv3ftOqxtFoKQ+5dzt1fyfivLwNi/3BnFgRfWqSBw6jv5Wn93JRqRAikWYJXohf JfvXQ9aA+W581cv1zoO41Gbejv8ZMn9fNzfRtiHFlk4puQMHjX251beKD/Ss5u5yWghnC0 vIC3eO07AF6lJPHlXzlzTHqoMFKoTsKRdD18/LqJaf9KBt7wkPMYWHnVFJoJ1nyzu3StT9 qjSAzxfQ0LlNgJLxVaiN76eAYaqH0KlzH/qDSSC4oomFx67l3wsBo7r8WJqhE/1dYBcipJ jWUXVaD/XdL2xWAsdUUyhUfx9BgHy6zjVF/Xy/FYBMiCpWhuuwPcwGwwBxdmFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGVJ30Lwhz17yp; Tue, 14 Feb 2023 18:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EIZEhb002256; Tue, 14 Feb 2023 18:35:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EIZELu002254; Tue, 14 Feb 2023 18:35:14 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:35:14 GMT Message-Id: <202302141835.31EIZELu002254@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: 389750e5fc9e - stable/12 - unbound: Fix config.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: 389750e5fc9ed3ce25019c67f3ff2a9e06af5924 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=389750e5fc9ed3ce25019c67f3ff2a9e06af5924 commit 389750e5fc9ed3ce25019c67f3ff2a9e06af5924 Author: Cy Schubert AuthorDate: 2023-01-15 06:55:05 +0000 Commit: Cy Schubert CommitDate: 2023-02-14 18:34:39 +0000 unbound: Fix config.h FreeBSD src does not support HAVE_DECL_EVSIGNAL_ASSIGN. While reviewing the new config.h after regenerating it, this definition was not removed. Updating config.h is a manual process of configuring the port and copying/merging the generated config.h into src. This definition was missed and not removed (#undef'd). Fixes: 1838dec31895fd4752fa8631322ab93be0705a66 (cherry picked from commit 06b93ef8cda227d755d7f6cfa95d08c0ccc9dc2d) --- usr.sbin/unbound/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/unbound/config.h b/usr.sbin/unbound/config.h index 7ea0d3151ac5..bd36bb7573f8 100644 --- a/usr.sbin/unbound/config.h +++ b/usr.sbin/unbound/config.h @@ -117,7 +117,7 @@ /* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if you don't. */ -#define HAVE_DECL_EVSIGNAL_ASSIGN 1 +/* #undef HAVE_DECL_EVSIGNAL_ASSIGN */ /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you don't. */ From nobody Tue Feb 14 18:35:16 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGVJ43D9kz3ppwq; Tue, 14 Feb 2023 18:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGVJ42Kxjz3mkq; Tue, 14 Feb 2023 18:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IFFBQkaSYt7kDehJpRUN+JWtQiI9Yxu4jqhvTyLRUXA=; b=X+TyMsB0e/qEruQmDsFRkW4Te55oVKrxn84IGYlil64ka211PHRZgyYdLGafGdRDDlcuxQ iwjBwPlE9clgI8V3jQDgEyEAcqKX7IwCMf+yWp8IuI+oAXDqG6/cCmrBYF5O9t3jnBZgUD CHAeZUH5I8pT625Svs4zRyQ6eRwY2NHSTDsWLJsJwEbft0+XNNOWaJG8LDGynqGO0O9Pki C0Yhtqz5TrVC45WJl0NNgNQxrz0/9Z0Cq2BjL1kaN6DhQUmema36GtQP9k+8I0wHm+eNPl 1ZMAR674U7x+BILfKttQznq+85WF85P+oMxJfqyTPHRkr2OZpJElm1pL3FJozw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IFFBQkaSYt7kDehJpRUN+JWtQiI9Yxu4jqhvTyLRUXA=; b=PgO4MUypiax5U8inaU9KkSaFDfEHpEVOSjxEA3kBRqw+z42HlIwWZJ3xGoXLUWABmUzlbM zDY0zpGXqVRVjrUeuNAG8xwvOi8Fl/80YDZNFk6N2jpHKWx6iYpeOA8UeRFMmfERN2zhr5 AamPG/+Jfq/X3D+ieS2CKYUUQ57aLSivHvUIPliS6X1tDWtrhb7Nvln11/EDRTM2OHgQ6m umreHp966oHZpsGRD815LX1bnqg8n6aMYFYQfOJiEqCUK+66wYzwGp8F2xsRpIkDUPeyWc +6iKCVS/3E4iu9iHvAz/PBzHM2u3a9jkiMCP8LN0djmLV/lXqq8RyCPJ6+mzcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399716; a=rsa-sha256; cv=none; b=lK/sDWUqgGq5GGoFdkeWzsRhBe+TLqQ7ZJA7ip29sbtfZ6+2cxJ3zOf/0+/MLHnifnRuzA tEohLNdgBX28HW3msdAET2ChDongfdzg/HFi7TvOMZkazeAVVk95OmjgbySI3hoGWh8cpA r/SOauWoOad1d6mtRHeml25wRgOW1okqwTZ/+eHNBhvjdFRNhbv62REdtOYJPVRFnWVV6q gttHoG56/MCG6d3g92lZ2oQ+MIrmVDSBvaZ4L9rQxvj9CeXjAQ6EK3+ze+m6UbCoJMicLM kmZTXLFDR0asLrPlOKp9CZ6Burc99Wg3UObY9rFoMNhQ6MRylqGrzX6KGZMpZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGVJ41QSBz18Pd; Tue, 14 Feb 2023 18:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EIZGD0002280; Tue, 14 Feb 2023 18:35:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EIZGkl002279; Tue, 14 Feb 2023 18:35:16 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:35:16 GMT Message-Id: <202302141835.31EIZGkl002279@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: 98dce7bf87f1 - stable/12 - unbound: Fix config file path List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: 98dce7bf87f1c2c8235c6eaed69e8861e2b006d4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=98dce7bf87f1c2c8235c6eaed69e8861e2b006d4 commit 98dce7bf87f1c2c8235c6eaed69e8861e2b006d4 Author: Juraj Lutter AuthorDate: 2023-01-17 17:25:47 +0000 Commit: Cy Schubert CommitDate: 2023-02-14 18:34:39 +0000 unbound: Fix config file path Commit 1838dec31895fd4752fa8631322ab93be0705a66 changed the config file path to /usr/local/etc/unbound/unbound.conf which is wrong for unbound in base. Reported by: Ihor Antonov Reviewed by: zlei Approved by: zlei Differential Revision: https://reviews.freebsd.org/D38106 Fixes: 1838dec31895fd4752fa8631322ab93be0705a66 (cherry picked from commit 1d577bedbae80ced38ccb834e6835e5fd98bc411) --- usr.sbin/unbound/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/unbound/config.h b/usr.sbin/unbound/config.h index bd36bb7573f8..2068cbfe7295 100644 --- a/usr.sbin/unbound/config.h +++ b/usr.sbin/unbound/config.h @@ -21,7 +21,7 @@ #define CONFCMDLINE "--with-ssl=/usr --with-libexpat=/usr --disable-dnscrypt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-libevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pthreads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --build=freebsd" /* Pathname to the Unbound configuration file */ -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" +#define CONFIGFILE "/var/unbound/unbound.conf" /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work */ From nobody Tue Feb 14 22:20:25 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGbHs6jS9z3q4vX; Tue, 14 Feb 2023 22:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGbHs692jz4J2b; Tue, 14 Feb 2023 22:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676413225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4+GOYWG1Q85paX2IC6pw1JvJ5Bnm8aDyaU34Nss/Caw=; b=O5bbvfgRrn9WT8Fvty4EYt+veutMG6EmPWFo7qDtY0K9nwmrkjFeEPlnIvoHMy8KxqfFxi rGhS/LOcGlTKGHUg3meM8CSdWA/xlfw4dNX0AvqW/li9f7JA8E9AVnkrOS5Ycig4VAhNuS 6s0rYBcuapD1E/s9vDbkj6zXicq482+3Ak2qgwqKj9eVMBWLnAWhsnxDRtu0Hyq+Ltyh52 4uxtHQpUpXgPP747uEptfRTXD7MQrvKpeprFHDjcnvfBs87c4AmDMs8p8wpL8lbTpNmbWV aTdkEDU0+XlXai78FNHCxeMvDQqNSmdrFGbVgL5wZ3irdIeEOYzHB5TSu1tPpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676413225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4+GOYWG1Q85paX2IC6pw1JvJ5Bnm8aDyaU34Nss/Caw=; b=Q1J/OCrRRGqxn0Dku5yQsvhzPbTE/XZqIf5AV3PVnqVdJ+GNX+vDQcNxDh5WKt3yhPJ1gS iEDkMpEv+TcwD6pDqzhhNWKqN8xBvc1c/rdq+4F3gNj6+WMOIFE7ILL02w9twDYJlx2bwK tvsaT9CO0UusX3ZoIA5lWwj6HbToZO0FAPUh2E0ont0POXY1Qb6njA4QxK8Dg5gxcBxFOW EUGGPpgMDGi5gWoQqdoQyFmx0yXMpoo+5MLGNlSyC0/PDWgeHsKc5qDg2p9+iSWXxEZoEu V/4AZchkBG8axUhWDFiyp5ULmmjVM+iQhEV5i20VAEMokgZozef9Onk4wNQnVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676413225; a=rsa-sha256; cv=none; b=VvfuAIUbuaqD09ongAlKBQwBVGj6CwfVhDiMAb+alcIYGqSY3yxzm6KfFhVgj4YS0EyVa3 tkXpZ0r6EeH5d575rCuzwXhywVt122rHD0JShvAr9CoaFLdJTyzCnLAjcsjc6qtHq2aagI ree4brK1txjb6G4MZxwIp7xfMvMn0LBgEFG7HzGEjW2mbsrnA432wYwagS0evNrCx+CqYo VP4W1u0YeSVUMQbrA1R9gh8P8uxqlFaGZZrn6Sx7KRqEHG7EEDyiShdFjiQeRxXLQe3Ele gOWiPzfKd7VpwxBqZaOYnEJQmOUuwISSzy0O7YjBCIqThuw3JcgNgOsN78L7eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGbHs53vnz1Fg0; Tue, 14 Feb 2023 22:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EMKPxa027200; Tue, 14 Feb 2023 22:20:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EMKPcB027199; Tue, 14 Feb 2023 22:20:25 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:20:25 GMT Message-Id: <202302142220.31EMKPcB027199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: b158a379d271 - releng/13.2 - tzcode: Resurrect tzsetwall(3) with a deprecation warning. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13.2 X-Git-Reftype: branch X-Git-Commit: b158a379d2716d55e59978b970c146ff5284f36c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b158a379d2716d55e59978b970c146ff5284f36c commit b158a379d2716d55e59978b970c146ff5284f36c Author: Dag-Erling Smørgrav AuthorDate: 2023-02-09 18:35:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-14 22:19:53 +0000 tzcode: Resurrect tzsetwall(3) with a deprecation warning. This function has been around since 4.4BSD but was dropped upstream in 2020. This went unnoticed when tzcode was updated. Bring it back, but prepare for removing it before 14.0 is released. PR: 269445 MFC after: 3 days Reported by: val@packett.cool Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38445 Approved by: re (cperciva) (cherry picked from commit 71e0c8906e1a4ff774f8ae810aeb94af039eedb7) (cherry picked from commit eab9ed3d48e0842f3114d8582a4c2868a354190b) --- contrib/tzcode/localtime.c | 21 +++++++++++++++++++-- lib/libc/gen/tzset.3 | 14 +++++++++----- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index 1b52e26a5faf..a8beaf47319a 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -1517,9 +1517,8 @@ zoneinit(struct state *sp, char const *name) } static void -tzset_unlocked(void) +tzset_unlocked_name(char const *name) { - char const *name = getenv("TZ"); struct state *sp = lclptr; int lcl = name ? strlen(name) < sizeof lcl_TZname : -1; if (lcl < 0 @@ -1541,6 +1540,12 @@ tzset_unlocked(void) lcl_is_set = lcl; } +static void +tzset_unlocked(void) +{ + tzset_unlocked_name(getenv("TZ")); +} + void tzset(void) { @@ -1550,6 +1555,18 @@ tzset(void) unlock(); } +void +freebsd13_tzsetwall(void) +{ + if (lock() != 0) + return; + tzset_unlocked_name(NULL); + unlock(); +} +__sym_compat(tzsetwall, freebsd13_tzsetwall, FBSD_1.0); +__warn_references(tzsetwall, + "warning: tzsetwall() is deprecated, use tzset() instead."); + static void gmtcheck(void) { diff --git a/lib/libc/gen/tzset.3 b/lib/libc/gen/tzset.3 index ddeb40585f33..788a6259b727 100644 --- a/lib/libc/gen/tzset.3 +++ b/lib/libc/gen/tzset.3 @@ -31,7 +31,7 @@ .\" @(#)tzset.3 8.2 (Berkeley) 11/17/93 .\" $FreeBSD$ .\" -.Dd November 17, 1993 +.Dd February 8, 2023 .Dt TZSET 3 .Os .Sh NAME @@ -102,10 +102,14 @@ is used. .Pp The .Fn tzsetwall -function -sets things up so that -.Xr localtime 3 -returns the best available approximation of local wall clock time. +function is equivalent to calling +.Fn tzset +with the +.Ev TZ +environment variable unset. +It is deprecated and may not be available in +.Fx 14.0 +and later. .Sh SPECIFICATION FORMAT When .Ev TZ From nobody Tue Feb 14 22:34:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGbbd2gtcz3q6Dw; Tue, 14 Feb 2023 22:34:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGbbd1sh3z4KfK; Tue, 14 Feb 2023 22:34:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676414045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+uVvJRVfCd+8/khXrnShHPRZzDCgL1PNYPI/odd9nK8=; b=UIwyXb/VDUDsUVoOOoRvkRdxQ8xnIH2AMD133H1FG7oyFvqkjNhnV9loFe3b+yIfaA04kB rkOjS5QMGUDmsjFgQaZac3a9vAKZKX0r4uf9nQ/SiClvGuXD/0aG5VEIRnF/MrJMBMQMU5 D4n/lKOr/4gnnGG+h3VC2vLpyD7R6LilgHHju1PnzUtn8nFo2kz0C7YHHZjs66jth+Y124 /izR4S2DxZW83I/5EnKp/Y/6RQ47dTJR3Q/o5VCDyvbrXjxH/9y/AtYVITtJL7zYwX433q g1sDhocIqSLmcpKkJpUoALXBmsMbW6N4lVg8OYHPad86jd9NDwfyHrjXnhrzEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676414045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+uVvJRVfCd+8/khXrnShHPRZzDCgL1PNYPI/odd9nK8=; b=aufzmqWO809ZwXRT3iVMm3MQESFPpsGT5FYL8uj18xT+xckjDtTnd0YKCEtFZ30sSDhVTr FPhjQ+jdjj+FBMpDq594tRjT0KShANX2FsdS+qgZPlo+awexZAEUZCb2T91/8dbEOGiMKG FBpovyS1vcgg/wHv4C4IJEyzvwIyTlvRb0vx25/UJX6O53sL/YT38zDskG9WXjubna3v8U gIBdK4sYQEYRJJ2LjyibK/XxvmLNTGXWNrTc9YmLJSBT+4xPvsGMaKuI+1AoRC0vAGpMsE hC1O7gfBb8zoPizqZ1TYhdRf50IT+raawHHT4t+1J3iIFgvFORXF7/2sN1/Oqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676414045; a=rsa-sha256; cv=none; b=LEJpnP419INEznKZkyuEzhX7lDcxwZc+IaSm+7OF3tRv/pX42U6PSFqT0aXCY4CMH4hDRL 2zW3jR4eOP9zAlkdhncm3lG0sejZ5OR8PN0fqYV+CVsHZsvbF/JrQCcRvhJE8DTOG94Uv2 lgTY6Ob8nrnYzGm3TlHNaeV8jpuAs/3Dde2cvwm+xZMy9VQS5xH4hirXLkCHhJ0JQQGnNW MRxPoY/PjbfEPp2oXgSZ4yjKRxrVqPGWRP7jdq0yeUPAjc5F8I/LrkO+bMiVaoY2AOwq5c KLu3uK6IYqsWOM5upQg4hiO5884NwRgGW2y4VQqPwODw2Kvg0W6UONX7DOoRRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGbbd0xV9z1GFS; Tue, 14 Feb 2023 22:34:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EMY5M2046575; Tue, 14 Feb 2023 22:34:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EMY5vI046574; Tue, 14 Feb 2023 22:34:05 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:34:05 GMT Message-Id: <202302142234.31EMY5vI046574@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: 26b9c45c8f65 - releng/13.2 - ssh: fix SIZEOF_TIME_T #define on i386 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 26b9c45c8f65dbd30bc41f1928db8cd66bb154bb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=26b9c45c8f65dbd30bc41f1928db8cd66bb154bb commit 26b9c45c8f65dbd30bc41f1928db8cd66bb154bb Author: Ed Maste AuthorDate: 2023-02-08 18:31:44 +0000 Commit: Ed Maste CommitDate: 2023-02-14 22:33:56 +0000 ssh: fix SIZEOF_TIME_T #define on i386 Reported by: imp Reviewed by: imp Approved by: re (cperciva) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38443 (cherry picked from commit 1aa9a35f6361cc898e2323e1f2823771eb4161da) (cherry picked from commit 59ab4b95129dd5d64a52e0822b4fb5621bf65e9c) --- crypto/openssh/config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 55ad3be64e69..e267ba122719 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -1941,7 +1941,11 @@ #define SIZEOF_SHORT_INT 2 /* The size of `time_t', as computed by sizeof. */ +#ifdef __i386__ +#define SIZEOF_TIME_T 4 +#else #define SIZEOF_TIME_T 8 +#endif /* Define as const if snprintf() can declare const char *fmt */ #define SNPRINTF_CONST const From nobody Tue Feb 14 22:34:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGbbg1QGDz3q6Ln; Tue, 14 Feb 2023 22:34:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGbbg08bsz4Kg4; Tue, 14 Feb 2023 22:34:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676414047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D1JVE0U6gyINPQP+OL6RWCw3qZYJSyHBpi12srviK9g=; b=D+ZBud2QjYRg2By+1JouN0Mobau8fDKube2kH3tiZWiMed3NT8vRGAZ/M95KLirA1X0Ndt FjyAcik3L/xIzRlPwZdY8lVmir4earvdbbIrNJmJ8xOKdpynfkSyRgUc2AfZxrzdgCvXgX tNcRsDG53yON7ROvXE3E75rO317ZnXU87S0ccZI9H8JY7+BKsDAdGsC77JwSgPn82ODQ3V wj21ewplPDm6FHRzC5myh1VE3FJCebdo4HzakFNgFIndmJ7XcJy/qs5NKvkHTwOV3Sq2kT qUqA5VMHCwBMXrojJWdzUj4bzK/qR3c2dZXxIjTIcQw/YXYXW3/YXvAy0Fl/2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676414047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D1JVE0U6gyINPQP+OL6RWCw3qZYJSyHBpi12srviK9g=; b=dKMFnTGLPNsd61nJqbzgZLTwDQOnEvkzjZ+J8ksQkGQdn2ngk7UglCgKfb8jzvGW0zwpj7 +EobYJDWV9oh6Du3dkfkjvMkeUGEAgQfR1kwqng/UVtHFQJeLtMJnWVF0pRaS8k9svjxHL CN2MN9nax8zqK5u1Skz3xdh96/0DpFsIs/+4XdH/GxsQb5O1bDLVXW+Aoc8JmbA4mV7Drz 0XOI+aJLfsUY+TBnpU2NT73nr0GsN4m4QLR7vdqTrWbBiruy0aye6F7actOdlxSRpgKuVw HiXtD7kFyijSdeYabuXlGaO0Eyuyy61Rh7qLM/CJISUghclgI1CWzPmQbdX/rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676414047; a=rsa-sha256; cv=none; b=WnPDYjtoXyaF19NUoh+klgE3hWzLVb1l7VTyOKnvqlf7eKirsWck8ZIJttLM400xV4mPNA kHiEuc+TtNpwXxHU+zNC69I3rX0HlagQuiVecZbiqQ88Wmb5KAZRXc2iqBJnHQ6lPTGQye 3+8pun2WxMZq6iKfDBetJDPns7VC2XPCGrF6q2DAchlcqBA1YXPz0vr4c4zbWfv5MLlVRS Jqk8uSviQOFYUm/0XQf+KbIQndWaDm/pSTD1setV285oN12lDTxjnYeMQIAJETRaUo4T/f ZLAKbAcqMe1GkBmkXdDGFYr6gvaij62TIpJ+YjD6+9ICYk+s5F6xPqMo+/PGkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGbbf6DdWz1GL9; Tue, 14 Feb 2023 22:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EMY6ut046611; Tue, 14 Feb 2023 22:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EMY6Ru046604; Tue, 14 Feb 2023 22:34:06 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:34:06 GMT Message-Id: <202302142234.31EMY6Ru046604@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: fad31dffb405 - releng/13.2 - ssh: update to OpenSSH 9.2p1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/releng/13.2 X-Git-Reftype: branch X-Git-Commit: fad31dffb4057cc606fe59a7ba2e09ca9a8a147c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fad31dffb4057cc606fe59a7ba2e09ca9a8a147c commit fad31dffb4057cc606fe59a7ba2e09ca9a8a147c Author: Ed Maste AuthorDate: 2023-02-06 21:54:56 +0000 Commit: Ed Maste CommitDate: 2023-02-14 22:33:56 +0000 ssh: update to OpenSSH 9.2p1 Release notes are available at https://www.openssh.com/txt/release-9.2 OpenSSH 9.2 contains fixes for two security problems and a memory safety problem. The memory safety problem is not believed to be exploitable. These fixes have already been committed to OpenSSH 9.1 in FreeBSD. Some other notable items from the release notes: * ssh(1): add a new EnableEscapeCommandline ssh_config(5) option that controls whether the client-side ~C escape sequence that provides a command-line is available. Among other things, the ~C command-line could be used to add additional port-forwards at runtime. * sshd(8): add support for channel inactivity timeouts via a new sshd_config(5) ChannelTimeout directive. This allows channels that have not seen traffic in a configurable interval to be automatically closed. Different timeouts may be applied to session, X11, agent and TCP forwarding channels. * sshd(8): add a sshd_config UnusedConnectionTimeout option to terminate client connections that have no open channels for a length of time. This complements the ChannelTimeout option above. * sshd(8): add a -V (version) option to sshd like the ssh client has. * scp(1), sftp(1): add a -X option to both scp(1) and sftp(1) to allow control over some SFTP protocol parameters: the copy buffer length and the number of in-flight requests, both of which are used during upload/download. Previously these could be controlled in sftp(1) only. This makes them available in both SFTP protocol clients using the same option character sequence. * ssh-keyscan(1): allow scanning of complete CIDR address ranges, e.g. "ssh-keyscan 192.168.0.0/24". If a CIDR range is passed, then it will be expanded to all possible addresses in the range including the all-0s and all-1s addresses. bz#976 * ssh(1): support dynamic remote port forwarding in escape command-line's -R processing. bz#3499 Approved by: re (cperciva) Sponsored by: The FreeBSD Foundation (cherry picked from commit f374ba41f55c1a127303d92d830dd58eef2f5243) (cherry picked from commit 2f43f145825d0d8468f583b1686262b0f40c1fe5) --- crypto/openssh/.depend | 8 +- crypto/openssh/.github/ci-status.md | 12 +- crypto/openssh/.github/configs | 43 +- crypto/openssh/.github/setup_ci.sh | 19 +- crypto/openssh/.github/workflows/c-cpp.yml | 155 +- crypto/openssh/.github/workflows/cifuzz.yml | 32 + crypto/openssh/.github/workflows/selfhosted.yml | 94 +- crypto/openssh/.github/workflows/upstream.yml | 29 +- crypto/openssh/.skipped-commit-ids | 2 + crypto/openssh/ChangeLog | 15052 +++++++++---------- crypto/openssh/INSTALL | 2 +- crypto/openssh/Makefile.in | 9 +- crypto/openssh/PROTOCOL | 4 +- crypto/openssh/README | 2 +- crypto/openssh/README.md | 3 +- crypto/openssh/aclocal.m4 | 4 +- crypto/openssh/addr.c | 73 +- crypto/openssh/addr.h | 4 + crypto/openssh/auth-pam.c | 16 +- crypto/openssh/auth-rhosts.c | 4 +- crypto/openssh/auth.c | 11 +- crypto/openssh/channels.c | 246 +- crypto/openssh/channels.h | 24 +- crypto/openssh/clientloop.c | 171 +- crypto/openssh/config.guess | 1206 +- crypto/openssh/config.h | 3 + crypto/openssh/config.sub | 674 +- crypto/openssh/configure.ac | 84 +- crypto/openssh/contrib/redhat/openssh.spec | 2 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/crypto_api.h | 4 +- crypto/openssh/ed25519.c | 2048 ++- crypto/openssh/ed25519.sh | 119 + crypto/openssh/entropy.c | 34 - crypto/openssh/fe25519.c | 337 - crypto/openssh/fe25519.h | 70 - crypto/openssh/ge25519.c | 321 - crypto/openssh/ge25519.h | 43 - crypto/openssh/ge25519_base.data | 858 -- crypto/openssh/install-sh | 422 +- crypto/openssh/kex.c | 6 +- crypto/openssh/misc.c | 97 +- crypto/openssh/misc.h | 11 +- crypto/openssh/moduli | 843 +- crypto/openssh/monitor_wrap.c | 3 +- crypto/openssh/mux.c | 6 +- crypto/openssh/openbsd-compat/arc4random.c | 12 +- crypto/openssh/openbsd-compat/arc4random.h | 10 + crypto/openssh/openbsd-compat/bsd-getentropy.c | 7 +- crypto/openssh/openbsd-compat/bsd-poll.c | 38 +- crypto/openssh/openbsd-compat/bsd-poll.h | 25 +- crypto/openssh/openbsd-compat/bsd-timegm.c | 52 +- crypto/openssh/openbsd-compat/getrrsetbyname.c | 12 +- crypto/openssh/openbsd-compat/openbsd-compat.h | 5 +- crypto/openssh/openbsd-compat/regress/Makefile.in | 7 +- .../openbsd-compat/regress/opensslvertest.c | 2 + crypto/openssh/readconf.c | 14 +- crypto/openssh/readconf.h | 4 +- crypto/openssh/regress/Makefile | 7 +- crypto/openssh/regress/agent-getpeereid.sh | 11 +- crypto/openssh/regress/agent-ptrace.sh | 1 + crypto/openssh/regress/channel-timeout.sh | 91 + crypto/openssh/regress/connection-timeout.sh | 87 + crypto/openssh/regress/dynamic-forward.sh | 127 +- crypto/openssh/regress/hostbased.sh | 4 +- crypto/openssh/regress/krl.sh | 6 +- crypto/openssh/regress/multiplex.sh | 3 +- crypto/openssh/regress/percent.sh | 20 +- crypto/openssh/regress/reexec.sh | 4 +- crypto/openssh/regress/scp-uri.sh | 4 +- crypto/openssh/regress/scp.sh | 51 +- crypto/openssh/regress/scp3.sh | 10 +- crypto/openssh/regress/test-exec.sh | 14 +- crypto/openssh/regress/unittests/hostkeys/Makefile | 4 +- crypto/openssh/regress/unittests/kex/Makefile | 6 +- .../openssh/regress/unittests/kex/test_proposal.c | 83 + crypto/openssh/regress/unittests/kex/tests.c | 4 +- .../openssh/regress/unittests/misc/test_ptimeout.c | 85 + crypto/openssh/regress/unittests/misc/tests.c | 4 +- crypto/openssh/regress/unittests/sshkey/Makefile | 4 +- .../openssh/regress/unittests/sshkey/test_sshkey.c | 4 +- crypto/openssh/regress/unittests/sshsig/Makefile | 4 +- crypto/openssh/regress/yes-head.sh | 4 +- crypto/openssh/sandbox-seccomp-filter.c | 5 +- crypto/openssh/sc25519.c | 308 - crypto/openssh/sc25519.h | 80 - crypto/openssh/scp.1 | 29 +- crypto/openssh/scp.c | 163 +- crypto/openssh/servconf.c | 138 +- crypto/openssh/servconf.h | 10 +- crypto/openssh/serverloop.c | 98 +- crypto/openssh/session.c | 27 +- crypto/openssh/session.h | 4 +- crypto/openssh/sftp-client.c | 25 +- crypto/openssh/sftp-glob.c | 34 +- crypto/openssh/sftp-server.c | 4 +- crypto/openssh/sftp.1 | 18 +- crypto/openssh/sftp.c | 36 +- crypto/openssh/sntrup761.c | 44 +- crypto/openssh/sntrup761.sh | 5 +- crypto/openssh/ssh-agent.1 | 27 +- crypto/openssh/ssh-agent.c | 9 +- crypto/openssh/ssh-dss.c | 284 +- crypto/openssh/ssh-ecdsa-sk.c | 170 +- crypto/openssh/ssh-ecdsa.c | 318 +- crypto/openssh/ssh-ed25519-sk.c | 139 +- crypto/openssh/ssh-ed25519.c | 181 +- crypto/openssh/ssh-keygen.c | 3 +- crypto/openssh/ssh-keyscan.1 | 24 +- crypto/openssh/ssh-keyscan.c | 46 +- crypto/openssh/ssh-rsa.c | 352 +- crypto/openssh/ssh-sk-helper.c | 3 +- crypto/openssh/ssh-xmss.c | 228 +- crypto/openssh/ssh.1 | 5 +- crypto/openssh/ssh.c | 42 +- crypto/openssh/ssh_config.5 | 19 +- crypto/openssh/ssh_namespace.h | 111 +- crypto/openssh/sshbuf.c | 27 +- crypto/openssh/sshbuf.h | 26 +- crypto/openssh/sshconnect.c | 9 +- crypto/openssh/sshd.8 | 8 +- crypto/openssh/sshd.c | 30 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 104 +- crypto/openssh/sshkey-xmss.c | 4 +- crypto/openssh/sshkey-xmss.h | 4 +- crypto/openssh/sshkey.c | 1993 +-- crypto/openssh/sshkey.h | 82 +- crypto/openssh/verify.c | 49 - crypto/openssh/version.h | 6 +- secure/lib/libssh/Makefile | 2 +- 131 files changed, 15622 insertions(+), 13755 deletions(-) diff --git a/crypto/openssh/.depend b/crypto/openssh/.depend index fca83a67c970..5226523aa2ad 100644 --- a/crypto/openssh/.depend +++ b/crypto/openssh/.depend @@ -50,11 +50,9 @@ digest-libc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-c digest-openssl.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h dispatch.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh2.h log.h ssherr.h dispatch.h packet.h openbsd-compat/sys-queue.h compat.h dns.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshkey.h ssherr.h dns.h log.h digest.h -ed25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ge25519.h fe25519.h sc25519.h +ed25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h entropy.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h fatal.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h ssherr.h -fe25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h fe25519.h crypto_api.h -ge25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h fe25519.h crypto_api.h sc25519.h ge25519.h ge25519_base.data groupaccess.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h groupaccess.h match.h log.h ssherr.h gss-genr.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h gss-serv-krb5.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h @@ -108,7 +106,6 @@ sandbox-rlimit.o: includes.h config.h defines.h platform.h openbsd-compat/openbs sandbox-seccomp-filter.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sandbox-solaris.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sandbox-systrace.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -sc25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sc25519.h crypto_api.h scp.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/glob.h xmalloc.h ssh.h atomicio.h pathnames.h log.h ssherr.h misc.h progressmeter.h utf8.h sftp.h sftp-common.h sftp-client.h servconf.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/glob.h openbsd-compat/sys-queue.h xmalloc.h ssh.h log.h ssherr.h sshbuf.h misc.h servconf.h compat.h pathnames.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey .h servconf.o: kex.h mac.h crypto_api.h match.h channels.h groupaccess.h canohost.h packet.h dispatch.h hostfile.h auth.h auth-pam.h audit.h loginrec.h myproposal.h digest.h @@ -137,7 +134,7 @@ ssh-ed25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-c ssh-keygen.o: cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h ssh-keygen.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshkey.h authfile.h sshbuf.h pathnames.h log.h ssherr.h misc.h match.h hostfile.h dns.h ssh.h ssh2.h ssh-pkcs11.h atomicio.h krl.h digest.h utf8.h authfd.h sshsig.h ssh-sk.h sk-api.h cipher.h ssh-keyscan.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h crypto_api.h compat.h myproposal.h packet.h dispatch.h log .h -ssh-keyscan.o: ssherr.h atomicio.h misc.h hostfile.h ssh_api.h ssh2.h dns.h +ssh-keyscan.o: ssherr.h atomicio.h misc.h hostfile.h ssh_api.h ssh2.h dns.h addr.h ssh-keysign.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h log.h ssherr.h sshkey.h ssh.h ssh2.h misc.h sshbuf.h authfile.h msg.h canohost.h pathnames.h readconf.h uidswap.h ssh-pkcs11-client.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh-pkcs11-helper.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h sshbuf.h log.h ssherr.h misc.h sshkey.h authfd.h ssh-pkcs11.h @@ -174,7 +171,6 @@ uidswap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compa umac.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h umac.h misc.h rijndael.h umac128.o: umac.c includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h umac.h misc.h rijndael.h utf8.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h utf8.h -verify.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h xmalloc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h log.h ssherr.h xmss_commons.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmss_fast.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h diff --git a/crypto/openssh/.github/ci-status.md b/crypto/openssh/.github/ci-status.md index 0ad8bf5aaf44..d13bbfa8c038 100644 --- a/crypto/openssh/.github/ci-status.md +++ b/crypto/openssh/.github/ci-status.md @@ -1,4 +1,10 @@ -[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml) -[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml) -[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml) +master : +[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:master) +[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:master) +[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml?query=branch:master) +[![CIFuzz](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh) + +9.1 : +[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_1)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_1) +[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_1)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_1) diff --git a/crypto/openssh/.github/configs b/crypto/openssh/.github/configs index 6bf1ab27f0ca..bdd5ddbdfaf0 100755 --- a/crypto/openssh/.github/configs +++ b/crypto/openssh/.github/configs @@ -9,10 +9,13 @@ # LTESTS config=$1 +if [ "$config" = "" ]; then + config="default" +fi unset CC CFLAGS CPPFLAGS LDFLAGS LTESTS SUDO -TEST_TARGET="tests" +TEST_TARGET="tests compat-tests" LTESTS="" SKIP_LTESTS="" SUDO=sudo # run with sudo by default @@ -108,7 +111,7 @@ case "$config" in kitchensink) CONFIGFLAGS="--with-kerberos5 --with-libedit --with-pam" CONFIGFLAGS="${CONFIGFLAGS} --with-security-key-builtin --with-selinux" - CONFIGFLAGS="${CONFIGFLAGS} --with-cflags=-DSK_DEBUG" + CFLAGS="-DSK_DEBUG -DSANDBOX_SECCOMP_FILTER_DEBUG" ;; hardenedmalloc) CONFIGFLAGS="--with-ldflags=-lhardened_malloc" @@ -141,6 +144,11 @@ case "$config" in ;; openssl-*) LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl --with-rpath=-Wl,-rpath," + # OpenSSL 1.1.1 specifically has a bug in its RNG that breaks reexec + # fallback. See https://bugzilla.mindrot.org/show_bug.cgi?id=3483 + if [ "$config" = "openssl-1.1.1" ]; then + SKIP_LTESTS="reexec" + fi ;; selinux) CONFIGFLAGS="--with-selinux" @@ -152,7 +160,7 @@ case "$config" in LIBCRYPTOFLAGS="--without-openssl" TEST_TARGET=t-exec ;; - valgrind-[1-4]|valgrind-unit) + valgrind-[1-5]|valgrind-unit) # rlimit sandbox and FORTIFY_SOURCE confuse Valgrind. CONFIGFLAGS="--without-sandbox --without-hardening" CONFIGFLAGS="$CONFIGFLAGS --with-cppflags=-D_FORTIFY_SOURCE=0" @@ -161,16 +169,19 @@ case "$config" in export TEST_SSH_ELAPSED_TIMES # Valgrind slows things down enough that the agent timeout test # won't reliably pass, and the unit tests run longer than allowed - # by github so split into three separate tests. - tests2="rekey integrity try-ciphers" + # by github so split into separate tests. + tests2="integrity try-ciphers" tests3="krl forward-control sshsig agent-restrict kextype sftp" tests4="cert-userkey cert-hostkey kextype sftp-perm keygen-comment percent" + tests5="rekey" case "$config" in valgrind-1) - # All tests except agent-timeout (which is flaky under valgrind) + # All tests except agent-timeout (which is flaky under valgrind), + # connection-timeout (which doesn't work since it's so slow) # and hostbased (since valgrind won't let ssh exec keysign). # Slow ones are run separately to increase parallelism. - SKIP_LTESTS="agent-timeout hostbased ${tests2} ${tests3} ${tests4}" + SKIP_LTESTS="agent-timeout connection-timeout hostbased" + SKIP_LTESTS="$SKIP_LTESTS ${tests2} ${tests3} ${tests4} ${tests5}" ;; valgrind-2) LTESTS="${tests2}" @@ -181,6 +192,9 @@ case "$config" in valgrind-4) LTESTS="${tests4}" ;; + valgrind-5) + LTESTS="${tests5}" + ;; valgrind-unit) TEST_TARGET="unit USE_VALGRIND=1" ;; @@ -210,6 +224,10 @@ case "${TARGET_HOST}" in TEST_TARGET="t-exec TEST_SHELL=bash" SKIP_LTESTS="rekey sftp" ;; + debian-riscv64) + # This machine is fairly slow, so skip the unit tests. + TEST_TARGET="t-exec" + ;; dfly58*|dfly60*) # scp 3-way connection hangs on these so skip until sorted. SKIP_LTESTS=scp3 @@ -227,12 +245,15 @@ case "${TARGET_HOST}" in # test that relies on one. # Also, Minix seems to be very limited in the number of select() # calls that can be operating concurrently, so prune additional tests for that. - T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse connect - connect-uri exit-status forward-control forwarding hostkey-agent - key-options keyscan knownhosts-command login-timeout multiplex + T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse + connect connect-uri exit-status forwarding hostkey-agent + key-options keyscan knownhosts-command login-timeout reconfigure reexec rekey scp scp-uri scp3 sftp sftp-badcmds sftp-batch sftp-cmds sftp-glob sftp-perm sftp-uri stderr-data transfer" + # Unix domain sockets don't work quite like we expect, so also skip any tests + # that use multiplexing. + T="$T connection-timeout dynamic-forward forward-control multiplex" SKIP_LTESTS="$(echo $T)" TEST_TARGET=t-exec SUDO="" @@ -260,6 +281,8 @@ esac case "`./config.guess`" in *cygwin) SUDO="" + # Don't run compat tests on cygwin as they don't currently compile. + TEST_TARGET="tests" ;; *-darwin*) # Unless specified otherwise, build without OpenSSL on Mac OS since diff --git a/crypto/openssh/.github/setup_ci.sh b/crypto/openssh/.github/setup_ci.sh index 044c4d1292b1..e4480e614f31 100755 --- a/crypto/openssh/.github/setup_ci.sh +++ b/crypto/openssh/.github/setup_ci.sh @@ -139,16 +139,29 @@ if [ "yes" = "$INSTALL_FIDO_PPA" ]; then sudo apt-add-repository -y ppa:yubico/stable fi -if [ "x" != "x$PACKAGES" ]; then +tries=3 +while [ ! -z "$PACKAGES" ] && [ "$tries" -gt "0" ]; do case "$PACKAGER" in apt) sudo apt update -qq - sudo apt install -qy $PACKAGES + if sudo apt install -qy $PACKAGES; then + PACKAGES="" + fi ;; setup) - /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,` + if /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`; then + PACKAGES="" + fi ;; esac + if [ ! -z "$PACKAGES" ]; then + sleep 90 + fi + tries=$(($tries - 1)) +done +if [ ! -z "$PACKAGES" ]; then + echo "Package installation failed." + exit 1 fi if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then diff --git a/crypto/openssh/.github/workflows/c-cpp.yml b/crypto/openssh/.github/workflows/c-cpp.yml index 3cd1188fc572..e6ea49550f71 100644 --- a/crypto/openssh/.github/workflows/c-cpp.yml +++ b/crypto/openssh/.github/workflows/c-cpp.yml @@ -2,11 +2,9 @@ name: C/C++ CI on: push: - branches: [ master, ci, V_9_0 ] - paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', 'Makefile.in', 'configure.ac' ] + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] pull_request: - branches: [ master ] - paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', 'Makefile.in', 'configure.ac' ] + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] jobs: ci: @@ -15,104 +13,109 @@ jobs: fail-fast: false matrix: # First we test all OSes in the default configuration. - os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022] - configs: [default] + target: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022] + config: [default] # Then we include any extra configs we want to test for specific VMs. # Valgrind slows things down quite a bit, so start them first. include: - - { os: windows-2019, configs: cygwin-release } - - { os: windows-2022, configs: cygwin-release } - - { os: ubuntu-20.04, configs: valgrind-1 } - - { os: ubuntu-20.04, configs: valgrind-2 } - - { os: ubuntu-20.04, configs: valgrind-3 } - - { os: ubuntu-20.04, configs: valgrind-4 } - - { os: ubuntu-20.04, configs: valgrind-unit } - - { os: ubuntu-20.04, configs: c89 } - - { os: ubuntu-20.04, configs: clang-6.0 } - - { os: ubuntu-20.04, configs: clang-8 } - - { os: ubuntu-20.04, configs: clang-9 } - - { os: ubuntu-20.04, configs: clang-10 } - - { os: ubuntu-20.04, configs: clang-11 } - - { os: ubuntu-20.04, configs: clang-12-Werror } - - { os: ubuntu-20.04, configs: clang-sanitize-address } - - { os: ubuntu-20.04, configs: clang-sanitize-undefined } - - { os: ubuntu-20.04, configs: gcc-sanitize-address } - - { os: ubuntu-20.04, configs: gcc-sanitize-undefined } - - { os: ubuntu-20.04, configs: gcc-7 } - - { os: ubuntu-20.04, configs: gcc-8 } - - { os: ubuntu-20.04, configs: gcc-10 } - - { os: ubuntu-20.04, configs: gcc-11-Werror } - - { os: ubuntu-20.04, configs: pam } - - { os: ubuntu-20.04, configs: kitchensink } - - { os: ubuntu-20.04, configs: hardenedmalloc } - - { os: ubuntu-20.04, configs: tcmalloc } - - { os: ubuntu-20.04, configs: musl } - - { os: ubuntu-latest, configs: libressl-master } - - { os: ubuntu-latest, configs: libressl-2.2.9 } - - { os: ubuntu-latest, configs: libressl-2.8.3 } - - { os: ubuntu-latest, configs: libressl-3.0.2 } - - { os: ubuntu-latest, configs: libressl-3.2.6 } - - { os: ubuntu-latest, configs: libressl-3.3.6 } - - { os: ubuntu-latest, configs: libressl-3.4.3 } - - { os: ubuntu-latest, configs: libressl-3.5.3 } - - { os: ubuntu-latest, configs: openssl-master } - - { os: ubuntu-latest, configs: openssl-noec } - - { os: ubuntu-latest, configs: openssl-1.0.1 } - - { os: ubuntu-latest, configs: openssl-1.0.1u } - - { os: ubuntu-latest, configs: openssl-1.0.2u } - - { os: ubuntu-latest, configs: openssl-1.1.0h } - - { os: ubuntu-latest, configs: openssl-1.1.1 } - - { os: ubuntu-latest, configs: openssl-1.1.1k } - - { os: ubuntu-latest, configs: openssl-1.1.1n } - - { os: ubuntu-latest, configs: openssl-1.1.1p } - - { os: ubuntu-latest, configs: openssl-3.0.0 } - - { os: ubuntu-latest, configs: openssl-3.0.5 } - - { os: ubuntu-latest, configs: openssl-1.1.1_stable } # stable branch - - { os: ubuntu-latest, configs: openssl-3.0 } # stable branch - - { os: ubuntu-22.04, configs: pam } - - { os: ubuntu-22.04, configs: krb5 } - - { os: ubuntu-22.04, configs: heimdal } - - { os: ubuntu-22.04, configs: libedit } - - { os: ubuntu-22.04, configs: sk } - - { os: ubuntu-22.04, configs: selinux } - - { os: ubuntu-22.04, configs: kitchensink } - - { os: ubuntu-22.04, configs: without-openssl } - - { os: macos-11, configs: pam } - - { os: macos-12, configs: pam } - runs-on: ${{ matrix.os }} + - { target: windows-2019, config: cygwin-release } + - { target: windows-2022, config: cygwin-release } + - { target: ubuntu-20.04, config: valgrind-1 } + - { target: ubuntu-20.04, config: valgrind-2 } + - { target: ubuntu-20.04, config: valgrind-3 } + - { target: ubuntu-20.04, config: valgrind-4 } + - { target: ubuntu-20.04, config: valgrind-5 } + - { target: ubuntu-20.04, config: valgrind-unit } + - { target: ubuntu-20.04, config: c89 } + - { target: ubuntu-20.04, config: clang-6.0 } + - { target: ubuntu-20.04, config: clang-8 } + - { target: ubuntu-20.04, config: clang-9 } + - { target: ubuntu-20.04, config: clang-10 } + - { target: ubuntu-20.04, config: clang-11 } + - { target: ubuntu-20.04, config: clang-12-Werror } + - { target: ubuntu-20.04, config: clang-sanitize-address } + - { target: ubuntu-20.04, config: clang-sanitize-undefined } + - { target: ubuntu-20.04, config: gcc-sanitize-address } + - { target: ubuntu-20.04, config: gcc-sanitize-undefined } + - { target: ubuntu-20.04, config: gcc-7 } + - { target: ubuntu-20.04, config: gcc-8 } + - { target: ubuntu-20.04, config: gcc-10 } + - { target: ubuntu-20.04, config: gcc-11-Werror } + - { target: ubuntu-20.04, config: pam } + - { target: ubuntu-20.04, config: kitchensink } + - { target: ubuntu-20.04, config: hardenedmalloc } + - { target: ubuntu-20.04, config: tcmalloc } + - { target: ubuntu-20.04, config: musl } + - { target: ubuntu-latest, config: libressl-master } + - { target: ubuntu-latest, config: libressl-2.2.9 } + - { target: ubuntu-latest, config: libressl-2.8.3 } + - { target: ubuntu-latest, config: libressl-3.0.2 } + - { target: ubuntu-latest, config: libressl-3.2.6 } + - { target: ubuntu-latest, config: libressl-3.3.6 } + - { target: ubuntu-latest, config: libressl-3.4.3 } + - { target: ubuntu-latest, config: libressl-3.5.3 } + - { target: ubuntu-latest, config: libressl-3.6.1 } + - { target: ubuntu-latest, config: libressl-3.7.0 } + - { target: ubuntu-latest, config: openssl-master } + - { target: ubuntu-latest, config: openssl-noec } + - { target: ubuntu-latest, config: openssl-1.0.1 } + - { target: ubuntu-latest, config: openssl-1.0.1u } + - { target: ubuntu-latest, config: openssl-1.0.2u } + - { target: ubuntu-latest, config: openssl-1.1.0h } + - { target: ubuntu-latest, config: openssl-1.1.1 } + - { target: ubuntu-latest, config: openssl-1.1.1k } + - { target: ubuntu-latest, config: openssl-1.1.1n } + - { target: ubuntu-latest, config: openssl-1.1.1q } + - { target: ubuntu-latest, config: openssl-1.1.1s } + - { target: ubuntu-latest, config: openssl-3.0.0 } + - { target: ubuntu-latest, config: openssl-3.0.5 } + - { target: ubuntu-latest, config: openssl-3.0.7 } + - { target: ubuntu-latest, config: openssl-1.1.1_stable } + - { target: ubuntu-latest, config: openssl-3.0 } # stable branch + - { target: ubuntu-22.04, config: pam } + - { target: ubuntu-22.04, config: krb5 } + - { target: ubuntu-22.04, config: heimdal } + - { target: ubuntu-22.04, config: libedit } + - { target: ubuntu-22.04, config: sk } + - { target: ubuntu-22.04, config: selinux } + - { target: ubuntu-22.04, config: kitchensink } + - { target: ubuntu-22.04, config: without-openssl } + - { target: macos-11, config: pam } + - { target: macos-12, config: pam } + runs-on: ${{ matrix.target }} steps: - name: set cygwin git params - if: ${{ startsWith(matrix.os, 'windows') }} + if: ${{ startsWith(matrix.target, 'windows') }} run: git config --global core.autocrlf input - name: install cygwin - if: ${{ startsWith(matrix.os, 'windows') }} + if: ${{ startsWith(matrix.target, 'windows') }} uses: cygwin/cygwin-install-action@master - - uses: actions/checkout@v2 + - uses: actions/checkout@main - name: setup CI system - run: sh ./.github/setup_ci.sh ${{ matrix.configs }} + run: sh ./.github/setup_ci.sh ${{ matrix.config }} - name: autoreconf run: sh -c autoreconf - name: configure - run: sh ./.github/configure.sh ${{ matrix.configs }} + run: sh ./.github/configure.sh ${{ matrix.config }} - name: save config - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-config + name: ${{ matrix.target }}-${{ matrix.config }}-config path: config.h - name: make clean run: make clean - name: make run: make -j2 - name: make tests - run: sh ./.github/run_test.sh ${{ matrix.configs }} + run: sh ./.github/run_test.sh ${{ matrix.config }} env: TEST_SSH_UNSAFE_PERMISSIONS: 1 TEST_SSH_HOSTBASED_AUTH: yes - name: save logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-logs + name: ${{ matrix.target }}-${{ matrix.config }}-logs path: | config.h config.log diff --git a/crypto/openssh/.github/workflows/cifuzz.yml b/crypto/openssh/.github/workflows/cifuzz.yml new file mode 100644 index 000000000000..7ca8c4719b61 --- /dev/null +++ b/crypto/openssh/.github/workflows/cifuzz.yml @@ -0,0 +1,32 @@ +name: CIFuzz +on: + push: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] + pull_request: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] + +jobs: + Fuzzing: + if: github.repository != 'openssh/openssh-portable-selfhosted' + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'openssh' + dry-run: false + language: c++ + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'openssh' + fuzz-seconds: 600 + dry-run: false + language: c++ + - name: Upload Crash + uses: actions/upload-artifact@main + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts diff --git a/crypto/openssh/.github/workflows/selfhosted.yml b/crypto/openssh/.github/workflows/selfhosted.yml index c4bd1d9b24f7..50bc9fffb723 100644 --- a/crypto/openssh/.github/workflows/selfhosted.yml +++ b/crypto/openssh/.github/workflows/selfhosted.yml @@ -2,37 +2,35 @@ name: C/C++ CI self-hosted on: push: - branches: [ master, ci, V_9_0 ] - paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', 'Makefile.in', 'configure.ac' ] + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] jobs: selfhosted: if: github.repository == 'openssh/openssh-portable-selfhosted' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.host }} + timeout-minutes: 600 env: - TARGET_HOST: ${{ matrix.os }} + HOST: ${{ matrix.host }} + TARGET_HOST: ${{ matrix.target }} + TARGET_CONFIG: ${{ matrix.config }} strategy: fail-fast: false # We use a matrix in two parts: firstly all of the VMs are tested with the - # default config. "os" corresponds to a label associated with the worker. + # default config. "target" corresponds to a label associated with the + # worker. The default is an ephemeral VM running under libvirt. matrix: - os: - - aix51 - - ARM - - ARM64 + target: - alpine - debian-i386 - - debian-riscv64 - dfly30 - dfly48 - dfly58 - dfly60 + - dfly62 - fbsd10 - fbsd12 - fbsd13 - # - hurd - minix3 - # - nbsd2 - nbsd3 - nbsd4 - nbsd8 @@ -42,62 +40,71 @@ jobs: - obsd69 - obsd70 - obsdsnap + - obsdsnap-i386 - openindiana - - openwrt-mips - - openwrt-mipsel - # - rocky84 - sol10 - sol11 - - win10 - configs: + config: - default - # Then we include any extra configs we want to test for specific VMs. + host: + - libvirt include: - - { os: ARM64, configs: pam } - - { os: debian-i386, configs: pam } - - { os: dfly30, configs: without-openssl} - - { os: dfly48, configs: pam } - - { os: dfly58, configs: pam } - - { os: dfly60, configs: pam } - - { os: fbsd10, configs: pam } - - { os: fbsd12, configs: pam } - - { os: fbsd13, configs: pam } - - { os: nbsd8, configs: pam } - - { os: nbsd9, configs: pam } - - { os: openindiana, configs: pam } - # - { os: rocky84, configs: pam } - - { os: sol10, configs: pam } - - { os: sol11, configs: pam-krb5 } - - { os: sol11, configs: sol64 } - # - { os: sol11, configs: sol64-pam } - - { os: win10, configs: cygwin-release } + # Then we include extra libvirt test configs. + - { target: aix51, config: default, host: libvirt } + - { target: debian-i386, config: pam, host: libvirt } + - { target: dfly30, config: without-openssl, host: libvirt} + - { target: dfly48, config: pam ,host: libvirt } + - { target: dfly58, config: pam, host: libvirt } + - { target: dfly60, config: pam, host: libvirt } + - { target: dfly62, config: pam, host: libvirt } + - { target: fbsd10, config: pam, host: libvirt } + - { target: fbsd12, config: pam, host: libvirt } + - { target: fbsd13, config: pam, host: libvirt } + - { target: nbsd8, config: pam, host: libvirt } + - { target: nbsd9, config: pam, host: libvirt } + - { target: openindiana, config: pam, host: libvirt } + - { target: sol10, config: pam, host: libvirt } + - { target: sol11, config: pam-krb5, host: libvirt } + - { target: sol11, config: sol64, host: libvirt } + # VMs with persistent disks that have their own runner. + - { target: win10, config: default, host: win10 } + - { target: win10, config: cygwin-release, host: win10 } + # Physical hosts, with either native runners or remote via ssh. + - { target: ARM, config: default, host: ARM } + - { target: ARM64, config: default, host: ARM64 } + - { target: ARM64, config: pam, host: ARM64 } + - { target: debian-riscv64, config: default, host: debian-riscv64 } + - { target: openwrt-mips, config: default, host: openwrt-mips } + - { target: openwrt-mipsel, config: default, host: openwrt-mipsel } steps: - name: shutdown VM if running run: vmshutdown - - uses: actions/checkout@v2 + working-directory: ${{ runner.temp }} + - uses: actions/checkout@main - name: autoreconf run: autoreconf - name: startup VM run: vmstartup + working-directory: ${{ runner.temp }} - name: configure - run: vmrun ./.github/configure.sh ${{ matrix.configs }} + run: vmrun ./.github/configure.sh ${{ matrix.config }} - name: save config - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-config + name: ${{ matrix.target }}-${{ matrix.config }}-config path: config.h - name: make clean run: vmrun make clean - name: make run: vmrun make - name: make tests - run: vmrun ./.github/run_test.sh ${{ matrix.configs }} + run: vmrun ./.github/run_test.sh ${{ matrix.config }} timeout-minutes: 600 - name: save logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-logs + name: ${{ matrix.target }}-${{ matrix.config }}-logs path: | config.h config.log @@ -106,3 +113,4 @@ jobs: - name: shutdown VM if: always() run: vmshutdown + working-directory: ${{ runner.temp }} diff --git a/crypto/openssh/.github/workflows/upstream.yml b/crypto/openssh/.github/workflows/upstream.yml index 3cec069ede74..1e2c2acb7ac0 100644 --- a/crypto/openssh/.github/workflows/upstream.yml +++ b/crypto/openssh/.github/workflows/upstream.yml @@ -2,46 +2,51 @@ name: Upstream self-hosted on: push: - branches: [ master, ci ] + branches: [ master ] paths: [ '**.c', '**.h', '.github/**' ] jobs: selfhosted: if: github.repository == 'openssh/openssh-portable-selfhosted' - runs-on: ${{ matrix.os }} + runs-on: 'libvirt' env: - TARGET_HOST: ${{ matrix.os }} + HOST: 'libvirt' + TARGET_HOST: ${{ matrix.target }} + TARGET_CONFIG: ${{ matrix.config }} strategy: fail-fast: false matrix: - os: [ obsdsnap, obsdsnap-i386 ] - configs: [ default, without-openssl, ubsan ] + target: [ obsdsnap, obsdsnap-i386 ] + config: [ default, without-openssl, ubsan ] steps: - - uses: actions/checkout@v2 - name: shutdown VM if running run: vmshutdown + working-directory: ${{ runner.temp }} + - uses: actions/checkout@main - name: startup VM run: vmstartup + working-directory: ${{ runner.temp }} - name: update source run: vmrun "cd /usr/src && cvs up -dPA usr.bin/ssh regress/usr.bin/ssh" - name: make clean - run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean && cd /usr/src/regress/usr.bin/ssh && make obj && make clean" + run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean && cd /usr/src/regress/usr.bin/ssh && make obj && make clean && sudo chmod -R g-w /usr/src /usr/obj" - name: make - run: vmrun "cd /usr/src/usr.bin/ssh && case ${{ matrix.configs }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac" + run: vmrun "cd /usr/src/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac" - name: make install run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install" - name: make tests` - run: vmrun "cd /usr/src/regress/usr.bin/ssh && case ${{ matrix.configs }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac" + run: vmrun "cd /usr/src/regress/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac" env: SUDO: sudo timeout-minutes: 300 - name: save logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: - name: ${{ matrix.os }}-${{ matrix.configs }}-logs + name: ${{ matrix.target }}-${{ matrix.config }}-logs path: | - /usr/obj/regress/usr.bin/ssh/*.log + /usr/obj/regress/usr.bin/ssh/obj/*.log - name: shutdown VM if: always() run: vmshutdown + working-directory: ${{ runner.temp }} diff --git a/crypto/openssh/.skipped-commit-ids b/crypto/openssh/.skipped-commit-ids index b639678939dd..59e80518acf2 100644 --- a/crypto/openssh/.skipped-commit-ids +++ b/crypto/openssh/.skipped-commit-ids @@ -25,6 +25,8 @@ cc12a9029833d222043aecd252d654965c351a69 moduli-gen Makefile 7ac6c252d2a5be8fbad4c66d9d35db507c9dac5b moduli update 6b52cd2b637f3d29ef543f0ce532a2bce6d86af5 makefile change f9a0726d957cf10692a231996a1f34e7f9cdfeb0 moduli update +1e0a2692b7e20b126dda60bf04999d1d30d959d8 sshd relinking makefile changes +e1dc11143f83082e3154d6094f9136d0dc2637ad more relinking makefile tweaks Old upstream tree: diff --git a/crypto/openssh/ChangeLog b/crypto/openssh/ChangeLog index 02e11b023ca0..4251831a1732 100644 --- a/crypto/openssh/ChangeLog +++ b/crypto/openssh/ChangeLog @@ -1,11314 +1,11196 @@ -commit 0ffb46f2ee2ffcc4daf45ee679e484da8fcf338c +commit 6dfb65de949cdd0a5d198edee9a118f265924f33 Author: Damien Miller -Date: Tue Oct 4 01:51:42 2022 +1100 +Date: Thu Feb 2 23:21:54 2023 +1100 - update .depend + crank versions in RPM specs -commit 657e676ff696c7bb787bffb0e249ea1be3b474e1 +commit d07cfb11a0ca574eb68a3931d8c46fbe862a2021 Author: Damien Miller -Date: Tue Oct 4 01:45:52 2022 +1100 +Date: Thu Feb 2 23:21:45 2023 +1100 - update release notes URL + update version in README -commit f059da2b29840c0f048448809c317ce2ae014da7 +commit 9fe207565b4ab0fe5d1ac5bb85e39188d96fb214 Author: Damien Miller -Date: Tue Oct 4 01:45:41 2022 +1100 +Date: Thu Feb 2 23:17:49 2023 +1100 - crank versions in RPM spec files + adapt compat_kex_proposal() test to portable -commit b51f3f172d87cbdb80ca4eb7b2149e56a7647557 +commit 903c556b938fff2d7bff8da2cc460254430963c5 Author: djm@openbsd.org -Date: Mon Sep 26 22:18:40 2022 +0000 +Date: Thu Feb 2 12:12:52 2023 +0000 - upstream: openssh-9.1 + upstream: test compat_kex_proposal(); by dtucker@ - OpenBSD-Commit-ID: 5a467b2ee81da01a86adf1ad93b62b1728494e56 + OpenBSD-Regress-ID: 0e404ee264db546f9fdbf53390689ab5f8d38bf2 -commit 4cf8d0c0f3030f594a238bab21a0695735515487 +commit 405fba71962dec8409c0c962408e09049e5624b5 Author: dtucker@openbsd.org -Date: Wed Sep 21 22:26:50 2022 +0000 +Date: Thu Jan 19 07:53:45 2023 +0000 - upstream: Fix typo. From AlexanderStohr via github PR#343. + upstream: Check if we can copy sshd or need to use sudo to do so - OpenBSD-Commit-ID: a134c9b4039e48803fc6a87f955b0f4a03181497 + during reexec test. Skip test if neither can work. Patch from anton@, tweaks + from me. + + OpenBSD-Regress-ID: 731b96ae74d02d5744e1f1a8e51d09877ffd9b6d -commit 8179fed3264d5919899900ed8881d5f9bb57ca33 +commit b2a2a8f69fd7737ea17dc044353c514f2f962f35 Author: djm@openbsd.org -Date: Mon Sep 19 21:39:16 2022 +0000 +Date: Thu Feb 2 12:10:22 2023 +0000 - upstream: add RequiredRSASize to the list of keywords accepted by + upstream: openssh-9.2 - -o; spotted by jmc@ + OpenBSD-Commit-ID: f7389f32413c74d6e2055f05cf65e7082de03923 + +commit 12da7823336434a403f25c7cc0c2c6aed0737a35 +Author: djm@openbsd.org +Date: Thu Feb 2 12:10:05 2023 +0000 + + upstream: fix double-free caused by compat_kex_proposal(); bz3522 - OpenBSD-Commit-ID: fe871408cf6f9d3699afeda876f8adbac86a035e + by dtucker@, ok me + + OpenBSD-Commit-ID: 2bfc37cd2d41f67dad64c17a64cf2cd3806a5c80 -commit 5f954929e9f173dd1e279e07d0e8b14fa845814d -Author: Damien Miller -Date: Mon Sep 19 20:59:34 2022 +1000 +commit 79efd95ab5ff99f4cb3a955e2d713b3f54fb807e +Author: Darren Tucker +Date: Wed Feb 1 17:17:26 2023 +1100 - no need for glob.h here + Skip connection-timeout test on minix3. - it also causes portability problems + Minix 3's Unix domain sockets don't seem to work the way we expect, so + skip connection-timeout test on that platform. While there, group + together all similarly skipped tests and explicitly comment. -commit 03d94a47207d58b3db37eba4f87eb6ae5a63168a *** 38722 LINES SKIPPED *** From nobody Tue Feb 14 23:17:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGcZG1xTQz3qNyr; Tue, 14 Feb 2023 23:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGcZG1R1nz4P7X; Tue, 14 Feb 2023 23:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676416678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfQPRGIXbEtqqtX8XCRw3iUx73gVndtNfx9EctQSnBw=; b=PIgHDPy4KOXh0z7Px8tGI3fCmzum8Rm3gWoQwgdpdJ1rSRvGPJahW9/1jQKtZwuGNWFAZS 7jYu+BWv3u4wuZPeGUplBGorMjWgNOLJ00Af/CNaCpGUhklsmgyYExMnhLBC90a1/Aqe88 DTb3IrdwznHyGpPTR4tElBFjfJobpqqsPHh+JXOlQjQTWAbYEkinbXNqTh5F/NR6sAWuk4 Uz4t9GcX98RXOHMJN7wj5UymE3f1VVpNuOsnwx9wg6Cund2wJiQE1xd/2/ZuysffLdrSuO b4F7FaXJ67lJpTHhu4kmcvK7jRwJn1tXneMwQjjMWOSAwnVv10eCptmAdNUw7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676416678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfQPRGIXbEtqqtX8XCRw3iUx73gVndtNfx9EctQSnBw=; b=OkmpVFcP0Jw4paRfoEYy9hbtBvCo19kAj5TJQT3UJLExorMy1pjOARRKex39Fj/bHtQpVC PTQRBLb5V60mFbG9Vh4XltN2DPCGe+R6CtFLUlnZS4+w3HeCbRW9nsEE7+3d8QOxnhw2uH B5o9b8j73G0fXV/olREi4djC/dkxaPn6LFzNA3HXAhbeyIffGNZlyu6LWQnPI/Ut+jQI6A GlvPjpN4pDZwYyFvg+cw5cLzs81mxKzNlhSXruoe1gBmivjWsjfjKrY/bIQYmmHldxjkzp NluVWZa32+OEeim0yCrVyTcjav7NHMsDNDnw3JQCsgY7ZdqvLBvrUBMKo1h2yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676416678; a=rsa-sha256; cv=none; b=nAZbvWkA4bW9ZB/TROvIgiWwrJ7Lq3/Y8TLhcGv1GRlQ1YWFRiMJGjjdZT8sxoV6phx/YS Xx89m65a0bshVsU6/tvPwB55oa9yDAx9HfaYb1Q+SujKEJGAOx2qfWghWBSZPFqcEJb1pj /0RMeXkz0scI+qEShIHsexrvqfGDEvkmvOXa0x5h+j2goDbDeDP9qevq4O6udv0z2NYAr8 jl7sP0PMjpZ/G7l8P0cXiW1dOzwHQxKxf4SXQuDbwbEJMUwu9xeG9ViUZUzlytuoqLSNfZ HX5JYMz0fduXUIq0E+TYQY+UesKdEcn2l7EinvHibGtlaWT6SqKcGQdwmK5nDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGcZG0My1z1H95; Tue, 14 Feb 2023 23:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31ENHv1R005542; Tue, 14 Feb 2023 23:17:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ENHvFL005541; Tue, 14 Feb 2023 23:17:57 GMT (envelope-from git) Date: Tue, 14 Feb 2023 23:17:57 GMT Message-Id: <202302142317.31ENHvFL005541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: f09f828a41d8 - releng/13.2 - ahci: increase timout List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: f09f828a41d8eaf6456d2894a97a2a10f8979ea1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=f09f828a41d8eaf6456d2894a97a2a10f8979ea1 commit f09f828a41d8eaf6456d2894a97a2a10f8979ea1 Author: Mariusz Zaborski AuthorDate: 2023-02-10 15:56:04 +0000 Commit: Mariusz Zaborski CommitDate: 2023-02-14 23:17:57 +0000 ahci: increase timout For some devices, like Marvell 88SE9230, it takes more time to connect to the device. This patch introduces a special flag that extends the timeout from around 100ms to around 500ms. This change is based on the work of: Peter Eriksson Approved by: re (cperciva) PR: 243401 Reviewed by: imp Tested by: dch MFC after: 3 days Sponsored by: Equinix Sponsored by: SkunkWerks, GmbH Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38413 (cherry picked from commit f08ac4cb14c1c0740346a4363f82e1e1367c2bad) (cherry picked from commit 65bab39e140f97cace92a2923e50c6b654b02e22) --- sys/dev/ahci/ahci.c | 12 ++++++++---- sys/dev/ahci/ahci.h | 4 +++- sys/dev/ahci/ahci_pci.c | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index f5227f5e7147..45171a34cfbf 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -2605,10 +2605,14 @@ static int ahci_sata_connect(struct ahci_channel *ch) { u_int32_t status; - int timeout, found = 0; + int timeout, timeoutslot, found = 0; - /* Wait up to 100ms for "connect well" */ - for (timeout = 0; timeout < 1000 ; timeout++) { + /* + * Wait for "connect well", up to 100ms by default and + * up to 500ms for devices with the SLOWDEV quirk. + */ + timeoutslot = ((ch->quirks & AHCI_Q_SLOWDEV) ? 5000 : 1000); + for (timeout = 0; timeout < timeoutslot; timeout++) { status = ATA_INL(ch->r_mem, AHCI_P_SSTS); if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) found = 1; @@ -2627,7 +2631,7 @@ ahci_sata_connect(struct ahci_channel *ch) break; DELAY(100); } - if (timeout >= 1000 || !found) { + if (timeout >= timeoutslot || !found) { if (bootverbose) { device_printf(ch->dev, "SATA connect timeout time=%dus status=%08x\n", diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h index 472f9845117d..e28c02d6678e 100644 --- a/sys/dev/ahci/ahci.h +++ b/sys/dev/ahci/ahci.h @@ -621,6 +621,7 @@ enum ahci_err_type { #define AHCI_Q_NOCCS 0x00400000 #define AHCI_Q_NOAUX 0x00800000 #define AHCI_Q_IOMMU_BUSWIDE 0x01000000 +#define AHCI_Q_SLOWDEV 0x02000000 #define AHCI_Q_BIT_STRING \ "\020" \ @@ -648,7 +649,8 @@ enum ahci_err_type { "\026MRVL_SR_DEL" \ "\027NOCCS" \ "\030NOAUX" \ - "\031IOMMU_BUSWIDE" + "\031IOMMU_BUSWIDE" \ + "\032SLOWDEV" int ahci_attach(device_t dev); int ahci_detach(device_t dev); diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 3671efcb8e22..b5cbc044d9f0 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -292,7 +292,7 @@ static const struct { {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG | AHCI_Q_IOMMU_BUSWIDE}, {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_ALTSIG | - AHCI_Q_IOMMU_BUSWIDE}, + AHCI_Q_IOMMU_BUSWIDE | AHCI_Q_SLOWDEV}, {0x92351b4b, 0x00, "Marvell 88SE9235", 0}, {0x06201103, 0x00, "HighPoint RocketRAID 620", 0}, {0x06201b4b, 0x00, "HighPoint RocketRAID 620", 0}, From nobody Wed Feb 15 08:45:39 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGs9H5MsMz3rVrs; Wed, 15 Feb 2023 08:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGs9H4q45z3v5N; Wed, 15 Feb 2023 08:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676450739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRQQuTXjazyAVyCIXtTsZqL9larUBish/pJcCY5sQBY=; b=Qq5xqhLkQIrjIozUmPeOPqFUJTZIihCf+R1s1NgNGNuSpVZJyAVU2HLtZcu/Y2cBqqqkVp l2VkhxEFIbq8tOZhwmduGwOl4tHq0u0WU8ii033n8hOP8QpG7dWSMuKJQ5ky4oJ/Ao5sIW RmX3WJDEwvGWq571jjNMEcCEH2lK+TvxnlUMB2ID7C236rjobhC7Uj2AphErNLKrQFQ6/7 0wxVdjDezmK4EUFdt+aiwH3OvDoz8vLlw2LRgbGpGx0fqj2ad/9fKxrChD5SpDZKEIHE2r llQF9PRMvFNROWF17Cp4rhXmM4iQeHG05usIBGOv2mWTPxBLjDi1XwBPxNj90Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676450739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRQQuTXjazyAVyCIXtTsZqL9larUBish/pJcCY5sQBY=; b=ayJxSvcaLrngmjoC00QhRxmI+DRD51JsZLwa7mCFdwIQnvJLom4M9J0w+geZzLZuLer0/v bx6svCGVqIh+41ZCNinKJmkmlDdTrZjs2KTAkLd6paufB1wlyvF1pQxEksF42geGG10w0s mdoVjFEKVYxyxVUy8pk/Q6I86DgDU41TEusdkcZl+mV+IzkZmWsBlgbipskjOk3rexkwAC 8QgcGjWwDHszN6ae/c6mzsad1+si970BDvRzActVVMBAy1kQk3GhRqVaa+pRORObqKiH8t hMogJsihoqDl/eLMR+7bdJbfQg3GoaJ4eUsEc1cnaya50UUxmvhPNU8Uustcdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676450739; a=rsa-sha256; cv=none; b=PGkUZTyrVNdCsZuZBmJXA/48RDNcT04vEnRGdAMIlTCw0e++j+ioEzNQ52ghqY+mgWN1hu kQ12ySmTvSPoPKO6NusNWwM+ORF7IvlwdeySVY1Pwgu2NVyG935lkkW9SD10IMv2rcOs4k BNfr3jIJrMBkJ4+tBRfcRq8L60VUqBhVDuXcC4XXBs5JYRHCfwBr+EUnrfOlPfdD1QXMPS w8Frb816tfjL8h46EcSswrEpFITBOqUVV7qle55eayaTAKbin/9vjJp7uPLgIGUZEC2q7y 7Eb4J5PUYmVmMzFbDccu4/gWhJTh+4Pzny1WxipKbWYAlIWHzeQOCINMmwrrNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGs9H3sJTzJ93; Wed, 15 Feb 2023 08:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31F8jd7W017278; Wed, 15 Feb 2023 08:45:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31F8jdb0017277; Wed, 15 Feb 2023 08:45:39 GMT (envelope-from git) Date: Wed, 15 Feb 2023 08:45:39 GMT Message-Id: <202302150845.31F8jdb0017277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Tijl Coosemans Subject: git: d6ab6f93ef94 - releng/13.2 - local-unbound-setup: Use default root certificates List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: d6ab6f93ef94784426083516a857eb9f2441414f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by tijl: URL: https://cgit.FreeBSD.org/src/commit/?id=d6ab6f93ef94784426083516a857eb9f2441414f commit d6ab6f93ef94784426083516a857eb9f2441414f Author: Tijl Coosemans AuthorDate: 2023-01-19 17:13:35 +0000 Commit: Tijl Coosemans CommitDate: 2023-02-15 08:42:04 +0000 local-unbound-setup: Use default root certificates Don't force /etc/ssl/cert.pem. It does not exist by default, only if security/ca_root_nss is installed. Just use the default OpenSSL search locations which are /etc/ssl/cert.pem and /etc/ssl/certs/. The tls-system-cert option was added in Unbound 1.16.0. Reviewed by: zlei Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D38243 (cherry picked from commit 8932f7ce1783a10e9ba79c61d54077aa7693552e) (cherry picked from commit 412d15f7268e0662909822b1aef71536a2b285e5) --- usr.sbin/unbound/setup/local-unbound-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh index 3be78339b0ba..dc0768a672a6 100755 --- a/usr.sbin/unbound/setup/local-unbound-setup.sh +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh @@ -260,7 +260,7 @@ gen_unbound_conf() { echo " pidfile: ${pidfile}" echo " auto-trust-anchor-file: ${anchor}" if [ "${use_tls}" = "yes" ] ; then - echo " tls-cert-bundle: /etc/ssl/cert.pem" + echo " tls-system-cert: yes" fi echo "" if [ -f "${forward_conf}" ] ; then From nobody Wed Feb 15 16:19:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3Dd4gWrz3qVxX; Wed, 15 Feb 2023 16:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3Dd46cSz3k2X; Wed, 15 Feb 2023 16:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676477953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=elrGmdtmdq4FC2B+XNJjuPmBcBkYpGXus3ddgVJxh78=; b=nCVYQseLXN5UYHZYvVGlFIPiwYbwTwVqVeyE7AmFcHu1Uyokjz9UjfUGwm52q3MVhJNlqm /oEQb21hMmWhCdzdv0SnNRM7KXzm+Cz+hITkg/zhoF8HJcVgc7BPuHio+FQrR5bLDodqC/ tWI2tBM0SA1kgDZQLzy+DMUjDKxkWS5fID1sSjXtHCClnfNH8F+0yaMB82uFkdrInuSom2 HziTh0mcnJfBZrjsHvbxgRW4mhkkLdSRI6gxoLK4hoBzlj8ytidC1qSHsFkP+8cMXxDR/B 22KhEqhLhSwHz7418o+hAF6nkt85I8CYQSKKDPlF3oGYVBmQ+OWFZJkgeQfqOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676477953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=elrGmdtmdq4FC2B+XNJjuPmBcBkYpGXus3ddgVJxh78=; b=RDrkEojHkMuipjNl6Q/pb380Pz3kEXUVE9Pf9/fywPHyO889yA+Fg6ZNZnMVxBAQFLlbir Ekxj3jPYFh6ejFj8va6K+bNZrFK+ICtYPxFP4ENQtuvymyXcIeX/Q/ee8tSPInNIZDsA22 vdBXvurTE2uUcMO/vrMjTgd9cUtV+1Jgy1RJy8y5r0Ako9uK0KABpCv1lmxutUJA/6xRGs ZFuBc8hH82OkT5Ju9ItfMAY9ngPfQ1WOEt3Rl71jqXvF9G/y7KYlRBjGh7ce75RV3/dF+j k7WcFfs4XEsrucmLNiJwnmQKGbWDniD40VVwcT/+0vkcWmtmAZUjRZJAnkND3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676477953; a=rsa-sha256; cv=none; b=gRBHwvw4xH7sY0e2DYJvTrNycHLtAICembCMHzGmS3JVPtbZfaQ8e4RPXfeQCqn4GeXuZb +g6kkpkQwanU6gYmRIPOByCrenjoZyg4q8sahvM1dPIJG69burCgdXSHSKq0DFjJGpR9VZ CzsSGJsBf8c4XyqFO3rJ++9ryUPTaI0hcgT0UhdHkElbeEEq7QjogA3DDijLy8ZJIXJRuE osdUsvf6Xuat3+39Hj+aUlQ3SbCuQB59UtV/eVaD4HQoxp+O8kEmB/wF2F2xbXPMv2WXi6 FC8GewiChXS2m3b2q0cvfQNwvvUnmuTB0O3XJyQX5hsR78av5gC1TkAGUUOXOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3Dd3BNwzVFn; Wed, 15 Feb 2023 16:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGJDfd059516; Wed, 15 Feb 2023 16:19:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGJDHm059515; Wed, 15 Feb 2023 16:19:13 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:19:13 GMT Message-Id: <202302151619.31FGJDHm059515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: f334eece0677 - releng/13.2 - netlink: allow to override sb_max for netlink sockets. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: f334eece06771b8f81a9ca04318925c4faf9cdcd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f334eece06771b8f81a9ca04318925c4faf9cdcd commit f334eece06771b8f81a9ca04318925c4faf9cdcd Author: Alexander V. Chernikov AuthorDate: 2023-02-10 16:07:17 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-15 16:18:39 +0000 netlink: allow to override sb_max for netlink sockets. Netlink sockets sometimes require larger buffers than other sockets. For example, full-view IPv4 dump sent via netlink may consume 50+ megabytes. The desired buffer may be bigger than the system maximum `sb_max`. FreeBSD HEAD has a mechanism for overriding protocol `setsockopt()` handler, which netlink uses to permit buffer reservations beyond `sb_max`. This behaviour is handy as it doesn't require system administrator to lift the limits for other sockets. Stable/13 lack such muchanism, so a different approach has to be used. This diff is a direct commit to stable/13 and it simply copies the logic from Netlink in -HEAD for checking if the larger buffer size should be permitted. Differential Revision: https://reviews.freebsd.org/D38472 Approved by: re(cperciva) (cherry picked from commit c3d3f3594fdf653392936594b75ec330af12d7fa) --- sys/kern/uipc_sockbuf.c | 3 ++- sys/kern/uipc_socket.c | 10 ++++++++++ sys/sys/sockopt.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index cbfcc0e5fe95..277965412779 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -693,7 +693,8 @@ sbsetopt(struct socket *so, int cmd, u_long cc) if (*lowat > *hiwat) *lowat = *hiwat; } else { - if (!sbreserve_locked(sb, cc, so, curthread)) + u_long limit = sogetmaxbuf(so); + if (!sbreserve_locked_limit(sb, cc, so, limit, curthread)) error = ENOBUFS; } if (error == 0) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index f8931b653a4d..fdf718de2483 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -128,6 +128,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2975,6 +2976,15 @@ sooptcopyin(struct sockopt *sopt, void *buf, size_t len, size_t minlen) return (0); } +u_long +sogetmaxbuf(struct socket *so) +{ + if (so->so_proto->pr_domain->dom_family != PF_NETLINK) + return (sb_max); + u_long nl_maxsockbuf = 512 * 1024 * 1024; /* 512M, XXX: init based on physmem */ + return ((priv_check(curthread, PRIV_NET_ROUTE) == 0) ? nl_maxsockbuf : sb_max); +} + /* * Kernel version of setsockopt(2). * diff --git a/sys/sys/sockopt.h b/sys/sys/sockopt.h index cb7fc3ffca27..d01d62f21680 100644 --- a/sys/sys/sockopt.h +++ b/sys/sys/sockopt.h @@ -68,5 +68,6 @@ int accept_filt_getopt(struct socket *, struct sockopt *); int accept_filt_setopt(struct socket *, struct sockopt *); int so_setsockopt(struct socket *so, int level, int optname, void *optval, size_t optlen); +u_long sogetmaxbuf(struct socket *so); #endif /* _SYS_SOCKOPT_H_ */ From nobody Wed Feb 15 16:19:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3Df5SkVz3qW31; Wed, 15 Feb 2023 16:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3Df4tnZz3k5H; Wed, 15 Feb 2023 16:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676477954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+eBqaieVHdW9PGJHnmp1iSDEqJrbEOPSuZ6LaSZz8/4=; b=WJqjiYsBZ/M53BbE2H4b26yAu/SnLtRCiKQedg7tWFlRcT7aH4VlUqyR7kzXnY7gDbrbAT GUH185afPrEhgq9cewM1h/Hu7FedE0Res/a1uKo2KeInM6E3ym1Et6o3JvLpntOaJOpEGh Qivsj+K3QmOq4ZupBE4sHNnCzcyvBaxFn1OkqpmN6BX8HmxDlYOU04DAzaV7GuOpmxBaq7 Vd8LS3bxHK5ypVUH+M8bjnEBMq56RMTYsDbLVr+WLI7bQUqR3e0mpX+ntbkH0GTYGnHnir +NyCpVuKEKCaS0b3RS+c94oID7vAIDjdMWZdnb9O5pJu2KFiKBAiFz+NxH+Zyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676477954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+eBqaieVHdW9PGJHnmp1iSDEqJrbEOPSuZ6LaSZz8/4=; b=Htic7oMfvdjFZTWLlf0QnaMMSM6Z4Iq8YHawJG0PNcjhGvJwY8G8J8ocBTfQrxwBLQTEa5 I6TmIZFOPuQV140yQI5ry3c3YU8cm8VZMpToyMsc8uvocWiXxsktLkQSf5NmaumxQwl81H VtcfCCcebXxgj1Hp736JAvCfp6dO8uH3/KY+XTRWUpsiIP7tbICmcYd5A2zFw4loKMrRVg udH57j3vgnROr+3ZRK9te3l/zJaLbGmFZfTBWLpTimsvbqlQEn2XwinRYtbG9Zg5/Ckhu1 ALtYKG5YNhlWNeoRYsshd0QQ4boyiJkrf198XgwKBS5MfmD/qpy0BHU47Z66vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676477954; a=rsa-sha256; cv=none; b=Sm/rhA2fPTIPVuLJIAC+bZMSJN1bRYD3KNrAfwArmmdig4KNlJfG/T4m2ewzzhZuIMseCI Dn4qOC5yqK4Ryh7Rz07WOUKfkFCb1NRxq39z47B+O+60fGOvdiE8QgKJ2UcUqdZhhRPU7J R+o9RsvcgyThh2Uyi9CF88o/VJImOyf4bteXs+NMInjhlt3BTCr80iWeT9xBVlXy3JNbhJ mNAd32rL8+jupZC0aEMpcztke3oPhVGo8PwKgpizGJoFoNIKpQHfAuZhghyPPr+ierPA7c Jk2TDKTfumpLMR/x2c4FcT3fnSjyuVU8s+vStKd7Xglxi1FBdG1vRY3a3y73Aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3Df3wVhzVVY; Wed, 15 Feb 2023 16:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGJE6K059542; Wed, 15 Feb 2023 16:19:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGJE58059541; Wed, 15 Feb 2023 16:19:14 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:19:14 GMT Message-Id: <202302151619.31FGJE58059541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 30b6990e1f2a - releng/13.2 - netlink: do not require elevated privileges when reading arp/ndp state. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 30b6990e1f2a391f7fc293fbe6763dd72eeba5cd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=30b6990e1f2a391f7fc293fbe6763dd72eeba5cd commit 30b6990e1f2a391f7fc293fbe6763dd72eeba5cd Author: Alexander V. Chernikov AuthorDate: 2023-02-09 14:12:33 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-15 16:18:52 +0000 netlink: do not require elevated privileges when reading arp/ndp state. MFC after: 1 day Approved by: re(cperciva) (cherry picked from commit 5a5436eb5d960b9e243f8196147c6a51ca4f9dee) (cherry picked from commit aff2a514adb691938a5302975dc337ee01c6c721) --- sys/netlink/route/neigh.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index 9bcbb68dd375..8cd1e31ce67a 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -519,7 +519,6 @@ static const struct rtnl_cmd_handler cmd_handlers[] = { .cmd = NL_RTM_GETNEIGH, .name = "RTM_GETNEIGH", .cb = &rtnl_handle_getneigh, - .priv = PRIV_NET_ROUTE, } }; From nobody Wed Feb 15 16:43:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3m50vwzz3qXgT; Wed, 15 Feb 2023 16:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3m50VSkz3nVy; Wed, 15 Feb 2023 16:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hdnnt99qGxlLhNtnkIuQvbyPS2FNvk/UXKxB3dDNSAc=; b=kszALjHmHMf4HhW0Q9HkvFTzOsMP0Y1HKrQegjX5dj8rOzodO6+BSeaDX8wR34nX9DDsut uco1veNLPw0tpeOIiqYbxLo8Wfu2i0RxtlusoFsVb8WHt52vuLmrsHsX0zTU1QhwsNHNij bOyCAA4rZP70WI0Iho3MNCAdF1c/697kTlT3FNoqAZZIBpLZ/x7j5CLFNXU1ogcXlNKpmq U8z4JCZxRhMvffwdznuQXPzmSgMegVo5P6odyxVkODxs5HmoJ3E8iaa8/RfgsOOWLWFBRG nxB8vyR4qMvZHw0reoHa6cXByD3jrJFXEzFhJ5bblEFxon0T0+pKkSITrm/nDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hdnnt99qGxlLhNtnkIuQvbyPS2FNvk/UXKxB3dDNSAc=; b=bo7/+0dhQQL3prX2rDX6pxfuR2WgXHZi+OJYsafhUAmybpGBMBF/ZNm/5J32mDVzU7Ycgf DD+TSjXeS/IRxWcI2W15GnEm8WOXiBn2pxyapwn6RFKDO6nrIZU3H33LMTplm2Jhm4FVeX xWUAVjxG74yj4XxCHrjrhxoiWdxWFLgAoySVfDbfaP+7kgSCOtsZUjjUhGXz8S75qPM71p jQcglKw4IJTwBtT03IaPdvO3p0GH3ZHrQaLBdh+qkzZAVuTdTeIARz7yYrvigBqqSZGKzO 009EpWKMn+T9udPY39oYRUjlBZOcRfOvc0LEQIsmtJYA41qtdlq/hM0IhTmMjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676479381; a=rsa-sha256; cv=none; b=Sp4ZkdVgmcUZq3X9nsS09qgOhTwBXQPBg4FHs2g77T6ZQhuRqGgezkPai/B9L0UCE4OrFM ClSQuyqmLt1KIdwQdpRVVLydV8cSGID+lrh2qDjPbmVML1V4Prveqqv1f0d/TJpKEx1dAh nejM7TWL92t4TWE7T1aAUdMAPWrGvVND+O5cwiIEZRvCWI6GYaO4GyKVt5fPSUjREMqZSZ afmbC92CMMaddRutYyDkPnLu8tudHGVl/i9hMTDGcOELX7gXnl1rfQ7ptOVUvEkLFY1TBs Jx5s1i+OBMoy2bgkLgLsAO3jtmiubG3kHMNK6CsOQDeFMjunXPvKWZ2toYTBdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3m46RGszWhv; Wed, 15 Feb 2023 16:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGh0Xc002003; Wed, 15 Feb 2023 16:43:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGh0xC002002; Wed, 15 Feb 2023 16:43:00 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:43:00 GMT Message-Id: <202302151643.31FGh0xC002002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 27cd9722efb1 - stable/13 - Update comments referencing create_thread() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 27cd9722efb10f03e9d7d79ecb737be6ec82b5e2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=27cd9722efb10f03e9d7d79ecb737be6ec82b5e2 commit 27cd9722efb10f03e9d7d79ecb737be6ec82b5e2 Author: Mitchell Horne AuthorDate: 2023-02-09 15:34:38 +0000 Commit: Mitchell Horne CommitDate: 2023-02-15 16:41:11 +0000 Update comments referencing create_thread() The equivalent function is now named thread_create(). Mention kthread_add() where it is also relevant. Reviewed by: kib, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38180 (cherry picked from commit a7a452fedc42d9e260224b7e2cd833df7287319f) --- sys/kern/kern_kthread.c | 2 +- sys/sys/proc.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index 2eef7798f3d6..782370b1ba77 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -296,7 +296,7 @@ kthread_add(void (*func)(void *), void *arg, struct proc *p, thread_cow_get_proc(newtd, p); - /* this code almost the same as create_thread() in kern_thr.c */ + /* This code is similar to thread_create() in kern_thr.c. */ p->p_flag |= P_HADTHREADS; thread_link(newtd, p); thread_lock(oldtd); diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 23b8fcfe9bd7..452ffe413327 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -251,7 +251,7 @@ struct thread { u_char td_lend_user_pri; /* (t) Lend user pri. */ u_char td_allocdomain; /* (b) NUMA domain backing this struct thread. */ -/* Cleared during fork1() */ +/* Cleared during fork1(), thread_create(), or kthread_add(). */ #define td_startzero td_flags int td_flags; /* (t) TDF_* flags. */ int td_inhibitors; /* (t) Why can not run. */ @@ -316,7 +316,7 @@ struct thread { u_int td_ucredref; /* (k) references on td_realucred */ #define td_endzero td_sigmask -/* Copied during fork1() or create_thread(). */ +/* Copied during fork1(), thread_create(), or kthread_add(). */ #define td_startcopy td_endzero sigset_t td_sigmask; /* (c) Current signal mask. */ u_char td_rqindex; /* (t) Run queue index. */ @@ -337,7 +337,7 @@ struct thread { #define td_endcopy td_pcb /* - * Fields that must be manually set in fork1() or create_thread() + * Fields that must be manually set in fork1(), thread_create(), kthread_add(), * or already have been set in the allocator, constructor, etc. */ struct pcb *td_pcb; /* (k) Kernel VA of pcb and kstack. */ From nobody Wed Feb 15 16:43:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3m61Tjmz3qXP4; Wed, 15 Feb 2023 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3m611gnz3p1X; Wed, 15 Feb 2023 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y4XlB+R7mfIY4vguwG2phg2DzrMgLo2ObkOZQitFf58=; b=x6d0jxzYZC50LOzpgJtgZarmSkL6uw9WrSpSJ3lNXjOXw593J1grbfFxucjtpZ5p2HpcKJ I6FGyNNlfXqGAcE33d+fbkBC3IVhl0cpw+JejIfgjNwC5WI1Lh9vay8R7i4t8J5L02gC3t TCwlh0FD1WcxbkhEwCeC5HAm3fyPKezwq+fuVXiej59RPXP+HNXuVnitJLZXKqBirSrK+7 jSXhM2thGzgJB6nYrq5RlCrpOHwWQU1ROMQG9IRSJYk0GyAg7kna0pxni910lPQVT3ypCx aNSSVkSPO+knGyiVVeDEW/ah2RDmn+nkDLFYfDr/mezxQYo3kxTU2iT3YZ2icQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y4XlB+R7mfIY4vguwG2phg2DzrMgLo2ObkOZQitFf58=; b=PtLyxuT3s3Xf1E6hBRbZAArQHukGb6ODhbOFkD93/tKTP6mDoGssQoqXOOwF9qiIRcRpY2 ywKdeuUV0+CgmkBkV6mniEfFUTFn10xIOqnx8/hw4bN/8rmihDHL/5ja1O5ibzMVCICHds IcIMxZjilZWeWdWD1ZnX7SLtM7Lhtbnx21jlrIvbnbA5U9R7MS11xwS/ZHdJr04wIttG0e qxXzXk2eXt/FCMbyrf/eAmojRa/UsTZa8/whzmwloJ1tUEtzAau/jJauUKoPJ6CXu3GijD Z86deUrx5gzz7QMiY4aOqIYX4ktxCm9ADl9gBioPOF9acwaPF1Ue6iVmwf+o4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676479382; a=rsa-sha256; cv=none; b=f77pG5u+5BbsaLn8XnMGx2+vEsW9cPYwu5DrEy/ojVZ40DSb5575h7pAgq3p0qwv85D3qk /EED3qUiYput97j0Tee6MYnaVqWZSwrgWfoUwfKcbdNrJwpnaaMfPKzw4RqKa8WglN1wJj ig6X3+1nLJgFerb3DHfJU7Fg3T06zlfkv/DHh62ursMP6F2jXp7v3cz1Ybupil6HS8+Twv WPAc4MWZPD4G89iiClKQPLSgz5jbuchqZVAZJGYEir0HlSQLrTvtFQ30UkdZWR4CTDoiY1 UchvfRctCflr2CdZAaVHMCSr+0pSPuN2TJz0FX3On5q+ah8unRJkTFKTI5ZxKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3m607GWzWTD; Wed, 15 Feb 2023 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGh1AY002029; Wed, 15 Feb 2023 16:43:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGh1Ww002028; Wed, 15 Feb 2023 16:43:01 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:43:01 GMT Message-Id: <202302151643.31FGh1Ww002028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 1f7d3b4c8f20 - stable/13 - Boolify should_yield() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1f7d3b4c8f2011d78468b17406045812349b8538 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1f7d3b4c8f2011d78468b17406045812349b8538 commit 1f7d3b4c8f2011d78468b17406045812349b8538 Author: Mitchell Horne AuthorDate: 2023-02-09 15:35:11 +0000 Commit: Mitchell Horne CommitDate: 2023-02-15 16:41:11 +0000 Boolify should_yield() Do this ahead of adding a man page that describes the function. No functional change. Reviewed by: kib, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38181 (cherry picked from commit d570418bd8918980e578ff78a229593766b832bb) --- sys/kern/kern_synch.c | 2 +- sys/sys/proc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 5abc38d64296..b3570321806a 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -641,7 +641,7 @@ synch_setup(void *dummy) loadav(NULL); } -int +bool should_yield(void) { diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 452ffe413327..e3806a86c2a2 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1148,7 +1148,7 @@ void sess_hold(struct session *); void sess_release(struct session *); int setrunnable(struct thread *, int); void setsugid(struct proc *p); -int should_yield(void); +bool should_yield(void); int sigonstack(size_t sp); void stopevent(struct proc *, u_int, u_int); struct thread *tdfind(lwpid_t, pid_t); From nobody Wed Feb 15 16:43:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3m72TQrz3qXsk; Wed, 15 Feb 2023 16:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3m721q8z3p0V; Wed, 15 Feb 2023 16:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSINnZD2PacafSQL9ijNjGAG3T9L9stXm9YVobZ/3Uk=; b=P2ZKetNFewKGDcEWy57QGLjqY9yvHV8UeJdob9Obi0HZNxxT/kqgfW3hr9lPairXy72ACK zzZ7yj3XgJSmnqBqpjATFv+6+kIdZJhXlN/dpyVD08XuATEHhWCnFWh3D+GjCbhYU3YH3L SKVHiVi7+Z9rwaVcPVv6ed3Hm1m8hrjQqpOboZ/PIb68uiM7V37jukS7o0hCW46le1L/CD Ic8FkFHrcGfMkKGStaUm0bnOErtB74z+xRZNlhFaT25qv+9/OtyGCh0wmA5dSvI6Vv2OzJ /FbCriOsoYatr+m0wH75JcA4Ul64hwCw4jXvxLW90XAzC1t5mYEnEpWjZuUjcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSINnZD2PacafSQL9ijNjGAG3T9L9stXm9YVobZ/3Uk=; b=XzI7ckqzfxhCkBywxzOa6zvMZjH//UxDI5o/ryO28JzyPWulFxJbkTSjzGgDqZWygA0FvR 1cXBSmwHTyqYaYHx/mlxeF1nDHHsCdDiCtEua/kz7TB/foAPvic+3i/dMDAi66IrxsihI/ W/PufcGAJPM1QEkVKUNEr5NOLTc+CaRDygTWc8ugb3J3dodKooygJmX5nVT2l7p2WCJop9 v4fE60hxQdeBs/sN1J3ujMR+AnJXQ4iDgAYa7t7aZeZis+H3Xz7Wr61XKPNPMewMQwYjD1 /+FWay16/gCe1SXZACci1KvwNIeGmDA2MPx7mhH4gSRjkgJg8e0b+SD+x1TmIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676479383; a=rsa-sha256; cv=none; b=R5SVhtNfYW7QicMeXFRAqxOp4wlo6gefxmW+H7zQFR60smx5qghhj9IVXri+Ld0xpAgMcE pRUiLILi4WM8UinFBMIhz6MRk4fJapth/tx+Sgn6q4MefM3hctcTMtc+Q1D6daUlN8ZVsX BlF7y8k68YabjwY1Q5gDqgByDpaEpr2tR5vM04FUIzvDGCWMyR97N5gMhjBny52ak2i+3t EL1TJbjc9Ut1XVd6tqHilD5it9YFY6FYCd2SHkkjNzbm6eySFE8WGF+ePRa2eTHvLz3nzi XkE4FVd8RcDiM1qMYE1/Tt85aYj82ga2BALfeTUxlF3NW5jiN2kfFAlj1SB1Qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3m715hPzWhw; Wed, 15 Feb 2023 16:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGh3Ii002053; Wed, 15 Feb 2023 16:43:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGh3JS002052; Wed, 15 Feb 2023 16:43:03 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:43:03 GMT Message-Id: <202302151643.31FGh3JS002052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 6ddc7cdbc07c - stable/13 - Use maybe_yield() in a few more places List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ddc7cdbc07c6d14b88923d741adff6df113d7bc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6ddc7cdbc07c6d14b88923d741adff6df113d7bc commit 6ddc7cdbc07c6d14b88923d741adff6df113d7bc Author: Mitchell Horne AuthorDate: 2023-02-09 15:42:53 +0000 Commit: Mitchell Horne CommitDate: 2023-02-15 16:41:11 +0000 Use maybe_yield() in a few more places Reviewed by: kib, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38186 (cherry picked from commit dc9b13736fce15ec3dc77a87e06d6406c92a0141) --- sys/kern/vfs_subr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 81bad2da0f0c..67f707dd9edb 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1235,8 +1235,7 @@ restart: vn_finished_write(mp); done++; next_iter_unlocked: - if (should_yield()) - kern_yield(PRI_USER); + maybe_yield(); mtx_lock(&vnode_list_mtx); goto restart; next_iter: @@ -6706,8 +6705,7 @@ __mnt_vnode_next_all(struct vnode **mvp, struct mount *mp) { struct vnode *vp; - if (should_yield()) - kern_yield(PRI_USER); + maybe_yield(); MNT_ILOCK(mp); KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); for (vp = TAILQ_NEXT(*mvp, v_nmntvnodes); vp != NULL; @@ -6922,8 +6920,7 @@ __mnt_vnode_next_lazy(struct vnode **mvp, struct mount *mp, mnt_lazy_cb_t *cb, void *cbarg) { - if (should_yield()) - kern_yield(PRI_USER); + maybe_yield(); mtx_lock(&mp->mnt_listmtx); return (mnt_vnode_next_lazy(mvp, mp, cb, cbarg)); } From nobody Wed Feb 15 16:43:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3m86fgQz3qXnD; Wed, 15 Feb 2023 16:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3m83T0Bz3npB; Wed, 15 Feb 2023 16:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P37EmqZPlkp3aRDUBGMNg+EJvMrETzyUw0+UZYw16s0=; b=FZXAJoxf5XY48BpUacz9oeZHKZVn5Sx3YoXe0e+dSVH6gtCJFyY3t/fK3buP0Ir7UnrKB4 HaKXyWL6OrAHdwqZWJ/hnhwb9b9aROacTc7ZHozEDt0bczOKQnxIlqSfTGwb/wtrw06zdU RS3hQ7sjMLfXwPGIna1Ueloep5XWP12lHqMadruYqATy7JL0R5ddxDUNUMRCE7oIgPFoq1 sNsd5baQ/fNqpUnQJS2N2eEuvU9Wud+Ll9moqgEiim/fsQT+zqkEI56ztfoMDymIoLxfFx 2KoPMT0zSZOSfn28k10pY4DqY9i2h2xCf4FY36VRSuXvY5b2gxB6yK1/lCVnig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P37EmqZPlkp3aRDUBGMNg+EJvMrETzyUw0+UZYw16s0=; b=J5r6W1pi8Dw6AWgG3rHq2jI0xhOOc5iJia8lD5cFeGUwL7nMap5PndyZ1AAcucs0SWTFUL fco/nVa/JX3PRO2eD9g7NVBr0oUSOypUX/29AwzTO5KLLc3wYuEHpwHVlEjQZY0RW1JQxH PPr3D8baKFNxqIkRf/UPGhyMnruSTCF464TizduD1HaJav9T5HIYmx13hKtODvlZut7kRh 9A/miu3JOSrRl8lQd9efGI2fC9zCmSZTrnVl7g2ZdHCjnGyxgm8yZ/Yxx2NnAz6sO3L16M ttMD+T7H3fIGdyH3PBuAY0/0NVJj39Kw/iNCLD0ag5LLqWAdfOtu2OnXMYcdUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676479384; a=rsa-sha256; cv=none; b=BtHvldQQmvGaA+LyjfSU8UNRwEFThf7sdW4+LLloNR/Ruvzng/4OF9T6vC2BXXZ1Q6zSEc trHyI88MGfJJO0hElUytErnQn2yL2IyHasgbOMTB13JqtsuDfc1GRkfmXjpqtNlp4svyhb KCwbgPLDLJpymoazawfhgnvGsXrJvNP/j94jtsT7ajvbJ6NiAY7/aE7FYBsgIZ6iVbBY3i x88eZpWjNw4xpfY2RJ78tlxdBZTaxBOsO2+NEvBVYc15k9WfRbm3edhpANKpgHSpwyNJBG DQd5XaizRnzdqo27pz6WXn2+5waSj3DY1Rq80GcYJ6jtb5ASc7+yw+orXeIfmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3m8244gzWr4; Wed, 15 Feb 2023 16:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGh4US002077; Wed, 15 Feb 2023 16:43:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGh4Zc002076; Wed, 15 Feb 2023 16:43:04 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:43:04 GMT Message-Id: <202302151643.31FGh4Zc002076@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 2f0fc9ab8912 - stable/13 - dtrace: handle page faults in riscv dtrace_trap() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f0fc9ab8912d3446ba67ed28bc7f6d226b16144 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2f0fc9ab8912d3446ba67ed28bc7f6d226b16144 commit 2f0fc9ab8912d3446ba67ed28bc7f6d226b16144 Author: Mitchell Horne AuthorDate: 2023-02-06 18:08:35 +0000 Commit: Mitchell Horne CommitDate: 2023-02-15 16:41:39 +0000 dtrace: handle page faults in riscv dtrace_trap() We must detect the correct amount to increment sepc, as it may have been a compressed instruction that triggered the fault. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38299 (cherry picked from commit 06faad1de2c9aadcfd606d5f7121b201dbfbaa9d) --- sys/cddl/dev/dtrace/riscv/dtrace_subr.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c index 1e24a88f6c75..f32bb3a2343e 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c @@ -63,6 +63,8 @@ typedef struct dtrace_invop_hdlr { dtrace_invop_hdlr_t *dtrace_invop_hdlr; +static int match_opcode(uint32_t insn, int match, int mask); + int dtrace_invop(uintptr_t addr, struct trapframe *frame) { @@ -188,6 +190,8 @@ dtrace_gethrestime(void) int dtrace_trap(struct trapframe *frame, u_int type) { + uint16_t insn; + /* * A trap can occur while DTrace executes a probe. Before * executing the probe, DTrace blocks re-scheduling and sets @@ -196,9 +200,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * flag is cleared and finally re-scheduling is enabled. * * Check if DTrace has enabled 'no-fault' mode: - * */ - if ((cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT) != 0) { /* * There are only a couple of trap types that are expected. @@ -208,15 +210,24 @@ dtrace_trap(struct trapframe *frame, u_int type) case SCAUSE_LOAD_ACCESS_FAULT: case SCAUSE_STORE_ACCESS_FAULT: case SCAUSE_INST_ACCESS_FAULT: + case SCAUSE_INST_PAGE_FAULT: + case SCAUSE_LOAD_PAGE_FAULT: + case SCAUSE_STORE_PAGE_FAULT: /* Flag a bad address. */ cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; - cpu_core[curcpu].cpuc_dtrace_illval = 0; + cpu_core[curcpu].cpuc_dtrace_illval = frame->tf_stval; /* * Offset the instruction pointer to the instruction - * following the one causing the fault. + * following the one causing the fault. Check if the + * instruction is compressed or not. Standard + * instructions always have bits [1:0] == 11. */ - frame->tf_sepc += 4; + insn = *(uint16_t *)frame->tf_sepc; + if (match_opcode(insn, 0x3, 0x3)) + frame->tf_sepc += INSN_SIZE; + else + frame->tf_sepc += INSN_C_SIZE; return (1); default: From nobody Wed Feb 15 16:43:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3m94bvlz3qXhn; Wed, 15 Feb 2023 16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3m93y6jz3pGM; Wed, 15 Feb 2023 16: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=1676479385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pof/scvlqavbP92QTgCBoLgpM6pu4jPkTLZq/eJk1+g=; b=ObaekqAKxHP7WgCJ0phIhwlSkMPqi0tyn00ejzYlWIVAXui6Kw60UMlodGCgJEARPt+LJU jE0Q842yar7U9UcCOiS9ivUtIA+L5o8H3TVCixJEfsuQWTezfIt5qWNoLqyvS4HSmYLFXy dCaBkb0xg8MgWpqJKX784bxXriERJ130ZM2i7O5xTUgynxjQ4XnfIfnRcIutbmLichSIvk 2kfJMgyhiTG1FrJpISNptr/57qtz8RXfNUsPx8LEj+/xPJeDzlolC7XdFjownnN6MQR2c6 cmyE/x8TuvyDRP/YoTQe5i8J/NDZmZnEYLxPjMKysS9PqWZaSL2wKGQm7FJhyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pof/scvlqavbP92QTgCBoLgpM6pu4jPkTLZq/eJk1+g=; b=mxtQh0AlXxmRx5SsI5JhijWZmKonZXqgr8s7v9YPiv+yvRjVC6I2W34rUGXW0xclbHdqMH /Gd7XhCKILlbBzfCz/P1Y0nO7xAjKT8gS/GvKHOCbSSLFAN5GfhQHp2LZ8XBBDTlJXbTMl sEThhIqwb6rvJuCVEEDZ8vFDoDodgpdVut/oJBLVT+jmA6Rby/x2q2i6pxtH2cFIy/cAjH hcynYKnnsItfcG7MiVOCpfDo1eG2qAwu3rHxZclDjW/5cgFKvNNjTFvgyFtnG1dFuM54ZT a1ObWiJA16Tiqs0uoYdt98Hz3/B1dY89+MzWX5sdAvb5mCtT7YE4/S59YD4h7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676479385; a=rsa-sha256; cv=none; b=TdKbT/Sf5ezhYZifXi5/LPtQwMp45vL78genhM1gkUFboXpNXKBNGQXw5txiW40I0Wm8Tg /Eb2dIy1e3ZTMPsZGZz/D7Oa07qjp/c8lMkMUI3cOrpW0I7BSUfkiaenbzyH+ZUYrjwFFe HpDuziyGbEfMkqVdbn83mUG25G0iRQx7ZHJxDzs031jJ/jQbFAIB0aFcqMhMv26szJ5ueu W8Uf52rMj695nG7dqSV8437L4Y6VjqXUS8Mk6hoVYVQigFLVbzbEu45f93eNQE6cWv9DI6 KeHc8wAC1H5ldzKfK5bIB4aC6M2BOCZeWPp0nuwi7QP4T0xK8E680t9fto8Lcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3m932R1zWTF; Wed, 15 Feb 2023 16:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGh5gA002107; Wed, 15 Feb 2023 16:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGh54B002106; Wed, 15 Feb 2023 16:43:05 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:43:05 GMT Message-Id: <202302151643.31FGh54B002106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 698af78e7809 - stable/13 - dtrace_asm.S: properly enter/exit user access List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 698af78e78093aed0b84f1e5d396e127ae13f52c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=698af78e78093aed0b84f1e5d396e127ae13f52c commit 698af78e78093aed0b84f1e5d396e127ae13f52c Author: Mitchell Horne AuthorDate: 2023-02-06 18:04:21 +0000 Commit: Mitchell Horne CommitDate: 2023-02-15 16:41:39 +0000 dtrace_asm.S: properly enter/exit user access In order to read or write userspace memory without generating an access fault, we must first enable the SUM bit in the sstatus CSR. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38298 (cherry picked from commit 0e563bde48b1af6bd472e940f04a8d76315749ab) --- sys/cddl/dev/dtrace/riscv/dtrace_asm.S | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_asm.S b/sys/cddl/dev/dtrace/riscv/dtrace_asm.S index eeaf64061675..98c22a2aedfd 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_asm.S +++ b/sys/cddl/dev/dtrace/riscv/dtrace_asm.S @@ -74,7 +74,9 @@ uint8_t dtrace_fuword8_nocheck(void *addr) */ ENTRY(dtrace_fuword8_nocheck) + ENTER_USER_ACCESS(t0) lb a0, 0(a0) + EXIT_USER_ACCESS(t0) RET END(dtrace_fuword8_nocheck) @@ -83,7 +85,9 @@ uint16_t dtrace_fuword16_nocheck(void *addr) */ ENTRY(dtrace_fuword16_nocheck) + ENTER_USER_ACCESS(t0) lh a0, 0(a0) + EXIT_USER_ACCESS(t0) RET END(dtrace_fuword16_nocheck) @@ -92,7 +96,9 @@ uint32_t dtrace_fuword32_nocheck(void *addr) */ ENTRY(dtrace_fuword32_nocheck) + ENTER_USER_ACCESS(t0) lw a0, 0(a0) + EXIT_USER_ACCESS(t0) RET END(dtrace_fuword32_nocheck) @@ -101,7 +107,9 @@ uint64_t dtrace_fuword64_nocheck(void *addr) */ ENTRY(dtrace_fuword64_nocheck) + ENTER_USER_ACCESS(t0) ld a0, 0(a0) + EXIT_USER_ACCESS(t0) RET END(dtrace_fuword64_nocheck) @@ -111,6 +119,7 @@ dtrace_copy(uintptr_t uaddr, uintptr_t kaddr, size_t size) */ ENTRY(dtrace_copy) beqz a2, 2f /* If len == 0 then skip loop */ + ENTER_USER_ACCESS(t0) 1: lb a4, 0(a0) /* Load from uaddr */ addi a0, a0, 1 @@ -118,6 +127,7 @@ ENTRY(dtrace_copy) addi a1, a1, 1 addi a2, a2, -1 /* len-- */ bnez a2, 1b + EXIT_USER_ACCESS(t0) 2: RET END(dtrace_copy) @@ -129,7 +139,9 @@ dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size, XXX: Check for flags? */ ENTRY(dtrace_copystr) - beqz a2, 2f /* If len == 0 then skip loop */ + beqz a2, 3f /* If len == 0 then skip loop */ + ENTER_USER_ACCESS(t0) +1: lb a4, 0(a0) /* Load from uaddr */ addi a0, a0, 1 sb a4, 0(a1) /* Store in kaddr */ @@ -138,6 +150,8 @@ ENTRY(dtrace_copystr) addi a2, a2, -1 /* len-- */ bnez a2, 1b 2: + EXIT_USER_ACCESS(t0) +3: RET END(dtrace_copystr) From nobody Wed Feb 15 16:43:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3mB5xvvz3qXPD; Wed, 15 Feb 2023 16:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3mB4wNJz3p6J; Wed, 15 Feb 2023 16:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HBAJpJtQdj/3JL1d+0udjDhoqrDB49XCk4+Z4PRUOk4=; b=OMPwgi5m1WpIQlgTXhBk492nmxpMPRHW+sY8nCljMaBiXdlpO1TkftXD2JkDgsXjB9G7mL DpuVLwh4LFEgtWdRL6gd91co84cUwGwm1C2QuqevwKzJ5OdM22QbM5CKBraIUmmUJgQHRJ zSXwNDkryGHGuu+DDszy4eDl6j4pLqUylellMPw4jFhjrhmrsjyUN5OuzhFh32uTPCvWko SJ6mvU4Rl86H8nWz+fQbpsKTxEVZVVg8ORK4LLzHx3wvx7F5mnrhyPloceGV2S65z9UleR 1sYs5e3SGRZTbPUPl3sVm5YSxnr6buwS11f9FYHFQe/Z+rgxgkABSsiLkmvIMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HBAJpJtQdj/3JL1d+0udjDhoqrDB49XCk4+Z4PRUOk4=; b=wAvCJfMxIdqGUrONQb2YD6Do9STpj3aeMjKmdTlWSM9oMAnLQTPWVqfaZil5gRr/jbXKba tRLL53kuJTkKiYGqH+q5WvnNtvUKxUL8tyOQyk02IGyDwp6YIAWVIBRJf8swQuhQBP0heA TH1HFnGngwkNtyVg43wMlt4Bz8Kokw6Y6Y7UEIfJYc3IPNrlo+Md8F0N3l6Y45K87H5vuZ e+Yu0qJv7MuO5FWzV2g21UcOeyypIcNRZVs5rBAgfkjJNg9blCSyf1QzyTFTYx8ZvRHTXj efln2NdDfpqSLGfQZ7td2nRUM78gpNFTuUD/oYM2cMGen3L6jGplOVODp1v5aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676479386; a=rsa-sha256; cv=none; b=LljpowZ074m8PgFC+qmE74U4Rmqzhe8zTswKkpUCxncGxmwHPw+6CcL2l371tp5Ir81bqP 9vfiEUCf0rSuTXIByUV0qZ1CXRubVOn7K/xo/MmsmsanRG02Bl5SiYryecc/BDmwQa0bhB j6XuL1YIZxNr9I2XN2IOy/cCdqqi6NEqfaSXoNg21F1Ni4kQNu7cpbMd6Zwxw66r6H3sWr v5p3lnFR+kIRyT8EAb4nlrmb57hsIOKqUb5fr+sYo0WkDXsj8pf5ug4z3qjIqqBqwdfoxi CH4rlDbqoc7DHDZACjP5osaZX3AbD1TZOt1w2y5ykHgSEzl/D9wqntUkrC/Jmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3mB404pzWr5; Wed, 15 Feb 2023 16:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGh6po002132; Wed, 15 Feb 2023 16:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGh6cW002131; Wed, 15 Feb 2023 16:43:06 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:43:06 GMT Message-Id: <202302151643.31FGh6cW002131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: ed44d21ee847 - stable/13 - dtrace: Fix RISC-V user stack unwinder List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: ed44d21ee8473f7b73d8160287e2012e2f797bea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ed44d21ee8473f7b73d8160287e2012e2f797bea commit ed44d21ee8473f7b73d8160287e2012e2f797bea Author: Jessica Clarke AuthorDate: 2023-02-06 18:30:57 +0000 Commit: Mitchell Horne CommitDate: 2023-02-15 16:41:39 +0000 dtrace: Fix RISC-V user stack unwinder The unwind logic was copied from AArch64 which follows the peculiar AACPS (where, unlike typical RISC architectures, its frame pointer follows an x86/stack machine-like convention where the frame pointer points at the bottom of the frame record, not the top). Delete the pointless riscv_frame struct and fix this. Reviewed by: mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28054 (cherry picked from commit 38720107324b3903f342bcb0306c72c4e4235053) --- sys/cddl/dev/dtrace/riscv/dtrace_isa.c | 5 ++--- sys/riscv/include/frame.h | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c index bc8426a752df..6d44a0cee9ee 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c @@ -150,9 +150,8 @@ dtrace_getustack_common(uint64_t *pcstack, int pcstack_limit, uintptr_t pc, if (fp == 0) break; - pc = dtrace_fuword64((void *)(fp + - offsetof(struct riscv_frame, f_retaddr))); - fp = dtrace_fuword64((void *)fp); + pc = dtrace_fuword64((void *)(fp - 1 * sizeof(uint64_t))); + fp = dtrace_fuword64((void *)(fp - 2 * sizeof(uint64_t))); if (fp == oldfp) { *flags |= CPU_DTRACE_BADSTACK; diff --git a/sys/riscv/include/frame.h b/sys/riscv/include/frame.h index 3917aebfac76..a822a285996c 100644 --- a/sys/riscv/include/frame.h +++ b/sys/riscv/include/frame.h @@ -59,11 +59,6 @@ struct trapframe { uint64_t tf_scause; }; -struct riscv_frame { - struct riscv_frame *f_frame; - u_long f_retaddr; -}; - /* * Signal frame. Pushed onto user stack before calling sigcode. */ From nobody Wed Feb 15 16:43:07 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3mC6RCNz3qXhx; Wed, 15 Feb 2023 16:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3mC5cBvz3pF0; Wed, 15 Feb 2023 16:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Na1zwhMhCCndu7d25ISZ3Ms8eWvxc2fuC0z65o91sy0=; b=rs1bnMpXQtLNUZaNgepCMi92JdI3gNUCK5eHgiqc9f3wwDZKzNLq6Zigq3a8VtK47mGLv5 yFd+TIPZXno/nzYISPTt5F/4LE95yMcad8Bgjv8quZDy72gxTorK0AybFkthnTMZR/CNa7 AwRIfohPKDubAhRiCsaw8VJOSq6pGP88XOnM3VGn2uQtpVg3/IBdnDhbpsvfsvNrt1+6Ug GI3ewo03w5GgT2nmfulLYOe1QyplCTxb+4pxA1fKc97gQEcJ1WAwl4zluE8H71z1WzVyXT mZFVSwnjeTwL1uvkz3+i+b0Cin1nBaT1bZM8fV7TLHkGjVCCRK3wAwY/LMR/qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676479387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Na1zwhMhCCndu7d25ISZ3Ms8eWvxc2fuC0z65o91sy0=; b=HxZWiGvt1PfI1bld3tv7OrmPx05SmqLchHuUtsqViOL38Z1uHGu5wDcT/vah553JY9scbW /IEklLc3J6Fy89ZjcC5/j6Jp2leE8DDapG9TJLJYUCFQS9IHsVadgxaf+aaG4X6PdfPshZ uFv6StMwEMOa7Iea//ZGSUQiC3J4oOSutnMg4qlssVUWvFv62x2n8+zQzTtPWIheoEtoo7 PL/icHKfFuSgpCdefPferrJv/Bu/3eI6mjR58FzMwXbs1J2d3DC9jSE8xsh1SQwHgeHmeo S7Pd3xHzwNm8dHGCoi19FPUXLlNs/YUdDRIgg4xI1pglwkFcXMDK0RUtavBgmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676479387; a=rsa-sha256; cv=none; b=IIgecVd3UxR0LHIa7YVGDv4XzPsGCGFhUkiqh7U4ByosGYxeoKGuMFH468i688yhPJc/Dz gROJnyHfJnUMTSAPcXJsZL1quWWmrlhBKAYp7zLhzkcJiEjdNsADkDs96wsIeZf4AeVzZZ 14fWQcRLM/mw2pNXXQ/fsg+6c6Qjb2kOoml0D3I6KPz5bAhHY8ajqS17X4LeQWOwWy7WSE CaMi0pInhg+Pzl5L0oWKX7pEHvIyADJBm005GKhmsGXIbwHzj8NT/i1uU57B0ZNMN0K3bO HD2mYJs+dsax9BK+EjuSPGKI0TAVVGvb33Rd4TGMcIQ0ea97mU+0ubLJU48Qpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH3mC4jclzWMg; Wed, 15 Feb 2023 16:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FGh73q002156; Wed, 15 Feb 2023 16:43:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FGh79w002155; Wed, 15 Feb 2023 16:43:07 GMT (envelope-from git) Date: Wed, 15 Feb 2023 16:43:07 GMT Message-Id: <202302151643.31FGh79w002155@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 3b0fb298fec6 - stable/13 - dtrace: implement riscv dtrace_getustackdepth() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3b0fb298fec6f1e82bec178e78be6072f310c28d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3b0fb298fec6f1e82bec178e78be6072f310c28d commit 3b0fb298fec6f1e82bec178e78be6072f310c28d Author: Mitchell Horne AuthorDate: 2023-02-06 18:23:42 +0000 Commit: Mitchell Horne CommitDate: 2023-02-15 16:41:39 +0000 dtrace: implement riscv dtrace_getustackdepth() Pretty trivial following other implementations. The existing dtrace_getustack_common() does most of the work. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38303 (cherry picked from commit c6943b44f7d73176acd2e36e0615e1b2ded02c0a) --- sys/cddl/dev/dtrace/riscv/dtrace_isa.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c index 6d44a0cee9ee..6e6459a8ce74 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c @@ -169,7 +169,7 @@ dtrace_getupcstack(uint64_t *pcstack, int pcstack_limit) { volatile uint16_t *flags; struct trapframe *tf; - uintptr_t pc, sp, fp; + uintptr_t pc, fp; proc_t *p; int n; @@ -195,7 +195,6 @@ dtrace_getupcstack(uint64_t *pcstack, int pcstack_limit) return; pc = tf->tf_sepc; - sp = tf->tf_sp; fp = tf->tf_s[0]; if (DTRACE_CPUFLAG_ISSET(CPU_DTRACE_ENTRY)) { @@ -207,7 +206,6 @@ dtrace_getupcstack(uint64_t *pcstack, int pcstack_limit) * at the current stack pointer address since the call * instruction puts it there right before the branch. */ - *pcstack++ = (uint64_t)pc; pcstack_limit--; if (pcstack_limit <= 0) @@ -231,8 +229,33 @@ zero: int dtrace_getustackdepth(void) { + struct trapframe *tf; + uintptr_t pc, fp; + int n = 0; - printf("IMPLEMENT ME: %s\n", __func__); + if (curproc == NULL || (tf = curthread->td_frame) == NULL) + return (0); + + if (DTRACE_CPUFLAG_ISSET(CPU_DTRACE_FAULT)) + return (-1); + + pc = tf->tf_sepc; + fp = tf->tf_s[0]; + + if (DTRACE_CPUFLAG_ISSET(CPU_DTRACE_ENTRY)) { + /* + * In an entry probe. The frame pointer has not yet been + * pushed (that happens in the function prologue). The + * best approach is to add the current pc as a missing top + * of stack and back the pc up to the caller, which is stored + * at the current stack pointer address since the call + * instruction puts it there right before the branch. + */ + pc = tf->tf_ra; + n++; + } + + n += dtrace_getustack_common(NULL, 0, pc, fp); return (0); } From nobody Wed Feb 15 17:10:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH4NB3VTHz3qZYq; Wed, 15 Feb 2023 17:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH4NB2vFlz3wYF; Wed, 15 Feb 2023 17:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676481050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TddIoGWFCFkAN/XPpcRVUd3IP3k70DkBKL3rFGEx4kM=; b=gkWlxpfbQbtmH+bi7mZRFwioFClgSjrerWy5x8W8Z3RfYtQItMBGOvtqN9a7fMoSGngza2 ubZ1XS3En0/7Fo3hXvxpPJJBmgfNv/LxBBJvkdaf3xt0w9mMl9g9vioz2juvRIqQF9hhkv gk2lezo9ZgVnZkZKZhxRxQEvwPbylx1K+NQBCBMhXnELTCNZaYs2d/uDw0CeM0QvW0AYKL eV647TcoYx+lqjq6bQbpcS6N2YLRsm68apomwJrhkkTrATURfYBr9J2SS5AjhcEbzZcF/0 sPMYS9bOlfbg3s4iS1P8BxEUEo2LC/XwVY2Sh65SRFOqz1OGQhSaqVbXjZTFnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676481050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TddIoGWFCFkAN/XPpcRVUd3IP3k70DkBKL3rFGEx4kM=; b=KCgecWnAcKZPJy6MsDZv1QBERa+qPzVdNosPAa5NcwTCtqsHc2enA19CSTdsy03nQNcTd9 gigwo6FB+hOLzoIvYz1XZR/nYt+P8HgQCSp9FiLrJjxBQZqAoUVEtRy2+j9ugDc37dd3/2 tvcKu74n2r7aCOJR3/hipujpLRetGoj4G4fjHTeSwCdHBoD7lIiQ/myf0uUIO2DSqAo4Ir qPCWFP7G7We8/OfycGQsFNA0mjZFvfE6M97tscyd77EadFdA8jLaLrgzUcj4Q2xscVWSO1 yhU/4T3eVWQoAUR2fWvNkL4/pVsqCxRx06lW+5/XhBDf5kgSiflSMUNXNq89RA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676481050; a=rsa-sha256; cv=none; b=k+/CY53vt581J8Gy15g2fZFP0f4NQ4DojFS/7xn5Kz+ndksAZP+otCSiSl1OegQh6AnVSu 44sNe7o6kxRIEtGs9TtmHbo/2mk37XesVXgBPrwRqA5haJCI0CBn5yC0ZS9yrTZzDHMNwP EaXpaTmUl538n+IpvtTWY60fH6dMi9HOS8gSnNknsxkpTeo0XExzgabjns8JxQaJ0iNsmt kFOvaDe8SsFuGzN00rlDm0xlO0f4uYlD4gY920yLmggm4Ua2QbRZvJPFhFpV+kVnAagCvS APRqbO+1PZbHGq1aKrFZNCpMPvdJ3GRIb0jTa1P6FWi6PVddyeKoW6eke9NrgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH4NB1sCzzXS6; Wed, 15 Feb 2023 17:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FHAoWH044133; Wed, 15 Feb 2023 17:10:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FHAo81044132; Wed, 15 Feb 2023 17:10:50 GMT (envelope-from git) Date: Wed, 15 Feb 2023 17:10:50 GMT Message-Id: <202302151710.31FHAo81044132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: a2b4abce0e30 - stable/13 - loader: always install help files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a2b4abce0e30e014b2c08c0bdc34b368aa9c7a6f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a2b4abce0e30e014b2c08c0bdc34b368aa9c7a6f commit a2b4abce0e30e014b2c08c0bdc34b368aa9c7a6f Author: Mitchell Horne AuthorDate: 2021-02-11 14:29:00 +0000 Commit: Mitchell Horne CommitDate: 2023-02-15 16:44:21 +0000 loader: always install help files Address two issues with current help file logic: The existing condition prevents the common help file from being installed when there are no additional help files defined. This results in no loader.help on EFI platforms, for example. Second, due to the fact that we build and install multiple loader types, each successive install will clobber the previous loader.help. The result is that we could lose type-specific commands, or possibly list them in loaders that do not have such commands. Instead, give each loader type a uniquely named help file. The EFI loader will look for /boot/loader.help.efi, userboot will look for /boot/loader.help.userboot, etc. The interpreter variant has no effect on which help file is loaded. This leaves the old /boot/loader.help unused. Some credit for the final approach goes to Mathieu for their version of the fix in https://reviews.freebsd.org/D22951. PR: 267134 Reported by: Daniel O'Connor Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28591 (cherry picked from commit 8859960436f5727f163a7b3468e08710c5e6d874) --- ObsoleteFiles.inc | 3 +++ stand/common/commands.c | 4 ++-- stand/efi/loader/Makefile | 1 + stand/i386/loader/Makefile | 1 + stand/kboot/Makefile | 2 ++ stand/loader.mk | 15 ++++++++++----- stand/powerpc/ofw/Makefile | 1 + stand/uboot/Makefile | 3 ++- stand/userboot/userboot/Makefile | 2 ++ 9 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index fd0c71b4814a..64214e29e93f 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20230203: loader help files renamed +OLD_FILES+=boot/loader.help + # 20230201: timeout moved from /usr/bin to /bin OLD_FILES+=usr/tests/usr.bin/timeout/Kyuafile OLD_FILES+=usr/tests/usr.bin/timeout/timeout_test diff --git a/stand/common/commands.c b/stand/common/commands.c index d109a2a8dbcf..d195bf723b37 100644 --- a/stand/common/commands.c +++ b/stand/common/commands.c @@ -123,7 +123,6 @@ help_emitsummary(char *topic, char *subtopic, char *desc) return (pager_output("\n")); } - static int command_help(int argc, char *argv[]) { @@ -132,7 +131,8 @@ command_help(int argc, char *argv[]) char *topic, *subtopic, *t, *s, *d; /* page the help text from our load path */ - snprintf(buf, sizeof(buf), "%s/boot/loader.help", getenv("loaddev")); + snprintf(buf, sizeof(buf), "%s/boot/%s", getenv("loaddev"), + HELP_FILENAME); if ((hfd = open(buf, O_RDONLY)) < 0) { printf("Verbose help not available, " "use '?' to list commands\n"); diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index 2aaba4fbb377..4c94f67cf4e0 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -83,6 +83,7 @@ CFLAGS+= -DEFI_SECUREBOOT NEWVERSWHAT= "EFI loader" ${MACHINE} VERSION_FILE= ${.CURDIR}/../loader/version +HELP_FILENAME= loader.help.efi # Always add MI sources .include "${BOOTSRC}/loader.mk" diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index 3195cb00c6be..2d3fcba4383c 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -67,6 +67,7 @@ CFLAGS.main.c+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs .if exists(${.CURDIR}/help.i386) HELP_FILES= ${.CURDIR}/help.i386 .endif +HELP_FILENAME= loader.help.bios # Always add MI sources .include "${BOOTSRC}/loader.mk" diff --git a/stand/kboot/Makefile b/stand/kboot/Makefile index 35d71cb064fc..6a238aad93b0 100644 --- a/stand/kboot/Makefile +++ b/stand/kboot/Makefile @@ -42,6 +42,8 @@ CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs HAVE_ZFS=yes .endif +HELP_FILENAME= loader.help.kboot + .include "${BOOTSRC}/fdt.mk" # Note: Since we're producing a userland binary, we key off of MACHINE_ARCH diff --git a/stand/loader.mk b/stand/loader.mk index 262de84c3107..b3569c1080c9 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -168,12 +168,17 @@ vers.c: ${LDRSRC}/newvers.sh ${VERSION_FILE} CFLAGS+= -DELF_VERBOSE .endif -.if !empty(HELP_FILES) +# Each loader variant defines their own help filename. Optional or +# build-specific commands are included by augmenting HELP_FILES. +.if !defined(HELP_FILENAME) +.error Define HELP_FILENAME before including loader.mk +.endif + HELP_FILES+= ${LDRSRC}/help.common -CLEANFILES+= loader.help -FILES+= loader.help +CFLAGS+= -DHELP_FILENAME=\"${HELP_FILENAME}\" +CLEANFILES+= ${HELP_FILENAME} +FILES+= ${HELP_FILENAME} -loader.help: ${HELP_FILES} +${HELP_FILENAME}: ${HELP_FILES} cat ${HELP_FILES} | awk -f ${LDRSRC}/merge_help.awk > ${.TARGET} -.endif diff --git a/stand/powerpc/ofw/Makefile b/stand/powerpc/ofw/Makefile index 28eb8ee91fad..5912ceae93d5 100644 --- a/stand/powerpc/ofw/Makefile +++ b/stand/powerpc/ofw/Makefile @@ -37,6 +37,7 @@ SRCS+= trampolineLE.S .endif HELP_FILES= ${FDTSRC}/help.fdt +HELP_FILENAME= loader.help.ofw # Always add MI sources .include "${BOOTSRC}/loader.mk" diff --git a/stand/uboot/Makefile b/stand/uboot/Makefile index ed2253cdae6f..5b8275a0131b 100644 --- a/stand/uboot/Makefile +++ b/stand/uboot/Makefile @@ -35,7 +35,8 @@ WARNS?= 1 CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized .endif -HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt +HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt +HELP_FILENAME= loader.help.uboot # Always add MI sources .include "${BOOTSRC}/loader.mk" diff --git a/stand/userboot/userboot/Makefile b/stand/userboot/userboot/Makefile index c5e2e6fe7c7c..43011b9577c9 100644 --- a/stand/userboot/userboot/Makefile +++ b/stand/userboot/userboot/Makefile @@ -54,6 +54,8 @@ CFLAGS+= -DUSERBOOT_ZFS_SUPPORT HAVE_ZFS=yes .endif +HELP_FILENAME= loader.help.userboot + # Always add MI sources .include "${BOOTSRC}/loader.mk" CFLAGS+= -I. From nobody Wed Feb 15 17:15:17 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH4TL1hqxz3qb07; Wed, 15 Feb 2023 17:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH4TL19ZCz3x5y; Wed, 15 Feb 2023 17:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676481318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O69GpGQg/8a0n35/gW0wW8AFcOM7M1j8Rf8X7UuzFi8=; b=ZyIoc514iBhmOWG8ikEvZ+v8j82O613dyOjARrRdQNwHmP9VMA0w1vL2eSsRMbQkQ5VxEJ gREb5Ro3IV6hzuB7emkkhnE1+4OoC52jGml2aEpyYGaHAGpxN7sgsLNW/YFzfsblrwkv3V ae1eXUNbzb1W0zKz7QkvHOFyi354mGoqeGiBy8v2nz6ZYhiIVRfcSdec++Ovg+Iw64bcAW K+TPPN5zh9GjEzNiCjReZzcpYtJYI+kudrBhoOHHPMZBPKzlO4Ay2S/vx2xWxFr5zN6nTM lwSAuELGxrY6O6V2HWpyC36qRJcBD5Ukhx6vVWpSW4HYXqs1HrZApHDBS/xjZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676481318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O69GpGQg/8a0n35/gW0wW8AFcOM7M1j8Rf8X7UuzFi8=; b=rY6Qhex9+VAF/2Dnewv+y4+T5+Nhtg5f05zHXBWEVF6Tdch+K5bBxtFR8OEPXp4gucGh1T yhU0Sj3zuHfRBbqeHNGxON5hWCp/DvtY8aesC/uaSDF/TZjEUS+FHBTF8O1rvjK8AtmRco RQkJchzGuyUgOLAXhXgWya8p8OGojy+cOIWQwcCRzoLq1GenzKhM4wwZPuvUkSiKrx2MC9 8e8fTp6HHyfeWXieySvfZC6X59dq+cquhYqSikWXhoJxvF1HUtc7SC1ugasi2q8a2xY60V r8v3UjyvnMYOZ2YDgkOWs3ryoIPxOtK347ypP4LO1Sf90U6kE20gS04zJ8766w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676481318; a=rsa-sha256; cv=none; b=NRttKbypdPdJHc2K2Ndz6QMdeo6l1sPYoLgqLhlLj5mtwXIteQ36GiagiowIbbbPR1sBtn z4v9D4L8Xu/QZ5vtf8GeEzySwV0KTWidbygEqH9N5UBxM6E5DDIpS+AUhjmWnCnWEXYs6f iND1x3sAWeGzDcoTFT5jVvaJpgwxy/o5yKfUkIdn62POh8MH92f4/sRsvigeAkk5l1JmnL 1S3QugejrSe/8LZq0DjW5TGwl4m5eu3FGA+K4U/cY2RsWSh81tBStRDNBr1/MUfOkcXl2S PXH3j1qcOon4vU5NtzHrFF0Lrfq4OMaLMhCpC6qc1qzcqafXqMmrfg5yFIPRNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH4TL0D78zXSl; Wed, 15 Feb 2023 17:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FHFHSO046493; Wed, 15 Feb 2023 17:15:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FHFHkg046492; Wed, 15 Feb 2023 17:15:17 GMT (envelope-from git) Date: Wed, 15 Feb 2023 17:15:17 GMT Message-Id: <202302151715.31FHFHkg046492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 5f7042c880de - releng/13.2 - netlink: add headers installation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 5f7042c880de53f6464e6d1994e27a7ff440ef9c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=5f7042c880de53f6464e6d1994e27a7ff440ef9c commit 5f7042c880de53f6464e6d1994e27a7ff440ef9c Author: Alexander V. Chernikov AuthorDate: 2022-10-01 16:31:58 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-15 17:14:47 +0000 netlink: add headers installation Approved by: re(cperciva) (cherry picked from commit 11ca01e9aa479559da240ceba17fdcdf2d1e97c3) (cherry picked from commit acaed6b1e2859cb6726e35e8c937b192c16a95c8) --- include/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/Makefile b/include/Makefile index 490b430d94c6..879a7c48f6df 100644 --- a/include/Makefile +++ b/include/Makefile @@ -41,7 +41,7 @@ LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ syslog.h ucontext.h LDIRS= geom net net80211 netgraph netinet netinet6 \ - netipsec netsmb nfs nfsclient nfsserver sys vm + netipsec netlink netsmb nfs nfsclient nfsserver sys vm LSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ @@ -59,6 +59,7 @@ LSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ netinet/cc \ netinet/netdump \ netinet/tcp_stacks \ + netlink/route \ security/mac_biba security/mac_bsdextended security/mac_lomac \ security/mac_mls security/mac_partition \ security/mac_veriexec \ From nobody Wed Feb 15 22:46:21 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHCqL15z4z3rRkj; Wed, 15 Feb 2023 22:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHCqL0cFHz3pJ6; Wed, 15 Feb 2023 22:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676501182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R46JyU3BoqCHaEz5/+9qx7QAbjf0zSdNjkaeyadYzoQ=; b=qQKPWEGBb96Xnvj5l0CRzDZKsjuvino6G02hTbkvlHcJeBHbtQ5FIGoNjHXImI30kBMNia AYnhOenuIDQeZWM/PaALhyWfKq0nMAMFCBtSvNfDHEYNTKWcIwKivSrHdkkIEDVOUvGWL1 rDc/qqh9NfXlIOwpBByuY7rX0PjDC9+TJNc7jH2Sn2w9cpeQLoXQRfmDG3+5uojPEqt2OK v72Mr8vL9WljxVapRq2FOQSwT05/w9XMOE8guxsElpg5fX/s5DHFqCHFtwDhzmXQ5B9GnG wv0SCPJPIbL0TLOSwUiEJindjwKWvALy5BGg0rfcKuDxjouAyCMdQFzganZp3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676501182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R46JyU3BoqCHaEz5/+9qx7QAbjf0zSdNjkaeyadYzoQ=; b=U6bgTIsRlaSp/rtpmZEtbEhwLxdBTImqCkSp4Xs1/TW7Id3XMDqftOV0TA5NnAKzWk1vRu O8A7TGbw0uxeKM6Ftw6SCAHSuzNskcgIUZ92b9KVlisd8G9lUcFvtmB7x6JUnrdXrV7iYT 7ekSGIeCFeHErsbtXO8vJ+4onH4CuSXqm+EWrRFR5532Va6qYsfWpsTtqgm1xcdSnv+ePY 42qhqN7mHe7SdHK/kXTuEfKTFoY7wyp0SQi41u3KNdnTxh/F4+TMBTDuygxvB4TipEbJb0 DrtZyewOCMnqp3Yqcavg7+sWiooephlez2I8swllBXsS4XT/TsmShjfT52/phg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676501182; a=rsa-sha256; cv=none; b=p9AKH2lyfCljnNSddvyJy38xBwmV4LuH/j67UHBfzR2q9mhZu7H2AVg0aNQMmn/D9Kgf/G PKiCk/V0XoR4Avg5UNL22c3q6+kUUiplC2QtOW5Z5NGJkWy7Ct65heKVGuYr8hmFFL6EoY 0QJ8fMu7dfhQtM6ro64c2CUbk3WDHTUnZvcvp21JCNvLdhd7MI3jOzXwykML85twQbtEhn 9PocbccrUXa1yR8hmexIDf487/gO8B0m5Kd+BvJB/TgNSFg1gzFAwdwHTemmBKnj2uNcHU EumczpgGK5SKG04pCSKZxYoS2p8PgRDe24mXRMmL5zsXezmbgmSJXIfV+qcVgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHCqK6fxFzhbY; Wed, 15 Feb 2023 22:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FMkLwM022096; Wed, 15 Feb 2023 22:46:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FMkLV6022095; Wed, 15 Feb 2023 22:46:21 GMT (envelope-from git) Date: Wed, 15 Feb 2023 22:46:21 GMT Message-Id: <202302152246.31FMkLV6022095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 7333d34e5ec9 - stable/13 - irdma: fix LINT-NOIP/NOINET/NOINET6 builds List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7333d34e5ec96db747648ab7b245d814d3140738 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=7333d34e5ec96db747648ab7b245d814d3140738 commit 7333d34e5ec96db747648ab7b245d814d3140738 Author: Mitchell Horne AuthorDate: 2022-05-30 20:47:32 +0000 Commit: Eric Joyner CommitDate: 2023-02-15 22:45:43 +0000 irdma: fix LINT-NOIP/NOINET/NOINET6 builds This module depends on the presence of both INET and INET6 options in order to compile. Reviewed by: erj Fixes: cdcd52d41e24 ("irdma: Add RDMA driver for Intel(R) Ethernet...") Differential Revision: https://reviews.freebsd.org/D35343 (cherry picked from commit acdfbc6cbe0a8a976d446216be84994c8ee8d5c1) --- sys/conf/files | 30 +++++++++++++++--------------- sys/modules/Makefile | 2 ++ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index c15f87d9f830..0c3a553c3dad 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4764,35 +4764,35 @@ ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \ ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" -dev/irdma/icrdma.c optional irdma ice pci ofed \ +dev/irdma/icrdma.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_cm.c optional irdma ice pci ofed \ +dev/irdma/irdma_cm.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_ctrl.c optional irdma ice pci ofed \ +dev/irdma/irdma_ctrl.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_hmc.c optional irdma ice pci ofed \ +dev/irdma/irdma_hmc.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_hw.c optional irdma ice pci ofed \ +dev/irdma/irdma_hw.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/icrdma_hw.c optional irdma ice pci ofed \ +dev/irdma/icrdma_hw.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/fbsd_kcompat.c optional irdma ice pci ofed \ +dev/irdma/fbsd_kcompat.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_kcompat.c optional irdma ice pci ofed \ +dev/irdma/irdma_kcompat.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_pble.c optional irdma ice pci ofed \ +dev/irdma/irdma_pble.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_puda.c optional irdma ice pci ofed \ +dev/irdma/irdma_puda.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_uda.c optional irdma ice pci ofed \ +dev/irdma/irdma_uda.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_uk.c optional irdma ice pci ofed \ +dev/irdma/irdma_uk.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_utils.c optional irdma ice pci ofed \ +dev/irdma/irdma_utils.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_verbs.c optional irdma ice pci ofed \ +dev/irdma/irdma_verbs.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" -dev/irdma/irdma_ws.c optional irdma ice pci ofed \ +dev/irdma/irdma_ws.c optional irdma ice inet inet6 pci ofed \ compile-with "${OFED_C} -I$S/dev/ice/" dev/mthca/mthca_allocator.c optional mthca pci ofed \ diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 975ca2d84e57..3e2cc835dc99 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -621,9 +621,11 @@ _ice= ice _ice_ddp= ice_ddp .endif .if ${MK_OFED} != "no" || defined(ALL_MODULES) +.if ${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no" _irdma= irdma .endif .endif +.endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ ${MACHINE_CPUARCH} == "riscv" From nobody Thu Feb 16 00:32:23 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHG9g4Ncmz3rYbB; Thu, 16 Feb 2023 00:32:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHG9g2gxQz41bh; Thu, 16 Feb 2023 00:32:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676507543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ZWCtExh2V2lSU7RDBZg4q+L0tMM6jFjhSsa3iHYYMk=; b=JYKw/Muxjhu7JsonAsOcWcHGWLZRTJKKWpsWQwNE9nf9niPX9X3U747pudvwHYr0Kln6qs FnSdGyBPgcdWCaw40EMgpSt3oyqGWA9D1/wUSOzd79jAoUSsk/44N1x37xka84KVrrB/Pe J0zMx0v44YnNrk7jeusi2RVzPZvUTkNlX9E+A2Vt/uDyEPkPPAM3hE0/QOPTIxUh10vSd4 SndzQ7oO7F5Ifg6fVzNaouI5lip8Kg0mOsBjSVRx2Kdp2sgR+uJdUdL7U4C3gsNYHKvUvh wMMKCrON4KxCoZTEhaMQEOI0srpNG2QNWG9PnZgq1bSdoIncfGRL8sxhJMXF/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676507543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ZWCtExh2V2lSU7RDBZg4q+L0tMM6jFjhSsa3iHYYMk=; b=DZpdLQvvOOyysmwK+3iqnkL/8kzajerWNMf/cBcNTn/iVevvNUUg56m1oiqZIXebVTIawJ eWXlL0MOWTVOHGQB4V5EBLWsv+vUdXzAZtsGGAhY7fZvG7Y5ffjOgV1xLAfn++PoRJ/t0T 77CASZDfMW1DYm69ljhzLve2rhExt2NfdjuY8rcJ1PpZQVoF5PHZnCnwiF28U5+sHCVpGj K9+JiRpj9s1ZyhgpUEbc12ISc4hqxkLdALpd9Ky2eZZQyTNAFDgLvToBJwF67ZgvOHvKBO iw2370tic9hubg50onK6BANqfMLznq2SFzxG7+a8VRGUPSSP2AP+CaKL+BKBGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676507543; a=rsa-sha256; cv=none; b=gBb6p3bGPfTnbauj5X/Ae6hFr5y9H82azz0tpDbjKMJjylEyj2Ox9aQFJg7eQ+u1RguaP3 b8w8XiJPFNKocH4SDgO3s+XLF+R5uZRU9CpYjy14ZcEbxFSTJmCbYc72RxoZqBACgw3GUb BMdtheoNkojGh3iXxMkziIpEb6D8evkIHZDTXXzUF5tbrEyKJAYoDVidWIAsyYu1D26GxI NbiUlzsknMnQKXH0xJqjMLOoodcfK3pAWkKsWOHVpaHLEWJnAOCVKfEMRV6qiK9GVZusUa Sp5Qy/Ud5N+kyumRBihQZgM5giUsCbIsDLGHo6G83aPOr1iUKKLHZXbEkyQdQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHG9g1lGkzl1N; Thu, 16 Feb 2023 00:32:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G0WNFe084109; Thu, 16 Feb 2023 00:32:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G0WN84084108; Thu, 16 Feb 2023 00:32:23 GMT (envelope-from git) Date: Thu, 16 Feb 2023 00:32:23 GMT Message-Id: <202302160032.31G0WN84084108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: c16a901eac92 - stable/13 - sesutil: plug memory leaks List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c16a901eac92ca5dcb83509c432cabf36220920c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c16a901eac92ca5dcb83509c432cabf36220920c commit c16a901eac92ca5dcb83509c432cabf36220920c Author: Alan Somers AuthorDate: 2022-01-19 21:57:27 +0000 Commit: Alan Somers CommitDate: 2023-02-16 00:32:00 +0000 sesutil: plug memory leaks Sponsored by: Axcient Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D33955 (cherry picked from commit 09f29b03ddf857a366f338145693b5449e6ca5de) --- usr.sbin/sesutil/sesutil.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/sesutil/sesutil.c b/usr.sbin/sesutil/sesutil.c index 33303235a33c..fe74a8d8ce90 100644 --- a/usr.sbin/sesutil/sesutil.c +++ b/usr.sbin/sesutil/sesutil.c @@ -525,6 +525,7 @@ objmap(int argc, char **argv __unused) } print_extra_status(e_ptr[j].elm_type, e_status.cstat, PRINT_STYLE_DASHED); xo_close_instance("elements"); + free(e_desc.elm_desc_str); free(e_devname.elm_devnames); } xo_close_list("elements"); @@ -617,7 +618,7 @@ static void show_device(int fd, int elm_idx, encioc_elm_status_t e_status, encioc_elm_desc_t e_desc) { encioc_elm_devnames_t e_devname; - char *model, *serial; + char *model = NULL, *serial = NULL; off_t size; /* Get the device name(s) of the element */ @@ -634,8 +635,6 @@ show_device(int fd, int elm_idx, encioc_elm_status_t e_status, encioc_elm_desc_t (caddr_t) &e_devname) < 0) { /* We don't care if this fails */ e_devname.elm_devnames[0] = '\0'; - model = NULL; - serial = NULL; size = -1; } else { skip_pass_devices(e_devname.elm_devnames, 128); @@ -660,6 +659,8 @@ show_device(int fd, int elm_idx, encioc_elm_status_t e_status, encioc_elm_desc_t print_extra_status(ELMTYP_ARRAY_DEV, e_status.cstat, PRINT_STYLE_CSV); xo_emit("\n"); xo_close_instance("elements"); + free(serial); + free(model); free(e_devname.elm_devnames); } @@ -852,6 +853,7 @@ show(int argc, char **argv __unused) */ break; } + free(e_desc.elm_desc_str); } if (prev_type != (elm_type_t)-1 && prev_type != ELMTYP_DEVICE && prev_type != ELMTYP_ARRAY_DEV) From nobody Thu Feb 16 00:40:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHGM22zW3z3rYvJ; Thu, 16 Feb 2023 00:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHGM22Mvwz42wt; Thu, 16 Feb 2023 00:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/nZfFzgKHYYoYW8mNXw9BUjRPZG7QMVK4upnJrUdGQQ=; b=ambowTmrlT3Io+qR18XQXL0uSoipO5T9NgWjnxXa0r2YV8q5zhGWmi9A23HT8HiSICceNS +BKwf/ZFQZPxOVmuzJJrZjZXemmesGF1UUSZflqY8A7k1FxKcGJkhxF/oVeTx420Mhz9GO EckFBMaBepENxA+xkl4IrzoS5H15kOH89nzGmIHg75JXRCKiBCa6qwEnz7zWXgN8oxkKtw 1phzj/+xoQhV79lKKUB30tXYZmudPyS27kttQ6lRvDq2O+qv6kfS/8ii6hyjQPYHD7KSLj wfhLdouww3ON2Fa446N94ShbsPD9IGww+STpldH1Lhea7U4K0TnO2B9uH7jjOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/nZfFzgKHYYoYW8mNXw9BUjRPZG7QMVK4upnJrUdGQQ=; b=J5l/EBAPQxm0hrLirW++5YiLwIGLfdDq2SpjLtOazYDXl+CSjBxBSpNgd4fjFahyRysXjC DLiFdAAM1L5UnS2SHqX3gac1pgpDh/DCVQ2fwrJgZrHgnGjHZoqDZ0v7A/wW5jxX2U44+9 GVuJIZLcf4LcTPZwjls+wVcnnZUJr0qTZgQslojwWFAuY59DieEDkzfpq7+fpr/Ay3CDHB zYxOWo2Tst4r5IxVWz7SVCRfJO6qwrSZ8jy2gBnr2uwj+2tMC93WYZzSVwc7VlYqnBX2bn ZFgE6emx2FoOe6s0AJ6IKnI6zCvlx0gIly+d7hKsaSEEux9KeDeV0XKGYdjPiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676508030; a=rsa-sha256; cv=none; b=dDouc6Sgp6tpzaNdrYN3IdRkQWm7ds6xafmW7+C7a0eb5PJ1LBGcehIOGibMCA2mMk0cX0 eQjwNQ0OFOSmOyP47ZZj8hKQLnKzkT1CRV3H3qmGdy+KKOTbwuR2xsRu2uHyoeff/5eZEu noDXKim2WbdyS3e1qa7tHAZt9MrYIgQghL5qEaYsIB/dbaqxKvzjFf/oEKQGTYKAJhq7FM CadAueOM5e1K8kgL+kUyJuBVuW6CJm/PhIGR+DydrZjYnJgafsloouHdJX4jXduX/vOAWy qjs4lyM2PV1v5IdP4llFf76482KFH3c+7v5BlIN1zcKV0Y/MRN0itNRVOJEPdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHGM21PXXzl1X; Thu, 16 Feb 2023 00:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G0eUxL093997; Thu, 16 Feb 2023 00:40:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G0eUe3093996; Thu, 16 Feb 2023 00:40:30 GMT (envelope-from git) Date: Thu, 16 Feb 2023 00:40:30 GMT Message-Id: <202302160040.31G0eUe3093996@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: 5ec6a37a1eae - stable/13 - amd64: record a dependency of vdso on its linker script List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5ec6a37a1eaecfd959e97b5bd62a503f6885e15d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5ec6a37a1eaecfd959e97b5bd62a503f6885e15d commit 5ec6a37a1eaecfd959e97b5bd62a503f6885e15d Author: Konstantin Belousov AuthorDate: 2023-02-05 21:40:31 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-16 00:40:12 +0000 amd64: record a dependency of vdso on its linker script (cherry picked from commit 5bb807fed4622b17f2b2aa837f5ebd124e08f904) --- sys/conf/files.amd64 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index d8f7a1837f6a..07987a92017b 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -13,13 +13,13 @@ include "conf/files.x86" # # elf-vdso.so.o standard \ - dependency "$S/amd64/amd64/sigtramp.S assym.inc $S/tools/amd64_vdso.sh" \ + dependency "$S/amd64/amd64/sigtramp.S assym.inc $S/conf/vdso_amd64.ldscript $S/tools/amd64_vdso.sh" \ compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' DEBUG='${DEBUG}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_vdso.sh" \ no-implicit-rule before-depend \ clean "elf-vdso.so.o elf-vdso.so.1 vdso_offsets.h sigtramp.pico" # elf-vdso32.so.o optional compat_freebsd32 \ - dependency "$S/amd64/ia32/ia32_sigtramp.S ia32_assym.h $S/tools/amd64_ia32_vdso.sh" \ + dependency "$S/amd64/ia32/ia32_sigtramp.S ia32_assym.h $S/conf/vdso_amd64_ia32.ldscript $S/tools/amd64_ia32_vdso.sh" \ compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' DEBUG='${DEBUG}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_ia32_vdso.sh" \ no-implicit-rule before-depend \ clean "elf-vdso32.so.o elf-vdso32.so.1 vdso_ia32_offsets.h ia32_sigtramp.pico" From nobody Thu Feb 16 00:40:31 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHGM34c9bz3rYsM; Thu, 16 Feb 2023 00:40:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHGM33GFFz432W; Thu, 16 Feb 2023 00:40:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XJtVUp9G/vZIbXoh69s1iy2bt9IliZtZ+Tz+OmrshZM=; b=LBP2i67UKkQfpVNgFz01qKphZDJSLf0/tDjyRpkd0mVivA1cMSaIuv9irwGkF2KepJVY9L fud4uTD9kQA3k+2v6HfLsu91z0rfckOWyvSgv5s/vqsmo+zJm8QUv5tO9lBfz2JZ0XxBtv cDuTnKhS1+fpwrakM2iSwICf3qiQaRuVo51WosezlK+rXylr/9GaxayHqjIHtnFxG22zOd Gmlb3OKgBIG5BCF86VJPW2nY0VfG3DFYOxzjTpOau/N7aWFR8gIwhDYt0ifoMzcBClj9Oa KrUBFYg+hczVFbwtWvfTgwCEK04NPuBwCTEn+0yb5q4zMO7ErNLZVW0OxHPkfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XJtVUp9G/vZIbXoh69s1iy2bt9IliZtZ+Tz+OmrshZM=; b=EZcNY7UD/CWPk49gFEyQBN+36LBYV8XaoTZldMuOBjFrh4dzn32YYuF4CCMMIj0DFfiuum 0w274Zsit9eTgnCqX6zrCq+6m3Pl6GD6qgWStd9bwTKfjZjJ3PmUe0np8ShyWMexNCgC/E HDimtpo3ddrKMx7EbwUgGqWIje4YMY6qdXj/RGtbdtsvL8SoysxwutG1tkXe5AGccpHcRi wiV+Z0HED7THsV9S4F5Xul338yF8XObssk9TPnFFIVn9Wcnet+ZQ1Do9b3fzsNdEqMp3pL qydoSXhPMsC3pXFHNb72NIEyxswDQeSBEwyVjQcP3z6rFNOIfrYomTxiSuabDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676508031; a=rsa-sha256; cv=none; b=B3KQwxVfyLV88M1/ocZMnp9TqgWd1lIx1pZ4/UCaeWxP3VR4iPhL3bGZrRbIfnMX5ieR3h tWkYKHzhiJkMUGSYB9e7R3vWkR0dihv1KcH7mimrMJytMwk+c8TXmgLfhXgrYeYZFXYKwn yrRyq1kW91xYg7hYyRsKat1/xKNMI14aBKv8YR6NNgu3dRwhEo1FrSX+ocAGvi2OgFiydw ZSUFf9IeMN8plDI12YEuNZXPOTKiUdm0RUybHd6tsRomQeCWMbPEFpzNT6EWOCQPphY4iB IDZJ1/VO5mKr5Vh3Xnq94Hk1h5peih20fgw52k1QAD5BzDafo0Y7aUiGSIlp5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHGM32KYMzl1Y; Thu, 16 Feb 2023 00:40:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G0eVa5094026; Thu, 16 Feb 2023 00:40:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G0eV6Z094025; Thu, 16 Feb 2023 00:40:31 GMT (envelope-from git) Date: Thu, 16 Feb 2023 00:40:31 GMT Message-Id: <202302160040.31G0eV6Z094025@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: b2accc5e0662 - stable/13 - amd64 ia32 vdso: always define some __vdso_ symbols List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b2accc5e0662b0818623666a3a7f51d05a4c4bdb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b2accc5e0662b0818623666a3a7f51d05a4c4bdb commit b2accc5e0662b0818623666a3a7f51d05a4c4bdb Author: Konstantin Belousov AuthorDate: 2023-02-05 21:41:25 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-16 00:40:12 +0000 amd64 ia32 vdso: always define some __vdso_ symbols (cherry picked from commit ee844871206562c6aaaa14ee4576cb20895adb00) --- sys/amd64/ia32/ia32_sigtramp.S | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/amd64/ia32/ia32_sigtramp.S b/sys/amd64/ia32/ia32_sigtramp.S index f7f3fd129cc7..7d873127e848 100644 --- a/sys/amd64/ia32/ia32_sigtramp.S +++ b/sys/amd64/ia32/ia32_sigtramp.S @@ -84,10 +84,10 @@ __vdso_ia32_sigcode: jmp 1b .cfi_endproc -#ifdef COMPAT_FREEBSD4 ALIGN_TEXT .globl __vdso_freebsd4_ia32_sigcode __vdso_freebsd4_ia32_sigcode: +#ifdef COMPAT_FREEBSD4 calll *IA32_SIGF_HANDLER(%esp) leal IA32_SIGF_UC4(%esp),%eax/* get ucontext */ pushl %eax @@ -97,12 +97,14 @@ __vdso_freebsd4_ia32_sigcode: /* on stack */ 1: jmp 1b +#else + ud2 #endif -#ifdef COMPAT_43 ALIGN_TEXT .globl __vdso_ia32_osigcode __vdso_ia32_osigcode: +#ifdef COMPAT_43 calll *IA32_SIGF_HANDLER(%esp)/* call signal handler */ leal IA32_SIGF_SC(%esp),%eax /* get sigcontext */ pushl %eax @@ -111,6 +113,9 @@ __vdso_ia32_osigcode: int $0x80 /* enter kernel with args */ 1: jmp 1b +#else + ud2 +#endif /* * Our lcall $7,$0 handler remains in user mode (ring 3), since lcalls @@ -128,7 +133,10 @@ __vdso_ia32_osigcode: ALIGN_TEXT .globl __vdso_lcall_tramp __vdso_lcall_tramp: +#ifdef COMPAT_43 int $0x80 1: jmp 1b +#else + ud2 #endif .p2align 1 From nobody Thu Feb 16 03:34:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHLD74773z3s0wW; Thu, 16 Feb 2023 03:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHLD73VKzz4M2b; Thu, 16 Feb 2023 03:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjswXsSyx8piXsk3BEVLLQn0gyuu05bTfSwR9NyjELk=; b=RYQZnrg32ccdPulahQAWfpr7pgdTsOZMcSq08JJe01+wPIBh3yUW99iP31t0FpDWPk4kfb bZStVnYcMKM2gaJpn6IOVscX2bnY6EiVGpVYqNySlzmzRnrUPKmQc5ZqnUnCrsstCNEYmQ 7q6uwFOZ9u412lhZJY3uMCCHZyyboQB9yrAAWKQXoHzZp6nC4+zV1+clu6uIm0EvEGMlrr 6+CAY0rxYjek6JI4luKMbjuvMh1/u4pIn/P5+VwqDAMQCpMqpa+masFxMcTmPu1KAhrPcg kwB08zd3tiuI4EOt2YGd0Hwla2tcdhb76+2rDSQRvgTvYYwVpFRgPVAgeoPqdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjswXsSyx8piXsk3BEVLLQn0gyuu05bTfSwR9NyjELk=; b=cu2zrWiMYM8RAOXI/qseMk5NnHwgO2nTJaE1Yvg6VKooXKkNEDiNSqVMR40VFgvBPaf58k Xs2TjHkVsVrYVzwxpsu8KY/skIJwk/aRfrAeRPCktpbLz31Ziehy7IIgqXslaFoBb+oKAe GyBXj1chat2pgLmmiLPc11w3SJ8ZXGcn+Dxa/8QVr2t11F05b9ZvlD2VTuQVcXUC1BmLyM lTX7R21RysDhA1PXbt5xgyirRTRHTaTCY3xgrW5N0J1pw/a/Jg894yR7Qup0C4z54k20Vn ncbFWQCAniBIZFA7eKhV4s6YGhNngaCMavtyZaJP2WkowRKu2KR/AAJKRyxrbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676518487; a=rsa-sha256; cv=none; b=lyJOYaib6+vlV3iYxJCrROflWal8eEvC2OvkLSZVZlAH93AIyJVNk/fBCwU3Yqe6jnnfXD y5I4zB9a0ZDnPdvngNZR0JkRb8BbkFNDE2aIFwFGWEXBNqdJPIs6AtK/iG+YM/UcB8Bbs9 6nv5jl9Seeefis0pVP1Kqx4vwQGns3ZKB3ypmaR4W4UQCMhPkI6ZsX3TYM2+d/VD4dFg/d ubiIg808E9a7ukVR+R6VIMo2QgKABQn8byCCK5i7SLbNCQwChjSnuuYW/OsaJdvM8qJt6D Ol9Tza9Ycfpp1j76MNL7TFi2y1reAw7TcFp8PaW2YKE64LRL/AFcPmfckUTWIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHLD72Yfszpxw; Thu, 16 Feb 2023 03:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G3YlHH042922; Thu, 16 Feb 2023 03:34:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G3Ylwl042921; Thu, 16 Feb 2023 03:34:47 GMT (envelope-from git) Date: Thu, 16 Feb 2023 03:34:47 GMT Message-Id: <202302160334.31G3Ylwl042921@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: 0d277acfd12e - stable/13 - wg: add a test for the home jail socket feature List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 0d277acfd12e0f11e90791883ea814bca03dd97f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0d277acfd12e0f11e90791883ea814bca03dd97f commit 0d277acfd12e0f11e90791883ea814bca03dd97f Author: Kyle Evans AuthorDate: 2023-02-13 05:59:20 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 03:29:30 +0000 wg: add a test for the home jail socket feature This adds a test for a semantic that we added to mirror a feature of the Linux implementation w/ netns: if a wg interface is moved into a jail, we still create the socket in the context of the home vnet. With this added, one can actually create vnet jails that only have a wg tunnel to the outside world providing network connectivity without any epairs in the setup. Reviewed by: jhb, markj (both earlier version) (cherry picked from commit 96f4ab26633a457c52fdb9c45f48dcb052b408a4) --- tests/sys/net/if_wg.sh | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/tests/sys/net/if_wg.sh b/tests/sys/net/if_wg.sh index 6946fb72524a..7f5f5daba95d 100644 --- a/tests/sys/net/if_wg.sh +++ b/tests/sys/net/if_wg.sh @@ -189,9 +189,81 @@ wg_key_peerdev_makeshared_cleanup() vnet_cleanup } +# The kernel is expected to create the wg socket in the jail context that the +# wg interface was created in, even if the interface is moved to a different +# vnet. +atf_test_case "wg_vnet_parent_routing" "cleanup" +wg_vnet_parent_routing_head() +{ + atf_set descr 'Create a wg(4) tunnel without epairs and pass traffic between jails' + atf_set require.user root +} + +wg_vnet_parent_routing_body() +{ + local pri1 pri2 pub1 pub2 wg1 wg2 + local tunnel1 tunnel2 + + kldload -n if_wg + + pri1=$(wg genkey) + pri2=$(wg genkey) + + tunnel1=169.254.0.1 + tunnel2=169.254.0.2 + + vnet_init + + wg1=$(ifconfig wg create) + wg2=$(ifconfig wg create) + + vnet_mkjail wgtest1 ${wg1} + vnet_mkjail wgtest2 ${wg2} + + echo "$pri1" | jexec wgtest1 wg set $wg1 listen-port 12345 \ + private-key /dev/stdin + pub1=$(jexec wgtest1 wg show $wg1 public-key) + echo "$pri2" | jexec wgtest2 wg set $wg2 listen-port 12346 \ + private-key /dev/stdin + pub2=$(jexec wgtest2 wg show $wg2 public-key) + + atf_check -s exit:0 -o ignore \ + jexec wgtest1 wg set $wg1 peer "$pub2" \ + endpoint 127.0.0.1:12346 allowed-ips ${tunnel2}/32 + atf_check -s exit:0 \ + jexec wgtest1 ifconfig $wg1 inet ${tunnel1}/24 up + + atf_check -s exit:0 -o ignore \ + jexec wgtest2 wg set $wg2 peer "$pub1" \ + endpoint 127.0.0.1:12345 allowed-ips ${tunnel1}/32 + atf_check -s exit:0 \ + jexec wgtest2 ifconfig $wg2 inet ${tunnel2}/24 up + + # Sanity check ICMP counters; should clearly be nothing on these new + # jails. We'll check them as we go to ensure that the ICMP packets + # generated really are being handled by the jails' vnets. + atf_check -o not-match:"histogram" jexec wgtest1 netstat -s -p icmp + atf_check -o not-match:"histogram" jexec wgtest2 netstat -s -p icmp + + # Generous timeout since the handshake takes some time. + atf_check -s exit:0 -o ignore jexec wgtest1 ping -c 1 -t 5 $tunnel2 + atf_check -o match:"echo reply: 1" jexec wgtest1 netstat -s -p icmp + atf_check -o match:"echo: 1" jexec wgtest2 netstat -s -p icmp + + atf_check -s exit:0 -o ignore jexec wgtest2 ping -c 1 $tunnel1 + atf_check -o match:"echo reply: 1" jexec wgtest2 netstat -s -p icmp + atf_check -o match:"echo: 1" jexec wgtest1 netstat -s -p icmp +} + +wg_vnet_parent_routing_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "wg_basic" atf_add_test_case "wg_key_peerdev_shared" atf_add_test_case "wg_key_peerdev_makeshared" + atf_add_test_case "wg_vnet_parent_routing" } From nobody Thu Feb 16 03:34:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHLD85ps8z3s0nk; Thu, 16 Feb 2023 03:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHLD84qzZz4Lr4; Thu, 16 Feb 2023 03:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uO84mx/+9uEh9IVk2vazjyxvkYO1tyYWGxTTQvpbCu0=; b=tvP7oBK3ZIpaDP0l6bRCrFc3RSDpBePSHQcxN7W0Vc0zsRwVMk+OwcHxn43Cq3i9e9WTj2 glLiGeK7bg4ezGRbbnCpIj0j80vySA1B6Lf3YBdQdGKKI6i3lUgbUDKeM/sumcIL1jXHQS chxEMz7fLb8mXZ6Ajyhmts+e9cB81kXnv4ZeYOhL1H7XgN3c8Zhprc5UOfG1e4EqJUwvdB tgZbuu/kPvxv8blrzjJoEeF3DwBOkkQpg8roGAF9ZdACX19cwEuj72w8EnKs9vFs6FQX+C 2OF51LGIhhV7pPeWLDP51kIn80a1zXoQfm0A4n8HXDj5m70ZipD5Gzbm/Aau1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uO84mx/+9uEh9IVk2vazjyxvkYO1tyYWGxTTQvpbCu0=; b=bS21cQ2LX4B2nIfI2Pu7poS0cFHvoYcvJzDJ6AZ2PS8du6hNzNXaGw2WmlGqIGS4NotyVx vAt4V4JfMfe3BA3xK+qKl0htoJrM02RGv+2W+OtY54aoc2wdm46YPM0ZQp//TEcC2M06xJ 93PJqZtkhKcXWPBn3maDZRTkWlahQ0ME6HbHTzCluECsvalf30x0eDa83o8lqYsZ2DNRHq cNgyHQnjRrywWACYg8SvqkNjqZg5lHScZORhTVCEox+aFEAj2VdQb29RaY2q8JMlBSbJI7 wDA8i+NjeAE2XsFhQKwxfA5Rfy5w+G1FkhGlAQ5CFOgsOXrvOgN7kVr336AeWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676518488; a=rsa-sha256; cv=none; b=Yw1fx+zekc29rKP1iK8lHgCg9wj9NSuy/ScP303zxA8V2FNrNWmtKVDBKLknNDldsexgr/ zML+7u3LcYZhnRbU830sg/klTIy4eXFNS7+keQjyltn0jKJtV6nPaIk29ERaoJEm8frHUn IwceLBXGwxXyC0cybYFGB7BST4H9N/ejmnJF+gnlEA7UupH2uJuRPahK0BqKWlj8xmKydk VgAwVeWsL7MKnBbs9A9uEUn/zLy2aOBS0yjon08RMbJWwX+aq00DQGxsqxYZP5o6FxdluQ srkHgodnb33BM7KK+w15oks0Jq6LvM4vAy3dB8na0jpJQcL++w8WS+UwEtUlpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHLD83TZ8zq1Y; Thu, 16 Feb 2023 03:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G3Ymph042950; Thu, 16 Feb 2023 03:34:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G3YmEb042949; Thu, 16 Feb 2023 03:34:48 GMT (envelope-from git) Date: Thu, 16 Feb 2023 03:34:48 GMT Message-Id: <202302160334.31G3YmEb042949@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: 1dc1d45055a3 - stable/13 - wg: tests: remove an obsolete workaround List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 1dc1d45055a3e60dbe88dfb10abd9872a2677661 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1dc1d45055a3e60dbe88dfb10abd9872a2677661 commit 1dc1d45055a3e60dbe88dfb10abd9872a2677661 Author: Kyle Evans AuthorDate: 2023-02-13 05:59:21 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 03:29:36 +0000 wg: tests: remove an obsolete workaround PR 254212 was resolved to avoid issues with not having IPv6 addresses present in the jail, so we can safely drop this workaround now... Reviewed by: jhb, markj (cherry picked from commit e63dcbe7a2cb8f6b6932cef48e70f3372f4df737) --- tests/sys/net/if_wg.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/sys/net/if_wg.sh b/tests/sys/net/if_wg.sh index 7f5f5daba95d..ffa08a6a2dd6 100644 --- a/tests/sys/net/if_wg.sh +++ b/tests/sys/net/if_wg.sh @@ -59,10 +59,6 @@ wg_basic_body() vnet_mkjail wgtest1 ${epair}a vnet_mkjail wgtest2 ${epair}b - # Workaround for PR 254212. - jexec wgtest1 ifconfig lo0 up - jexec wgtest2 ifconfig lo0 up - jexec wgtest1 ifconfig ${epair}a ${endpoint1}/24 up jexec wgtest2 ifconfig ${epair}b ${endpoint2}/24 up From nobody Thu Feb 16 03:34:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHLDB15rJz3s0wb; Thu, 16 Feb 2023 03:34:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHLD95MSNz4M82; Thu, 16 Feb 2023 03:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NGbgfurNTbGyTmLE2C+iuHiZ2GMVEnYrTVNEz9owRzc=; b=eDgVVZKECcDSYBEc0fba5f9KN6LBB8CarLNFNgApQsrbaIhlMHFF+KpjF8nswruAoK4FBa wSKxvnk7nuCc2tJtQk1mHF8cMjwb/2HkBS+NdqwWbbgGFsdNkwalfRC6RmbpMvbnmK8kWG G+Ko3YGRzyqi6ZYxO15OmVrxTNl+z9agVzm9nhPai+OAuRVTNGHYCRzdYb0mk7J4qvWG76 eYfPU/zT7S/38E43ERBQwwj4hIpOCV/q1Yb7BwubNbmXmoWN5sSBs6aPMeY7Tln0nBG2zO EEjpt4bDtewDjF24GSUcO5WHxfxm8wG5kpMdB5EJEZRrIr88k8C97KNPmQN6+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NGbgfurNTbGyTmLE2C+iuHiZ2GMVEnYrTVNEz9owRzc=; b=MM3lxlQYgfg5QYE+XUrCrB5fy0/b8NgYzC/gfHxB1Lr/xqKorb6VJpqDsjGXl8NQFguqbb vbWoHnMVOcS1uDLzljsJOlN57E3FC4XXkaCG9rX2XTnq3X9GtaslFCmn17yx/3r/b7vHKY FY97ahmDroeaOxThVbaw0J2Vt+V41KkH1fM0KxN4tCC7jEKvIfOi3NUOLZXZoUk+GrSZdM VzI9OzxCAwDTklM7MQZoR0j2W6ujwicn5nL663mx4vZd1fLWyOV2NQ4hF+Kk5NaR4+pMAa 6fK/DE11NbhHTa1ITXJh6SSAgQHMiiyS7IbB1GjLJB+5X35/Uq+tyfbPlNnDAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676518489; a=rsa-sha256; cv=none; b=luKFU5NCj05q0tpjXOQbCbzBgfE+zvOpvM1sM93YBmV6I36cSb8jZNrjxqWgMVLQXxqyKS PwFThNHgIeow4F/2MuuHLUS3Y3gmiv3vVg4/d9VnYPotM+ftKUFfkty4cuHLxCOFYWrJhQ s5ymsMxKILvsMgfPw2NxPWbwPbxu6OR4q2+tUG9thoax8uZxuGXTojIROuY9i/8WDQcV69 9sBOmUTnnouZ72RB/XJbAILRWKqlsbvEGri8lKug2AA3p8z7rdfDVoXaTxpkMQ3o/V2p13 VOW3da81fRLikI1nfWKd25TfuRD2Z52Th50TBbEc+N36hRzAC2GAhK44Khtszg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHLD94RH7zpWg; Thu, 16 Feb 2023 03:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G3Ynuw042981; Thu, 16 Feb 2023 03:34:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G3YnYn042980; Thu, 16 Feb 2023 03:34:49 GMT (envelope-from git) Date: Thu, 16 Feb 2023 03:34:49 GMT Message-Id: <202302160334.31G3YnYn042980@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: dfdc3b2e6541 - stable/13 - patch: omit filename if the prompt was ignored List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: dfdc3b2e6541c941b51edd5e5ec575411e5be143 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=dfdc3b2e6541c941b51edd5e5ec575411e5be143 commit dfdc3b2e6541c941b51edd5e5ec575411e5be143 Author: Kyle Evans AuthorDate: 2023-01-24 16:46:01 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 03:29:40 +0000 patch: omit filename if the prompt was ignored When a file is missing, patch(1) will prompt for a filename to try and patch it. If we're doing a dry-run, we'll output that the patch to the source file was either ignored/failed. If you ignore the prompt in a dry-run (i.e. just hit enter), we'll output: X out of X hunks ignored while patching (null) Let's improve the aesthetics a bit and just omit the last part if the prompt was ignored: X out of X hunks ignored Unfortunately we can't really test this without expect(1) because both force and batch mode will use the first best guess, which is wiped out by the "File to patch:" prompt. We could record the initially derived bestguess there and use *that*, but given that this is only possible in an interactive session I think it's fine to just omit the filename rather than adding a fair amount of complexity (which could also break other scenarios I haven't considered yet).. Reviewed by: des Sponsored by: Klara, Inc. (cherry picked from commit 7e688ed493482c5346d969e7667856d8ced8d87a) --- usr.bin/patch/patch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index a23fc82d3d90..48d3bd37fe5b 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -463,9 +463,13 @@ main(int argc, char *argv[]) if (!check_only) say("%d out of %d hunks %s--saving rejects to %s\n", failed, hunk, skip_rest_of_patch ? "ignored" : "failed", rejname); - else + else if (filearg[0] != NULL) say("%d out of %d hunks %s while patching %s\n", failed, hunk, skip_rest_of_patch ? "ignored" : "failed", filearg[0]); + else + /* File prompt ignored, just note # hunks. */ + say("%d out of %d hunks %s\n", + failed, hunk, skip_rest_of_patch ? "ignored" : "failed"); if (!check_only && move_file(TMPREJNAME, rejname) < 0) trejkeep = true; } From nobody Thu Feb 16 03:34:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHLDB6q6Gz3s0X8; Thu, 16 Feb 2023 03:34:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHLDB6C7Bz4Lrm; Thu, 16 Feb 2023 03:34:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDDNa2ywq0WAAXAOLtUugqu6WXr2Z0Aj7T9UBDUB58A=; b=pa+hm2t8Y+BSrVgpk7khoTZFcAul/z0ZYeSrHHoF0sVCY9AxB2awF4GqD0nZHFdDWg456O mFoJGKn+7Sro1xA6qSQfNyxg1lb/eS7LZqH2E0yfzc4MjOYuD9NBULHL0Ng46JvxzIvD/3 +MLI/wg2plE1JafoNIEMDW3ciYK3BlhNCnt0TvkSm/fAIy3IlwA3hI3XY5Y+uP+RhAUrgf 9r/KoHblFjWPn3yPBbPPGi9Ha0i1ugbGFWL9cQnnUYwPqWqPs0SI1FcfU8KtBfWRuIIzWa IQG90ZF7ja62XkSOx/UNf92QlUyYgG7GpGILaAW3f74qZEtoKdO5INFYbyukUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDDNa2ywq0WAAXAOLtUugqu6WXr2Z0Aj7T9UBDUB58A=; b=EKsFPsU5RH1EgMEgWNZzDpKCtkrlkUYQz4bWLBs0afX23ER+mADMUp0XWcG/7/ykFcUfBl AKBbc03KeqQSqIDwJfE5U1SqHfdYlE6kaoZ+B2ydKRQ+zh+Icv6ewwiV28TSpupU5O/VA9 hu1z409wikGmII432wWCkWoljXIMH3K8N59+hB6MYzyngnEFiKc41DXTzNd0R+YHjIcAHY KSde+i7e/phrGRpJJzQjSRYg1kki9dLNq8MJrrrnD1Rkd32F3DQEMucbKIpcDfeMiH82zu YJmCaO4QjhgN0MwkVbYf+9NtKvV23/HdXPcfgo6UdK4eGeTuFlT1DIzwi07nKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676518490; a=rsa-sha256; cv=none; b=XqtSEnl40MN+hh05LgDzibDdjCUgwxspJEShCFCfp/cIQD/6MAZtnWYryis57fpIValCz5 xnH6wiboBWlFLhDePJ/937LN8Qhvzl56P32OQltChO6z1LtWIVFpqULJonb5jFQpzNg0Sc YQyqNTZPtJ3b3rnpHcGMCgWTYGBwIZKoQUx0frT8gW9dD9YLv16ZomDRBm1wSKn7NAfOcK bNGl0SMfSFHANd5v26LqOa28XlqWKEA8zQgBqvYIkoBj/rCGkAU7L5PgJE6sDP+42WovsH rFwRjIZykQ3zmclnmBPKwsIaBi9bdlXhhsud6UMynEbFcWF9/UTzEHueL8pEhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHLDB5HnTzq3j; Thu, 16 Feb 2023 03:34:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G3YonW043005; Thu, 16 Feb 2023 03:34:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G3YobK043004; Thu, 16 Feb 2023 03:34:50 GMT (envelope-from git) Date: Thu, 16 Feb 2023 03:34:50 GMT Message-Id: <202302160334.31G3YobK043004@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: 9eb694146a19 - stable/13 - md5: fix *sum -c with missing files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 9eb694146a19bd0ee7439f6cab030a8d5c273977 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9eb694146a19bd0ee7439f6cab030a8d5c273977 commit 9eb694146a19bd0ee7439f6cab030a8d5c273977 Author: Kyle Evans AuthorDate: 2023-02-13 06:32:38 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 03:29:46 +0000 md5: fix *sum -c with missing files If we fail to open one of the files in the file listing, we still need to advance `rec` along with `argv` so that the checksum we're checking against lines up with the file we're hashing. Tests added both for the -c flag, as well as the -b and -t modes of the *sum programs. PR: 267722 Reviewed by: emaste (earlier version) (cherry picked from commit 8d78a0d331ec2c168efe6cb85bbc2da86e9a6124) --- sbin/md5/md5.c | 2 ++ sbin/md5/tests/Makefile | 4 ++- sbin/md5/tests/md5_test.sh | 82 ++++++++++++++++++++++++++++++++++++++++++ sbin/md5/tests/sum_a.in | 1 + sbin/md5/tests/sum_b.in | 1 + sbin/md5/tests/sum_c.in | 1 + sbin/md5/tests/sum_sums.digest | 3 ++ 7 files changed, 93 insertions(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index db4cdd7da1ff..6bc1a780df86 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -368,6 +368,8 @@ main(int argc, char *argv[]) if ((fd = open(*argv, O_RDONLY)) < 0) { warn("%s", *argv); failed++; + if (cflag && gnu_emu) + rec = rec->next; continue; } /* diff --git a/sbin/md5/tests/Makefile b/sbin/md5/tests/Makefile index 93f3913c687d..7429233ebeaf 100644 --- a/sbin/md5/tests/Makefile +++ b/sbin/md5/tests/Makefile @@ -11,7 +11,7 @@ TEST_DIR= ${SRCTOP}/sbin/md5/tests FILESGROUPS+= FILESinputs FILESinputsPACKAGE= ${PACKAGE} FILESinputsDIR= ${TESTSDIR} -FILESinputs!= echo ${TEST_DIR}/*.inp +FILESinputs!= echo ${TEST_DIR}/*.inp ${TEST_DIR}/*.in FILESGROUPS+= FILESchkfiles FILESchkfilesPACKAGE= ${PACKAGE} @@ -28,6 +28,8 @@ FILESparamPACKAGE= ${PACKAGE} FILESparamDIR= ${TESTSDIR} FILESparam!= echo ${TEST_DIR}/*.txt +ATF_TESTS_SH+= md5_test + PLAIN_TESTS_SH+= self-test PLAIN_TESTS_SH+= bsd-c-test PLAIN_TESTS_SH+= bsd-p-test diff --git a/sbin/md5/tests/md5_test.sh b/sbin/md5/tests/md5_test.sh new file mode 100644 index 000000000000..1aeb91321c74 --- /dev/null +++ b/sbin/md5/tests/md5_test.sh @@ -0,0 +1,82 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2022 Kyle Evans +# +# 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_test_case sum_bflag +sum_bflag_body() +{ + cp $(atf_get_srcdir)/sum_a.in a + cp $(atf_get_srcdir)/sum_a.in b + + (sha256 -q a | tr -d '\n'; echo " *a") > expected + (sha256 -q b | tr -d '\n'; echo " *b") >> expected + + atf_check -o file:expected sha256sum -b a b +} + +atf_test_case sum_cflag +sum_cflag_body() +{ + + # Verify that the *sum -c mode works even if some files are missing. + # PR 267722 identified that we would never advance past the first record + # to check against. As a result, things like checking the published + # checksums for the install media became a more manual process again if + # you didn't download all of the images. + for combo in "a b c" "b c" "a c" "a b" "a" "b" "c" ""; do + rm -f a b c + :> out + cnt=0 + for f in ${combo}; do + cp $(atf_get_srcdir)/sum_${f}.in ${f} + printf "${f}: OK\n" >> out + cnt=$((cnt + 1)) + done + + err=0 + [ "$cnt" -eq 3 ] || err=1 + atf_check -o file:out -e ignore -s exit:${err} \ + sha256sum -c $(atf_get_srcdir)/sum_sums.digest + done + +} + +atf_test_case sum_tflag +sum_tflag_body() +{ + cp $(atf_get_srcdir)/sum_a.in a + + # -t is a nop, not a time trial, when used with the *sum versions + (sha256 -q a | tr -d '\n'; echo " a") > expected + atf_check -o file:expected sha256sum -t a +} + +atf_init_test_cases() +{ + atf_add_test_case sum_bflag + atf_add_test_case sum_cflag + atf_add_test_case sum_tflag +} diff --git a/sbin/md5/tests/sum_a.in b/sbin/md5/tests/sum_a.in new file mode 100644 index 000000000000..257cc5642cb1 --- /dev/null +++ b/sbin/md5/tests/sum_a.in @@ -0,0 +1 @@ +foo diff --git a/sbin/md5/tests/sum_b.in b/sbin/md5/tests/sum_b.in new file mode 100644 index 000000000000..5716ca5987cb --- /dev/null +++ b/sbin/md5/tests/sum_b.in @@ -0,0 +1 @@ +bar diff --git a/sbin/md5/tests/sum_c.in b/sbin/md5/tests/sum_c.in new file mode 100644 index 000000000000..76018072e09c --- /dev/null +++ b/sbin/md5/tests/sum_c.in @@ -0,0 +1 @@ +baz diff --git a/sbin/md5/tests/sum_sums.digest b/sbin/md5/tests/sum_sums.digest new file mode 100644 index 000000000000..613c49dd031d --- /dev/null +++ b/sbin/md5/tests/sum_sums.digest @@ -0,0 +1,3 @@ +SHA256 (a) = b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c +SHA256 (b) = 7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730 +SHA256 (c) = bf07a7fbb825fc0aae7bf4a1177b2b31fcf8a3feeaf7092761e18c859ee52a9c From nobody Thu Feb 16 03:34:51 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHLDD0PnXz3s0Zc; Thu, 16 Feb 2023 03:34:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHLDC74tPz4MC9; Thu, 16 Feb 2023 03:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lP5GbwOUaxzOVTj2hZEOmnnwp+d5twQQ0mGWwc5o5A4=; b=h1r+/7EpvuTELhwrviXhHQMa/nitzeYIiQF3HmcmN2JdeQiCfO/+KAKRDZzyZbGedJ2AFb 9cQ+6ioJhwG9i+ED6QZL3qUmyB2WrPAHAcFTJGyboFpRg7qgEDkTGW7j9wcjrLTx8Y4vun SZp4UMHRjvhZRVet96QNVPmDVeZtwJMrjqwExQPkWaHVpc2ULTnAx79Nn0uEKUufpVqreO LOZNY4V+EXUi9qOtOzpxPlw7pkxn/bi3ds6MARTMGlFUqz67Tc3o+LvUbRa4/w9pYN77IW Klrqa9PSfYeBFhJcDV/SIvP4vUAI0b1i4AQJnTiGz4uHrOrlU2eWulJN/s2EsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lP5GbwOUaxzOVTj2hZEOmnnwp+d5twQQ0mGWwc5o5A4=; b=aPQcdLaUMAqmrk1bO5UCiICxJ6PTvMuuDkZepYSs3lop+D45R+4a5jmd/PvWBmKopcRAsf xwf1YIMBJI4tL3AVqLzPHPx67sSryhL61XWso9SoAEV0Sqq6Hpc143yOkqnJXpuMZeWhES 48pYsGp2zzc17DgLn+Nxq7nNBH1iL9veODb2SKpcy/vEj3IqIah8tbEj0/q8cFm530o82R xmXUIDZ4rqJai4Lvk/5/hqTOZj6137nLVGSjZdwYZBJ7Yt5aBZcrBAVOXPz4M2gYRQ1fr1 4/IvnVJd8us7B34KtkAWIyzr1wQwWMcWese424ycEo2daoRNAJV+TpmFEqxFWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676518492; a=rsa-sha256; cv=none; b=Qq05io/L8DdH1sGqff+gF/aKpfRo+SSkvZ/rNGin7pTy8pu/bG0SMuEtxy20UJ4tnomNbK htdGqfJH77ft9iabcjzCFX+iuR53MYf8n4aUMaPhfUhC0lOxVw5cthu/vsNPwL8oqlCiuC VqDkcouvYZ0QPi05leueHGc6P3d0hVAygK2ed7vD9BkXFy4rCJbqPiwZ9QbsVhghoHWruT 1xLKCieV9sZUBcSmhcM/5JZ7VBQTRAVtzNi0b4ve5dQgqj5ZnyPh8/ZPmQO2IX2TNO5f3V cSow2wuHoWtThvLNRWWXoe1zjMAp0NjHdFcvsRXLrFC+CmiaHU7kEyDL2ipG9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHLDC63hjzq3k; Thu, 16 Feb 2023 03:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G3YpCW043029; Thu, 16 Feb 2023 03:34:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G3YpJv043028; Thu, 16 Feb 2023 03:34:51 GMT (envelope-from git) Date: Thu, 16 Feb 2023 03:34:51 GMT Message-Id: <202302160334.31G3YpJv043028@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: 786639d1950f - stable/13 - libc: popen: slightly simplify cloexec logic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 786639d1950f369faf04fb6617d6ea85dae131a4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=786639d1950f369faf04fb6617d6ea85dae131a4 commit 786639d1950f369faf04fb6617d6ea85dae131a4 Author: Kyle Evans AuthorDate: 2023-02-13 06:33:52 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 03:29:51 +0000 libc: popen: slightly simplify cloexec logic No need to check the mode again here; we know that `iop` wraps the correct fd. Reviewed by: bapt (cherry picked from commit f123c6c425d4161b06f237996662496abbd78b94) --- lib/libc/gen/popen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c index 4f94405c2ff4..c5373077f3ae 100644 --- a/lib/libc/gen/popen.c +++ b/lib/libc/gen/popen.c @@ -181,7 +181,7 @@ popen(const char *command, const char *type) * the list which will cause an explicit close. */ if (!cloexec) - (void)_fcntl(*type == 'r' ? pdes[0] : pdes[1], F_SETFD, 0); + (void)_fcntl(fileno(iop), F_SETFD, 0); return (iop); } From nobody Thu Feb 16 03:34:52 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHLDF1Tcmz3s0XG; Thu, 16 Feb 2023 03:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHLDF139gz4MVw; Thu, 16 Feb 2023 03:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2waxgtH8ieNf4+au429hF59VGYzrBxex/S6z5Cd2SGs=; b=UnzK4UZfUWBEBRZQFWRCtpv55rxbdJy7rMmhD4eY+bVmUDbXdTP8q/3c0tatOHMwZlYC+B PYComVf/ci90Q0qCoW1fwAML0VsPPACSnFqupkxsV0lFOATJW1w09yfLWTZ+LvYTUESm3A S6Pf/n/0EbHt68jTxMCLRlrIgUK5w9WOj48Ui0/nz1atatdjlb7men25ptxJyCVkkUFaoM 4FyP+FaRTdQwsov9qKoi8cxhgaJNfZK+uWcMtfgT3wMylRmu2MxLT4B+m2mx/1fyN7KVFG dz/2T97x45iye7f37KUvFOpTgF5GGUmNrF1UDrQfE1JTrzn24F/9E05Etx+6HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676518493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2waxgtH8ieNf4+au429hF59VGYzrBxex/S6z5Cd2SGs=; b=Gljof/BvXsE7dHwGKV+2O/ROhHAi+y+pqqav3ciWLuUPPSHQ9RVC3OL81ZncLc7Qv8n+5V hLDOKIso+LBXHjlLV9P9qEiK7kV++CfQ5K2bGj5q7ub0L84FMn9xN2HN7vz4ZUZqX1yFZT BIRMoWKeL+GFhM82nAXuwGv6n6wYjMBPd9NChDT3XZgEvOrlRT10CRyFULnQf7jODdZZXk alWfD13rU/cT3IruJ9/mAD5CopiqM68V4CpnBwb/IUcLhuJsA9FDgDrmJeZYzMJieefNdx yXie6MbuZizZBDCI8ep5UIGQRpp7lsidHrhJXTvmGf2tdo2CAyUF+EkPh3x8Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676518493; a=rsa-sha256; cv=none; b=dp8QA6mYG31UveyI7Lhdyp96w/bUtSkxQyOYuKjbDQEzrcE99yCAQQojfnlVTCPf/i9MUg yExbQDptUAV0WBamZK9vBZ3sFMSq1K3ioZZLoG3GpwR0Agv9autIOYHsd7iFjFR07jhPmE EnVKE8jK0q+qUYZRD2aG9cPYvZM/wJULe+szskPmCOd3cJ2Sze4i0ODSSuZRXgiYBeQccR dPLyDhrKTXAk4XOgPZ+X92n5NYcqsaIwf2jJsRmxJ2mJpZQr16lRYyaTv3iPKJyGUNmlGw zTD4+2nQrZBDDxYKtlt4rsbV1rOU0Hq+5AzfIIS2ATt09yB/iW31edjA0X6EpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHLDF07GpzpbB; Thu, 16 Feb 2023 03:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G3Yqcm043053; Thu, 16 Feb 2023 03:34:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G3Yq15043052; Thu, 16 Feb 2023 03:34:52 GMT (envelope-from git) Date: Thu, 16 Feb 2023 03:34:52 GMT Message-Id: <202302160334.31G3Yq15043052@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: cfd3bd04c245 - stable/13 - top: fix sorting by pid (-o pid) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: cfd3bd04c245889d339c4f7cb1e45c955537e3eb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cfd3bd04c245889d339c4f7cb1e45c955537e3eb commit cfd3bd04c245889d339c4f7cb1e45c955537e3eb Author: Kyle Evans AuthorDate: 2023-02-13 06:39:04 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 03:29:54 +0000 top: fix sorting by pid (-o pid) The 'pid' order was added, but the equivalent comparator was not back in 8b800d3af2d8c ("Add the PID column to the list of sort keys."). `ordernames` indices need to match `compares` indices in order for this to work. A future commit will restructure all of this to make it less error prone going forward (see D37083). Reviewed by: pstef (D37083) (cherry picked from commit deb63adf945d446ed91a9d84124c71f15ae571d1) --- usr.bin/top/machine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 315c8be1a4c2..be667ec0e461 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1567,6 +1567,7 @@ int (*compares[])(const void *arg1, const void *arg2) = { compare_ivcsw, compare_jid, compare_swap, + compare_pid, NULL }; From nobody Thu Feb 16 04:53:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHMzM2GdWz3s4bp; Thu, 16 Feb 2023 04:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHMzM1dY3z4TCD; Thu, 16 Feb 2023 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=1676523231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8gnO7+C9q8tROUgAGaRKndvA4Grc3MlhER+uAqj6XPE=; b=drlt6/gdj7lARSsSKwJoXSznePk4rbKxBp4fY3VqyYGhe1e9JmyxBpPa3JE8w/GjHLozmx 3p4FDYeMzDdgIRPSU+JMKDbzrx1sQtG0ymB2tflTZqTPfZugHhaf6uPb89LLb2B8NBwVvi ir1ea7F0ZIYYJJD/RhTqtTEymZZ73MhXiPCdc7xGHcdX7arwUnAb08fVZE0u7uhBi83ych dibJXLOqDy1Y3nlTtug5Ck/7pZad+XqTLLX+1mKsoSkk6fTZIiDWrQwCaH2SNAz4BIDf5Q Y3pvURN5fXwm3nuSlKOEh6noiwwCfaW4VzOnBVbPJjJEDFebIU+X9RchraUp/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676523231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8gnO7+C9q8tROUgAGaRKndvA4Grc3MlhER+uAqj6XPE=; b=vWyx7X5O1LAcMnJu79yX6VPLRW/BWVb87Eoh2IJ3heTWAMLcx44BFUe9+OTRgJd5VX6VSn tmpPD4snf9q9+N5tH6bo4fn6IgCIgc7Fc9Y7cLUGkatEmxyn3HqEAHFNsU4qADMmpchL+t UCDDnle418HQ6aEYbGFIE+OJIPQTFHgh1H1TcCq9e2QoMwoFczxL4bEoN7JwvVqOgzX+/E tg2NNODXQCgzwckmnUOOoIRJhXmZBPvkBXi9gcwTB9xsEetTrYysIHBPzkJ3M2/CH24aon Nu/FYxT5i0NS7VgjE/yGygnMw9+t9YlMnRiQqRQnKriVzyw11A6lRJ/u55TCbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676523231; a=rsa-sha256; cv=none; b=Nd+RrWFnv8khYWeFIGN13/us2TONjI/fZxGvALYWlMEg6bwm55E7pb/f3nPq8Bn2YbMTiY mf6TWpr4OGkVmJIPBkKjUU0JJws+EBSIQQ0rTFpUZFI/wNZS5gCBTuktgO9N8Kxi3+Y8Yn HkZonJH2+kP+svQbmv3VjGarEVl4BgelVwTX4Z//e03nbsTlSq57e+bOgsFSb1fP+Epenk lllxfA3cvxtcTt96vEFJ3ptWVzWZeWN2dNcr/v6/8EZ3kyOMmfMHttWHn4qz5VPQEyu75q k/ZrcGAZhXCviWZHmphjHVJvQFelYie0VS427JIZrecN37FrowGhlmlnvi/FBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHMzM0gGBzrbM; Thu, 16 Feb 2023 04:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G4rpA7057140; Thu, 16 Feb 2023 04:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G4ro2N057139; Thu, 16 Feb 2023 04:53:50 GMT (envelope-from git) Date: Thu, 16 Feb 2023 04:53:50 GMT Message-Id: <202302160453.31G4ro2N057139@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: 5ad8ebc3a3a5 - releng/13.2 - md5: fix *sum -c with missing files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 5ad8ebc3a3a51b6726364788e42f49d36b4048d3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5ad8ebc3a3a51b6726364788e42f49d36b4048d3 commit 5ad8ebc3a3a51b6726364788e42f49d36b4048d3 Author: Kyle Evans AuthorDate: 2023-02-13 06:32:38 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 04:53:39 +0000 md5: fix *sum -c with missing files If we fail to open one of the files in the file listing, we still need to advance `rec` along with `argv` so that the checksum we're checking against lines up with the file we're hashing. Tests added both for the -c flag, as well as the -b and -t modes of the *sum programs. PR: 267722 Reviewed by: emaste (earlier version) Approved by: re (cperciva) (cherry picked from commit 8d78a0d331ec2c168efe6cb85bbc2da86e9a6124) (cherry picked from commit 9eb694146a19bd0ee7439f6cab030a8d5c273977) --- sbin/md5/md5.c | 2 ++ sbin/md5/tests/Makefile | 4 ++- sbin/md5/tests/md5_test.sh | 82 ++++++++++++++++++++++++++++++++++++++++++ sbin/md5/tests/sum_a.in | 1 + sbin/md5/tests/sum_b.in | 1 + sbin/md5/tests/sum_c.in | 1 + sbin/md5/tests/sum_sums.digest | 3 ++ 7 files changed, 93 insertions(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index db4cdd7da1ff..6bc1a780df86 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -368,6 +368,8 @@ main(int argc, char *argv[]) if ((fd = open(*argv, O_RDONLY)) < 0) { warn("%s", *argv); failed++; + if (cflag && gnu_emu) + rec = rec->next; continue; } /* diff --git a/sbin/md5/tests/Makefile b/sbin/md5/tests/Makefile index 93f3913c687d..7429233ebeaf 100644 --- a/sbin/md5/tests/Makefile +++ b/sbin/md5/tests/Makefile @@ -11,7 +11,7 @@ TEST_DIR= ${SRCTOP}/sbin/md5/tests FILESGROUPS+= FILESinputs FILESinputsPACKAGE= ${PACKAGE} FILESinputsDIR= ${TESTSDIR} -FILESinputs!= echo ${TEST_DIR}/*.inp +FILESinputs!= echo ${TEST_DIR}/*.inp ${TEST_DIR}/*.in FILESGROUPS+= FILESchkfiles FILESchkfilesPACKAGE= ${PACKAGE} @@ -28,6 +28,8 @@ FILESparamPACKAGE= ${PACKAGE} FILESparamDIR= ${TESTSDIR} FILESparam!= echo ${TEST_DIR}/*.txt +ATF_TESTS_SH+= md5_test + PLAIN_TESTS_SH+= self-test PLAIN_TESTS_SH+= bsd-c-test PLAIN_TESTS_SH+= bsd-p-test diff --git a/sbin/md5/tests/md5_test.sh b/sbin/md5/tests/md5_test.sh new file mode 100644 index 000000000000..1aeb91321c74 --- /dev/null +++ b/sbin/md5/tests/md5_test.sh @@ -0,0 +1,82 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2022 Kyle Evans +# +# 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_test_case sum_bflag +sum_bflag_body() +{ + cp $(atf_get_srcdir)/sum_a.in a + cp $(atf_get_srcdir)/sum_a.in b + + (sha256 -q a | tr -d '\n'; echo " *a") > expected + (sha256 -q b | tr -d '\n'; echo " *b") >> expected + + atf_check -o file:expected sha256sum -b a b +} + +atf_test_case sum_cflag +sum_cflag_body() +{ + + # Verify that the *sum -c mode works even if some files are missing. + # PR 267722 identified that we would never advance past the first record + # to check against. As a result, things like checking the published + # checksums for the install media became a more manual process again if + # you didn't download all of the images. + for combo in "a b c" "b c" "a c" "a b" "a" "b" "c" ""; do + rm -f a b c + :> out + cnt=0 + for f in ${combo}; do + cp $(atf_get_srcdir)/sum_${f}.in ${f} + printf "${f}: OK\n" >> out + cnt=$((cnt + 1)) + done + + err=0 + [ "$cnt" -eq 3 ] || err=1 + atf_check -o file:out -e ignore -s exit:${err} \ + sha256sum -c $(atf_get_srcdir)/sum_sums.digest + done + +} + +atf_test_case sum_tflag +sum_tflag_body() +{ + cp $(atf_get_srcdir)/sum_a.in a + + # -t is a nop, not a time trial, when used with the *sum versions + (sha256 -q a | tr -d '\n'; echo " a") > expected + atf_check -o file:expected sha256sum -t a +} + +atf_init_test_cases() +{ + atf_add_test_case sum_bflag + atf_add_test_case sum_cflag + atf_add_test_case sum_tflag +} diff --git a/sbin/md5/tests/sum_a.in b/sbin/md5/tests/sum_a.in new file mode 100644 index 000000000000..257cc5642cb1 --- /dev/null +++ b/sbin/md5/tests/sum_a.in @@ -0,0 +1 @@ +foo diff --git a/sbin/md5/tests/sum_b.in b/sbin/md5/tests/sum_b.in new file mode 100644 index 000000000000..5716ca5987cb --- /dev/null +++ b/sbin/md5/tests/sum_b.in @@ -0,0 +1 @@ +bar diff --git a/sbin/md5/tests/sum_c.in b/sbin/md5/tests/sum_c.in new file mode 100644 index 000000000000..76018072e09c --- /dev/null +++ b/sbin/md5/tests/sum_c.in @@ -0,0 +1 @@ +baz diff --git a/sbin/md5/tests/sum_sums.digest b/sbin/md5/tests/sum_sums.digest new file mode 100644 index 000000000000..613c49dd031d --- /dev/null +++ b/sbin/md5/tests/sum_sums.digest @@ -0,0 +1,3 @@ +SHA256 (a) = b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c +SHA256 (b) = 7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730 +SHA256 (c) = bf07a7fbb825fc0aae7bf4a1177b2b31fcf8a3feeaf7092761e18c859ee52a9c From nobody Thu Feb 16 04:53:52 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHMzN3PFxz3s4th; Thu, 16 Feb 2023 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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHMzN2jQYz4TCd; Thu, 16 Feb 2023 04:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676523232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NxADzpCZAo3LN4LLYmpLi3GOQnum83ter1aU0PimoEw=; b=aqUtUbPsVIOu91w6cAV6pTR1MyiI5nGNVz2W282nMtq+Z4+l9uzUX+WAjqmeBqXx2/C7aj jyRM+b1zfgMP8kagllVni0T0hAmsjKSVUH5m2Y4v8qnbF/grgt3S8oUjEx3OeNY41bbLDb VQORt+Wk9a8IUDvSmOvRnziNaADgMebjK7aNM2mAXUu83sEXduRGA82B6Z342QLhpPAOb/ jwm+U+Web3CC9r+qSq6yd3vmiJJ4/6kRC9q9kUk0RQjCYYT6ohnuqVyXFp9buoX5EdhIKF g/eqe+HXVxiTDPEZ8dXjOPsCKgWkRG7qn7eoRjnCgiBOGGON/QZHAhjUjy7i7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676523232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NxADzpCZAo3LN4LLYmpLi3GOQnum83ter1aU0PimoEw=; b=c6/B6u1G1N5pceWMUzqpD8w0N1LxZozjowiLfSxR+TXRg0vmwBv8zExiQPr3SIv9sZ2xQ0 Le9YE3w2ZAd1JXMCyq+BMS+2suGjMKhdsr+dwwiKFbTxynk7LeGCgEIAhBlSW20ymAbVUu dX6KV4CUAD7a/sR2Z+5vTVwzyR8IVfel8Iu2GsDW4ZCoR/FWeBir2zAgzwLwO99ia9Z9bY yMeAafsjfd+XEUj5Qv4yBxaqtBJ4YpHJNJSAGs3LpmJ2tHfKmez5SHQYEOEtfC8CDMU9hn m99jYbIAM1a/MKCtb4c/N2WECWngUFkimWgcwFzg+f8ZHlTyQcyKNxzwzXk1Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676523232; a=rsa-sha256; cv=none; b=R6utZSVL51JS1FYbJUS2P85pAnLOKEgpPP+ouYt1LirTo289ajbQ/DXgrjHZLtJ70KCrN7 3bEHBc0n12TU/JNZ4BWeh4v9tFPafGP2QSusuVSyuyzQLGzQBMIGit1Bn2iTBZ5Ln9b0UN M+h50xahZD9SqMP8odN4+N9CxGU8EOQVxVA3f6vpimZ+bgGnp3TBJJ1mMCL2HvgU9mWlXk 3Q00+hEoDfnMUtNSpAhUWyYbfH1py7qp6LL8xShKHoTWLXBArFjCo3Q30uB4mZ+/MXbKsI 06Ra/JHo4++SlfceDRcq86Cojtkt+lJn46e8MDaijkwQQBN7KtIdcSg8Vl1eGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHMzN1dhvzrvW; Thu, 16 Feb 2023 04:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G4rqq1057175; Thu, 16 Feb 2023 04:53:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G4rq09057174; Thu, 16 Feb 2023 04:53:52 GMT (envelope-from git) Date: Thu, 16 Feb 2023 04:53:52 GMT Message-Id: <202302160453.31G4rq09057174@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: b7a3f47bffd2 - releng/13.2 - top: fix sorting by pid (-o pid) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/releng/13.2 X-Git-Reftype: branch X-Git-Commit: b7a3f47bffd2f15d4b0d2cc3a36852bed6960595 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b7a3f47bffd2f15d4b0d2cc3a36852bed6960595 commit b7a3f47bffd2f15d4b0d2cc3a36852bed6960595 Author: Kyle Evans AuthorDate: 2023-02-13 06:39:04 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 04:53:44 +0000 top: fix sorting by pid (-o pid) The 'pid' order was added, but the equivalent comparator was not back in 8b800d3af2d8c ("Add the PID column to the list of sort keys."). `ordernames` indices need to match `compares` indices in order for this to work. A future commit will restructure all of this to make it less error prone going forward (see D37083). Reviewed by: pstef (D37083) Approved by: re (cperciva) (cherry picked from commit deb63adf945d446ed91a9d84124c71f15ae571d1) (cherry picked from commit cfd3bd04c245889d339c4f7cb1e45c955537e3eb) --- usr.bin/top/machine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 315c8be1a4c2..be667ec0e461 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1567,6 +1567,7 @@ int (*compares[])(const void *arg1, const void *arg2) = { compare_ivcsw, compare_jid, compare_swap, + compare_pid, NULL }; From nobody Thu Feb 16 04:58:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHN4Q2dNKz3s4gY; Thu, 16 Feb 2023 04:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHN4Q26Wxz4VNF; Thu, 16 Feb 2023 04:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676523494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WChwlTBdlSl7yi6DHATHmzbvV8auaP4qhqKmiNpDwac=; b=MkcRXTwWIxA+S8egywKbhEIJlvpa6C/RvHAKlpL7JZf3LrEC4nIxuTyGaZr1cjo+itdPVB ZlrRhjQBaGzVZ/sc5/EaU014Sz6fN+NCRKCPp3yIJRCKtlK0Q+vR8RaZ81iRZX7+MpxOxF GPlGHUoe/fwBhrdFFEP3z761fK2lWhj/MBbB019M1xEFFn2gKGX1QLIV8YolBdsQug3Moz 9oQh3vOimQ5nHSRM5W3fygAYe5vo8DxHqSLDNP2gBNq9/EcokoYjFh3AGnCny5DFnwtnz+ OUaRn491wT9RGfjrhs+S81u0MDB29dBFd3tzT9ITs0w5xsMvKoRY3LtMnePDNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676523494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WChwlTBdlSl7yi6DHATHmzbvV8auaP4qhqKmiNpDwac=; b=AHnI2mzLfYUytzjNh1Nf0pyYmPeDpv5egl0JDEFrgoMsqBntipENUHtvUFLBmkLbxVEJoh eWxW1sP2i7pfZUEo9v9q7T6jvYP/6jgULO2DrH308WdlD8zClDTTaDKTMkoDyJfYNXRMNH 9J1iovCvca8VDVKzLLfrNqLoWLT1pxLgip2Bee78NMOcvpgDyQFcnjilQe/vIBbnZCfcBn iwMvvTcHJH/G+B3ootX/JWAPNoamodM9k3IGLGB5vt70EWLHdI8j2klVvf+VJ3P7fi6qz4 HyyTYkzqMcJ7TWVDL3HLWZ7aGBtzrzFYse1UQaqUN6yg8ti3/ndX1bvmu+4bpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676523494; a=rsa-sha256; cv=none; b=stnk1yyp+8oN5Ef9p7mTVBigkK8sxUspfCRI8oQwpAPbm8zgc8AD4uHbQzH32z8ncP5SFt GBZzuCsFQZtcB15y2uXzBBSuttRNm3J3VtXGVSeMHOYASHin2R88OShOUQO3g/i/JRjnOZ tRPXUYCcZqJwvTSezYJj6RMEiEfFIQOcDCJq3l+XC40Y8KwgcvgJSUx8UAvD0K13NBV4Vm XDbmTQ3QU7Usc7zobipG1FInq1xYM1MsVS+AHo6O8og1NY7FBrt+yzkCVABlt67S91mcdn G1hHpWXwWueZQYHLMX8lO1XdEwPsr9SKG7q54ivXmS3csDvEUQbiNztAAK+W/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 4PHN4Q162WzrvZ; Thu, 16 Feb 2023 04:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G4wEdn057815; Thu, 16 Feb 2023 04:58:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G4wEDk057814; Thu, 16 Feb 2023 04:58:14 GMT (envelope-from git) Date: Thu, 16 Feb 2023 04:58:14 GMT Message-Id: <202302160458.31G4wEDk057814@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: a80643d2a94f - stable/12 - md5: fix *sum -c with missing files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: a80643d2a94fc55b7e2567d63d66c0c3cd17a830 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a80643d2a94fc55b7e2567d63d66c0c3cd17a830 commit a80643d2a94fc55b7e2567d63d66c0c3cd17a830 Author: Kyle Evans AuthorDate: 2023-02-13 06:32:38 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 04:57:49 +0000 md5: fix *sum -c with missing files If we fail to open one of the files in the file listing, we still need to advance `rec` along with `argv` so that the checksum we're checking against lines up with the file we're hashing. Tests added both for the -c flag, as well as the -b and -t modes of the *sum programs. PR: 267722 Reviewed by: emaste (earlier version) (cherry picked from commit 8d78a0d331ec2c168efe6cb85bbc2da86e9a6124) --- sbin/md5/md5.c | 2 ++ sbin/md5/tests/Makefile | 4 ++- sbin/md5/tests/md5_test.sh | 82 ++++++++++++++++++++++++++++++++++++++++++ sbin/md5/tests/sum_a.in | 1 + sbin/md5/tests/sum_b.in | 1 + sbin/md5/tests/sum_c.in | 1 + sbin/md5/tests/sum_sums.digest | 3 ++ 7 files changed, 93 insertions(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 7235e6e0a39f..cc97a2ac3e7b 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -364,6 +364,8 @@ main(int argc, char *argv[]) if ((fd = open(*argv, O_RDONLY)) < 0) { warn("%s", *argv); failed++; + if (cflag && gnu_emu) + rec = rec->next; continue; } /* diff --git a/sbin/md5/tests/Makefile b/sbin/md5/tests/Makefile index 93f3913c687d..7429233ebeaf 100644 --- a/sbin/md5/tests/Makefile +++ b/sbin/md5/tests/Makefile @@ -11,7 +11,7 @@ TEST_DIR= ${SRCTOP}/sbin/md5/tests FILESGROUPS+= FILESinputs FILESinputsPACKAGE= ${PACKAGE} FILESinputsDIR= ${TESTSDIR} -FILESinputs!= echo ${TEST_DIR}/*.inp +FILESinputs!= echo ${TEST_DIR}/*.inp ${TEST_DIR}/*.in FILESGROUPS+= FILESchkfiles FILESchkfilesPACKAGE= ${PACKAGE} @@ -28,6 +28,8 @@ FILESparamPACKAGE= ${PACKAGE} FILESparamDIR= ${TESTSDIR} FILESparam!= echo ${TEST_DIR}/*.txt +ATF_TESTS_SH+= md5_test + PLAIN_TESTS_SH+= self-test PLAIN_TESTS_SH+= bsd-c-test PLAIN_TESTS_SH+= bsd-p-test diff --git a/sbin/md5/tests/md5_test.sh b/sbin/md5/tests/md5_test.sh new file mode 100644 index 000000000000..1aeb91321c74 --- /dev/null +++ b/sbin/md5/tests/md5_test.sh @@ -0,0 +1,82 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2022 Kyle Evans +# +# 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_test_case sum_bflag +sum_bflag_body() +{ + cp $(atf_get_srcdir)/sum_a.in a + cp $(atf_get_srcdir)/sum_a.in b + + (sha256 -q a | tr -d '\n'; echo " *a") > expected + (sha256 -q b | tr -d '\n'; echo " *b") >> expected + + atf_check -o file:expected sha256sum -b a b +} + +atf_test_case sum_cflag +sum_cflag_body() +{ + + # Verify that the *sum -c mode works even if some files are missing. + # PR 267722 identified that we would never advance past the first record + # to check against. As a result, things like checking the published + # checksums for the install media became a more manual process again if + # you didn't download all of the images. + for combo in "a b c" "b c" "a c" "a b" "a" "b" "c" ""; do + rm -f a b c + :> out + cnt=0 + for f in ${combo}; do + cp $(atf_get_srcdir)/sum_${f}.in ${f} + printf "${f}: OK\n" >> out + cnt=$((cnt + 1)) + done + + err=0 + [ "$cnt" -eq 3 ] || err=1 + atf_check -o file:out -e ignore -s exit:${err} \ + sha256sum -c $(atf_get_srcdir)/sum_sums.digest + done + +} + +atf_test_case sum_tflag +sum_tflag_body() +{ + cp $(atf_get_srcdir)/sum_a.in a + + # -t is a nop, not a time trial, when used with the *sum versions + (sha256 -q a | tr -d '\n'; echo " a") > expected + atf_check -o file:expected sha256sum -t a +} + +atf_init_test_cases() +{ + atf_add_test_case sum_bflag + atf_add_test_case sum_cflag + atf_add_test_case sum_tflag +} diff --git a/sbin/md5/tests/sum_a.in b/sbin/md5/tests/sum_a.in new file mode 100644 index 000000000000..257cc5642cb1 --- /dev/null +++ b/sbin/md5/tests/sum_a.in @@ -0,0 +1 @@ +foo diff --git a/sbin/md5/tests/sum_b.in b/sbin/md5/tests/sum_b.in new file mode 100644 index 000000000000..5716ca5987cb --- /dev/null +++ b/sbin/md5/tests/sum_b.in @@ -0,0 +1 @@ +bar diff --git a/sbin/md5/tests/sum_c.in b/sbin/md5/tests/sum_c.in new file mode 100644 index 000000000000..76018072e09c --- /dev/null +++ b/sbin/md5/tests/sum_c.in @@ -0,0 +1 @@ +baz diff --git a/sbin/md5/tests/sum_sums.digest b/sbin/md5/tests/sum_sums.digest new file mode 100644 index 000000000000..613c49dd031d --- /dev/null +++ b/sbin/md5/tests/sum_sums.digest @@ -0,0 +1,3 @@ +SHA256 (a) = b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c +SHA256 (b) = 7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730 +SHA256 (c) = bf07a7fbb825fc0aae7bf4a1177b2b31fcf8a3feeaf7092761e18c859ee52a9c From nobody Thu Feb 16 04:58:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHN4S08fGz3s4y8; Thu, 16 Feb 2023 04:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHN4R2ySKz4Vf2; Thu, 16 Feb 2023 04:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676523495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5HdHs3vQEl5iU1ddya2IwIOuEvdsY1esqKOcxskbq5I=; b=u8+pPIvTeamnCNyqiZkGykhvP2GwmrTIbnE/k8Wcw6nJnnTc0CEMoQ9QIJXwUvAlFZb92Q f6ewL/M6XqiMWgLvutaTGtND2QohvK8Ebwjr5A2i/s2D+XtzxCusoNcSJ9Wn12oVDWdPG5 skzTzLwaKn65SqCioUbHhC5asaoHGf7czhhlvm/6YWS4CPujFxb0XV0E7HXaai6Fw3XCim D9M5Vj4KUPXcP5+4kL7QPSt9/nOM0yh6wnVbrv/2tdrGcNHo0cij1CnWHKilaRD9Hchx09 //nb6uf1Yi1asRI5g58EhLeAIxWJ5wafsM+6dyLPGb7p/zDHMsl3waE8OhDjQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676523495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5HdHs3vQEl5iU1ddya2IwIOuEvdsY1esqKOcxskbq5I=; b=EkPD8rOdNwo/7qiKP+c7Ou2XJXJIYCgfHaUnIyAmlc50jKUHzLS21sJ14CkkRWTXHJWjTM wSg5FLY+cTyt46WUmWuJ/cJDvCAL5mdS53ry2OmJ4iI+wYb2K4VXRPzM8FokC8qHxrJvQA 1fBqAUMEKJ6ImOkZqcpRP0h7vr+VG2ICiq9lK9lm/aeBOXz4Fhxs2R0yW/M6+fHeYR4Ecj +nXX0w29PpSwlvplQLHB/IDLRkMsT1QLcRizzgm+4Azw6EBFbot5IqDU0/ebEJCf26yBRo oPBp1mizz7TfUmfu6e/uRsg6yE+BfxPtjmVDtHnDqi/iUn0te0v28euoZO3zfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676523495; a=rsa-sha256; cv=none; b=vZQzi8lopJUjyLN3tbqrMYj0pKnplnZQaA++nbW11vMWJOmiqExAAaX9fE/ybHmgimWJk1 3MM3zEGktCjvVYiza0kDTtgoDGFt1gF8QDyX1vVIIzRR3t0r9n6PFwYoC1Zc1pO8L6Yx7B wTuZtdkQUUkfquE94IKFjTr85Cz2CmuKXOfuHDCHzdjwazfhKOJZPqXMZqCI5c3YBmXnkI HvXLUH1Ui2ZcoVZw9J96HwIx9er0IMH6u98inTuLvozA/K8txDb4o8Mgp4goqD+pX8vb24 ghS1DHplga/uY7bP+ciqi2S4qHzPZVJV5VFJ7cQRzQRNt0Kee19J/yJK1fgqbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHN4R21WBzrkF; Thu, 16 Feb 2023 04:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31G4wFvo057839; Thu, 16 Feb 2023 04:58:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G4wFWm057838; Thu, 16 Feb 2023 04:58:15 GMT (envelope-from git) Date: Thu, 16 Feb 2023 04:58:15 GMT Message-Id: <202302160458.31G4wFWm057838@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: 6431b5ab6bba - stable/12 - top: fix sorting by pid (-o pid) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: 6431b5ab6bba2dbf7a22c00e6a3ce2afd1bde436 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6431b5ab6bba2dbf7a22c00e6a3ce2afd1bde436 commit 6431b5ab6bba2dbf7a22c00e6a3ce2afd1bde436 Author: Kyle Evans AuthorDate: 2023-02-13 06:39:04 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 04:57:54 +0000 top: fix sorting by pid (-o pid) The 'pid' order was added, but the equivalent comparator was not back in 8b800d3af2d8c ("Add the PID column to the list of sort keys."). `ordernames` indices need to match `compares` indices in order for this to work. A future commit will restructure all of this to make it less error prone going forward (see D37083). MFC after: 3 days Reviewed by: pstef (D37083) (cherry picked from commit deb63adf945d446ed91a9d84124c71f15ae571d1) --- usr.bin/top/machine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 6116a06bb28b..d41b3e4f6b74 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1552,6 +1552,7 @@ int (*compares[])(const void *arg1, const void *arg2) = { compare_ivcsw, compare_jid, compare_swap, + compare_pid, NULL }; From nobody Thu Feb 16 10:54:22 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHWzL4Nrkz3q1rK; Thu, 16 Feb 2023 10:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHWzL3nWxz42dW; Thu, 16 Feb 2023 10:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676544862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EmhkqAXqiCYk4amH4x1ajgOj+84IK0FteukfA6XBdy8=; b=Zzs7/l4K0Bq2SvKHTEF+eNYMJa6KODHDACMGyFHEf8b6n8neGnTnbmcCiS+XN8dGn3QYft me93JN9uC+RCU0ECiFwLgRvV2PNZlNhuPNMeWvg21OTO39eYQtTiTNystpjpAkMtZ/YNEC ksbEjHOaSkaOmvq28VZXX6GzKpjPTrG91A1l7epkFvUcM2qtCCf8suaHIouK14mq39xLYy oR1380bqn3nIKxGg1UrWzEaKMzEo/5oijqMvd4NnCvU/m1Yg88x8yOl0CpTtHcaa5gCDtG FiNvq5pRDkSuJDMa4r1EIEujPBSx01BuZ9ZWbnUgqLOEXkIfaXnz8esO70zDqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676544862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EmhkqAXqiCYk4amH4x1ajgOj+84IK0FteukfA6XBdy8=; b=IqXkMkktDWWfBbrJZaDTmFH8LreMEQjhqmd/Bbq9OsvLTS2mYNf4ndj255mrDPhBjpiUxP Uu16ArZvPC0jye8WRfP0qnxZR1UwzqJPzmVj1LaNR41BuHRhY29XMWV2ENey/yzsNnJZU/ Gf5GMbIOEyuXG3ohwUCLrOcAyQdyB2oPUaF+MJAXwsDeHrU25rgKpyrp2NmwIugzoQW1pQ uEc6IJdWFwlnWnGb6pRtEFsgtLQ+sN7BMymHeKnWknWWlLx6nRFm0Gv+48zdm46878G2gV Qg09cPc7lOywO9V8nGq5rr2iaU4/H3fL+MgwuSoivOvm1SRWEZe/0n5Zfh+PYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676544862; a=rsa-sha256; cv=none; b=VZC5G6HfhfpTmPdaoS6BWDTEpvfc58Mw79BRwKR5j63WImnZDSw3KJxMY/IsUTiKXslUjC MHobLdWBpeCJFWRPr/CqqIRS7oLSwssmjcLhYhuTGrC2JpwXNoYCTQ4z3Yb6Xj1OH49y6P EW/1mZu1IwiQCJbhoaf8mcPwDjVzbq9TpqvpN6HdP2pfQ4zlbyrt1D+cyVM9J7ZT7lsQsW DvSqZ+fdFmsY0aWUu7lxAb7r10g9fTYxKDsFWjo68Bpnc3n461d+SzYPmHaFs9OokOSFGD XtxRP5mhbXzI1WKlZAdWlwACXgfFtON9knVW5V2AWbw9KQb4opq38IMHlY1Iug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHWzL2t4zz11Bl; Thu, 16 Feb 2023 10:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GAsMOc069177; Thu, 16 Feb 2023 10:54:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GAsMuS069176; Thu, 16 Feb 2023 10:54:22 GMT (envelope-from git) Date: Thu, 16 Feb 2023 10:54:22 GMT Message-Id: <202302161054.31GAsMuS069176@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: 0460517df472 - stable/13 - Add ck.h userspace shims for CK_SLIST_ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 0460517df4728fec10777a7b798ac291a56397d5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0460517df4728fec10777a7b798ac291a56397d5 commit 0460517df4728fec10777a7b798ac291a56397d5 Author: Elliott Mitchell AuthorDate: 2023-02-09 23:27:12 +0000 Commit: Kevin Bowling CommitDate: 2023-02-16 10:53:56 +0000 Add ck.h userspace shims for CK_SLIST_ Differential Revision: https://reviews.freebsd.org/D38471 (cherry picked from commit cd3193f640e26991d94d87a45ee9b6a953c56fb5) --- sys/sys/ck.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/ck.h b/sys/sys/ck.h index b04fe67b476d..1dba51daf063 100644 --- a/sys/sys/ck.h +++ b/sys/sys/ck.h @@ -13,6 +13,8 @@ #define CK_STAILQ_ENTRY STAILQ_ENTRY #define CK_LIST_HEAD LIST_HEAD #define CK_LIST_ENTRY LIST_ENTRY +#define CK_SLIST_HEAD SLIST_HEAD +#define CK_SLIST_ENTRY SLIST_ENTRY #endif #endif /* !_SYS_CK_H_ */ From nobody Thu Feb 16 10:55:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHX063BbSz3q1tK; Thu, 16 Feb 2023 10:55:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHX062jxWz430V; Thu, 16 Feb 2023 10:55:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676544902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEZAg0kdai/PpHr5Wv4Euy5YsSL0CIQ+ECHUhVVejBU=; b=kmugsb5yDGkUAP4pzs0mQcIDmqByNA1Nh6vAUIfL6Lk9xq3adiuBZNsbtmhW0Hump65ec/ biBfSZqTX+zbo4SUWLps6S8goPRNbTWwlRlL9Oqafy7OKuOFetPRfvaIHV3PxXUFsKYQZq u5IqYbLN30TAsb6G1rksQkMVJExCJSONctecq55njV+WVdW/PpWSVSljSvZU9nQmkix/zM lbkpr96zpHIiz8CDfRxthfKf/ACcy0/whywFW26Zh+plhJlSy2lHIRR2W0mDnCN/1W6oTJ QiXGj+fr2prpZ4iScGJU/eu3XLAqCKyTtSyCuXYaWXhb0NNH4Te5Z/2pdJUBXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676544902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEZAg0kdai/PpHr5Wv4Euy5YsSL0CIQ+ECHUhVVejBU=; b=evMLA1SCHNMAah03HoHw7xpuoEfPTqXSDtPwNTbIOqUQFb/rl8n0OHvKDxiMtXhqk3rOoe eGXrPwysIfjIlwkOwRtQV/81/X2u0jsG1lZqDHzhajvx56Xar8/HXe7b50CvHaSoIL3zxt 9gSWLUCuPW2Yavmi6J7kg3WV7jy1wmqgbVViAjHaZ2NXSfPIJOsTNTrLnL+p+py/4xoqz5 H9sQWEX9GH8lmt7QbchBWrOWu9DZc3BSI8Lp69IPvbgIg+G6G4qPSUqyHfb/y/Nw+gJuul beN6dyHsuAlGxUZiDljV/R8bHYGYvsJASFDiIdMvIee+C5OhMcwhj8Kdo37IZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676544902; a=rsa-sha256; cv=none; b=uOVIeRHQ+v1LJY0hoUvx6orD80HEuNpJscgzkrRCsEi26K8a9IqXJsfQv8gjsGstEBBjIZ 11FI6JBb5dJRMK8dwpOv96K2VjFbzgrk4HoXciv2Xi6F4uOioXKp1P4Gbim1PIAttLVqSr p8fAOhkIc1D/tcvdHG2Bt+2jPb/C/DxJaVv6w38yIoORWtJTyFgpqiJTpEQAmB2jVD96iw 8y9N3+xpzq0J0NYN94UI7wSdZIX8O0b1Vew4hF2K8qG5aE8tGcBWR6OzHgaes3ZxfBkN8x 1SeVrsM0YWSce0YKDBl+ZzIXO5qkZYZzxpB3RkiAzA9ZWXMv7TL6+yJRzJSi1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHX061q7dz11WC; Thu, 16 Feb 2023 10:55:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GAt24v069362; Thu, 16 Feb 2023 10:55:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GAt2bp069361; Thu, 16 Feb 2023 10:55:02 GMT (envelope-from git) Date: Thu, 16 Feb 2023 10:55:02 GMT Message-Id: <202302161055.31GAt2bp069361@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: 82fd8caf6c37 - stable/12 - Add ck.h userspace shims for CK_SLIST_ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: 82fd8caf6c373b5057eb61a4aa037512193a63fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=82fd8caf6c373b5057eb61a4aa037512193a63fd commit 82fd8caf6c373b5057eb61a4aa037512193a63fd Author: Elliott Mitchell AuthorDate: 2023-02-09 23:27:12 +0000 Commit: Kevin Bowling CommitDate: 2023-02-16 10:54:52 +0000 Add ck.h userspace shims for CK_SLIST_ Differential Revision: https://reviews.freebsd.org/D38471 (cherry picked from commit cd3193f640e26991d94d87a45ee9b6a953c56fb5) --- sys/sys/ck.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/ck.h b/sys/sys/ck.h index b04fe67b476d..1dba51daf063 100644 --- a/sys/sys/ck.h +++ b/sys/sys/ck.h @@ -13,6 +13,8 @@ #define CK_STAILQ_ENTRY STAILQ_ENTRY #define CK_LIST_HEAD LIST_HEAD #define CK_LIST_ENTRY LIST_ENTRY +#define CK_SLIST_HEAD SLIST_HEAD +#define CK_SLIST_ENTRY SLIST_ENTRY #endif #endif /* !_SYS_CK_H_ */ From nobody Thu Feb 16 11:55:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYKw75nQz3q584; Thu, 16 Feb 2023 11:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYKw6dGjz46hT; Thu, 16 Feb 2023 11:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cq+sceSlq4ZszjTWy2E6Hbs6J1dwoH/7dvWQpZ9rkvw=; b=SNonNmC0C4FjeXylgiNzZJ3aBschz5GXxQhHvoHmEYp+wDvUhyuJDM7nzXaSlbtXxmhtUr 3Gpa82kHVgu04CYkBJhCw1CJCCwu5NHoWhM08XgmGgA5+9ATIuA+6RIffB7wR1Ap0rAJer bZcv5ktf7Os2SDet2wm97Jj17YF5M5krADngU1LiZ+Wj0HZp/7sIQQTazo50svr74d3Iwa d6kl974uzygCK6QrYSNVsMJOvZ0SjOKlecDh9u7CdhmUb5BgCG2Ivbt24oF/O4cBqeEed3 tiDkt8BuFlPHPtXY2h/ecoQXycmTCfkRhYsXS9nzlEDbnNxoXMNa3IhYP//C7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cq+sceSlq4ZszjTWy2E6Hbs6J1dwoH/7dvWQpZ9rkvw=; b=BAWJKEXuvxiDq86GbdgqE7mmbl1vB87tB1D06uWhTrvYKaiRP1/tqb3DpGKdBAiJcXjnVS nkwAQWi0CpXRKheG+Iggqky00KyJpPpr7Ef7Y8Od3raH5oNJ/uk60BwLZRZbkd0s9+xw1x BKTI4BlBoPmsC1hd622u9WJU0aX/ZEmWwY9P12a1OpvvCd7pva4EIZXFzWeTJLD4azVJ+P DQbgCCYBYZVTZVBFIr3NaAoEhxkoGb2ECqeLE+lDC2HDYQ6FSbOUjMse6oqGS5j+pU8Uz9 n6KpGobiusTYVFG6A4tMJ3Tk2e76EXBvBVZTEZqL1joLuo8mpktCfstlPTDvIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548532; a=rsa-sha256; cv=none; b=uD2T7VApfm46KFA4wBcfMLq87eaLZy7Lks7f9Xx50Oe+8rDelTtPX/Hj0cPA9QnuXXmRhJ Q1StFX/lNvu038S7cl4PO7WdF1SeH5/TxAM6LlXfPiiFiOFQOamWyV4B3GYWgIR3tRPOX0 AIbzVOn/2hnJ62p46Lw5kBLvrn7vVpqBXa/+INmiXAkLdhudZ4DkFUC/TnulNMkY+qWeLR VTQKG7Ig21Xo5LILG8NtBiU3o62PYN6jG1km45Yklzsxms7dwdrhgycg3jbc2vOhT3Y2bN NxZruhbQgtZ7MtwgXoiMxaU54ehNLmw0Wh71GKzSFEBE2sXOSypw+14Bv1h3gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYKw5hFCz12fN; Thu, 16 Feb 2023 11:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtWQF054690; Thu, 16 Feb 2023 11:55:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtWIs054689; Thu, 16 Feb 2023 11:55:32 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:32 GMT Message-Id: <202302161155.31GBtWIs054689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: ae653e3a3dab - stable/13 - linuxkpi: Define `GFP_NOFS` in `linux/gfp.h` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ae653e3a3dab14ef758ed93565ebe1f1c3df728a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ae653e3a3dab14ef758ed93565ebe1f1c3df728a commit ae653e3a3dab14ef758ed93565ebe1f1c3df728a Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 09:49:08 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:03 +0000 linuxkpi: Define `GFP_NOFS` in `linux/gfp.h` Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37910 (cherry picked from commit c0c1c599c0ca7e8a15509503991f8cd97c292bea) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index a2930b44b0c4..55558500dd30 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -72,6 +72,7 @@ #define GFP_HIGHUSER_MOVABLE M_WAITOK #define GFP_IOFS M_NOWAIT #define GFP_NOIO M_NOWAIT +#define GFP_NOFS M_NOWAIT #define GFP_DMA32 __GFP_DMA32 #define GFP_TEMPORARY M_NOWAIT #define GFP_NATIVE_MASK (M_NOWAIT | M_WAITOK | M_USE_RESERVE | M_ZERO) From nobody Thu Feb 16 11:55:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYKy2j6Gz3q5bx; Thu, 16 Feb 2023 11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYKy0jxpz46qV; Thu, 16 Feb 2023 11: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=1676548534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UGBr9Io2ecTJyavs7/PSHjBFTYdBY8iGu3zBP6TzZmQ=; b=WaLM8UtTJaaKb9t7T4smQOtmcGUvb83yuBy+XCfkII02Rlbuw5GOBGW94aX2mP8ZayDf9x yPWZ7u2SoAHQIWv1QP0fFQTBfAEmKR6R+ZxHaAIndPgTirfTO6Q35NSgBzjGSGpNkPh6lu J6k2KnfWlkN+7Nu+aa8R1pXkGPytLlK3DUbn4Qwjgv2zxhQiBZG1J1VAhK/2Z27s55zs+Q ixznKu4TrJPY614oAgKjjSJ55ichEdyXLMh/tf2sf9qHIeewYj0VXzPm2Nqic5oOsjWkJC hj9fdT3Dgf0Dh5JjOi8DwPVnLX7Tie6QGGLPQkys6786GHRr9hbgSEeOKYi4ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UGBr9Io2ecTJyavs7/PSHjBFTYdBY8iGu3zBP6TzZmQ=; b=gTa+TiTjcpRa0u6gmnTZ0f32mzaXSp3ykf6DM1qlZHrzlO8rSNCCb6oSycNnMb5hsgvelQ VsY5a1BDat3B0Bu2Rm/1jwkU4xd5OfRuvNLad8JoWFg3CzjYaPQUBuSlU+AXbnjz0Y/oi7 13L+GkyL86XnZ+JNrPm9rhJKJ6DZ3zd9Q58ntOGLJagsnp0awOeRxn0/n0t+Huxf6/uR5I Ml3GxrYJPc2TjSOmi1DVUH5pPSVIHtJo0a2F7x+uM8T9lZYsYHCXxH9L9HDEomcnoL2i2o FTAgsmQOdGR1Ses5US5iZn2aY7hgsLEY7S7ctMh+SmGwux7VagWPt7ect4GskQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548534; a=rsa-sha256; cv=none; b=pSz4VbInuEmeDhYjc3t4VOneZ//TNKzvfbIRSoj9zWbpWEgPKg6StH3KzzwfvP/a95f9aG +2EVdYzJYUDGLseAXQ3CYpezZ9PUtpiUaInwb2HU1UbrewmfH3/4UBBPQFV+drUyPYjlXK UyuxHZ3Kz1UZmYdX81fVEQUw6TOZa/tDhdxB8sRDf8La+ik6/O9g0QDTwtmqy2KIu/V+74 3wrkdz8+78ADAn7irRXiVCeEJ6325buwROcBwXDETrbx+r8b0kQ3Syv9igVqiohHo0R0e9 p1TBTTb2CAQpxDnt4zZLdpsJ9RjuBoTVV6oLmQXcnuD937j3Q35mOkR2gnB78A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYKx6gRWz12tf; Thu, 16 Feb 2023 11:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtXXR054719; Thu, 16 Feb 2023 11:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtXLX054718; Thu, 16 Feb 2023 11:55:33 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:33 GMT Message-Id: <202302161155.31GBtXLX054718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: ced06aa51626 - stable/13 - linuxkpi: Add `gfp_mask` field to `struct shrink_control` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ced06aa51626fe98c4a44108123e014d2f6bb598 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ced06aa51626fe98c4a44108123e014d2f6bb598 commit ced06aa51626fe98c4a44108123e014d2f6bb598 Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 09:56:46 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:10 +0000 linuxkpi: Add `gfp_mask` field to `struct shrink_control` bz@ asked if the KBI breakage is a concern here. My answer was that this is the first time in the DRM drivers in Linux 5.13 (the version I'm working on) that this structure is initialized (as a variable local to the function in this case), so it shouldn't be a problem for the DRM drivers. However, I can't speak for other drivers maintained outside of the src tree. Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37913 (cherry picked from commit 3aa335d00ac860565d106eb47e931206641cd653) --- sys/compat/linuxkpi/common/include/linux/shrinker.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/shrinker.h b/sys/compat/linuxkpi/common/include/linux/shrinker.h index 05f702e62fd5..39ea35f0a862 100644 --- a/sys/compat/linuxkpi/common/include/linux/shrinker.h +++ b/sys/compat/linuxkpi/common/include/linux/shrinker.h @@ -29,8 +29,10 @@ #define _LINUXKPI_LINUX_SHRINKER_H_ #include +#include struct shrink_control { + gfp_t gfp_mask; unsigned long nr_to_scan; unsigned long nr_scanned; }; From nobody Thu Feb 16 11:55:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYKz2KQ2z3q5HX; Thu, 16 Feb 2023 11:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYKz1dBfz479F; Thu, 16 Feb 2023 11:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QnmT5kYKotRi16ZhZcH3pmObJAkU42iPT89Z1IWlVtA=; b=pKDdq068RgW5X41zcYDtvhK1y7I90SWYVXt/+WhmXQa6mU4TWapGOoTw3uZYq094aoWR1O YEwmS9yOIX/cGecSSQ+QtBmdeN5zrAdC4yQN6txSFnutKgtcwc0vWWVHjafTpj9YeVPCrG VR8hzzhxIbsqmu50xuLvIY0Vd9+HDzros902HGuIhTK57LOBCgrIDKveGQdgxIsoxeBf4f VaEkwy5rPiKkjLAHdFIv2urI2ZCWfxbXlSmiHuzqtcDINk6UTJvnpT6ir+j8NPY4lUH3lV 8bXmIuMelXIyz85B59zydABd1vODicuo1rQLegfkjCsTlzHqx9TwqaelRDbRcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QnmT5kYKotRi16ZhZcH3pmObJAkU42iPT89Z1IWlVtA=; b=eXZpakgJwIw8FbhSGhIReaEJtgUef6e/Jc1NDH5lcGDs1nNZwfdFYFiz25x47fFq0iKeH+ UzOxSGPbX2d+P3EqH7DBq2vzYDZ/8oALgK0YM/V705ZwrZZqYZFfK9TOBXXgYbKiqC0pSQ MgKT2CTqD4/amBLdpQc1RN9oYGIubIAgSENXpCJuMUEke/smRkl7TMeHwboLxOb6LjLyWN pbqlq0sLm6wO5wqockrJUzCQWgaKCrNet98hIk/6euemAcBKt1LMGTWrgeCXwLNAiFauwq Nal8+sJRblpHhQ2U1acM+1P1D6GIDyJ1RQIWx4wjhDz22DBQ8h6CX9A6BP4c+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548535; a=rsa-sha256; cv=none; b=n3e5sE5GBrXlCUzpsA5XqTWt4EkaSx9ajLdlxCCg8zrZj44zyl8BAtAWKobYQFTJ/k50lA oPOykDFOJ8oEIGUgKgkOaVxE/pZ4jeeh7DIlLnsJjLIGQz4rpRRAV/Ap/07P3NdXhhJSdu 4AQ1yJ4xtEok7raE9xHyZpbr91Plev6fPsqsYYhVS6ye0rKPAXS67FSsjE/UfrnXkerql1 oE/NcXFdT06crTn5uogff+81IYjEpkY4ZJwDBWra3lInZ71mIT20HP3kLMcgYEKZOmoURt 8swPcrJC2dLe7I72n8z395AIekeVX+PXTeGnlryfK//Ablat0hG4AIGYI45a9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYKz0hsSz1350; Thu, 16 Feb 2023 11:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtZce054754; Thu, 16 Feb 2023 11:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtZuM054753; Thu, 16 Feb 2023 11:55:35 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:35 GMT Message-Id: <202302161155.31GBtZuM054753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 14b9db7ff854 - stable/13 - linuxkpi: Define `ioremap_cache()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 14b9db7ff85488fa5f85e8be2bdbe4e5ec0b3079 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=14b9db7ff85488fa5f85e8be2bdbe4e5ec0b3079 commit 14b9db7ff85488fa5f85e8be2bdbe4e5ec0b3079 Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 10:36:24 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:10 +0000 linuxkpi: Define `ioremap_cache()` It uses the `VM_MEMATTR_WRITE_BACK` flag on FreeBSD. It replaces `ioremap_wb()` which doesn't exist in Linux. Perhaps it existed in the past and was removed. Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37916 (cherry picked from commit ed53e350d703b9e3ab78d137fd59a5a9dfef8b3f) --- sys/compat/linuxkpi/common/include/linux/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index 7041710fe0c2..4eb69bca6141 100644 --- a/sys/compat/linuxkpi/common/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h @@ -420,7 +420,7 @@ void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr); #else #define ioremap_wc(addr, size) ioremap_nocache(addr, size) #endif -#define ioremap_wb(addr, size) \ +#define ioremap_cache(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_WRITE_BACK) void iounmap(void *addr); @@ -492,7 +492,7 @@ memremap(resource_size_t offset, size_t size, unsigned long flags) void *addr = NULL; if ((flags & MEMREMAP_WB) && - (addr = ioremap_wb(offset, size)) != NULL) + (addr = ioremap_cache(offset, size)) != NULL) goto done; if ((flags & MEMREMAP_WT) && (addr = ioremap_wt(offset, size)) != NULL) From nobody Thu Feb 16 11:55:36 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL034k3z3q5Fr; Thu, 16 Feb 2023 11:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL02fT4z479x; Thu, 16 Feb 2023 11:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sFtdjK/M1VsShTHS03uGkw5WFBSijyDtcDuZ9kk2VA4=; b=kNEasD/7ByHGcncCaS6g4UWcRKf6pyFT/D3cFIG2hwD/GSidC7xd+y+4FjaS6OZKIroF3B q/X6YB6uDJB76TjfpgSWaDx1oL4cdfgDQtEEti6RwOWT7FK9LnK2GaX0Ll0ch81n8ibBfH 2N8uRhxPxr+QTzLXSoze8An+KdXI3OWhK6QPE+p9Ck+YaDfkS+2prYA9dofOyrKE5yMPee XhGS48qBYcVc0p8LuGo1sTZolDvqLdLmNlinfhyl5bl4OLVeM5UHFS3wklG2hUpFK2mGOP DNh5Xk2VD8YXP7U5NA8MSZN6ZxBoVIyz6v/ZqVWIV6z6HHQZUzfwMBH3PE8g/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sFtdjK/M1VsShTHS03uGkw5WFBSijyDtcDuZ9kk2VA4=; b=qtK9YLjCSoZJWhFA3WKxvqJTJlYGRNeFQ/jwhzVlAnJRaqt1gTcf3NTct1waLCs/fHKE22 ULs5ykI0NqbtCsWn1p1IViCK853GNidqgQnMbu22ej91fueMNzCrfD8pNwe+qEyLfTI8Q6 b6Cmawmc8nRLtCkLhZkJ65ygVBvIAlFK60m5v65kg3BnqKHjUfvIWHCks60629TcEbnIXj YgabdwFEwvmF5o6f5YtaoU2hNQI0bbjHxXYs5CqnQ0KNoWQE36y1JTnIxWjt8/66lDYKAI 7oQ+83M6rIVpbIc1oT5gDw+Fji4A89b7kptT+XS86I6UMXStadG9dTbSsh8Erw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548536; a=rsa-sha256; cv=none; b=tBZJJY6kHiw8UAyczTehAprGg8G+spDEyl7feE8/cR0L0qhSTkKERj1ZcuHeajPK6i8Z7m pJQgYbq0EDtq49gAgDmPRIfb2MvG2qOpl2aSk7YzTtBZQH75Il1sX/7J2Vk/6zlUn+fpQK C6YMELNe6UxykpQubk7Wk8ZTz2sJd4K/I60dkEfCwgFWD6RUm++lCIFyUWQ7gGh8HxXpBQ Z0wLmzrmNjvFmmzzirZ9HfsHvR4y5HJZfLzlBcA65Bxcb1pslLJQzfDPBB4/cRjAszoK0i dDEyrUgp3gC7A4wVQrCvhkVdcmjgshF7AttPsGqek+mv6vY+jfOziLIWv+7X1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYL01h8Sz13Gx; Thu, 16 Feb 2023 11:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtaAc054786; Thu, 16 Feb 2023 11:55:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtaHx054785; Thu, 16 Feb 2023 11:55:36 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:36 GMT Message-Id: <202302161155.31GBtaHx054785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: d703686ed948 - stable/13 - linuxkpi: Add `memalloc_noreclaim_save()` and `memalloc_noreclaim_restore()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d703686ed948e1cd6f0d49e2540b5c1bb3d5da5a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d703686ed948e1cd6f0d49e2540b5c1bb3d5da5a commit d703686ed948e1cd6f0d49e2540b5c1bb3d5da5a Author: Jean-Sébastien Pédron AuthorDate: 2023-01-02 20:59:17 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:11 +0000 linuxkpi: Add `memalloc_noreclaim_save()` and `memalloc_noreclaim_restore()` They are no-ops. Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37933 (cherry picked from commit cf8f392260bf8e9b4e088f26f81ddb96bd97e91c) --- sys/compat/linuxkpi/common/include/linux/sched/mm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sched/mm.h b/sys/compat/linuxkpi/common/include/linux/sched/mm.h index 613473e142a9..c26d99378974 100644 --- a/sys/compat/linuxkpi/common/include/linux/sched/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/sched/mm.h @@ -36,5 +36,8 @@ #define memalloc_nofs_save(x) 0 #define memalloc_nofs_restore(x) do { \ } while (0) +#define memalloc_noreclaim_save(x) 0 +#define memalloc_noreclaim_restore(x) do { \ + } while (0) #endif /* _BSD_LKPI_LINUX_SCHED_MM_H_ */ From nobody Thu Feb 16 11:55:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL140cYz3q5Bt; Thu, 16 Feb 2023 11:55:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL13Ym1z47HM; Thu, 16 Feb 2023 11:55:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7E5gC2EdohFWAW8TPDU7Vk+MuP/ZXxzKVq+lvA9jvoA=; b=Gvj6jG6B8UAOgK2WFhxGo7bbYdLmgFD/SFaFnH6LdmhLMg8BZ74On7/Lcn3PEU8d1E6lrR v9jfk0NNFTvOffuxrAIalC4ciH/k4miMjgXPFT64LL6wqbLe1uCCHm14zKoAyke0vfGH5Q kJuWz6zeiiF8FMM1UCHczNrY5eDp3pPEO5H7zWilv/0olpjz37zAKDUEVLbxYgb+Ql3CwS pO2Lz0clzy2kKBz/BTbOFK6fcgmQWDGH8y6mMQDhaE6ryufoC9MQhdnTr4B9+31DekluUk mJKg+xNOetvMP9S0ELnBh4nYT98bsvkUKTzDmaetq00Ohmftcs1ikQRvlNso/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7E5gC2EdohFWAW8TPDU7Vk+MuP/ZXxzKVq+lvA9jvoA=; b=eIevj50p5OQntTLduWEqId+SXGNC8H77SYlC/WrNAp0NVQrr3vkpwzgCMknq+N0zrOyH9M R22kWY6jJwcBitOYB6Rxf8H6lM5C/3vNrWiqA8d6LM5EN0iGd04qR8lp+/xS6zI3JBeGuV f+S845y3mKcg5a7vdvY42bu6bVhxPvV4CZXwsb4wj4uU2IlKFL4qtyNAwoJlCgDxp0aSNI OXz0ca3qivJKLrPijwvjI/RKAB2+8yTWVMDfgUlNjW2mcwFrSb0pL6UpnFgGZObeLTV8bU ADh0iXRNOaDYHUV8h7UrxjwegvkaLM1LKcLqiA4H45jzicwfZfh+IM1lc/qDgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548537; a=rsa-sha256; cv=none; b=D8oo0gtQRoK1Ew9W9sJP1CSwUc+L7WRTgp0jOrmOewClGuVuCsJDoCkgQa4ouwh4oI4Jjt Ic49P9xCvr4JX13BQ43yPud/rY4LHZUwyaXNQVhhSDcoooofHnwipNVjgBKOkj5ORAkZse OKNPgIsn56Wo7ukPNt1Jwf5wIc5VGnrzSVj3+rY0EiMcLjVcR19MHRciLTZ8nARQTTqJ8V fncMCij6B3p+ddpCgz4SHAcQhaN6SbwdRzJMp42kRdeZ1Zhdd8o3ZPRhG5SvfNXLYgmsS/ iU5cNSrqFKF2s8cpheSXNsZ7ucZ9dFtmWlVko77AojXFhKuApIenipNiQlLC+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 4PHYL12fS5z1351; Thu, 16 Feb 2023 11:55:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtb9X054815; Thu, 16 Feb 2023 11:55:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtbw1054814; Thu, 16 Feb 2023 11:55:37 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:37 GMT Message-Id: <202302161155.31GBtbw1054814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: e50dd7e3bf1c - stable/13 - linuxkpi: Define EBADSLT to 57 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e50dd7e3bf1cdddcb5bd3b0fa1a57843cb8a30a1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e50dd7e3bf1cdddcb5bd3b0fa1a57843cb8a30a1 commit e50dd7e3bf1cdddcb5bd3b0fa1a57843cb8a30a1 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-02 22:48:16 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:11 +0000 linuxkpi: Define EBADSLT to 57 This is the same error code as Linux. As emaste@ noted in the review, FreeBSD defines the following errno values in `sys/errno.h`: * 56 is `EISCONN` * 57 is `ENOTCONN` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D37935 (cherry picked from commit e8ce32bea30d599b481735a1d1b0a87ac06c5a66) --- sys/compat/linuxkpi/common/include/linux/errno.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/errno.h b/sys/compat/linuxkpi/common/include/linux/errno.h index 72d8af6779a5..796203422d23 100644 --- a/sys/compat/linuxkpi/common/include/linux/errno.h +++ b/sys/compat/linuxkpi/common/include/linux/errno.h @@ -34,6 +34,7 @@ #include #define EBADRQC 56 /* Bad request code */ +#define EBADSLT 57 /* Invalid slot */ #define ECHRNG EDOM #define ETIME ETIMEDOUT From nobody Thu Feb 16 11:55:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL30ysmz3q5WF; Thu, 16 Feb 2023 11:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL25SzFz47Q6; Thu, 16 Feb 2023 11: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=1676548538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S0p3ijj0U8XcifVnaOB8xWONuooowCIasfIebDott8Y=; b=W/WhSDhU1ci5FJxXL9MeGqvJlVm/AhdkGSJkokMB8k7YmDUpcuQgcmK4EbOpH8vC9TJThp oiVe47XlCMxCnDk6xP9bvZzYD2DxTrygaiz7t2O5fH9du/4AmPU2XVo+j4g7RwqcTCDhns wv8VUh8T7dPfpx7dhT1lNZYkO8Tnesg39koRQJg9bpFKmLSCPiBqDtfP0oFLnxYrShf+/v hoAL7rpuIZF8wSVTSRXNusmiC2rJVAtG7bEq5iEptOoWsDlHM0kKVLejERBQJG+8fgc3vZ vU4WOnazpNhFXGifEY+GTWBHj4rt6eRITNRWBKU0mnk4/fDzjMis5wGDCEwscQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S0p3ijj0U8XcifVnaOB8xWONuooowCIasfIebDott8Y=; b=NnL/CbNUPB1LmupZv/HT/E4wcesbf6/RBotspM1ehSPlfNqNZEzKPb5Z3sMbCECbyfdRfw +KK/BdxmMvaVPbD2GgQog/BAHbQ5YXoHo5pH/Erqa687teyZQRER2s1eUNA7u4+n0zbTVv E2U8qJ9EnklK0u4Hpa9xfnCLVQLmIGksDNS9A9nfoAQ2e8d8eFOu6rSQD65/Yqrl2EnuCv yaxzNGEZ7jhJg/r+NYEsMcXCdyem7U5qY9z/kmC2aBaxxR6JNKUyXyKYWn2gSlMqdGfkyO f9251cV3k0VZFcTKUFph4YwbI6t9jv2/uNdosQBIxtE1a23GtjqXn+SJZEuGcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548538; a=rsa-sha256; cv=none; b=lyFL3kuRkuLLhbMMYx3vYG/OV/up/vuUATzHpK/GC438WswiAnO5R0PEYk5TEzyGfK5cQJ Im6Z4c4zUALyFNLO0yYCY+espzOe/xlqhGGXGQ49bZkJhpJyn1zoRICHo6RkyPRRh2UQUb eXw3wbPjARfSn39bArKPWiIyA+xzXa4pLRpt/mGUlxpOMmlk7M18Gr6GrcIOcWZytTw274 g/3DC3BOn66rxdArRFuWB5yfDFpb+qDVvyjQwq88oelTqXFffAGnU4FJ5azlalT5afPZ0B 66SKzG/Dpqx7edEsbDv2eY15D34JYI3JR1OpFOY/nUp6Q/A7bo1jLjkmycTJxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYL23bGjz13Gy; Thu, 16 Feb 2023 11:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtcJ2054845; Thu, 16 Feb 2023 11:55:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtcOM054844; Thu, 16 Feb 2023 11:55:38 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:38 GMT Message-Id: <202302161155.31GBtcOM054844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: ec8401ffaeb3 - stable/13 - linuxkpi: Define `hrtimer_try_to_cancel()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ec8401ffaeb399f8d02db237e6c2390c1e3f7bf5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ec8401ffaeb399f8d02db237e6c2390c1e3f7bf5 commit ec8401ffaeb399f8d02db237e6c2390c1e3f7bf5 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 01:00:57 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:11 +0000 linuxkpi: Define `hrtimer_try_to_cancel()` It is the same as callout_stop(9) but the return values are different. Reviewed by: hselasky Approved by: hselasky Differential Revision: https://reviews.freebsd.org/D38081 (cherry picked from commit bb651c77f5f71a38dd90b2eee214e7a2224421a7) --- sys/compat/linuxkpi/common/include/linux/hrtimer.h | 2 ++ sys/compat/linuxkpi/common/src/linux_hrtimer.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/hrtimer.h b/sys/compat/linuxkpi/common/include/linux/hrtimer.h index 23e707d906b4..4a63db80cc12 100644 --- a/sys/compat/linuxkpi/common/include/linux/hrtimer.h +++ b/sys/compat/linuxkpi/common/include/linux/hrtimer.h @@ -53,6 +53,7 @@ struct hrtimer { }; #define hrtimer_active(hrtimer) linux_hrtimer_active(hrtimer) +#define hrtimer_try_to_cancel(hrtimer) linux_hrtimer_try_to_cancel(hrtimer) #define hrtimer_cancel(hrtimer) linux_hrtimer_cancel(hrtimer) #define hrtimer_init(hrtimer, clock, mode) do { \ @@ -79,6 +80,7 @@ struct hrtimer { } while (0) bool linux_hrtimer_active(struct hrtimer *); +int linux_hrtimer_try_to_cancel(struct hrtimer *); int linux_hrtimer_cancel(struct hrtimer *); void linux_hrtimer_init(struct hrtimer *); void linux_hrtimer_set_expires(struct hrtimer *, ktime_t); diff --git a/sys/compat/linuxkpi/common/src/linux_hrtimer.c b/sys/compat/linuxkpi/common/src/linux_hrtimer.c index a56485512a14..5d9b376f9561 100644 --- a/sys/compat/linuxkpi/common/src/linux_hrtimer.c +++ b/sys/compat/linuxkpi/common/src/linux_hrtimer.c @@ -65,6 +65,28 @@ linux_hrtimer_active(struct hrtimer *hrtimer) return (ret); } +/* + * Try to cancel active hrtimer. + * Return 1 if timer was active and cancellation succeeded, 0 if timer was + * inactive, or -1 if the timer is being serviced and can't be cancelled. + */ +int +linux_hrtimer_try_to_cancel(struct hrtimer *hrtimer) +{ + int ret; + + mtx_lock(&hrtimer->mtx); + ret = callout_stop(&hrtimer->callout); + mtx_unlock(&hrtimer->mtx); + if (ret > 0) { + return (1); + } else if (ret < 0) { + return (0); + } else { + return (-1); + } +} + /* * Cancel active hrtimer. * Return 1 if timer was active and cancellation succeeded, or 0 otherwise. From nobody Thu Feb 16 11:55:39 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL405HWz3q5Hl; Thu, 16 Feb 2023 11:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL35kv2z47dm; Thu, 16 Feb 2023 11:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AzKxaLkiLeOD+2PQPXGjEjUIOPsqjeAuzI+LvtXxu6c=; b=gavrODCANglu04L1UMMAng5mlehxfK/9IY1yzU3bO+v10h5YxOPVan8HGPfqqKouTAER4c 3Y3Ck04VuKvi5CW1PPgyUxPVGicpNmGGvq826SChekMcg94Cwlvy1Xjf2GLRXj24p7knc2 Ld3cvs0csb4cWGBdk89Ph56ACwbp+8btXwr3/+8DCpXigRQlCRUTU4DAs08n6UgGzOQxRt bN6XnsJprlMvT1CtYmzf4UFSbI4FZXa9l3ONxqgIbp8oBJeT3agZQWSFPfSoupceSCKW5c /lVQ9Rj6pQXjAPeiaXs/SzpSTXe6HWYxcy3nbU0MdWxKIO4UAVnagB0qRPY9Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AzKxaLkiLeOD+2PQPXGjEjUIOPsqjeAuzI+LvtXxu6c=; b=A3ULqiWCj63r1fFZXXRZ01EYNyxvK2ZfcaBCRkIv1DnwGuXglRwotAnhuAoENRETJIVz1i OnNxi9ZBCYZNAp1SIDN95D7xv4e4kspuBmR1DrhYMkcpQVCpnmYj1Y2iOZXb7L2ncYbhqu XkxBb2/LOdpUszcaiMm8sc+klYHP32EaZy9RSFCqbtHQ0U9J9csBKO/kbTLtEa9hnXn6Jj utz8rI5ThUumacinfPd+zakUrAXGzLgpTgcWUNn991e0aa4MwGtSYdoqz4/04FzPiRBqnr EiBHXpVbClN2q5uODGuZdYDknyuQEC0APTshkaraKQwsMyEHi6Y7GSb8Zrq6VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548539; a=rsa-sha256; cv=none; b=kM5vAZyyXJYDHyHS5reA54i2S9zhmZcfinxNvSE/x3IrFBES2cHdnssXMxhvscUyhl5CXp eyGHzLAEoF5OzevQmh0epAa57b/JnUdlHxgPbKp56EG9ake+rJk8I488Gt80pJVpKgaMIE 1Q6hjy9kjZI63G1J6JtNj7iai0574sbU/iTUzDFMZB9A4ZJm25xhTRx7R52Ojo6w5jzp/i bSJr7gSEQL2nNB6b2dqC+/x12aZfI/tfRAU9+/oeVDt48XmX+vGyluB6kDxK7+PK0aV9NH PmSi+j6Vdkxse0gL5c7mI6esNIHqGPuMBcsgxN99gw2cQpecTzFE7Wfm1mAiJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYL34YvZz12ht; Thu, 16 Feb 2023 11:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtd1K054874; Thu, 16 Feb 2023 11:55:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtdUZ054873; Thu, 16 Feb 2023 11:55:39 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:39 GMT Message-Id: <202302161155.31GBtdUZ054873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 7fdbae1bd14a - stable/13 - lindebugfs: Add `debugfs_create_atomic_t()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7fdbae1bd14ac5ee61563d63b23080f45a5be459 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7fdbae1bd14ac5ee61563d63b23080f45a5be459 commit 7fdbae1bd14ac5ee61563d63b23080f45a5be459 Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 10:00:57 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:11 +0000 lindebugfs: Add `debugfs_create_atomic_t()` Reviewed by: jfree Approved by: jfree Differential Revision: https://reviews.freebsd.org/D37915 (cherry picked from commit f2044a3030fb2a657e59dee4b7e5865acff936bd) --- sys/compat/lindebugfs/lindebugfs.c | 30 ++++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/debugfs.h | 2 ++ 2 files changed, 32 insertions(+) diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c index b72ceb5e0be9..11a6dac579ac 100644 --- a/sys/compat/lindebugfs/lindebugfs.c +++ b/sys/compat/lindebugfs/lindebugfs.c @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -424,6 +425,35 @@ debugfs_create_ulong(const char *name, umode_t mode, struct dentry *parent, unsi } +static int +debugfs_atomic_t_get(void *data, uint64_t *value) +{ + atomic_t *atomic_data = data; + *value = atomic_read(atomic_data); + return (0); +} + +static int +debugfs_atomic_t_set(void *data, uint64_t value) +{ + atomic_t *atomic_data = data; + atomic_set(atomic_data, (int)value); + return (0); +} + +DEFINE_DEBUGFS_ATTRIBUTE(fops_atomic_t, debugfs_atomic_t_get, debugfs_atomic_t_set, "%d\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_atomic_t_ro, debugfs_atomic_t_get, NULL, "%d\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_atomic_t_wo, NULL, debugfs_atomic_t_set, "%d\n"); + +void +debugfs_create_atomic_t(const char *name, umode_t mode, struct dentry *parent, atomic_t *value) +{ + + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_atomic_t, + &fops_atomic_t_ro, &fops_atomic_t_wo); +} + + static ssize_t fops_blob_read(struct file *filp, char __user *ubuf, size_t read_size, loff_t *ppos) { diff --git a/sys/compat/linuxkpi/common/include/linux/debugfs.h b/sys/compat/linuxkpi/common/include/linux/debugfs.h index 4c9f52a0bc0f..422b96006b04 100644 --- a/sys/compat/linuxkpi/common/include/linux/debugfs.h +++ b/sys/compat/linuxkpi/common/include/linux/debugfs.h @@ -84,6 +84,8 @@ void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent, uint8_t *value); void debugfs_create_ulong(const char *name, umode_t mode, struct dentry *parent, unsigned long *value); +void debugfs_create_atomic_t(const char *name, umode_t mode, struct dentry *parent, + atomic_t *value); struct dentry *debugfs_create_blob(const char *name, umode_t mode, struct dentry *parent, struct debugfs_blob_wrapper *value); From nobody Thu Feb 16 11:55:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL46pKyz3q5VJ; Thu, 16 Feb 2023 11:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL46NFPz47cL; Thu, 16 Feb 2023 11:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RB773MNbUCv0DyKW/+jbNOTlxKs1CyfrZ1qHUDNRWvc=; b=B/ElA49WRJDETzPZlNBcmkRA+LPL1prF57BolznmlE8axqd43GTej5YkfsJWNsQ8XWDHv2 1jPfpq4sVx2YH5sjsmX/v2n82GzXS3n0NaWEpDOvecCPOUwaIpi6dbRm4RkmvgzFYRRAsb ckpCORTAsGbzsgJYSKoiW/njBWLXeTFh5FqXT7gCKzquvg213vTFRWchXGD13+yY6piAdX OzbDNY5J8UR9/MNV3fqesdPAht5m/IUrr/FIiVRpY9s2BisiI5eEoI6Xv/HCpHmwzaD4YK S+BFlVhabaGpxLeGbmrwtY8kTHuTbn16ceWT2b3GDPBFnYqWtARvGPO2sICfvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RB773MNbUCv0DyKW/+jbNOTlxKs1CyfrZ1qHUDNRWvc=; b=V46dXIPaTLet1715/50PxMdU87yQsPwFL6dqfgFpY4V+qx/IFGgIRGQOQfG27tC5uTE75l JYZld8BRoFKyx7W3sxDUMQcOug8GhFHpee7UkVry7uAf8G0FFkPG5Hx/B2Ee/tPQNL/6nZ OQoMHdeVB7CZ3xIo5EB+2RngQGHJ749bBPQGDq16I/ctw4Wv1IwO3P1TnaqbCXj2TdZ21S Fbqi9X7m0w5Ge3RGZJUwds7oL3in2xvHI+/l1Pj5P5fXENcBqej/bhe02kODnLNK9uyQVa OoCKMBazMG9bsF08S+IthzSyXLoVKZ8myy0wz4ER2bynztAhNFBXerVG69giDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548540; a=rsa-sha256; cv=none; b=bGBf22XCPHAb8VdoK4Szv5FKcPRfbxuN6nu01lo17LEZirC7PVy3RIY6tlnLCxDAaeR1k/ 8WZs9A5EJOnS7OivIfFGTCfT4Z/H71f477q9QSpH+E6yhvm7fWGOK3gXV6Es/45KkKRsIg YVmX0RCNFUtir6xb9+HE0H/OC6SjFIMxRbKu/G1icdBDBqvTA4DC/JdtwKRvj1LIPIaTTI 4sghFH/D7TUJfk5ELd9Ot+xLzCGhSYFHHQlD1+cXOpIUCbdyefb+J+CqwN4RzyTgisVC8j lJdv0tn2apQlFn7BSHWmb99afoOnGyMQ8sK5AWqE2xDx++y0zVFSLyUh/yc2OQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYL45HMdz12W1; Thu, 16 Feb 2023 11:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtewN054903; Thu, 16 Feb 2023 11:55:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBteFG054902; Thu, 16 Feb 2023 11:55:40 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:40 GMT Message-Id: <202302161155.31GBteFG054902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 76bad151d180 - stable/13 - lindebugfs: Add missing `debugfs_create_u*()` and `debugfs_create_x*()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 76bad151d180267578542aeb0be3702405cf166d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=76bad151d180267578542aeb0be3702405cf166d commit 76bad151d180267578542aeb0be3702405cf166d Author: Jean-Sébastien Pédron AuthorDate: 2023-01-12 23:41:32 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:11 +0000 lindebugfs: Add missing `debugfs_create_u*()` and `debugfs_create_x*()` The `debugfs_create_x*()` variants are the same as their `debugfs_create_u*()` equivalent, but they work with lowercase hexadecimal. While here, fix a few style(9) issues. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38087 (cherry picked from commit 976aa07a885b53e1bc2711082d2f6f113dbdd0bc) --- sys/compat/lindebugfs/lindebugfs.c | 140 +++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/debugfs.h | 14 +++ 2 files changed, 154 insertions(+) diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c index 11a6dac579ac..8e878b1cd446 100644 --- a/sys/compat/lindebugfs/lindebugfs.c +++ b/sys/compat/lindebugfs/lindebugfs.c @@ -364,6 +364,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_bool_wo, NULL, debugfs_bool_set, "%llu\n"); void debugfs_create_bool(const char *name, umode_t mode, struct dentry *parent, bool *value) { + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_bool, &fops_bool_ro, &fops_bool_wo); } @@ -392,10 +393,146 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_u8_wo, NULL, debugfs_u8_set, "%u\n"); void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent, uint8_t *value) { + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u8, &fops_u8_ro, &fops_u8_wo); } +DEFINE_DEBUGFS_ATTRIBUTE(fops_x8, debugfs_u8_get, debugfs_u8_set, "0x%016llx\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_x8_ro, debugfs_u8_get, NULL, "0x%016llx\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_x8_wo, NULL, debugfs_u8_set, "0x%016llx\n"); + +void +debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent, uint8_t *value) +{ + + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x8, + &fops_x8_ro, &fops_x8_wo); +} + + +static int +debugfs_u16_get(void *data, uint64_t *value) +{ + uint16_t *u16data = data; + *value = *u16data; + return (0); +} + +static int +debugfs_u16_set(void *data, uint64_t value) +{ + uint16_t *u16data = data; + *u16data = (uint16_t)value; + return (0); +} + +DEFINE_DEBUGFS_ATTRIBUTE(fops_u16, debugfs_u16_get, debugfs_u16_set, "%u\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_u16_ro, debugfs_u16_get, NULL, "%u\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_u16_wo, NULL, debugfs_u16_set, "%u\n"); + +void +debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent, uint16_t *value) +{ + + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u16, + &fops_u16_ro, &fops_u16_wo); +} + +DEFINE_DEBUGFS_ATTRIBUTE(fops_x16, debugfs_u16_get, debugfs_u16_set, "0x%016llx\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_x16_ro, debugfs_u16_get, NULL, "0x%016llx\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_x16_wo, NULL, debugfs_u16_set, "0x%016llx\n"); + +void +debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent, uint16_t *value) +{ + + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x16, + &fops_x16_ro, &fops_x16_wo); +} + + +static int +debugfs_u32_get(void *data, uint64_t *value) +{ + uint32_t *u32data = data; + *value = *u32data; + return (0); +} + +static int +debugfs_u32_set(void *data, uint64_t value) +{ + uint32_t *u32data = data; + *u32data = (uint32_t)value; + return (0); +} + +DEFINE_DEBUGFS_ATTRIBUTE(fops_u32, debugfs_u32_get, debugfs_u32_set, "%u\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_u32_ro, debugfs_u32_get, NULL, "%u\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_u32_wo, NULL, debugfs_u32_set, "%u\n"); + +void +debugfs_create_u32(const char *name, umode_t mode, struct dentry *parent, uint32_t *value) +{ + + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u32, + &fops_u32_ro, &fops_u32_wo); +} + +DEFINE_DEBUGFS_ATTRIBUTE(fops_x32, debugfs_u32_get, debugfs_u32_set, "0x%016llx\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_x32_ro, debugfs_u32_get, NULL, "0x%016llx\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_x32_wo, NULL, debugfs_u32_set, "0x%016llx\n"); + +void +debugfs_create_x32(const char *name, umode_t mode, struct dentry *parent, uint32_t *value) +{ + + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x32, + &fops_x32_ro, &fops_x32_wo); +} + + +static int +debugfs_u64_get(void *data, uint64_t *value) +{ + uint64_t *u64data = data; + *value = *u64data; + return (0); +} + +static int +debugfs_u64_set(void *data, uint64_t value) +{ + uint64_t *u64data = data; + *u64data = (uint64_t)value; + return (0); +} + +DEFINE_DEBUGFS_ATTRIBUTE(fops_u64, debugfs_u64_get, debugfs_u64_set, "%u\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_u64_ro, debugfs_u64_get, NULL, "%u\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_u64_wo, NULL, debugfs_u64_set, "%u\n"); + +void +debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent, uint64_t *value) +{ + + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u64, + &fops_u64_ro, &fops_u64_wo); +} + +DEFINE_DEBUGFS_ATTRIBUTE(fops_x64, debugfs_u64_get, debugfs_u64_set, "0x%016llx\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_x64_ro, debugfs_u64_get, NULL, "0x%016llx\n"); +DEFINE_DEBUGFS_ATTRIBUTE(fops_x64_wo, NULL, debugfs_u64_set, "0x%016llx\n"); + +void +debugfs_create_x64(const char *name, umode_t mode, struct dentry *parent, uint64_t *value) +{ + + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x64, + &fops_x64_ro, &fops_x64_wo); +} + static int debugfs_ulong_get(void *data, uint64_t *value) @@ -420,6 +557,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_ulong_wo, NULL, debugfs_ulong_set, "%llu\n"); void debugfs_create_ulong(const char *name, umode_t mode, struct dentry *parent, unsigned long *value) { + debugfs_create_mode_unsafe(name, mode, parent, value, &fops_ulong, &fops_ulong_ro, &fops_ulong_wo); } @@ -471,6 +609,7 @@ fops_blob_read(struct file *filp, char __user *ubuf, size_t read_size, loff_t *p static int fops_blob_open(struct inode *inode, struct file *filp) { + return (simple_open(inode, filp)); } @@ -504,6 +643,7 @@ lindebugfs_init(PFS_INIT_ARGS) static int lindebugfs_uninit(PFS_INIT_ARGS) { + return (0); } diff --git a/sys/compat/linuxkpi/common/include/linux/debugfs.h b/sys/compat/linuxkpi/common/include/linux/debugfs.h index 422b96006b04..074f709114eb 100644 --- a/sys/compat/linuxkpi/common/include/linux/debugfs.h +++ b/sys/compat/linuxkpi/common/include/linux/debugfs.h @@ -82,6 +82,20 @@ void debugfs_create_bool(const char *name, umode_t mode, struct dentry *parent, bool *value); void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent, uint8_t *value); +void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent, + uint16_t *value); +void debugfs_create_u32(const char *name, umode_t mode, struct dentry *parent, + uint32_t *value); +void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent, + uint64_t *value); +void debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent, + uint8_t *value); +void debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent, + uint16_t *value); +void debugfs_create_x32(const char *name, umode_t mode, struct dentry *parent, + uint32_t *value); +void debugfs_create_x64(const char *name, umode_t mode, struct dentry *parent, + uint64_t *value); void debugfs_create_ulong(const char *name, umode_t mode, struct dentry *parent, unsigned long *value); void debugfs_create_atomic_t(const char *name, umode_t mode, struct dentry *parent, From nobody Thu Feb 16 11:55:41 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL60h3qz3q5WL; Thu, 16 Feb 2023 11:55:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL56nxRz47nl; Thu, 16 Feb 2023 11:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdzMG+GcTdENbxI+E80VsK78rpOywtYtdj5Vh/MYs40=; b=YlzMkZYX5fX/hUsy7fnjRV4aOI9eROfLQ3En5eNcEl5GF/3OODofGk117QaLWhVVt7zdOC 7ICy94l/uP5tweqjxuHdw1ZbrRG8vtZ3G019Wfc2vMBBSnIZqmlS60kj+jH8+TDvP4h5D8 TkdAmmaJpxpkqaUHP8ZAHPcXSA/wuKIU0/vAyC+fFmoZRSAlsXBQc2T5jZR31QrI5t9bM0 Zfwr3VM/696dTO3IoVqaLJWtDpAby4ddQA3fTg7OGlfBELI4Wz2ec2HX0GBPHyMl1dNmt5 AUK3RX/ezaG3vCAxROTwhKCsZPCF8Zp78g5LCag9diN9GT+7Pf4kYi+8kyiMhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdzMG+GcTdENbxI+E80VsK78rpOywtYtdj5Vh/MYs40=; b=HXFfrTVrasRugQgkvvJLuc1iL31bK64rAUS3r4+ySM4CXkQYN7dq6sBOmyUwp+N0Y9M4jJ BDpp162mUAiBysoNv8Dn/4baBwfli+isgk7rnh9A8X4LuqywVYzvtDG+0VTd7EMQBsZBuD TYxNeaovFG5VJw2kl6H1APip2agPf/867NYjNBAsM2fJi9IHQ6IsxAGH7ts73yuIhGnCuD 77G7YgLNpugmEQVhOXCUL6iZMrylXMqJyQ8iJpnPPsgm03eIEQ2V1z6otIOpYNMn+oFiXb AzRGjR9Km9kxtWl4ovbhrX/Vet66gKCPR60M5RvabKdmgutPaPvRhlCKu5IigQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548542; a=rsa-sha256; cv=none; b=bs3ze/oS9dagehF+0au7PuCJCJwCBr6T5S5ryZZmOiXiqW5yHx3ZtbZ95JxzCI8q9Ir9Sj 80W+/Ogcg854v33JjRJqB0ORT7myXLcj9OgFIFFvBh8EVID7hDt1f0pSApfAcYuaIpIcN4 1mSgUqapSLOioUZEON4UMDGzgFAMpqPCm6dmz2dMjlMtyxi5IbD84JfDfwgWWs6HmJtSTN lN1tHIh2/7DROhY2VhqwkaaQviK/6hB4zKKvgw4o9MMfBET01AjsHL2rYJAmALVuYPil/U fp+D/mT7+FDgaR4Mo1daBX3qruk7l3ZDA2fq00t0s9jYbBYOCJI+HyOZJQiq3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYL55tGXz137W; Thu, 16 Feb 2023 11:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtfOA054937; Thu, 16 Feb 2023 11:55:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtfBF054936; Thu, 16 Feb 2023 11:55:41 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:41 GMT Message-Id: <202302161155.31GBtfBF054936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 78c7537d5636 - stable/13 - linuxkpi: Define `synchronize_hardirq()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 78c7537d56362d7db2fe2ec9f27faf331e88a20b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=78c7537d56362d7db2fe2ec9f27faf331e88a20b commit 78c7537d56362d7db2fe2ec9f27faf331e88a20b Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 00:27:40 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:11 +0000 linuxkpi: Define `synchronize_hardirq()` It currently does the same as `synchronize_irq()`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38079 (cherry picked from commit a609ed795943673074b71aeafafabe46d08f1a6d) --- sys/compat/linuxkpi/common/include/linux/hardirq.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/hardirq.h b/sys/compat/linuxkpi/common/include/linux/hardirq.h index 07f00f076860..9e7baec1b213 100644 --- a/sys/compat/linuxkpi/common/include/linux/hardirq.h +++ b/sys/compat/linuxkpi/common/include/linux/hardirq.h @@ -40,4 +40,14 @@ #define synchronize_irq(irq) _intr_drain((irq)) +/* + * FIXME: In the i915 driver's `intel_engine_cs.c` file, + * `synchronize_hardirq()` was replaced by `synchronize_rcu()` with the + * following comment: + * "Is it enough to wait that all cpu have context-switched?" + * + * See commit f6d50b7af554e21c380486d6f41c8537b265c777 in drm-kmod. + */ +#define synchronize_hardirq(irq) _intr_drain((irq)) + #endif /* _LINUXKPI_LINUX_HARDIRQ_H_ */ From nobody Thu Feb 16 11:55:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL72mBlz3q5cR; Thu, 16 Feb 2023 11:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL70sb2z47pH; Thu, 16 Feb 2023 11:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uS7PQ658cgtTRsH4Tbxb4Yyo+VagiY1GXI489BSHLcg=; b=Vm6LvwtalaL2mL12/BD+TWtGOOdUSSSUgHxxEAOjevzAtQV4bV2JDWgM50VusLCFN47vzF lGeevwFz3fcwosGQMqMovQNnf1xouIioOxJIxb6FVXUwalwxSN77fBwnewDHvpW+qVwVPJ hmwbb9UmeO1kP1bBqCC+7u6Ta/AxCUXK7Edbs+254SgbMg3ZXkH/U4LMgQiISmxv6EWNjx zC0QH1sQ5G1D567971yPEPQUSjZ/0+gh8Mg5Xw5Ds+KDdYFXjwyeZmyPKfayOebp5cyfH1 T1CPHFZW+EFxlH5poJjAjB/lwI0CrIeMZzWOz2Jqhk2DSH1iAv+uljjqX2Dz5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uS7PQ658cgtTRsH4Tbxb4Yyo+VagiY1GXI489BSHLcg=; b=gltY3aJrB6KSreDnQhbVyZICmoP4tbuVCC+tXn/P6sHSzuPDfzu9uUrjNWSNtUGyztFmz/ 3UmZg2RhN6TQfAH8KwYFQzJUD6NvZNkM50LpItQJ/7fXUeLl1x1sovIA9XPGSviVsaG1jR pcVn1rrSMcySVntqM5ryFpRLsyUBkZSvBseugATuktMtVcZp6h/qVcCmdCvohJVUfCOZZh uIsmbu/srRhmmPSFBbsg+hAQJQuAK6+RCRGshURXIKur/9jqgmXeDw/iVDbd9RAOj/cf6k WsVRmeHwF/D40ejn28fu7BILGoOClc26bzuTXXnDDfbRdHyCbPsD4hZN9cz3cQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548543; a=rsa-sha256; cv=none; b=IRLV4iL2SlhjYzpphe8BPTmTBkXfiPc5uKmHFGurjTMK/BlgEAJFKZYKPI8jTym0Q2xnPR kC+t+S+Frn5WMz7qPx3mKN3DJTIi65bJgwVnABevw1SxVFQ4WnFB2FOUVCKsdyXf4tNnC7 ASCMOjRZQPyuYg5x8kMsr5hBJCtRVJouHhPn/d63gSH9B5jNZLJd+xYsiL0KvA+YvFaLo1 DF/9prY+vAtMqWZBeNHTWLmCwsbq77Memd0G1w/+LHwFwSpo/75pkf+WAfRZNhUwBg+8QQ XjTkW9T1a432GGDrCs5jtlEnqqqJn8hrTzrcUft6nPr39ipKujSirJPpx/zw5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYL674Z2z137X; Thu, 16 Feb 2023 11:55:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtgCs054967; Thu, 16 Feb 2023 11:55:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtgh9054966; Thu, 16 Feb 2023 11:55:42 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:42 GMT Message-Id: <202302161155.31GBtgh9054966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 70bbe8425bc7 - stable/13 - linuxkpi: Define `tasklet_unlock_spin_wait()` as `tasklet_unlock_wait()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 70bbe8425bc7118f4971264ed577eacdd8237447 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=70bbe8425bc7118f4971264ed577eacdd8237447 commit 70bbe8425bc7118f4971264ed577eacdd8237447 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 00:48:43 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:12 +0000 linuxkpi: Define `tasklet_unlock_spin_wait()` as `tasklet_unlock_wait()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38080 (cherry picked from commit 2272ccaa68c550e0e29801b9d881b2ea5ba12efa) --- sys/compat/linuxkpi/common/include/linux/interrupt.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h index 57d7ac58ec5e..3bc98aa88ba4 100644 --- a/sys/compat/linuxkpi/common/include/linux/interrupt.h +++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h @@ -165,5 +165,6 @@ extern void tasklet_disable_nosync(struct tasklet_struct *); extern int tasklet_trylock(struct tasklet_struct *); extern void tasklet_unlock(struct tasklet_struct *); extern void tasklet_unlock_wait(struct tasklet_struct *ts); +#define tasklet_unlock_spin_wait(ts) tasklet_unlock_wait(ts) #endif /* _LINUXKPI_LINUX_INTERRUPT_H_ */ From nobody Thu Feb 16 11:55:43 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL839LWz3q5Yg; Thu, 16 Feb 2023 11:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL81kP6z47Zk; Thu, 16 Feb 2023 11:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUO9IcHjvWeizO73G1W1Wbt1bPG4GvibY2mdIP/zD14=; b=GUnM0ui9JpBLAFCrZo84g+V2V0L9DhI5Dme3QcQMYDz/zo/0S/8o6lPmJKaDTu1R8EWEc0 coLPzJBasY/Srq3Kpe+JPqIf2EEQgedPCdLZe2Okoonpi2+ZkALvWvMI5BX03P0+cjDeFh IEgc8JXQGWaV0XCsfCd66ImwiR36ALOoGDvx60ka9D1Qud0p3A/I9kBrQQfsoaW6mGitdV T+YpAa2BlMg/f+1J5GjYvF+FDaQpj6YoMX5mMANxquXC9UudafkyWCLpivkD0MwiK6t1X3 eQT5uVVTDOx2HwOh2jmJFFhHsl70FFRcah/TLtX8Zt5vEaohhC2+GBM6a+1sNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUO9IcHjvWeizO73G1W1Wbt1bPG4GvibY2mdIP/zD14=; b=dKqVbHeBz+ud7eJ4ErdQHNAVoG7bB6JyaEyyByddg+pneaZdTq1FOK47HXfC6FCDeOW5a0 7SRPRvaCUJyELIvZCW4Pm5Pk6zs6K3LaGvwoesfBy92XwgSOnd9p4ZOiqHTbd2jql82zfM k5c6Qqlx3VqnTDK5gMWZfhfxiCOWsu9skF4iKbXcMLgc/eJCozAyJZIVIJznaLJO6nH7T5 foRxxPlF8FmS1Rg8hpMlt5c+9yv5YWbuUWt6Ix0FR9lS3b7Ub6MqkJ24KaM0lqdp15qKNt lYwBx6t953cjRtmphMM+uh6nfjy9s0dLB+4fao0SeZdLHgBXQ4Jsp07sPPQ3vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548544; a=rsa-sha256; cv=none; b=JOhzyIGIn8t1Oa+sEe1wRs6f/4tDz67mT3cIv2E1+hla4aqUdURcio4UUXVgpgTw65NQtt lokHR2AugqPywQpyKVCoPsvnh4CvnhYf1ZziwNlbI1bL64gqvtRtGjVdfhRIYDvf34EzpU ffEhNoBB0KaAAG2KWHbx5MlbWnqr2nLdV8SDNOkmH6XmNr28izNbGPM4XwaNEts+W5izRS FBqT71nKmyyK8yRNG8aLGFJn8GLFj/HNwF1zonzOcbC4H0AfWBiYNPzpTkOtwbO7QC5KWG ir2V9uHeKf1k6/rC91nKmqa8GsuU1x19ZvxXAqCHoScvr4z6Nv2HsQAhavEjGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYL80dmxz12hv; Thu, 16 Feb 2023 11:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBthnS054996; Thu, 16 Feb 2023 11:55:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBthar054995; Thu, 16 Feb 2023 11:55:43 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:43 GMT Message-Id: <202302161155.31GBthar054995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 66e0e1636849 - stable/13 - linuxkpi: Add `pm_runtime_suspended()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 66e0e1636849da5c9109a553bef5f483cad6b7c3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=66e0e1636849da5c9109a553bef5f483cad6b7c3 commit 66e0e1636849da5c9109a553bef5f483cad6b7c3 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 22:23:14 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:12 +0000 linuxkpi: Add `pm_runtime_suspended()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38083 (cherry picked from commit 710c6084d11025fb3640dc1146ae1b157475333b) --- sys/compat/linuxkpi/common/include/linux/pm_runtime.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pm_runtime.h b/sys/compat/linuxkpi/common/include/linux/pm_runtime.h index 42c96a92b1ad..616dd508e562 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm_runtime.h +++ b/sys/compat/linuxkpi/common/include/linux/pm_runtime.h @@ -40,4 +40,10 @@ pm_runtime_get_if_active(struct device *dev, bool x) return 1; } +static inline int +pm_runtime_suspended(struct device *dev) +{ + return 0; +} + #endif /* _LINUXKPI_LINUX_PM_RUNTIME_H_ */ From nobody Thu Feb 16 11:55:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYL92pfnz3q5cX; Thu, 16 Feb 2023 11:55:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYL92KQ3z47x1; Thu, 16 Feb 2023 11:55:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Jaa7Xt2oFo865rfsJ0fAK8ERJO/1AVPqUux6jBidB4=; b=JOqe5zaak+UYSwgdM47DiqRbsO5yy9jmrWWVM9iAbQY/2xHstAndmF2acznK056roBKEcm fWI7EK5z5qAV4KeM21ppvKJ9nd2RraoCx8wTCbTt021gyf7XZQGP783Z8Ieqel7DWof9ev dFlYifLXSNYC3Ll0Q+rHjsEMU1H7f8n3k96YX4cJnSMEoW4sXYTSc961FWeXWomoUZO5wA 6XEx3vBTgjr7BTahC2XFZpXNDkbFvRiRTNWn3UvCvZ3ddd+UPgPY5R4FP3N6vozsgeSXte U5enMXVpdua/zzPS59ohuBR/e5AuZyl+1dSV/dRN+RIrhkWLVPbhhralz7oySw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Jaa7Xt2oFo865rfsJ0fAK8ERJO/1AVPqUux6jBidB4=; b=xvQ5EdMcymoforZ+Yl0PZAxam+2p92uHbgkJx7GvKVr0CKKlAkBnxXw9JX+W+t8EUtzJ8c KwY7htlRYaZ1Nn+956BvgY0Ekxc9mtz/GEygA+uBkzU3aCJ3p+BRIfTfZDzlHce9lrLAcV zxDCkzHvQxu0E+pEPr2zSLNB1gf3GhCK76gOaiaPofS2y+8aS80uqYavzWqGHR4Rizda8g /fJBpWU+bVAVyjmKWEOcxoDEZgeoDUEjV8olmeqcnspHNQbvFCWq3H04TVFbTqShI8Ay7c WVlRzR64ChI6VFpr4m3s/PPZZFtRYiP2ObzQ7bR/5ldmPJExjq8/kEiId9EppQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548545; a=rsa-sha256; cv=none; b=OvwUqsxCeLDXEHReMhqCKntNYNjShOkYY19C8wcUz9k9Z7y1laIQ/Y1ahKkxM/bVbdyxFL RiSIEYdidEhfsldEMHDuED07GsBm3ekcV1/0qG3rbAwQfKEYXRECssQiGviGUFzTYv1GJP kttN+MffZDlqx8LjZoVCCCjaIOzX3ox3Kr+ATV6RBV+S7g86PxbOpK0C82iRxGdjwsZgGv Uy/qbrkw8rpHF6saJrXpyQcSkQGb/mARV2oj/hmWtbyAf1ONNzZZ0pAyiBJkWGn/Z+yuj7 hKmWspnLsPTDwuNZxfR5K/wqjBybOVaY9vFuqVUazlOCBMIkLdgk1VSJPqdmxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYL91PSBz12tg; Thu, 16 Feb 2023 11:55:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtjqT055025; Thu, 16 Feb 2023 11:55:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtjfF055024; Thu, 16 Feb 2023 11:55:45 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:45 GMT Message-Id: <202302161155.31GBtjfF055024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: b813eb15d5b0 - stable/13 - linuxkpi: Add `pm_suspend_via_firmware()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b813eb15d5b07fc5e2e226056c995d3cc08f4160 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b813eb15d5b07fc5e2e226056c995d3cc08f4160 commit b813eb15d5b07fc5e2e226056c995d3cc08f4160 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 22:23:35 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:12 +0000 linuxkpi: Add `pm_suspend_via_firmware()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38084 (cherry picked from commit 270a13348065ebf2f02fbf88a02d42fa63a245fc) --- sys/compat/linuxkpi/common/include/linux/suspend.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/suspend.h b/sys/compat/linuxkpi/common/include/linux/suspend.h new file mode 100644 index 000000000000..5c15b0619bd0 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/suspend.h @@ -0,0 +1,12 @@ +/* Public domain. */ + +#ifndef _LINUXKPI_LINUX_SUSPEND_H_ +#define _LINUXKPI_LINUX_SUSPEND_H_ + +static inline int +pm_suspend_via_firmware() +{ + return 0; +} + +#endif /* _LINUXKPI_LINUX_SUSPEND_H_ */ From nobody Thu Feb 16 11:55:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLB4Csrz3q5Ym; Thu, 16 Feb 2023 11:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLB3MCcz47ml; Thu, 16 Feb 2023 11:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MqFOBt/0VtgEwuuVXj9mx2rru3zXH27T6PdRQoZuEQY=; b=SvDKGPUIgUEG93HkSp1uCTRq+we1Pir29SJ3xa1iODKR7yj+BVZr/NdimJbQkz1DAJwKTd SZKWSNfQUaMLNBRBuzvN4YCJAJ5xY+mdkz6f+imPyrW9ZLlCWXWyN/UXGglviNUV3DXNn+ 8Rk5d0mLOT2xnLugx0J2E8pg/dT4HcQ8ZEmBw6/RV46Fkwkg6Ho22fkpIIghRzyFnMtkEQ MSLJx8UXsocM+3MXHay/n/uD9guMjPPtDyAa0ye8htusOU2gIQMkH0NeJ3jgRY/RZPKv9S Ue2vU7wmN8XlrCDQ1QCiFsbgRhcMpvQGOVy/+inIAy6mLUyaef6tTcaHuvUAbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MqFOBt/0VtgEwuuVXj9mx2rru3zXH27T6PdRQoZuEQY=; b=yv3UiPjCidZ7aWJpRR0TsPzBtIvIovkcwIhO6bFqWNvtiKximnqoMBri7SRvqXEXcWRgid mV7gPtQQe3IO64qHqBRCecb/PMYEyOy/gqxDZ05xKe1jd7kYlJYGjKXgWGg2yxPYns+LTo LnUblmPuq0ny7TfogTywRlMal0vPqiKK4VsJQoowXc4/P+U9dShKDtJV60JSTutzHarv58 4g/FC4FAXBGN02mzTiF3d9qsu0+WSaYmT6n+hDxQWHFwj8R4jXiepjhKmJ6kEWXRWffUOR ufsZHWA0DOvRrzJGr6U/U8KKieEuUdjIy+7ML97YWtI0JZ1NKTv9+7q/7281rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548546; a=rsa-sha256; cv=none; b=gCuCR50T531cRN5pXUlsDq2e1D6TRxWxMEOngmnXipAqy3EpvabXQDRCXj01nfaX9Z8kep q0ksl1pxgiv4skTZL02PTYYI6rRdqLiot1yvuWNaB17bkKZPf4hDRcW99UPJydPP3084m5 RudjzAQ6PfYslVghF+ISNnkbPxfxqeZIDwlhQVkYFq2m8z4+oO95STMYn15GwFGp+NNBfc TDdX3RVhh6V8Kh6HyuJmO1ZqoMHcVRTlVgbx7706Y9y8qVbHhGs9kjg5+0jqqbeREgmx4v 45rZWmjKke1e0sCkFZjDIqdDWqFnhm/F7qU30nCcsCoUIjG9Ac0V0+3y+N7fBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLB2SMsz13H0; Thu, 16 Feb 2023 11:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtkqP055054; Thu, 16 Feb 2023 11:55:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtkxq055053; Thu, 16 Feb 2023 11:55:46 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:46 GMT Message-Id: <202302161155.31GBtkxq055053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 759a62384a17 - stable/13 - linuxkpi: Add `complete` field to `struct dev_pm_ops` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 759a62384a17970463d5e111a64e90017d0fd563 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=759a62384a17970463d5e111a64e90017d0fd563 commit 759a62384a17970463d5e111a64e90017d0fd563 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 22:23:57 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:12 +0000 linuxkpi: Add `complete` field to `struct dev_pm_ops` This change breaks the KBI. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38085 (cherry picked from commit 0d4d9ee6f0f9379f3de6e2c684dab19922eda705) --- sys/compat/linuxkpi/common/include/linux/device.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 70015fb7d81f..bf9a0cabd066 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -70,6 +70,7 @@ struct class { struct dev_pm_ops { int (*prepare)(struct device *dev); + void (*complete)(struct device *dev); int (*suspend)(struct device *dev); int (*suspend_late)(struct device *dev); int (*resume)(struct device *dev); From nobody Thu Feb 16 11:55:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLC6s3Jz3q5C1; Thu, 16 Feb 2023 11:55:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLC54HHz47y3; Thu, 16 Feb 2023 11:55:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ynnI7r2kCFjBaqI/MQTMm4euLREmC9Uzb+Q2Heqg5Eg=; b=KUWp9khZdqARtlCReoaYk8emr4J6ZGA+9UHPhGrKPrh7MXDkizSiwMM+WT4VqyVTDX8ZYZ NflhfVGgfqPr1GgmK7FK39yytx7xCe1eTWtgbgfv7PZ1Iqs7PW1PHtOZcrSwspbM1teGao D8lQ8FadL0wJ7oJMGUlizMWDnMYerDtsPrtV7alFNV4DWXF7DxndXStNgHCFurqPC9ptGx tXZ8yy4kN/v7+Rgy2mbY9AA9Yac+tPPZICvwXRXU9JRB4U6WY/gT7sla1Jhc29zsljOXWW QKsEgJxn8BW3IBKccaXj1Y9kPwYfFjVfhlWonkdZWufjGU9rLBZuH/8qfiQONQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ynnI7r2kCFjBaqI/MQTMm4euLREmC9Uzb+Q2Heqg5Eg=; b=UOGbnST3BvV03E8Wp6PPTbq1RioTimVezfAjYDiIBwdjfpXczPKby3b5H44f16VmeHxNOJ hwJJ89RoZxNsN4KPfIsazCL2qQU7uHfx3CuXKm5lyX/PvxlLmY/HMYoPh60gBntHliLoo+ IwfZwCPprDhAxH9DV35iggetDLVMZnR4y+NBNouYqIzxUq66Bnbn4UP5iyLRhyE6DGcsMs w0xfT2Zw7v0eQdz9yJjE8JZXlI1H6QHYZ5eN0iYlqJUhIHvMk4QR4nzXuXsMt2aE0rOmVv r0YEHU9VPHFranMGh4X8Kzz8dZmlkqKkWk0lz5xFhXsOOJysJX5as8D0RU2Aow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548547; a=rsa-sha256; cv=none; b=H/5f6929oDq8kTuFSR/mPv+cmr5gz+Qcnp7gl/IKh2agsnk6nHYtMhM9XWB8vIq4ttsnUz JQWvMoplX0qwa6Bx6w8oy49+l1EN9DFd5ffbQlm6GhiKuLSa/r0saJW8T3TgUhQiGVa/rB N8qxaBGN+nKMdErfA3F5Tvhm37p6S8HHJGEQZFpM1I3qPQ2OiBSuwWGKkPqDdynktYQuDy 61EM/mZSiydYzclGAZNGa99OXIffa5WpKD/YIP2LNpTdZrE8hHAsturVYYsdUhNzeb/Rkb zATp0dsekZ0YiVa15VB0ml/t+3pEa+P9cnfPw7JLe1s9/u8KI9ieYB1kCxwC6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLC3XtMz12fS; Thu, 16 Feb 2023 11:55:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtlF1055094; Thu, 16 Feb 2023 11:55:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtlou055092; Thu, 16 Feb 2023 11:55:47 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:47 GMT Message-Id: <202302161155.31GBtlou055092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a6575008038b - stable/13 - linuxkpi: Add `sysfs_emit()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a6575008038b7c70f8aaf0e8c18abdfe60e03852 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a6575008038b7c70f8aaf0e8c18abdfe60e03852 commit a6575008038b7c70f8aaf0e8c18abdfe60e03852 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 23:23:33 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:12 +0000 linuxkpi: Add `sysfs_emit()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38086 (cherry picked from commit 4fee6659c42c264e17dad7625f8663a45594d46b) --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index e6b8ad210f16..b9689a367c90 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -37,6 +37,7 @@ #include #include +#include struct sysfs_ops { ssize_t (*show)(struct kobject *, struct attribute *, char *); @@ -295,6 +296,24 @@ sysfs_streq(const char *s1, const char *s2) return (l1 == l2 && strncmp(s1, s2, l1) == 0); } +static inline int +sysfs_emit(char *buf, const char *fmt, ...) +{ + va_list args; + int i; + + if (!buf || offset_in_page(buf)) { + pr_warn("invalid sysfs_emit: buf:%p\n", buf); + return (0); + } + + va_start(args, fmt); + i = vscnprintf(buf, PAGE_SIZE, fmt, args); + va_end(args); + + return (i); +} + #define sysfs_attr_init(attr) do {} while(0) #endif /* _LINUXKPI_LINUX_SYSFS_H_ */ From nobody Thu Feb 16 11:55:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLD6Dh2z3q5J4; Thu, 16 Feb 2023 11:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLD5Tmtz48N4; Thu, 16 Feb 2023 11:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8EGUER1Mk9lkDwWFNTWDYxFnkvimmiYPLFwEbqFIsfk=; b=ndwUMhf9/FnjR1OjYzYk7v7wE2Q8U2Dgxcv+y7fLylILlsiiBHg9AGlhh1+G/WsKKA91di PhzAJ6nBWZ/bvZJoqaEQibU2C5ORqg4yU0X/2C14ut5hPShdeBi0dqimlr9osKRsv33VTw NihGlE+ACa0dYsRhp8en61a67FUUq/OVyIpyvp10IdGQptxyn+75fz37RM8qRbZxM7hEqw c+X2rX0/iayG+dSeTBlzjhCckzaVF4mzKvTnnSw6NKeDIWtfn0VKzVGMGGP8CdE5c3qppz trq7nFPo5wMmay1Wph6FiLfmXf6oCtoV5MGAsiWuKfaK77fSZlYAq7IqH48bZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8EGUER1Mk9lkDwWFNTWDYxFnkvimmiYPLFwEbqFIsfk=; b=G4zHJpkWHqyLoUPBG8mFixjeRqT4b8Ut5MbNSu/onLSgvhWN1YdOMN/wQYkV7c4H9CAw6B umjKDucKE10SfaR6HSpcqciBRS2ML6GbHb+fm87zzCi1L8/Cm29bzYF1poYOfIOuZ+rHFB PlbnyQaRtMpUP6WQgO0XIF7eMHn7xPAfxq/dtiaQlrt11HYqPDWVGZVaRf/vba7UfMPhWu 1uCwyVe7fz/q7IcJVtQaFWBcAsyB/rzvUOcMUMwpoe1Qpic3q+Xo8/sOsAeYp/MS5Hz9No YogFljIHvvD8gHuajCbpnxg4NlNUacZWmeitb8NU5rScDSI8nuCgg/pfjjWJow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548548; a=rsa-sha256; cv=none; b=xZQ74bEhKyXlmK1rc/uKvzr607J8xMLdw7/vTrWdHbg6V6+XU8UDE50i6n/8umSX8egfhD LzbYJBFqLk4GCV8S+3AHlZ78RASPlXQ4UcNYIa3GgzI8+gkSWURPnmF+Z6MfuX1MEkElfC MEDkp1/zXTSS7fkBPAPrS6+Orc1mURcF/yHPgmIh4nWRTD7l6FNw1iymqZ1Tz7mEm/pUcn z83NGj1ULcnmmhEcuZRxPRU18BPg9UFGRU5xwZaCN7Kignge0nulR9dGieWjt4d2oZqUfs xUUq2G/Vg4xi3C0ovq2AxW71lMBV1a2Ajhjb3jUHDC7scxvtkVcfUVo3zL7bTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLD4NPKz12W3; Thu, 16 Feb 2023 11:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtmQX055125; Thu, 16 Feb 2023 11:55:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtmgo055124; Thu, 16 Feb 2023 11:55:48 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:48 GMT Message-Id: <202302161155.31GBtmgo055124@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: cc32cc0f8e96 - stable/13 - linuxkpi: Add `io_mapping_map_user()` and `remap_pfn_range()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cc32cc0f8e965b5c3d0a7ac6595ae97997a76d1b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cc32cc0f8e965b5c3d0a7ac6595ae97997a76d1b commit cc32cc0f8e965b5c3d0a7ac6595ae97997a76d1b Author: Jean-Sébastien Pédron AuthorDate: 2023-01-14 12:22:19 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:13 +0000 linuxkpi: Add `io_mapping_map_user()` and `remap_pfn_range()` The code comes from the i915 DRM driver. In Linux commits b739f125e4ebd73d10ed30a856574e13649119ed and b12d691ea5e01db42ccf3b4207e57cb3ce7cfe91 (Linux 5.13), the i915 DRM driver dropped specific implementations to use Linux generic functions. Therefore I moved the FreeBSD code from that i915 driver to linuxkpi. However, these commits were later reverted (also in Linux 5.13) so the i915 driver doesn't use these functions. But perhaps it will help in the future. To sum up, the code comes from the i915 DRM driver but it doesn't use it (i.e. it continues to use its internal implementation). Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38088 (cherry picked from commit b99bc862324526b3ee6fad335618cbe85ad9e11e) --- .../linuxkpi/common/include/linux/io-mapping.h | 12 +++++ sys/compat/linuxkpi/common/include/linux/mm.h | 6 ++- sys/compat/linuxkpi/common/src/linux_page.c | 58 ++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/io-mapping.h b/sys/compat/linuxkpi/common/include/linux/io-mapping.h index 5c24f1ff8659..e874c5bcadc7 100644 --- a/sys/compat/linuxkpi/common/include/linux/io-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/io-mapping.h @@ -37,6 +37,7 @@ #include #include +#include #include struct io_mapping { @@ -100,6 +101,17 @@ io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset, return ((char *)mapping->mem + offset); } +int lkpi_io_mapping_map_user(struct io_mapping *iomap, + struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, + unsigned long size); + +static inline int +io_mapping_map_user(struct io_mapping *iomap, struct vm_area_struct *vma, + unsigned long addr, unsigned long pfn, unsigned long size) +{ + return (lkpi_io_mapping_map_user(iomap, vma, addr, pfn, size)); +} + static inline void io_mapping_unmap(void *vaddr) { diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 4afc1a953f8e..8bee6188c9cd 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -218,11 +218,15 @@ apply_to_page_range(struct mm_struct *mm, unsigned long address, int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, unsigned long size); +int lkpi_remap_pfn_range(struct vm_area_struct *vma, + unsigned long start_addr, unsigned long start_pfn, unsigned long size, + pgprot_t prot); + static inline int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, unsigned long size, pgprot_t prot) { - return (-ENOTSUP); + return (lkpi_remap_pfn_range(vma, addr, pfn, size, prot)); } static inline unsigned long diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 5fa370147045..8b2006668f8f 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef __i386__ DEFINE_IDR(mtrr_idr); @@ -334,6 +335,63 @@ retry: return (VM_FAULT_NOPAGE); } +int +lkpi_remap_pfn_range(struct vm_area_struct *vma, unsigned long start_addr, + unsigned long start_pfn, unsigned long size, pgprot_t prot) +{ + vm_object_t vm_obj; + unsigned long addr, pfn; + int err = 0; + + vm_obj = vma->vm_obj; + + VM_OBJECT_WLOCK(vm_obj); + for (addr = start_addr, pfn = start_pfn; + addr < start_addr + size; + addr += PAGE_SIZE) { + vm_fault_t ret; +retry: + ret = lkpi_vmf_insert_pfn_prot_locked(vma, addr, pfn, prot); + + if ((ret & VM_FAULT_OOM) != 0) { + VM_OBJECT_WUNLOCK(vm_obj); + vm_wait(NULL); + VM_OBJECT_WLOCK(vm_obj); + goto retry; + } + + if ((ret & VM_FAULT_ERROR) != 0) { + err = -EFAULT; + break; + } + + pfn++; + } + VM_OBJECT_WUNLOCK(vm_obj); + + if (unlikely(err)) { + zap_vma_ptes(vma, start_addr, + (pfn - start_pfn) << PAGE_SHIFT); + return (err); + } + + return (0); +} + +int +lkpi_io_mapping_map_user(struct io_mapping *iomap, + struct vm_area_struct *vma, unsigned long addr, + unsigned long pfn, unsigned long size) +{ + pgprot_t prot; + int ret; + + prot = cachemode2protval(iomap->attr); + ret = lkpi_remap_pfn_range(vma, addr, pfn, size, prot); + + return (ret); +} + /* * Although FreeBSD version of unmap_mapping_range has semantics and types of * parameters compatible with Linux version, the values passed in are different From nobody Thu Feb 16 11:55:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLG0t3hz3q5JC; Thu, 16 Feb 2023 11:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLF6t6Lz48Zj; Thu, 16 Feb 2023 11:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0TdMCR+LoL5LvpUicqO7kU+VwanA9/xwdDvhDxf28g=; b=WzpUY2D1wlldf65mg2kEgBKlLZgD91mth9fsV+XLG5SygAQal2QzElp2rOnDNC2MDUZstc Y0ekLKwR14joq34e6f+KjkkRwaNtZFcBIUd7ne28eekWUhQwzp5stLqBIOAxEOw73jpe0y R1bEOnq5qGcPVW3uh9d6s9xDbzxFdsAstJEJM40AlFIZLKhX9dmtlKCjTA7ciwaaE1B5px rGwKw7Oqr7InFMfHN65tPyY+y+fj5WgJxNxdVDVbvIaX2EsE/4l7uxi2OrPrd9exIloxtR n2dEeCKmlfaEj8vw6NQuoAKFctDFuMeKkmGdvRmPAw7Jyb9RHY+u/ZOy5LlizA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0TdMCR+LoL5LvpUicqO7kU+VwanA9/xwdDvhDxf28g=; b=d5+4/JLbkO0x2s9b7h8AwQ7l8DmBHXDuPMS0Vo9LVu5BLn/2C34q/ln2i3IpARfaF31Dr0 d0SQ3gX30UF/ebRCoMyIyloTq4G5lVU+qxMCI77Z7FZHkbsuBtvTsNJO9OH8zi0va6+mQ+ w8ZjbG5IxhbY4104SD8CkGZmvm2duyB9GObh24vEEQyyJt4Pq2B4YiaKs2HyiBQlbcjwJT qnkvrA+jbiZ/D+qQPCz3mfnbT5ea0q0c5drUHMbSnwtxP/MQ7WDj6JQFekb69vOjokdpcT XMAfIkeIHCDy3TVD8JCAufLXAp3OZZ+GSuoERoCBIqEw0Ap8tGu7om2KFJkXJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548550; a=rsa-sha256; cv=none; b=J3qoShXSuJm+evaUm7uht6w1r6a/svEp6MWbnTJ6zIcmcBBIhgd2cSrQ6nrhRBW0+/7ef5 ug3D46f/wOHzrqrLlwdf4KV1GJoY05AD4agLKFgPHVwlgKniv2F4r9IRXxue1HW+spsvat hvyKn6hT6f85ZkP50EYkcFPzK4m74snVpnRUuc1W5/kvJCm6FDr9Iot+o1gqdKCqW1U9jy exMfoUdwF1Ipv6jPWTppmP3ejmSvs/3Ik4lawpmd/bXOw6Cjv0O6wCpjaypxsnpur4h+vA cozsnRZLb7gFPhn4t++eMPJF/9qYNHJKn8VJXViZU0WEfcJoEruPqrRVNgGUOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLF5hq6z137b; Thu, 16 Feb 2023 11:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtnSw055154; Thu, 16 Feb 2023 11:55:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtnLs055153; Thu, 16 Feb 2023 11:55:49 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:49 GMT Message-Id: <202302161155.31GBtnLs055153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: b2bea8bf56a8 - stable/13 - linuxkpi: Fix `atomic_long_sub()` overflow List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b2bea8bf56a8f8de612b6fdb0d14fdebe4414af6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b2bea8bf56a8f8de612b6fdb0d14fdebe4414af6 commit b2bea8bf56a8f8de612b6fdb0d14fdebe4414af6 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-15 14:56:48 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:13 +0000 linuxkpi: Fix `atomic_long_sub()` overflow By (ab)using `atomic_long_add_return()`, `atomic_long_sub()` was making the atomic long overflow. Indeed the underlying FreeBSD atomic is based on an unsigned long. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38090 (cherry picked from commit 9491ea7c68221ca7bc5e369ebb57660886ef1b13) --- sys/compat/linuxkpi/common/include/asm/atomic-long.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/asm/atomic-long.h b/sys/compat/linuxkpi/common/include/asm/atomic-long.h index f8bd9edfccf9..aeec6edd707d 100644 --- a/sys/compat/linuxkpi/common/include/asm/atomic-long.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic-long.h @@ -41,7 +41,7 @@ typedef struct { } atomic_long_t; #define atomic_long_add(i, v) atomic_long_add_return((i), (v)) -#define atomic_long_sub(i, v) atomic_long_add_return(-(i), (v)) +#define atomic_long_sub(i, v) atomic_long_sub_return((i), (v)) #define atomic_long_inc_return(v) atomic_long_add_return(1, (v)) #define atomic_long_inc_not_zero(v) atomic_long_add_unless((v), 1, 0) @@ -51,6 +51,12 @@ atomic_long_add_return(long i, atomic_long_t *v) return i + atomic_fetchadd_long(&v->counter, i); } +static inline long +atomic_long_sub_return(long i, atomic_long_t *v) +{ + return atomic_fetchadd_long(&v->counter, -i) - i; +} + static inline void atomic_long_set(atomic_long_t *v, long i) { From nobody Thu Feb 16 11:55:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLH2T2Mz3q5l2; Thu, 16 Feb 2023 11:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLH0Plkz48jD; Thu, 16 Feb 2023 11:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BMWn4kpO+KCAiF/ibGFv8dGZ57SMGnV3JOswQiVVAIU=; b=ZHnxtK5c+O50Zm9pcsIL8tgzG2TrH+qZsH8NeF0iESOR59E/3UJA8eaTOCkW8gfCL7gLnG IsYYvuerbKX3QQ+/7HdQ4APClfT7ZJzkBe1/mZDvPAASu17VMamNd9KE29J2zFMlEqjhXX kj5nW81+Y0U6653OTj72/lL8zkuAN7B+MeKKvU7nwn6n/2aDhJ56pz0dQm/d575mmXbDI5 xK9EAyYtdBFtvUYQhvubMUhtiGbaqI6/7EDyBsTWwFkS++ORAJ2Ji5vzZcO4FjExLC3GwR 1n266LuvXD0HYHqinoz26mIf3DG4VZHIG97xDiSYKNudE+rClx6GS9DDmKHfHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BMWn4kpO+KCAiF/ibGFv8dGZ57SMGnV3JOswQiVVAIU=; b=obEJvoeuYcfc/tWPFnLLsqVbVHuZ2j590KDPMit6hoDJjphGLwumJk13uy/PiFgn4yz6DO FGGPMR6u2RVtW2HLusG/rsS4BBhpRwTSaMfWHC6Ks+Ffrl89yPnl4k6PIocD+bH21lLYNc jopZbi2Ws9lKNsIvFz5bq4YQVJLGQ9F6obZ6erfUZrBpHgWy425fVTcuz+q90zGZFFgLsv FmxMeuRpiYKoUHA0ZwtQHoRp8RYHZEfHF1w6hMtmG6UBrsBQqrZgloNF+S4QCes0b4tw/I v37+E0IyggejcWYN31sqpdjhQNw3vUOFu0YWs6WsaaogrXVyVKLGPA1ScWx+wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548551; a=rsa-sha256; cv=none; b=H06nkQJXDptgceZ8L7Wf5YIAzE919xqHTSqM+t9z1R4xv/6z9iJ2McMDk3oN8JbhVqNvd8 0a9N0NKpGnchp33UGwYy0lnrUlk1utD6pRPQM0Q5ZvGZE5K6hgmJncOOYfHX5sLXaXsfsM 6yqKc3kGGULkyRZqvynv5sIigTPHSmiqAIwfo8+nI91YZLKVEnEoL0Fe5utZsh2qRnd0Jd IVt2XZp9btjL6rSluEESyJVhcOTKJhLwkZsbbcenWvhDoH81ox5TOVp+oFTIsh5FsvmToX jZx1McK7ElqYvyERlMUG6dxu3BIjyR5tR8NYn8eMVut+xTT0smoaMDluCSd5DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLG6dWCz12tj; Thu, 16 Feb 2023 11:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtowp055183; Thu, 16 Feb 2023 11:55:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtoQY055182; Thu, 16 Feb 2023 11:55:50 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:50 GMT Message-Id: <202302161155.31GBtoQY055182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a0bf2c3aab9d - stable/13 - vt(4): Return errors from `vt_{,de}allocate()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a0bf2c3aab9dded785f2a406744e673a291e26c1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a0bf2c3aab9dded785f2a406744e673a291e26c1 commit a0bf2c3aab9dded785f2a406744e673a291e26c1 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-14 18:22:56 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:13 +0000 vt(4): Return errors from `vt_{,de}allocate()` This is useful to the DRM drivers to let them know if a device is effectively used by the console. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38089 (cherry picked from commit 29ab19455484be96150fa5e87bd38aefb85c888a) --- sys/dev/vt/hw/fb/vt_fb.c | 10 ++++++---- sys/dev/vt/vt.h | 4 ++-- sys/dev/vt/vt_core.c | 16 ++++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/sys/dev/vt/hw/fb/vt_fb.c b/sys/dev/vt/hw/fb/vt_fb.c index 2f6c4c3939d5..a84e182ef557 100644 --- a/sys/dev/vt/hw/fb/vt_fb.c +++ b/sys/dev/vt/hw/fb/vt_fb.c @@ -509,19 +509,21 @@ vt_fb_fini(struct vt_device *vd, void *softc) int vt_fb_attach(struct fb_info *info) { + int ret; - vt_allocate(&vt_fb_driver, info); + ret = vt_allocate(&vt_fb_driver, info); - return (0); + return (ret); } int vt_fb_detach(struct fb_info *info) { + int ret; - vt_deallocate(&vt_fb_driver, info); + ret = vt_deallocate(&vt_fb_driver, info); - return (0); + return (ret); } void diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h index 977372f04a7d..764d612ed060 100644 --- a/sys/dev/vt/vt.h +++ b/sys/dev/vt/vt.h @@ -91,8 +91,8 @@ SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RWTUN, &vt_##_name, 0, _descr) struct vt_driver; -void vt_allocate(const struct vt_driver *, void *); -void vt_deallocate(const struct vt_driver *, void *); +int vt_allocate(const struct vt_driver *, void *); +int vt_deallocate(const struct vt_driver *, void *); typedef unsigned int vt_axis_t; diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index e148fa4f8d7d..72e3e8f24883 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -3138,12 +3138,12 @@ vt_resume_handler(void *priv) vd->vd_flags &= ~VDF_SUSPENDED; } -void +int vt_allocate(const struct vt_driver *drv, void *softc) { if (!vty_enabled(VTY_VT)) - return; + return (EINVAL); if (main_vd->vd_driver == NULL) { main_vd->vd_driver = drv; @@ -3157,31 +3157,35 @@ vt_allocate(const struct vt_driver *drv, void *softc) if (drv->vd_priority <= main_vd->vd_driver->vd_priority) { printf("VT: Driver priority %d too low. Current %d\n ", drv->vd_priority, main_vd->vd_driver->vd_priority); - return; + return (EEXIST); } printf("VT: Replacing driver \"%s\" with new \"%s\".\n", main_vd->vd_driver->vd_name, drv->vd_name); } vt_replace_backend(drv, softc); + + return (0); } -void +int vt_deallocate(const struct vt_driver *drv, void *softc) { if (!vty_enabled(VTY_VT)) - return; + return (EINVAL); if (main_vd->vd_prev_driver == NULL || main_vd->vd_driver != drv || main_vd->vd_softc != softc) - return; + return (EPERM); printf("VT: Switching back from \"%s\" to \"%s\".\n", main_vd->vd_driver->vd_name, main_vd->vd_prev_driver->vd_name); vt_replace_backend(NULL, NULL); + + return (0); } void From nobody Thu Feb 16 11:55:51 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLJ2RKBz3q5Ys; Thu, 16 Feb 2023 11:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLJ1jt9z48lx; Thu, 16 Feb 2023 11:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oRxbOYTikuIxTl8Xs3FfnubDvyOX9qQtpRMVPn4u2E4=; b=PDsg75m7zFhS0lJQFqHjEDCjsDVAgNzO7ulJXvyZCGQ2HorsJf8b8HAz8VgaokI8l4z/5M LYf6CnV2eBb7r1c/xuGItl1YQvYWaM+NZ/rGmtFTjYijyrZQnQ82uoShNytgp/9wHRze44 d+e4GiTfzFsTMou/WCOvZmrm22GoVvok61Yieyg6qdSFx/bnzzBh5/vHOHOLS392nqRAMJ nEsDiarDilKgsd0t+Hwjw09YluYx31W+yVF73dvsJW0aaTc+JYSwVuZ2kgBJIQr1c7tP+9 Rv04TNXqKAb9N4UJRQzGMxHFssjxOQcmmWRfhnPzUH9NNOtRGGOx/kowvncLVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oRxbOYTikuIxTl8Xs3FfnubDvyOX9qQtpRMVPn4u2E4=; b=L6PG/2yWIuuKP6iq83WRWYQ/HyCrUCM7IE85zK10MDxv7mgc0jj/mmgGLu1W9NDmYrqtb/ i8Mfpw7mluyvpqwRtHFYkleImJNnL7d5TMtgZJNZgLqsCNVGm89tXTeZBfbmN/2u/lehzE UzYhZzdz9ZcflfTmTAU9abiTQGCPScFLNH+Ex/hwEoZ4/M45R0Xv+w9CpoD3dLgnbQI7zg Q/ZP4tVlw/DTc/nWAhoYyldnQsy0il8N2BL6AmS9Ad0KOGVutGEth+2oFUgCxGX49XDDyK 5iJoj+YKFAFJrCGzZURg0xEytUxqnP8y5hwbW8FkMFi9aI2HLESlMZe9aofW1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548552; a=rsa-sha256; cv=none; b=yVoUKozdeDHVj4Tq/S5mp/7bsMw5Vem4b+AYml3spIO4NP42Znq/XZPif3e1hBK1QPsVib w517yQVwj7hUBmR0miUwdmEZzLEf1dkteDC9Yw6yO+Z20S71l6OtkqYo+ssEohaeW8hh8U lxleioHHdW9u7KYOtnjV2OfdAY0ypgY/wE1XAx1lpVyjYWSf4yuJOuFIIuR/u/MRGBhRFq ttBDYYpa0wH8IwPl7FdBm53/lbXOri4MEkPdJgmUulk6+eQzKGjYsqA0jlnaVYWkDwjBkh imYJgOS+4Gm7OnURZ0DwDTawWXwHLPALPmFBChyOEXC7MzSll6PMF5bj3hukcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLJ0mSgz12fW; Thu, 16 Feb 2023 11:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtqkV055212; Thu, 16 Feb 2023 11:55:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtpRX055211; Thu, 16 Feb 2023 11:55:51 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:51 GMT Message-Id: <202302161155.31GBtpRX055211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 01ae017c3e0d - stable/13 - linuxkpi: Define `dev_dbg_ratelimited()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 01ae017c3e0da57e83982d5bd1d21bd8d4af9a4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=01ae017c3e0da57e83982d5bd1d21bd8d4af9a4d commit 01ae017c3e0da57e83982d5bd1d21bd8d4af9a4d Author: Jean-Sébastien Pédron AuthorDate: 2023-01-19 00:15:03 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:13 +0000 linuxkpi: Define `dev_dbg_ratelimited()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38145 (cherry picked from commit bbff0400c1d7728ae1759d8f740033a0a2f8aeff) --- sys/compat/linuxkpi/common/include/linux/device.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index bf9a0cabd066..01a1729830c4 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -233,6 +233,12 @@ show_class_attr_string(struct class *class, dev_warn(dev, __VA_ARGS__); \ } while (0) +#define dev_dbg_ratelimited(dev, ...) do { \ + static linux_ratelimit_t __ratelimited; \ + if (linux_ratelimited(&__ratelimited)) \ + dev_dbg(dev, __VA_ARGS__); \ +} while (0) + /* Public and LinuxKPI internal devres functions. */ void *lkpi_devres_alloc(void(*release)(struct device *, void *), size_t, gfp_t); void lkpi_devres_add(struct device *, void *); From nobody Thu Feb 16 11:55:53 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLK3rpGz3q5hm; Thu, 16 Feb 2023 11:55:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLK3225z499Q; Thu, 16 Feb 2023 11:55:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kv0X98tyug00zTdLfFLRWGhRH1RxumPj/Ks060C0hkQ=; b=dR3NrQOQrblxr6Eb6NyBu9tE5EHYlVy+eGeGuxAoOPT39LRPWmxdtkn12InfNtLPnjpvsa +s9zWM872OTJzT7jUj38Lhzzp5zTcIgiQnFQB4nc3DGKcGakGgcZAAhLqdxWYPrVVaSnzK Uac7He7OKHXF7Hizupma0NUOQKP+GITUIpBUYd4VCW0EdpYtxgKAYUM+QasEII7LSRbBoV CmMoAdRokqw2aRQYj95dVqD7aNdvYrTxEI9tdsF+ZkXgxZjKo8HAVNU+2uH2DZaZgMbQGX 4C8X3f7oujKRbfzD+HHUsjY+A/zFZ06UeRncOrWw3E2gAdZNV7bHMPtFXzIpow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kv0X98tyug00zTdLfFLRWGhRH1RxumPj/Ks060C0hkQ=; b=uinaUhFDgJtnxRH1Epmev4hnxSXjHkHVis0vuz8lwiRvcP87iTq5EIB9OeToEGOPQe+ZXr JxvNJtUB+1ARIPm3t4ycZfEpHQ6BvYrGDHsU7QhTJv+v+9ij9b+xeoWdy3/gxL3LIglw4y wYRK9dAR62SclkAB5LaTGdnXVLEzY1ACDJRbn/4AKvPLhUSQ0XSsFdqEIlTvojCjHVBeNU KlNxOZxkHWVu2omJ+G6AxgE1vU8VN0EQNC6BJ0gL26flV03MNoT9v4SPi/J0kS8UBkDGDU 51fpV5Mho9HHlKTWLGDhphwz4R1+FeqPrdKSrvCsh4SpJJnCgRZ1Y4zeRYfUYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548553; a=rsa-sha256; cv=none; b=dqnsCDIDmjrBpI8DT3ctNzPzh+0RA7C4pVRVZx644QKTZgQ9PZv9aEzKOia4taZg7ZLeWn oal2KTJ8HSDa/j+ItfviGyhXi65a3I+ap1ZtnLt99bV8y+f7lz1GZdHtwJlS0pW+2CzuWB gVefv/99ioMGxkBWfIDcobw7dX9tb+4R/AjrRnVbNKIQ67TEKqgi3g07rRejPrSdStUstU ozlP0aL4RS2brEICv+43BC8zilxFhLXvERcHvYkW/6ytdMZrmOxa3QGmepVlL1cfbBCTL7 yYdMRu3FRX9Mf+VWS2DMeiJy5v8wVnrmb00wxEyAigNQ4fnxJ3ukJHpFBYggxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLK1qqFz12W4; Thu, 16 Feb 2023 11:55:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtrXw055248; Thu, 16 Feb 2023 11:55:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtrcU055247; Thu, 16 Feb 2023 11:55:53 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:53 GMT Message-Id: <202302161155.31GBtrcU055247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 2f0b0161cee5 - stable/13 - linuxkpi: Add `pci_device_is_present()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f0b0161cee5f767c82e16f164a1bad5881d428b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2f0b0161cee5f767c82e16f164a1bad5881d428b commit 2f0b0161cee5f767c82e16f164a1bad5881d428b Author: Jean-Sébastien Pédron AuthorDate: 2023-01-19 17:46:37 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:13 +0000 linuxkpi: Add `pci_device_is_present()` This calls bus_child_present(9) internally. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38148 (cherry picked from commit 49b6d5ed142d6c59b7a517ff5660165d8647bd01) --- sys/compat/linuxkpi/common/include/linux/pci.h | 9 +++++++++ sys/compat/linuxkpi/common/src/linux_pci.c | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 8d41e33b0da8..ad7589e692f2 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1664,4 +1664,13 @@ pci_is_enabled(struct pci_dev *pdev) PCIM_CMD_BUSMASTEREN) != 0); } +static inline int +pci_wait_for_pending_transaction(struct pci_dev *pdev) +{ + + return (0); +} + +bool pci_device_is_present(struct pci_dev *pdev); + #endif /* _LINUXKPI_LINUX_PCI_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 54780adfda14..e4f85b906563 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -962,6 +962,16 @@ out: return (-EINVAL); } +bool +pci_device_is_present(struct pci_dev *pdev) +{ + device_t dev; + + dev = pdev->dev.bsddev; + + return (bus_child_present(dev)); +} + CTASSERT(sizeof(dma_addr_t) <= sizeof(uint64_t)); struct linux_dma_obj { From nobody Thu Feb 16 11:55:54 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLL4pXjz3q5l8; Thu, 16 Feb 2023 11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLL44gmz49T1; Thu, 16 Feb 2023 11: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=1676548554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XWGLcjW52iSTCz5+Jzn+Xaz9rpXqYFMirmPtDfJjWM=; b=yToSw+EPV2KBy6GDBw2MtdImcq6jvm7JWZ1d5Iy00uPqpsA60b6pLC646Wrh6rXJ5F3NbI tlaJXPsmjEN3AXkaqSBMPiaBfqhUKsNbQE8qEOgFNwGjthKXqzMJ7sd91QUJDzXu3X3gn7 2RlDnJ6Q1OebvQkNrOdRf5UaL1UEr0qg9PMrwLwGoeZVUmk+j16/5Yjc9L2XQ9AN7Kkz+I p9fbc3SdSvBAQrMjHLxK9RPw++cH9sfsTAttq/D4n1ziOw7dFv0aUQ8huP7Xw6FMyMaGpQ oLjlIGZ4zDA3mRS743Xye7XXbPACaLw4w2HObdNAmW4R8cL8epkhGxxYB9Cizw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XWGLcjW52iSTCz5+Jzn+Xaz9rpXqYFMirmPtDfJjWM=; b=sJj2k0LA6iqCWB+P6dQ4ZtBIWD5j05aWRixJXsKhJhEYkLi3XUBjDhSnuABICOjWePxcg4 h150i1WFSEuHINKzVjFpDWCZl6ZSKWrC4ydOoFccDhM2BrhoWqDC55+vUOJuf5320tOK+p MiyisdC2XxyZG7BGuPGiuK/4KVcSTV2b0CZaBE2H3k/Yqld+XtpKZw2aUZhehHLHeTd9Gs AD26LeXScnPhPwp5KDorPkeOLBNIXsIqhzVx/BTwtIJR55Fi3KU4oYQ9zflRki56KEEZWh m4t/CZKT0gKkK8bWPXJwBSVTaHxGlYXkPHLCR4MRAXelWvAeQMJxced7VaQZCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548554; a=rsa-sha256; cv=none; b=eBQcMNSjt8W4Enq+CokKFRZhZl8DXa/9v9xfclvuMpOQVqtHvTy37NoYLLJ/x3bVrzVB0f Dn4Kv8DGt5KPJKblixv3WtPoit586vcy9eMafPJQ57Thzv8g7EF0Su6dRqdrwS/jC6o6xD SdPDDC5J64mmHE3E69rTWcxiWqbmLTbKHCWYpc6Jwuo7KUrGx9kG6n8FJPtfxQrdXx4wL4 VKX/liuXOs3cI1gSyxonMqIANS26BPRN9OXWx+ziImpmWHtxCFRMN7TsrxlJO3k83G03Wj cOy2/Iw8hq6mPe4ysMYRXcc33tlGspLFaGILXZh4a5O2MbLCtSWviFwzUjsgMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLL2vn2z12hy; Thu, 16 Feb 2023 11:55:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtsDV055278; Thu, 16 Feb 2023 11:55:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtsqY055277; Thu, 16 Feb 2023 11:55:54 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:54 GMT Message-Id: <202302161155.31GBtsqY055277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 94c98df08d94 - stable/13 - linuxkpi: Define ENOKEY to 126. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 94c98df08d942d19c3fb71d38e17ec59a355b1eb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=94c98df08d942d19c3fb71d38e17ec59a355b1eb commit 94c98df08d942d19c3fb71d38e17ec59a355b1eb Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 17:14:25 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:14 +0000 linuxkpi: Define ENOKEY to 126. This is the same error code as Linux. This value is unused on FreeBSD. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38149 (cherry picked from commit f27b1399d68585f5edd83645c2a37a1580e7fb93) --- sys/compat/linuxkpi/common/include/linux/errno.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/errno.h b/sys/compat/linuxkpi/common/include/linux/errno.h index 796203422d23..d00dbec86b5a 100644 --- a/sys/compat/linuxkpi/common/include/linux/errno.h +++ b/sys/compat/linuxkpi/common/include/linux/errno.h @@ -35,6 +35,7 @@ #define EBADRQC 56 /* Bad request code */ #define EBADSLT 57 /* Invalid slot */ +#define ENOKEY 126 /* Required key not available */ #define ECHRNG EDOM #define ETIME ETIMEDOUT From nobody Thu Feb 16 11:55:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLN1Qkkz3q5cw; Thu, 16 Feb 2023 11:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLM5hX0z49C0; Thu, 16 Feb 2023 11: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=1676548555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OIe4MjYA06uu5WoPdGIcbJidvZCzfNoIqImJOfatD/I=; b=UG3z53GLZWESp/PnGV81N73v19CevWiEGMIzUh2i5LlBQKrXbdyJp9AvEQi6ju9H0txjSL 8fzYsnBHCM3LaV9rPxHbaezIMi46U6q0Q7sc7Km2Vw1uG+AkgM6zr71BvGy8AGX3JgluQs seLvQLWWi+QMd8FgUdoaPOs6r8zzfovnLmLwEIkY+JCdCMwWS6bYIsTLRYgtMAYlQ5lj1C xt79QlELnGLbOWj1QaHPZVHI5QV5qeS3PUdWRxTa2aiOo39FyCKxdu9j61T2qWTJtgJmQl PUrUJ81amCTZhcuqJUsQzU3CHHO1qAi0iR2QYkTovSQ0EYtS8TJPgRpn0wt9iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OIe4MjYA06uu5WoPdGIcbJidvZCzfNoIqImJOfatD/I=; b=xjek58cKSsk5LJATy390vZCJzc79aEWWiG2PeV2zOKxwDWXRn8vev3QnETY/wcUj+2qmKi tUQJW6XQlZmnJyWNSPwvDGNimBmUmoyHmxGbN5fVOZCWH54EPy3aaW/rjCLhbPykqjVMlm vp/0SGxKLu/t6j1th8Pggwl9u47UmPIl6Bs4NThO2iX8WhLdBJp4I/TprbF7tHNMmMBS8+ hr/FT15bpu+Fdn5nd0/hQk2Ug/GrNZ3sNMHBOvEbmPeL2j7jUZPLRP3f8fep3H3U/WVrEo 6TZ+kwoBB6+9ELRdA22aERddEKh/sjWQGHe9Aa1PxRoHUYhohSevDHtH8LRBTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548555; a=rsa-sha256; cv=none; b=ItL9WF6DmQNwC4vWcvUJRIxJQfN3pgdwVaSfzbVtPDit7SU0ZdR6G8t+wIX3eoRj+EhOt7 EZdJSnsusDSeaK6HYyE01jeGDpSzy/HFEQZWsyulT04itELEfDVxJ4qwy5c5YaZqNkjUK3 I280yQPBmWFUDNIpSVoHtRyttOyeZGFRcWKv8YBW2rc36H3EECQbQ7jFQqML+578MlYsOL ewiO3GppY0SIKnnoIoxbWXgoIst6oYWpwuMu9iTmD95+E6rMSEr9gkqjl1tLY0/xcmL+Xm DZh3PW1C5Pd7xY7qIC9wdpwXiAl9Rmf2lyoh4Wfad2sHnhEguC1G8QQd8YZ7cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLM4Bz7z13H4; Thu, 16 Feb 2023 11:55:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtt1o055307; Thu, 16 Feb 2023 11:55:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBttNv055306; Thu, 16 Feb 2023 11:55:55 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:55 GMT Message-Id: <202302161155.31GBttNv055306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 00ccfc51f72e - stable/13 - linuxkpi: Adds more `SZ_*` macros List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 00ccfc51f72eec7c801b77c7a142e7b9de0e9ed7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=00ccfc51f72eec7c801b77c7a142e7b9de0e9ed7 commit 00ccfc51f72eec7c801b77c7a142e7b9de0e9ed7 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 17:17:37 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:14 +0000 linuxkpi: Adds more `SZ_*` macros `SZ_2K` and `SZ_1G` were defined in irdma. They are removed from this driver. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38150 (cherry picked from commit 04cbeeb59742a9e88d838e18b84004e9bb89ca00) --- sys/compat/linuxkpi/common/include/linux/sizes.h | 14 ++++++++++++++ sys/dev/irdma/osdep.h | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/sizes.h b/sys/compat/linuxkpi/common/include/linux/sizes.h index b132eedff933..4e2eee2e1b33 100644 --- a/sys/compat/linuxkpi/common/include/linux/sizes.h +++ b/sys/compat/linuxkpi/common/include/linux/sizes.h @@ -32,6 +32,7 @@ #define _LINUXKPI_LINUX_SIZES_H_ #define SZ_1K (1024 * 1) +#define SZ_2K (1024 * 2) #define SZ_4K (1024 * 4) #define SZ_8K (1024 * 8) #define SZ_16K (1024 * 16) @@ -43,9 +44,22 @@ #define SZ_1M (1024 * 1024 * 1) #define SZ_2M (1024 * 1024 * 2) +#define SZ_4M (1024 * 1024 * 4) #define SZ_8M (1024 * 1024 * 8) #define SZ_16M (1024 * 1024 * 16) #define SZ_32M (1024 * 1024 * 32) #define SZ_64M (1024 * 1024 * 64) +#define SZ_128M (1024 * 1024 * 128) +#define SZ_256M (1024 * 1024 * 256) +#define SZ_512M (1024 * 1024 * 512) + +#define SZ_1G (1024 * 1024 * 1024 * 1) +#define SZ_2G (1024 * 1024 * 1024 * 2) +#define SZ_4G (1024 * 1024 * 1024 * 4) +#define SZ_8G (1024 * 1024 * 1024 * 8) +#define SZ_16G (1024 * 1024 * 1024 * 16) +#define SZ_32G (1024 * 1024 * 1024 * 32) + +#define SZ_64T (1024 * 1024 * 1024 * 1024 * 64) #endif diff --git a/sys/dev/irdma/osdep.h b/sys/dev/irdma/osdep.h index 5cae2b9fdc33..72c09bf2b452 100644 --- a/sys/dev/irdma/osdep.h +++ b/sys/dev/irdma/osdep.h @@ -87,8 +87,6 @@ /* a couple of linux size defines */ #define SZ_128 128 -#define SZ_2K SZ_128 * 16 -#define SZ_1G (SZ_1K * SZ_1K * SZ_1K) #define SPEED_1000 1000 #define SPEED_10000 10000 #define SPEED_20000 20000 From nobody Thu Feb 16 11:55:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLP0nSpz3q5Z3; Thu, 16 Feb 2023 11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLN5xGmz49Ll; Thu, 16 Feb 2023 11:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=etyISGzqaKQgTbR+FAsXm4SlZCzkSSqQGftgI11AX+8=; b=itV7rY72jZ6v1HAWYHtzfjr6i64xGVxemXEr5Pfe+yX1zioqymTQ/RNtMKrbG3tEYwovDe fhZfQhBrC28vHiDDxvtMwjcpNK2M+Or+gKIvN7roFhwWPKCslgpFlx6j0cjVFPjn7jzwWY 5Dh3BwQ4Z1oUo6it8OlVzudiJcEJZnxhgjbYBttnpyicFBOfQQrdZOI3EFTodoEUlcmOcS QQCLVIbtiWxd2pgtUGTpZIdvH5rPcahU6skCdAhzBVxOoHSFxhuISDTHe+kY6muVqQweT9 tfunswY99l64ebQCEfAMrVj7Ks0uNMrqOUagnXwasqZbwu5sOAHnusuNdeEx8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=etyISGzqaKQgTbR+FAsXm4SlZCzkSSqQGftgI11AX+8=; b=e1YKn5tgyzWrXyMeq0lJxETiWe48dfw/CJxdLh1JUrZBezEnsFI+lMZKUCL1OJtkI0aZxE 61/AaoCYSHIKB68md5LgFUv7As2Zyv0wrrmoQNYftLjsFO+20WZYyNPysi4tl4VFZ9bR19 KKZLSqnvuw2CFG0naCFUqxteC502tzPxoLJWsSvtFASg+UO7+vUM2aXgR6vAgb3MC9GUMK gEvHEDaTb3AcgGv+PO/+Dc3nnc46VWk4dD+pEOpbF4jROFI3FTCFmUIfYrpsbYE9e3jbmM mdCFBqoo3hWcDUzQDjg5Zg6GbW0Ivfqmarh2UrphvpoIFv5/b3xVB8nzvCpa7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548556; a=rsa-sha256; cv=none; b=lNVsO/KejbNHT+g4dOy5wV93aZgPUUHj1fzbx6hoWXc0XLvuRpHNIlYl7vb8kSRMP8/JsO wx8F9Pqtp4YZW7jeSXmMVnW/5B0H26QtLxsBY4BThM65ETBCkGTIfKES2rO+53oF+hX2w+ kKEqTkmkDpjA11EAuGfPB8oasqq0Ea6vUKkHwkC5NoBGzDelkTXl7eEUPy1uiXecaBG4JN extXgUO7t7h67CHedKNppzzkgY/hG0JrouT6IFw5bPn7E/mLJLP/3TAZjjzaf59qasEA3B ZnAMYYxIwFWqahzQ8HU/EqoYV1W+TDNZDyU3aLgsIMYHxvFEvrqUBA/qaezK6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLN4w9Jz133p; Thu, 16 Feb 2023 11:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtuer055341; Thu, 16 Feb 2023 11:55:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtutt055340; Thu, 16 Feb 2023 11:55:56 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:56 GMT Message-Id: <202302161155.31GBtutt055340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 3e9a3a64aa69 - stable/13 - linuxkpi: Define `DEFINE_WD_CLASS(name)` in List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3e9a3a64aa698f90fca4206bb26cae6456522f68 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3e9a3a64aa698f90fca4206bb26cae6456522f68 commit 3e9a3a64aa698f90fca4206bb26cae6456522f68 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 17:19:01 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:14 +0000 linuxkpi: Define `DEFINE_WD_CLASS(name)` in It is defined as a synonymous to `DEFINE_WW_CLASS(name)`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38151 (cherry picked from commit d9f1cb6774f1785544c2fbeba476d4842967e804) --- sys/compat/linuxkpi/common/include/linux/ww_mutex.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ww_mutex.h b/sys/compat/linuxkpi/common/include/linux/ww_mutex.h index 82ba7a55a7e8..d0dd7cd52601 100644 --- a/sys/compat/linuxkpi/common/include/linux/ww_mutex.h +++ b/sys/compat/linuxkpi/common/include/linux/ww_mutex.h @@ -61,6 +61,8 @@ struct ww_mutex { } \ SYSINIT(name, SI_SUB_LOCK, SI_ORDER_SECOND, name##_init, NULL) +#define DEFINE_WD_CLASS(name) DEFINE_WW_CLASS(name) + #define ww_mutex_is_locked(_m) \ sx_xlocked(&(_m)->base.sx) From nobody Thu Feb 16 11:55:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLQ6Xklz3q5j7; Thu, 16 Feb 2023 11:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLQ0lXbz49TS; Thu, 16 Feb 2023 11:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OlFqVmFZvnl2zAE2e00zIh3hG/9wKf9mIxYsF9twPOY=; b=Wz9Aic2oH02WKVlikgtKffpO2ms615yppy5pPNLad3g+CRS1D3/XILBIzuN7Lp810MZ8PB MjlgPo/9/gQXIuK2SIXYokOMGI2IAnW6ySRj6IpozdHrm0xokfxE0bkr03NxdGFtP9xzBG lfXSm7uYsyhdqbUaAAapWLlOGVBIpft8q6A53Xadp0ieoRt6jxgOM8WamGwPmFl02SH64X KliZWFdyAdeDSBwrTFqmSVb/zBQ1dwhKgAyD2EyY0L05LbnNjRvDqsD3YTx1u32OzOUdSV uIvIyRmc0lZGDOMORPO+sIv+RkL5r/np6NuYViHA26PcxUcE32I+WHrjX3SJzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OlFqVmFZvnl2zAE2e00zIh3hG/9wKf9mIxYsF9twPOY=; b=jq2Jok+QigOBafdsFU8gNjP35bMsBHRKXz0Y3PR/dPDFIX6NieOihzrmBrcG9t/nGD/ipX Fq3d2ILUpcCYJoUAHIhrvM3Yzz2AM9x80DOeouCcQTIMsi7Mi49AFATTamtKRyF2SMGVw7 v4XDv5LHJFrkmj5JEDaA2JX71O3f4WW1rRoeowciWm330uiOpytRRbaM2f18BL8eaedP82 Vo3YfsWxT6Ur+DNScBzDaCjj1go6CnHCqa5PwHbBdUD8J0+Ot4VMxsRlaXZe31a78AOwii gkh6kfcpNpD92B4ENSi6bfBYThZV1YARa7STdbC0n/ecPIcb8q38DTPqVuiucQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548558; a=rsa-sha256; cv=none; b=CIF8DA+YwlhENNqDULRZmn4Fx2fiopDPBRGExhjqwGMQC1K1/A4KWAnvKgN4XHGFQ7OHn2 ieffQmcZoqHcEbwC+XVOkBdcgRoDaWXs4db+7eWJtymOR8OGG8BYWLn6HAOmecHNRJL0oj oBlZBVwj9W6vlQG5G1JbbOguI0Svy25614RzhVrqxvWpCRRLmOoUvmnDkIToFJfNWIWi2r ZzLgDWmE3BHcEllvHGFnnzLBw/bvOA10SZSg9ILqLwzmMH6s4Z1tHbAn5/v7mLTS9PKdtt t0OEY2C4uEY3avlnpURaXafZ3IbVE3cm3okMMNZsd/uaUuFAz4LFrTeOp1TE3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLP5wgVz13H5; Thu, 16 Feb 2023 11:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtvO1055372; Thu, 16 Feb 2023 11:55:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtv0e055371; Thu, 16 Feb 2023 11:55:57 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:57 GMT Message-Id: <202302161155.31GBtv0e055371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 701b98af65a7 - stable/13 - linuxkpi: Add `seqcount_ww_mutex_t` in List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 701b98af65a708797a1eab6b6d4720c3d8b2e283 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=701b98af65a708797a1eab6b6d4720c3d8b2e283 commit 701b98af65a708797a1eab6b6d4720c3d8b2e283 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 17:20:01 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:14 +0000 linuxkpi: Add `seqcount_ww_mutex_t` in It is defined as a synonymous to `seqcount_mutex_t`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38152 (cherry picked from commit b34cd67243c39ca55be40b3e7958f3ade290347c) --- sys/compat/linuxkpi/common/include/linux/seqlock.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/seqlock.h b/sys/compat/linuxkpi/common/include/linux/seqlock.h index d82889528796..a29709e77cdb 100644 --- a/sys/compat/linuxkpi/common/include/linux/seqlock.h +++ b/sys/compat/linuxkpi/common/include/linux/seqlock.h @@ -53,6 +53,7 @@ struct seqcount_mutex { seqc_t seqc; }; typedef struct seqcount_mutex seqcount_mutex_t; +typedef struct seqcount_mutex seqcount_ww_mutex_t; static inline void __seqcount_init(struct seqcount *seqcount, const char *name __unused, @@ -68,6 +69,9 @@ seqcount_mutex_init(struct seqcount_mutex *seqcount, void *mutex __unused) seqcount->seqc = 0; } +#define seqcount_ww_mutex_init(seqcount, ww_mutex) \ + seqcount_mutex_init((seqcount), (ww_mutex)) + #define write_seqcount_begin(s) \ _Generic(*(s), \ struct seqcount: seqc_sleepable_write_begin, \ From nobody Thu Feb 16 11:55:58 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLR6DRjz3q5j8; Thu, 16 Feb 2023 11:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLR57kMz49Qw; Thu, 16 Feb 2023 11:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRTdN5Y70kk99/8YD2pSnX/i5JXlMjq+lT+VFJokfyM=; b=jB6g82AEMIO3JQoVOGS4cpogFazG5mODbxB9dHRXdHwN9mrazxpFdDgEMw23Uucrn5oD+s wqnZsy2T0XUFMxDyfOSdUWYMrZCzIpEUBzbOIxcFdH6oREjYud8XroDA51DwmW4lY351uz JzBvjgY961OZult83+CnyKGbhM9dGsaXGUnvnzvsqemu1oBI/0QOeK7gD4xMS6NFoPwRP+ 3SysPoiN+8aJg04ZhtpOAn0CF2HlyYIIkUcASUqVIqvqbXzWw5uOsjA4Pce0FWYOM3nslR CwoW1C8E/VjO5WD79GZyoU70+xW/QbJA5vo2TduogBFKr9ADNfjvrliARsA1+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRTdN5Y70kk99/8YD2pSnX/i5JXlMjq+lT+VFJokfyM=; b=pO9Ek1PFFV/ta010tDNtOHlv4+C0g1bG5gskG7p7cncMecNtvtdREWuD7ExyPOMCugcPP4 hZA9i6HBPq8asfqlRhvBdev31ysnY5fU+CZ69TP5giBuSc4+UVwkj0jluRzweQ76HFaB6X ZZu9e4FMOwgZS7YzxEf26BtMVbpq6HO7+oAuAOih9GtZw18ZF/Utc1OlnBhSuN6h5Lp3Yq fUHNMmEOZ8QOmevBgJAuUCpY/YkJRSmzb2R+L1sem71zVlcifkhHwXxhecV6113hG1DMzN 9OWhIw070uELplw8h0uvZUOpwqA0y+bIXrPugVHDJC4dLOM/1v7Ql2360sy87g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548559; a=rsa-sha256; cv=none; b=Frm98mB/gyrHTeUJFxc3YgnuEENGSl+v27x+wTGIouusXTLjvpxLj/7op+mMu8YUTURLVq lV39Fx2DkVCo5bsFM/KqGPTMXp2wBbRE3XP3PU9RrTDahrauNAts6IXNt2s8V+PyFmtCk/ RukmPTJy4HjqFfTG+GH275N7sDuojzD0PzBeq9r+Hz9cyT4c1TUC+W8b3OZm2yVmWgVixK H7zhmc7iXh8yJFxy/FPYz5p4AKwha1se5CdeExaO//Cvfcwy2WFNYP5mkzhShg9uBSeFER i8eNsYJCwqZ4K8lwwntpfdtE6ea/djhii5SZ2N9t8QfXWaHyhaZTh2jf7reTNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLR01Mgz13H6; Thu, 16 Feb 2023 11:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtwqd055407; Thu, 16 Feb 2023 11:55:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtwPB055406; Thu, 16 Feb 2023 11:55:58 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:58 GMT Message-Id: <202302161155.31GBtwPB055406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 86e2e1c9e8c3 - stable/13 - linuxkpi: Include from List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 86e2e1c9e8c3ab3b4eb76eb0c5914fffcdfef5b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=86e2e1c9e8c3ab3b4eb76eb0c5914fffcdfef5b0 commit 86e2e1c9e8c3ab3b4eb76eb0c5914fffcdfef5b0 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 17:51:40 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:14 +0000 linuxkpi: Include from I'm not sure this is correct, but it gives access to the definition of `PAGE_KERNEL` in `ttm_tt.c` in the DRM drivers. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38154 (cherry picked from commit 3d47e3bf7b3725482d6ae01675db097a6de020b6) --- sys/compat/linuxkpi/common/include/linux/pagemap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pagemap.h b/sys/compat/linuxkpi/common/include/linux/pagemap.h index f3c8c04aa13e..81b799f0e019 100644 --- a/sys/compat/linuxkpi/common/include/linux/pagemap.h +++ b/sys/compat/linuxkpi/common/include/linux/pagemap.h @@ -33,6 +33,7 @@ #include #include +#include static inline void release_pages(struct page **pages, int nr) From nobody Thu Feb 16 11:55:59 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLS628Qz3q5X9; Thu, 16 Feb 2023 11:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLS1gNxz49c3; Thu, 16 Feb 2023 11:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLgDHYtt0mu/S5Li40qjIHWGCMAg25b63T1UJKyyYKU=; b=KdkMAStdVYIjeJ5xqgiYSzBUOYZgxrqZNXs32Cv1NRdb1A+clSPWzuzW2/MBjonEm1E+Tp c5NRdQ6n9FBqxJCxZ7p6EM0gH1pja+ud0aIqWKGtlHxHvhEbQ1DW8l3wuJwJ9X8k7EqIZW cUGpIn7I85x7UUoirDrv5JydJcZFuKmQTF08gr7lIwzNF8j/B4CI1gjfpJwBT1KzhFIKU1 5IxrficUuknfnJa+SkQ2yfwSF/jxBDQtBUdFiiv1o+nakzUDtt2auNxwe6NRyTA0S9KD+2 84NdZJMzfZ8mK+eI8LdHFKMGXJOlP1MohB2zore1jcf+NkqTBhk259AwJy+OgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLgDHYtt0mu/S5Li40qjIHWGCMAg25b63T1UJKyyYKU=; b=kTH2g3OqsOr0SFTHnaSWjJYA87cJ9wRMQwgvJrIyB306ORAn4QLHOgefoWmQDJelLpfT/P VL5JT3qtn2S2b7IMyZB/lCoxKYtGZsLuNwSeLizxU1TZP7QFxWkCWwfkseFQaMZlGyDUxR ivdssqfjMHCDIhYm8zrvWaa8D+t/QCxpY7HIVOplFBywspkAt/vnd2P8r7Fhs02Z31ZO1t EDOJSTOmSL8O/tlJF4UfxNXFUQGTKK5YpSD9BgIChtMJSnYjZUtOwleEI5xe/QV5A6i1uH WGtelKJU8C6hQHOeryUIRR5hyK/Y7VYtnz291BPa3M3XblFrSzrHHG40Br9cKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548560; a=rsa-sha256; cv=none; b=alo693vrfIBcRbzrFhq119aRqG9BeurYF8Vh9V1MQOBzTGQT8RLlkrPAfFRZS70HyC95KC 6pi06uprjwNjBG3XsMiZbhCNcVTduXC5w+jwQZ0Cxz+2MpyV1HKWl3tzyrAjKleGlw2aI6 j9L77kv86Gu5P43qvtFq/IYHMDMstcHWkBCYF7i6VJX8PyqOrlhT+2cZ3c/OB2MuMft15s 5CGJOw2YuZLE0Fu6/XNXLvpK6FYns6pBPrQbOVmQfMuWA7XZWZq+omF5UZk087ASRgK07N 37GJGUr6UQUwZ7XpLN8oC1cOnLvCMJQAjCDzHouTPZzlNPU4Mh0CXFx27SEkmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLS0WLcz12W5; Thu, 16 Feb 2023 11:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBtxQP055436; Thu, 16 Feb 2023 11:55:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtxur055435; Thu, 16 Feb 2023 11:55:59 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:59 GMT Message-Id: <202302161155.31GBtxur055435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: dc795b79fb38 - stable/13 - linuxkpi: Define `is_cow_mapping(flags)` as false List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dc795b79fb38250bbe388e9d6b0db97da0fe6595 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=dc795b79fb38250bbe388e9d6b0db97da0fe6595 commit dc795b79fb38250bbe388e9d6b0db97da0fe6595 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 19:22:41 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:15 +0000 linuxkpi: Define `is_cow_mapping(flags)` as false Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38158 (cherry picked from commit 47877d61af072b6b28cc1bf45bc906bba3618b32) --- sys/compat/linuxkpi/common/include/linux/mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 8bee6188c9cd..8f5b543e1002 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -317,4 +317,6 @@ void lkpi_unmap_mapping_range(void *obj, loff_t const holebegin __unused, void vma_set_file(struct vm_area_struct *vma, struct linux_file *file); +#define is_cow_mapping(flags) (false) + #endif /* _LINUXKPI_LINUX_MM_H_ */ From nobody Thu Feb 16 11:56:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLT4v0dz3q5lS; Thu, 16 Feb 2023 11:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLT1ntsz49Nn; Thu, 16 Feb 2023 11:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MVqqs3MDkKNcOe8C+sNQIwml1KhB7s/1bTODwyXgMJI=; b=rKStiaOLHVF4ojnvRhM9DHL3NjhZr1zs6PI1dKEgJ6M2APRnUYqPOt2ZXroXug2riFbqFS 2vITgPYeO8U5yP9zYXEmSZb/6J9HNYdfSKCOpwJM9Cb6cDaJPdxx70v6YQa5EGv4uiHK8K RDALNZJvwBn1K3adm/CrpronQs+NNeSWS1oVPUzI53tmuQSJ+omCOfUTOBQKG0BMgK12cP Q6p6WYSXcdPxZds+Ol+kRS7sfHFEIVmFx81gQqX8x2Pf0AAjv1KOwsHBUtdRXako6E8Sms xmCdJFQ5Jl0UwzbmWGrkUGDnB/d35SE+huRm75klcWGB6JylNfYFWoV09kP50Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MVqqs3MDkKNcOe8C+sNQIwml1KhB7s/1bTODwyXgMJI=; b=PZyfXwUwjyKFUlOGX1B2y6czxmGLXKMRKFIpB69izh9pL0qnDH5ZRZFpmjeb5wel9Xrlrd nDA9f0UmrSuv7qBI/jwSNFp8lgz4EVcx3XBmhaTRXu4H0mFy02yqmPHUHrIqsnb/zxIpb9 EkxVnwXnBjCLE1JnZGRkQ2BaE4YGJn/tIsn08LmA6kQoFhOM0Xv417LGVJfA2A2NbldQ1m DCbO0oBDSn0GW4r3UQevt56fA4pAbm4WOnTL0EmXpsvbgCarfPAG0gCgUX8d94cosAj5zQ 2iQka+FQ4q+I/zM6hxH2guIfDSCEWSc0IqJU7kKDXPocztUBJSJYMSpEFBO6tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548561; a=rsa-sha256; cv=none; b=wA4MEWLkORLETTFzij0NQJV3kkTJCP4eqfnUbJ7hWk61Qt+RLWHNFRmebxb6sWuii4dMTT Kz3c3uNBAkepW1yFdBliROoPbblT2gcLbvZGcNR81q1tEUZApTc5EGOcTPH5m314Zosfap oJ4Au9AAji31HW6N8RtG19BdeOhQX/ariUGHSEylNS0Ujfpub33GlCj/xpA5P4UpsvLn7Q orachcATzlS625R8LsBWpHfcD/6QLokdIAykOIV1iU8LoIWLyoFh7ah+KQAnCw3lu2hXZK UTXMP/oxIeWNVcGni/BsDMbsPz5cRUR7UTQBotq+0jt8b4P6Tan9pULNyczm2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLT0pZTz1352; Thu, 16 Feb 2023 11:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBu14S055465; Thu, 16 Feb 2023 11:56:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBu1Yx055464; Thu, 16 Feb 2023 11:56:01 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:01 GMT Message-Id: <202302161156.31GBu1Yx055464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 2c447575b604 - stable/13 - linuxkpi: Add `sysfs_emit_at()` in List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c447575b604ee9a29c342a65c1fc1936877adb5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2c447575b604ee9a29c342a65c1fc1936877adb5 commit 2c447575b604ee9a29c342a65c1fc1936877adb5 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 19:23:17 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:15 +0000 linuxkpi: Add `sysfs_emit_at()` in Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38159 (cherry picked from commit e64afbc21572984ca1249e01ff6b1cab39b679b9) --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index b9689a367c90..9d19dd50dbbc 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -314,6 +314,24 @@ sysfs_emit(char *buf, const char *fmt, ...) return (i); } +static inline int +sysfs_emit_at(char *buf, int at, const char *fmt, ...) +{ + va_list args; + int i; + + if (!buf || offset_in_page(buf) || at < 0 || at >= PAGE_SIZE) { + pr_warn("invalid sysfs_emit: buf:%p at:%d\n", buf, at); + return (0); + } + + va_start(args, fmt); + i = vscnprintf(buf + at, PAGE_SIZE - at, fmt, args); + va_end(args); + + return (i); +} + #define sysfs_attr_init(attr) do {} while(0) #endif /* _LINUXKPI_LINUX_SYSFS_H_ */ From nobody Thu Feb 16 11:56:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLV3g7Sz3q5nl; Thu, 16 Feb 2023 11:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLV2swZz49Z3; Thu, 16 Feb 2023 11:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Ls0+wG6KGKMDwFEipx84BokMMeyQ1AnPkmWqtq/BoQ=; b=HYHrWPqdmPlOSacdxaHVNZRc/dXhzcBCrzlPNXZhgmv454HdrAUgJCFeBABEvNSpxHHMU1 zEpnVXVy4vsmPd4nzID/by72yPPdtzIgoihdDv/yMo9Xvcba2jxjvhuHTnSq5GTjN38BJt xxAoqY+MBmasJv55ROOR4D+CDWsfhfUrewE9EBd6R8UbxLXEs5i0RS29xwPdjCaTwSNq1v 6SHKp6RNSOfWsnfKuSNO3JqX4HWiuVjcgHdKKBE1oFCGfAUFFfoiW94Rd9f+PW+JfbFulM 00g5lTt8hBBIDcbTwPqH36u2OLkfBn7lkrLAvw9Hd9d4A3WPmmOQQruFixV1qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Ls0+wG6KGKMDwFEipx84BokMMeyQ1AnPkmWqtq/BoQ=; b=OkKXxXoWLv+85PR/asHJOFagH3o1/gWFHNQGz8GAftY4nCANDqbbqGBYnCy9o8fFBqdzGe gP7LRmKwiC2VJB5EFpRz8ApY1AHgrDZgXDijJDK2Cli2iSRKsHwfedsHliYzQf5fsdSawE WU5zqV5sBP2gycd9G1pIJSiGhDPRbk3uj4rCnVqBqj68Q3BCcgOGVUHvQy0eoId4p7omc5 asFh+wEMXFRZPDJaVc9xgg5yY917nDfmePnt8ETz4dljjNK+WIXC4qqCwoyjixDIQgFj35 jg6XA0QKWH7ZTPF0mKRIlW/TAVoPUVW6beFovhLSAe0ijl3pWsHapGQOVVIHvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548562; a=rsa-sha256; cv=none; b=b3PPVKhQOIHif6z6Osz4Sseq+yk69maI9RRnLw3HtDkLGbaE6tCoR3/FZzNh3FF388fBLr vxmR4xocESePVYMTPtVxeglf1/vsG4pL9ydGxZbWnPLYHC/IhuboQ8wANWh5A4rRfR4gT5 8Jjb0+OrhFrSVkuq9XAQDk3PfgBIxY7ZSzMseM3KekUMv1q9tlhEzszvkAwE0amNNlKotc 4BtPoaOdpdgo6KemFtF5eVuaoY+ISQ9HmfbyBxt2VnbTjsrpM4AW4VP3+Z9qj5oBE7z0Hb RZ7nTAeicRVkUyznXxe7lf27dCAHK/Cctl+jP44hHoSxRtv5Hiv1RA4ndq59zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLV1skPz12fX; Thu, 16 Feb 2023 11:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBu2YI055495; Thu, 16 Feb 2023 11:56:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBu29h055494; Thu, 16 Feb 2023 11:56:02 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:02 GMT Message-Id: <202302161156.31GBu29h055494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: ad7aa28c1d1a - stable/13 - linuxkpi: Add `msix_cap` to `struct pci_dev` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ad7aa28c1d1a522e423627f05188e432149490eb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ad7aa28c1d1a522e423627f05188e432149490eb commit ad7aa28c1d1a522e423627f05188e432149490eb Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 19:23:59 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:15 +0000 linuxkpi: Add `msix_cap` to `struct pci_dev` At the same time, define `PCI_MSIX_FLAGS`and `PCI_MSIX_FLAGS_ENABLE`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38160 (cherry picked from commit 4152ce2139548e3e3c28c1e224747fa5d10ae656) --- sys/compat/linuxkpi/common/include/linux/pci.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index ad7589e692f2..b0c52c3f062e 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -172,6 +172,8 @@ MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ #define PCI_MSI_ADDRESS_HI PCIR_MSI_ADDR_HIGH #define PCI_MSI_FLAGS PCIR_MSI_CTRL #define PCI_MSI_FLAGS_ENABLE PCIM_MSICTRL_MSI_ENABLE +#define PCI_MSIX_FLAGS PCIR_MSIX_CTRL +#define PCI_MSIX_FLAGS_ENABLE PCIM_MSIXCTRL_MSIX_ENABLE #define PCI_EXP_LNKCAP_CLKPM 0x00040000 #define PCI_EXP_DEVSTA_TRPND 0x0020 @@ -327,6 +329,7 @@ struct pci_dev { unsigned int devfn; uint32_t class; uint8_t revision; + uint8_t msix_cap; bool msi_enabled; TAILQ_HEAD(, pci_mmio_region) mmio; From nobody Thu Feb 16 11:56:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLW5HLTz3q5dy; Thu, 16 Feb 2023 11:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLW49J4z49kC; Thu, 16 Feb 2023 11:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BO4jPnS1Q6kTfEGu1t4BJxY6wBqHTL7JkPjYS83kzMw=; b=blhV70gGYq+c21nY3QgTW7q82Y1430pq0o433m5sSbPez6DW0Opc8r879li4DKYX8oMn/M 3AzfpKrzLRS4ZSh2S7NBE8gCBEsRTmOkjbqbkoA9274JP9INXoOG7SquoOWF4chjAutkDy EGS/9HAxFL2lTSd/sNZwT9xYuzXchZUWzYN6XSGcm+S8Am/oIUMqKgj4yT+nIqwT4YTQvg SlorADgJMYMGIipj6FlVRpL6Q7NrtPA0INt2o7k7pI8CydvBqPeq9O72weA9ZBJcU9ErZa XtbXSS9P9fkfIKabA+uKZT0U4xWfurgLxyZr7UuAHoWruExLhvJ6DX4hL6Lg8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BO4jPnS1Q6kTfEGu1t4BJxY6wBqHTL7JkPjYS83kzMw=; b=Te3cUdQNzsb63l8QtFxtwqw+x1452AwySFR7vnDN3CgqEZSUDSUb5mGlo161CyVZ5fF50S nF18z+Jedg8NNlV9xdc5k6ZqPW2MnKBPpaI11EGmvwZN73BwRj1KkKJCNEI5HcCg3wHRwZ l7myg+ASlMNnEXv66ah+mfcnJR5Zcm1ncRerz4t1HMDUy+cNisbUJXUMjYtkT8s4UowUtp 13bKioiql5SfhAbqlIdJZgZaP/wB5JhYjc9KlUBEcwzpTkj/sfNDCs7xT+aUPj9icnI+4U 45f09KWVyi368IT4Tar3l1djh4K59ogjGCnqkkScK6k5Qr2PxWsa1T1F6KB/qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548563; a=rsa-sha256; cv=none; b=HE95r5+W1UWmGhB6bNs3yYm86JHPjk9x8yx1znrWnYfWaMGd6mkCYVDjcnFfklvHF0cd0K uW24NN7+rHc/Om71seY4ESIF48CBlXZStNYg9yP2xLQzEWTulLpQLGE0TtKJG0wSokiRGq /umWfbyTf3tvwmNHeEu4oXypTTU7rJ7VamI7J8IEZSWUJ88BC6Q6Ts/1uBCTFSYbJR+elA BgvPgIh8elByzuasY9KnRqyjJLJeGFEqGxlbwrBvQCuMw2pG9LBzpb3tKlKG90w5rTJz4e ZB8nMC4d2tOS+k4AkIKpvGzd51Y3RQ9kKjiVK6T1z9VXbMEdbX/px2YcB3ocZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLW37G0z133q; Thu, 16 Feb 2023 11:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBu33U055526; Thu, 16 Feb 2023 11:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBu3o2055525; Thu, 16 Feb 2023 11:56:03 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:03 GMT Message-Id: <202302161156.31GBu3o2055525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a64bdffae73e - stable/13 - linuxkpi: Define `pm_suspend_target_state` in List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a64bdffae73e2c591e7dce5d7f45d02a241f13b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a64bdffae73e2c591e7dce5d7f45d02a241f13b6 commit a64bdffae73e2c591e7dce5d7f45d02a241f13b6 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 20:13:32 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:15 +0000 linuxkpi: Define `pm_suspend_target_state` in It is set to `PM_SUSPEND_ON`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38161 (cherry picked from commit ccd31b464568ecf5907dbecf255edf0676124735) --- sys/compat/linuxkpi/common/include/linux/suspend.h | 7 +++++++ sys/compat/linuxkpi/common/src/linux_acpi.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/suspend.h b/sys/compat/linuxkpi/common/include/linux/suspend.h index 5c15b0619bd0..8458a6f6d4c5 100644 --- a/sys/compat/linuxkpi/common/include/linux/suspend.h +++ b/sys/compat/linuxkpi/common/include/linux/suspend.h @@ -3,6 +3,13 @@ #ifndef _LINUXKPI_LINUX_SUSPEND_H_ #define _LINUXKPI_LINUX_SUSPEND_H_ +typedef int suspend_state_t; + +extern suspend_state_t pm_suspend_target_state; + +#define PM_SUSPEND_ON 0 +#define PM_SUSPEND_TO_IDLE 1 + static inline int pm_suspend_via_firmware() { diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c b/sys/compat/linuxkpi/common/src/linux_acpi.c index 5eb60941abac..e092481ff979 100644 --- a/sys/compat/linuxkpi/common/src/linux_acpi.c +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -58,6 +59,8 @@ _Static_assert(LINUX_ACPI_TAGS <= LINUX_NOTIFY_TAGS, #ifdef DEV_ACPI +suspend_state_t pm_suspend_target_state = PM_SUSPEND_ON; + static uint32_t linux_acpi_target_sleep_state = ACPI_STATE_S0; static eventhandler_tag resume_tag; From nobody Thu Feb 16 11:56:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLY3GQFz3q5rq; Thu, 16 Feb 2023 11:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLX6WHPz49VZ; Thu, 16 Feb 2023 11:56:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W02hnqmvnZjJPom7GthuFW+HXauw+yIbsQM1+OoCW5I=; b=mtmMB7s+/Ut6P6JddO3sUSJtYTQMP9ywXWf4CvylhDQaAPedCHtr9MCYoJPbaSS0nKKyLe /ORMBQs1nLjlXD/eUnlvdgEImLvnf+Lmi86xUweaxULxWS1rKJsYAzYLKqYGw6E1L1Zplg Wk6M4MedMqsfsRBXkXPLST54cefQu7HVjh/KXe47Q2TbI1aFB2hSUpYxWc3gCVx8gtu5h6 sacO/3e65Gie3GHFw/DP5F8O+gwbB4+XuTJUIj5OYxx//JQ3043Ox3bpM9v9/ewA+ozYoh Gs2Ea3/b1m3nXWgMi3/lfl6Bq6v5ke9LgE+aidrtoy384RJN4FlboXG5lr10Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W02hnqmvnZjJPom7GthuFW+HXauw+yIbsQM1+OoCW5I=; b=OBK84A3qJxyr065FWWcZFWkNzGqe1ij6Jc+XlW3KDjPfsVxcRf/sstxEe4z+HEERzTvCiE urvcZS+oIaKefzbCmkZdsVrmtkaUset1k+ov5TchYAoujZZfLZXWeZ2FrTQ/n3YH5W2vBT yn8heYx2xiNdE4yWqyi1NmqTJ/w9RhduHrfhBcyZvQZTe0mZquWNmTCWu8HLZfPux+kQA2 lN5hOoKdzl/EcsuCdya1AP5qKw44yragK1iA7peDQPtYIj2Eb6ualtngEUV6BdvNFcl099 eK1CqkTWHgf1vErn2QMhvBE67qM60RACfsslpNJ1Hh2zaToBM5cV+Rts3L0f2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548565; a=rsa-sha256; cv=none; b=AfD2iBCQoIYm4M7gN5oXdk4KM8mbD6T0oHxt8RoTL/zrOZmWWoC4TWnclKTEmEL6+0VZ2X RiZyHdclpV7aIxLEWYy2NZhEAcPlxtm+P747pbTw8k57IcCZOBIW8yDfM68ZIRGGyJpP1r EOyLuX5mU1lSeH4qaaJN0MsccZdEWGwO9SVIm2mDGNUtnRtvRU9wkYdyNmYDOqviV0pVtV 0tmYal/zPNVNY2EBXipiX4Ro1EwiidIuNrd37kTrxSsflv0hxyBbPYrfcoNqJitejKoFKS I9gNKHF8Qwo8sPJR4ZDYgh7ozqfEKN9CDD9WGE6RlRYH3mEovUjG8nTI7pAuOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLX4hLRz133r; Thu, 16 Feb 2023 11:56:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBu4Ox055561; Thu, 16 Feb 2023 11:56:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBu4B0055560; Thu, 16 Feb 2023 11:56:04 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:04 GMT Message-Id: <202302161156.31GBu4B0055560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 10ebda3457bf - stable/13 - linuxkpi: Define `PCI_STD_NUM_BARS` in List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 10ebda3457bf70d621dd6b97232c00654d772a96 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=10ebda3457bf70d621dd6b97232c00654d772a96 commit 10ebda3457bf70d621dd6b97232c00654d772a96 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-22 13:46:14 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:15 +0000 linuxkpi: Define `PCI_STD_NUM_BARS` in Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D38162 (cherry picked from commit 66cc55a041ddaf4890239b1fe83632c74957bc03) --- sys/compat/linuxkpi/common/include/linux/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index b0c52c3f062e..ab94cbeff6e4 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -108,6 +108,7 @@ MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ #define to_pci_dev(n) container_of(n, struct pci_dev, dev) +#define PCI_STD_NUM_BARS 6 #define PCI_VENDOR_ID PCIR_VENDOR #define PCI_DEVICE_ID PCIR_DEVICE #define PCI_COMMAND PCIR_COMMAND From nobody Thu Feb 16 11:56:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLb65VHz3q5fp; Thu, 16 Feb 2023 11:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLY6b6Nz49Zk; Thu, 16 Feb 2023 11:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gQUf90HRLy/C+W0VGhG7xxY5srIZ+KhwIXFpq5uLPvY=; b=xHImx84BE0lcHE8o2UPGwy/XML5wNdXVe6OKUzYjNdMpLJ5QRhfM1ZELzUP6LvfK2Vf3xf Lw8398uHCOiEdBlcczvLgcbX6PpBdR90f2RClCdCvJo38yY9zCeGX9bSlWpJMfk/cWl05I BIEpXqORCzrSAJzayBq/q+y1mDmo8BBaX6INvSqllrWEmNzDAWMdlzJD82N2fDBAwhFnfN jWHjk8jfImwYYJdol6rqdsDi6xnuGMvSmnmDVPeHACPipoPo5KG+bk6G11GwdPQnuHPuu8 ZpZ7MPs4i50zgEhJwVN/0iyuxFPlprI2PDMg6XGzvIB4bB6/Pzs74+KsVI2nDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gQUf90HRLy/C+W0VGhG7xxY5srIZ+KhwIXFpq5uLPvY=; b=yPxy0rVODvcnJSy1oIFSSt3N97YRMKkJPOt23dmA1KytTGSXZpPRsYRvlyrB+KPgMQqRfj I2pHzKoMRl3qBsApKcosMfvXZ4aqKVb7lFvkZ7F8AR8iQ5qUnLYyFx4Ferqj0OHEkvK5sy xhHW6lBv/YXHhJIoTU8cemMkzWw3BdoiC90ijrTZNKhyJn7hvXLD/uYks0EcB8Vc/NMo0O Z+5sgLZaCe+u1j8gYGGQsRlOjgcRClV65zU7FuuUsMFFKTdS4XslYURxgBAZqG8gR0Q6vc 803R1RlPYCrUEtr99Xe/zeOXBfsaY5QhY9F/1Y7EDzqOKxfUTMQ8QVCrrdF/mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548565; a=rsa-sha256; cv=none; b=uXlL+Pfd3Kk/c8Bm+4Xn+LxB14oLRGQaPKSsU2ACDkxGkBPLeqvD11xqUaPI7H0uXoxhLk ZvDxg5ObMXLUrABsJuE0D8RLbbHPrkCRZXNBJHYkDMSPC7YtKZBWnRi8wLtEV1xE86ojki NiMu3mGOoeyQ9VaSmNXNnYYBXbwyaKO+9hNTVQGLif3BNjLXGDtyCYI30/BiIh521lUzJB BGHvt2KOIzT67LNBfj79Q2EtAxM9OrZnqCfApKesujtD2VsXhUSP0inNPFDEhOscI6qERj NIyHpQQwL+/cHB32DO7qpQ7i5vF5sHObnm9WG4ZnmOi01HZ9Be8tyMcVwChZkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLY5Hftz12j0; Thu, 16 Feb 2023 11:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBu5Cu055590; Thu, 16 Feb 2023 11:56:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBu51C055589; Thu, 16 Feb 2023 11:56:05 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:05 GMT Message-Id: <202302161156.31GBu51C055589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: f583b92a8c9d - stable/13 - lindebugfs: Add `debugfs_create_file_size()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f583b92a8c9df26f1a1661675563e4eed5ec8d40 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f583b92a8c9df26f1a1661675563e4eed5ec8d40 commit f583b92a8c9df26f1a1661675563e4eed5ec8d40 Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 09:57:49 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:16 +0000 lindebugfs: Add `debugfs_create_file_size()` This is the same as `debugfs_create_file()` but takes the initial size of the file. In FreeBSD, the given size is ignored and `debugfs_create_file()` is called. Reviewed by: emaste, manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D37914 (cherry picked from commit a04aa80e773a4bfdc4e72bab85d6e16f0083745e) --- sys/compat/lindebugfs/lindebugfs.c | 11 +++++++++++ sys/compat/linuxkpi/common/include/linux/debugfs.h | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c index 8e878b1cd446..168d591625f2 100644 --- a/sys/compat/lindebugfs/lindebugfs.c +++ b/sys/compat/lindebugfs/lindebugfs.c @@ -213,6 +213,16 @@ debugfs_create_file(const char *name, umode_t mode, return (dnode); } +struct dentry * +debugfs_create_file_size(const char *name, umode_t mode, + struct dentry *parent, void *data, + const struct file_operations *fops, + loff_t file_size __unused) +{ + + return debugfs_create_file(name, mode, parent, data, fops); +} + /* * NOTE: Files created with the _unsafe moniker will not be protected from * debugfs core file removals. It is the responsibility of @fops to protect @@ -228,6 +238,7 @@ debugfs_create_file_unsafe(const char *name, umode_t mode, struct dentry *parent, void *data, const struct file_operations *fops) { + return (debugfs_create_file(name, mode, parent, data, fops)); } diff --git a/sys/compat/linuxkpi/common/include/linux/debugfs.h b/sys/compat/linuxkpi/common/include/linux/debugfs.h index 074f709114eb..abda2d149582 100644 --- a/sys/compat/linuxkpi/common/include/linux/debugfs.h +++ b/sys/compat/linuxkpi/common/include/linux/debugfs.h @@ -56,8 +56,14 @@ struct dentry *debugfs_create_file(const char *name, umode_t mode, struct dentry *parent, void *data, const struct file_operations *fops); -struct dentry *debugfs_create_file_unsafe(const char *name, umode_t mode, +/* TODO: We currently ignore the `file_size` argument. */ +struct dentry *debugfs_create_file_size(const char *name, umode_t mode, struct dentry *parent, void *data, + const struct file_operations *fops, + loff_t file_size); + +struct dentry *debugfs_create_file_unsafe(const char *name, umode_t mode, +struct dentry *parent, void *data, const struct file_operations *fops); struct dentry *debugfs_create_mode_unsafe(const char *name, umode_t mode, From nobody Thu Feb 16 11:56:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLb6Q3sz3q5lc; Thu, 16 Feb 2023 11:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLb4m09z49kw; Thu, 16 Feb 2023 11:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pr5kAi1m7S+/TgUybMY3aSDGI2iYW8k620Y1ozwiSIU=; b=tGcvSyAr9Dd8zw8HPNn+SXXPlx9tucmIm5T/uUCaJuEfgit8XMzFwZ4cADGEawLGddX4zP PlYTZd0Dj16Cuc/qNv1oalSYC2g3cInIgg5Z7tOyliynhPn8lhpZh7xVzwOKwsFDEDIJck UYVEcMh0WAxC+1lJc56RS2ZJJXeK+jdcMnpMEgowR2+OdOKb/Yilk4EBJu+ZGW+0UjYcCO bT8p24uZdV845gydKax34S1rEUjkMM6UB3sGqONFmfhLDNnlrhtfA4OxDIaIKn40f1EaoR f8Q9zjN+DuuuI5xPRykqZLb0FJM2IdpqAQ3wKoPng3guQEkqgyRJkgjnl1XNEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pr5kAi1m7S+/TgUybMY3aSDGI2iYW8k620Y1ozwiSIU=; b=ApLq1dmHNc0+HeDCAHhol7+925JaZ1OE6cdqMSFOEl3Vg/WloTARzDeupTj/EzZLvpOqhY p4kLAua1dCQUlC8Y/Q6DA9LZceEtLlDIjzgNvux3G3VF93CDUiPtaqBT5ALZZ4K3HT3QeU pj5HmH5xAicwfURren3m/3/1a8Bmk+7qUTHEwHXkHX2Yqyp/cAdwoEF8QR4kKPOtFzpG55 jTfFt7vonvYu8+hCB9wNFduMYvPlgso1Mst329HnT6MZyhuq5ER7xke4VnyNEN+B/RMoD/ 1VFoGS5DCOC2HkcmhQTfRXEELV5nkyIZUD8qgbIllW9a6N3oRvHxy+eewYl1xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548567; a=rsa-sha256; cv=none; b=JMcgrBk6K4wnS8Q2KPU9yz08wbgYalUoIhAZMR4rpmZRkOV9joQ/YaEbvUr6KF5hXxqI49 4uTwsOzLHY/GFqJBqpnmiD6oc4OLcfw7oyaRxRgY6xXJecmK2s5OJZfB8aNdy8SRiyLLua syx3+zMkR0f051xE3OnObBdPsvUl2LuTJDrxkY+gFCPJk6bLkV0XPCay2SImEQXjy9XhJp 0mkm79WOiwdAOAEWBD0xvKd+aixp1Oo70xqWbXWnxailjA9LxiFZh/ZVRKWaby+n6p9DqY wFht9DgD/yc47C/04PTKapDNBFHJohkYP28ANt3SViBEXUUlYvAVcxp03Oy4gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLb05PRz13H7; Thu, 16 Feb 2023 11:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBu6Kj055620; Thu, 16 Feb 2023 11:56:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBu6A9055619; Thu, 16 Feb 2023 11:56:06 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:06 GMT Message-Id: <202302161156.31GBu6A9055619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: c5c4d2f523fc - stable/13 - linuxkpi: Include `linux/sched/mm.h` from `linux/sched.h` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c5c4d2f523fcef1b82a43d4bb9334e26132ea871 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c5c4d2f523fcef1b82a43d4bb9334e26132ea871 commit c5c4d2f523fcef1b82a43d4bb9334e26132ea871 Author: Jean-Sébastien Pédron AuthorDate: 2022-12-30 09:52:54 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:16 +0000 linuxkpi: Include `linux/sched/mm.h` from `linux/sched.h` At least one file in the DRM drivers benefits from some namespace pollution to use `fs_reclaim_acquire()`/`fs_reclaim_release()`. They are defined in `linux/sched/mm.h` and this header must be included indirectly into the DRM drivers' source file. I couldn't find how it was included. Therefore this commit includes `linux/sched/mm.h` from `linux/sched.h`. This is not the case in Linux but fixes the issue with the DRM drivers. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D37912 (cherry picked from commit 8c46bd9f86911c11c42f780fb233db0505ea94ee) --- sys/compat/linuxkpi/common/include/linux/sched.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h index 4d1e669dd32e..6e0a01aa8466 100644 --- a/sys/compat/linuxkpi/common/include/linux/sched.h +++ b/sys/compat/linuxkpi/common/include/linux/sched.h @@ -50,6 +50,8 @@ #include #include +#include + #include #define MAX_SCHEDULE_TIMEOUT INT_MAX From nobody Thu Feb 16 11:56:07 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLc6FYfz3q5fw; Thu, 16 Feb 2023 11:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLc2m1lz49W1; Thu, 16 Feb 2023 11:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FbEK7mdQsNw2isBIgVzKVTNMudTiSl2WRwDrp0qKEWM=; b=GkGJZ6eZivmp2k0X7Hk5ivJtaBtI9cF3RuxXBLN1wDLLP8bUa4Fy/pmz06TrbOe/+DNX1q Jv0Z9K2ybpJuMXJn0EyWCQWZ5AuM2CO1DXnSrct/8NcDckpz1hss+PGiEu82PaKf1VhloE gW1IVymhVw8RQy1WetsQ4bT1Ux+zs3GNPTC/STGlrZvDvKSky7wfoGitGYLP9l7/gis9c9 /ZtArfMdkrnh2mQiD3yv6p+FLVr6P0SNwm5MqS7YJkHX/DKQAcvZ+lLHgDytXRMQ3Rqtwo ZujUOvytXs/LQN+NRuWo0F4Zg2pMwkuvxcafN8p9s5V1oLs+Nx5tR9V1uJo0lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FbEK7mdQsNw2isBIgVzKVTNMudTiSl2WRwDrp0qKEWM=; b=rQxUr6FWFxnHpkAURQ8qPOPDGjxmG5b3PDvVvNa64GCIfh+kQWHRvbgtFLBbF4qsTFfldg pJfGSBFYxDaWvf9sedWYyLX8g0ZLGNMS5bO7lUJszy8GyvZat7aWheMwCykBMg6DkCNtdb tEH+ZwFzinp+qAMV6kVaC6x6062NXpTS1TRYAqdkpwqw51qMUOQqZGFOMG0nL/CP9xBn95 N80LdLJ1k+OTJS/fSNBY5KbmSkDd5uZ72SYoR3Sgg1mzejl9XWXms2eNXlH2+sLFuXupfz dInTXAfj3bmybaEqqVCHh/f3ys9kFBCdyZR96ss0V0iY8BjhCNg+zZ2vewP8lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548568; a=rsa-sha256; cv=none; b=DsNkmc52Hc2eZZxnkG24HNm1uJsBXuhS+WKaMZgiPm5qLn/kLXx7CqyuF6gWtTiNNmQVb5 IBt1oa9stk/eVIdnOFyrquq2ICF2nKNEJ7744dTsXogijoaMOuGPT6gV0bY6QdpZ6SmDjc m289JcnamXlT3BhONEfGsr0R0bJW8TLYjkuJgSC5x+9IZ8zJFKUgBXxgQRKDnCZhBEMdO8 mjngc/OVx2k90qn4yrjwJMdh+4J2tA5nsyoJOQ0vmv2+KNFOwFx6oG9A/7+WSjRAWKj/zL TKStr1iePeqfcpIbP9jGSn2t54b6h4YYI5oELrBwYAB6eLTMWPt7eHZyYYtaQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLc0Zrpz12W6; Thu, 16 Feb 2023 11:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBu7b6055649; Thu, 16 Feb 2023 11:56:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBu7cC055648; Thu, 16 Feb 2023 11:56:07 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:07 GMT Message-Id: <202302161156.31GBu7cC055648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 71e12e26417f - stable/13 - linuxkpi: Fix `sg_alloc_table_from_pages()` to have the same API as Linux List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 71e12e26417f9af8824b1cd544391d3fc7d74478 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=71e12e26417f9af8824b1cd544391d3fc7d74478 commit 71e12e26417f9af8824b1cd544391d3fc7d74478 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-10 10:10:30 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:16 +0000 linuxkpi: Fix `sg_alloc_table_from_pages()` to have the same API as Linux It now returns a `struct scatterlist *` pointer instead of an error code only. The implementation is incomplete because it doesn't use the `prv` argument. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38077 (cherry picked from commit 3e0856b63fe0e375a0951e05c2ef98bb2ebd9421) --- .../linuxkpi/common/include/linux/scatterlist.h | 44 +++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index 86aeefafb501..d1a71258c27d 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -327,18 +327,40 @@ sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) return (ret); } +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 +static inline struct scatterlist * +__sg_alloc_table_from_pages(struct sg_table *sgt, + struct page **pages, unsigned int count, + unsigned long off, unsigned long size, + unsigned int max_segment, + struct scatterlist *prv, unsigned int left_pages, + gfp_t gfp_mask) +#else static inline int __sg_alloc_table_from_pages(struct sg_table *sgt, struct page **pages, unsigned int count, unsigned long off, unsigned long size, unsigned int max_segment, gfp_t gfp_mask) +#endif { unsigned int i, segs, cur, len; int rc; struct scatterlist *s; +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 + if (prv != NULL) { + panic( + "Support for prv != NULL not implemented in " + "__sg_alloc_table_from_pages()"); + } +#endif + if (__predict_false(!max_segment || offset_in_page(max_segment))) +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 + return (ERR_PTR(-EINVAL)); +#else return (-EINVAL); +#endif len = 0; for (segs = i = 1; i < count; ++i) { @@ -350,13 +372,19 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, } } if (__predict_false((rc = sg_alloc_table(sgt, segs, gfp_mask)))) +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 + return (ERR_PTR(rc)); +#else return (rc); +#endif cur = 0; - for_each_sg(sgt->sgl, s, sgt->orig_nents, i) { + for (i = 0, s = sgt->sgl; i < sgt->orig_nents; i++) { unsigned long seg_size; unsigned int j; + s = sg_next(s); + len = 0; for (j = cur + 1; j < count; ++j) { len += PAGE_SIZE; @@ -371,7 +399,16 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, off = 0; cur = j; } + KASSERT(s != NULL, ("s is NULL after loop in __sg_alloc_table_from_pages()")); + +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 + if (left_pages == 0) + sg_mark_end(s); + + return (s); +#else return (0); +#endif } static inline int @@ -381,8 +418,13 @@ sg_alloc_table_from_pages(struct sg_table *sgt, gfp_t gfp_mask) { +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 + return (PTR_ERR_OR_ZERO(__sg_alloc_table_from_pages(sgt, pages, count, off, size, + SCATTERLIST_MAX_SEGMENT, NULL, 0, gfp_mask))); +#else return (__sg_alloc_table_from_pages(sgt, pages, count, off, size, SCATTERLIST_MAX_SEGMENT, gfp_mask)); +#endif } static inline int From nobody Thu Feb 16 11:56:09 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLg12sBz3q5g5; Thu, 16 Feb 2023 11:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLf1r0qz49rp; Thu, 16 Feb 2023 11:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9dzPAOQfNF9fwhtclbEp2aJxr/wonIi41mg2MvYfq8Y=; b=p5i3r+DmOcFBz7vGswyFEl90N5KmMNVz+zGjb8gIeIZ2Or5fv2faAANgaZifLfiBjQsWvE 3nwlUuzVRNMPMe5+fkFW+SmePcCbFQwKavY5LUYuIpkPqWeGbo8UBANMXw35lX0lIRfaDN hYFlben3JROpVIfGi5tla6du9FA8uUvr8m9S6wLeMDTOooRi+g7AqETiXdSE5QpXQEVgmK mCr9mpFlRLPhNxyxebxGdBfqPEp9Xn5wbLuSIegurEf8v9wnB9k9GLwf5bphVieyn1jeEa qw7ntBpMJSuJXEQHBAPY0bqrZNFKF0aXsJDguSutEORvMo7ERR0z1M41FNAoXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9dzPAOQfNF9fwhtclbEp2aJxr/wonIi41mg2MvYfq8Y=; b=YXnCo3bUUKuykjqwhtVfQMdKVKYwJIW23vj4UYaaMoc6sTB9eF7l7/L3KV5SsZGopHdiAQ 1n2K6w2niffj+g+WL3n+6JObQhDe3xfD0jVdlCv5zOyI2bp+uNCp98yxPT2zV6578gFQw3 zXzECk6phhuBhLP5SmgXHACrEDOTItX7sqZFNopeZPclwA0PWf8OTFijplaMV1qyaqth9C slTrDbtn6Sg5WX8XdPrx5N5liCmpmvTtCjkb1s1rhQW9z8/kqyzokd7L1v35odZSi+6TxN CdjcZDl6rJoCXn9lwq+A7dJp4aXQzHetCIwsEYspi5hqt4A72ae/KWt2gLfWWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548570; a=rsa-sha256; cv=none; b=vz0Gs8gc3enk5YiE6HMBITvK8QWprR3QYle5zcd0g6s5XstMOZYjnYP3lzeEsmBVerFVJj W0uWQs5PsRtzcZzDdz+AkGCkZ/EKhFIOEB12O8X6mcX3n9WFsLz2rGt18BPg78KzDbAT91 N7wmW9LBfEkcNKFJ3t8zoZAVMJFMDpybzr4k/eNlmn1zCL5j1A81iET5hR09lyqxM1hAN2 SFPQQMC4jllkjp3JDZAT8bUmgdEOv6kiTTukcd39IzCTb/unf1lXaZLcU8mEG2HT4fcIUz +C9q8K5u2K7cbFNjACVCm/NVaNLaq+UchFG2fTyIsO0QpPIqBycde0z+AiD4UQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLd2b0Kz137f; Thu, 16 Feb 2023 11:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBu9WF055678; Thu, 16 Feb 2023 11:56:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBu9sl055677; Thu, 16 Feb 2023 11:56:09 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:09 GMT Message-Id: <202302161156.31GBu9sl055677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 22319e99b799 - stable/13 - linuxkpi: Add `pin_user_pages*()` functions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 22319e99b799b792848a0b9da2322b7bc5db8a2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=22319e99b799b792848a0b9da2322b7bc5db8a2e commit 22319e99b799b792848a0b9da2322b7bc5db8a2e Author: Jean-Sébastien Pédron AuthorDate: 2023-01-10 10:09:56 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:16 +0000 linuxkpi: Add `pin_user_pages*()` functions They were defined in the i915 DRM driver. I move the code in linuxkpi so it can benefit other drivers. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38078 (cherry picked from commit 3d751b7a719fd7934e902a34285ce4e5bbaf1e16) --- sys/compat/linuxkpi/common/include/linux/mm.h | 33 +++++++++++++++++++++++++-- sys/compat/linuxkpi/common/src/linux_page.c | 6 ++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 8f5b543e1002..43d1cb0f8aad 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -257,25 +257,54 @@ get_page(struct vm_page *page) extern long get_user_pages(unsigned long start, unsigned long nr_pages, - int gup_flags, struct page **, + unsigned int gup_flags, struct page **, struct vm_area_struct **); +static inline long +pin_user_pages(unsigned long start, unsigned long nr_pages, + unsigned int gup_flags, struct page **pages, + struct vm_area_struct **vmas) +{ + return get_user_pages(start, nr_pages, gup_flags, pages, vmas); +} + extern int __get_user_pages_fast(unsigned long start, int nr_pages, int write, struct page **); +static inline int +pin_user_pages_fast(unsigned long start, int nr_pages, + unsigned int gup_flags, struct page **pages) +{ + return __get_user_pages_fast( + start, nr_pages, !!(gup_flags & FOLL_WRITE), pages); +} + extern long get_user_pages_remote(struct task_struct *, struct mm_struct *, unsigned long start, unsigned long nr_pages, - int gup_flags, struct page **, + unsigned int gup_flags, struct page **, struct vm_area_struct **); +static inline long +pin_user_pages_remote(struct task_struct *task, struct mm_struct *mm, + unsigned long start, unsigned long nr_pages, + unsigned int gup_flags, struct page **pages, + struct vm_area_struct **vmas) +{ + return get_user_pages_remote( + task, mm, start, nr_pages, gup_flags, pages, vmas); +} + static inline void put_page(struct vm_page *page) { vm_page_unwire(page, PQ_ACTIVE); } +#define unpin_user_page(page) put_page(page) +#define unpin_user_pages(pages, npages) release_pages(pages, npages) + #define copy_highpage(to, from) pmap_copy_page(from, to) static inline pgprot_t diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 8b2006668f8f..10172d341e95 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -249,7 +249,7 @@ __get_user_pages_fast(unsigned long start, int nr_pages, int write, long get_user_pages_remote(struct task_struct *task, struct mm_struct *mm, - unsigned long start, unsigned long nr_pages, int gup_flags, + unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas) { vm_map_t map; @@ -260,8 +260,8 @@ get_user_pages_remote(struct task_struct *task, struct mm_struct *mm, } long -get_user_pages(unsigned long start, unsigned long nr_pages, int gup_flags, - struct page **pages, struct vm_area_struct **vmas) +get_user_pages(unsigned long start, unsigned long nr_pages, + unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas) { vm_map_t map; From nobody Thu Feb 16 11:56:10 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLg1F6lz3q5g6; Thu, 16 Feb 2023 11:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLf3gtPz49mN; Thu, 16 Feb 2023 11:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XqNQdDUl2nV0b5QdF5DWriUlaDOrugk75T5xr3LnhyE=; b=kNEHiKX5s0OBxdlYIn+6W6GSy07rrY7t9+DJ/a9lPFw/EQZu6Xh71cgtMJsS7qGWXXkxz8 nHdrqQOQQKF8kwv/QZCRnIQAlJTanHAyV/cZ39v7Q/mFHGPWJsJK+eP6LZZxdy7wmIMffR Uf4KgIuq1ATtLkHAOKBJF6QbH93fSXWB/TIySsgVJh4FGBAXPsReGV9qr4SAQ7NgAWlPeQ sWIPy1zPiM6LXsxsv10rlAw1baPkYOqjfD+cO+jAYdXyEyIAR3jcLltc7iQq4Zf6WLV8A0 yW1EYTcX0ltTEamsQiPtEBx7QEavU/yneS5x6Wh05AgrGJa0rhAuvuube+Y39g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XqNQdDUl2nV0b5QdF5DWriUlaDOrugk75T5xr3LnhyE=; b=udyz4E4dmzcFh5rhwFLq9J26v/NMNVmQ+PAxVMrER4FQspHFroroZ/JwXR9qyW+OEM17GI J87sVR5+6F0nn1UN/brD6/WW4QBPb0ETnPy0C+wS86IyHp1HlCsecRDcVq1lz0iOE3BjI0 hkjHBeRtxIqAddVn8ICAJgMo9b8ViIL+g2zoYsJT1Du6FpIZOqBZWUan6UxdZ8jz9hOC0Q yixCthTapaU2FH3RqJxnzK+7QsUqD0BEBdrYT2Iq3hsAoMH0OWYMAA8gXDkbgbGgZCgkfQ 0Vc19nbbdp6BAnJj22chhNQ2FDa4SWdZ2c8MoUsZWyc17JuiuzDu4gIoBqSo5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548570; a=rsa-sha256; cv=none; b=wcv+HARdcz3j/kald81P0e1aoR5F51JBZ+rPXVV80D+o+DSDFkPkcZJrRAbZDcbId14x0m 88F/ES1P3/zxoUE8sIkNm8Y1fBn8m9aeKhmNzYIq1aWZQSSn1q1tDSEon1Vu0sA/c8/wPL swEjdB94QIj8r8IeS7upzP/8KSTNlYR6soW6ToPKqwfAyIkjYKG4OYEnm0L9MlB6Z4mukX 0M1uKxUtPAXTHOeNNaOMUwNbQA3aw6wKw2KicZd52zeNVvZ/zJoS98v5zeKCqfF3+Wc+lJ 2tZkrI8d4JjfkDEy/ctq52sYb3R8e/wnxgY4RZjS9r2FrcGiHoue6NnaNLzLjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLf2kCvz1353; Thu, 16 Feb 2023 11:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuAxP055713; Thu, 16 Feb 2023 11:56:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuAs4055712; Thu, 16 Feb 2023 11:56:10 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:10 GMT Message-Id: <202302161156.31GBuAs4055712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 1b1901620028 - stable/13 - linuxkpi: Add `freeram` and `freehigh` to `struct sysinfo` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1b1901620028a316e55d907069b85a2f077e6db3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1b1901620028a316e55d907069b85a2f077e6db3 commit 1b1901620028a316e55d907069b85a2f077e6db3 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-02 20:57:35 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:16 +0000 linuxkpi: Add `freeram` and `freehigh` to `struct sysinfo` The struct layout is modified with this commit because new fields are added in the middle, keeping original Linux order. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D37932 (cherry picked from commit e400b695991bf3f336e9cbe39e400943d8b1d676) --- sys/compat/linuxkpi/common/include/linux/mm.h | 8 +++++--- sys/compat/linuxkpi/common/src/linux_page.c | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 43d1cb0f8aad..be3890edb5cf 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -144,9 +144,11 @@ struct vm_operations_struct { }; struct sysinfo { - uint64_t totalram; - uint64_t totalhigh; - uint32_t mem_unit; + uint64_t totalram; /* Total usable main memory size */ + uint64_t freeram; /* Available memory size */ + uint64_t totalhigh; /* Total high memory size */ + uint64_t freehigh; /* Available high memory size */ + uint32_t mem_unit; /* Memory unit size in bytes */ }; /* diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 10172d341e95..a82a8c45be01 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -79,7 +79,9 @@ void si_meminfo(struct sysinfo *si) { si->totalram = physmem; + si->freeram = vm_free_count(); si->totalhigh = 0; + si->freehigh = 0; si->mem_unit = PAGE_SIZE; } From nobody Thu Feb 16 11:56:11 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLl705yz3q5s4; Thu, 16 Feb 2023 11:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLh624mz49s0; Thu, 16 Feb 2023 11:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P8O2liocHHobhyfEvVkGKYN4LMkUafdqFcYDpcFZUro=; b=JFrqIAYB7BVQUrQe0JGJ0n4+VXxbpImJg1y/P5+JHiD48jZ3Xgz1ABRQUtmy8LJnWv9zUh yHrJRLwdcNskzqM4SP57h4j1tIj0oycUC0anwMLZhJRWGSAg8T7SdjZXOmutUxGZ78Pt4s R7MYHIitGrHk+/uMJXfxdgoWuhRxWJVZZVyObIGkH0AJ+jvfpt9s3a1updJO6XHb9YE2+3 Y6jN0caKZTS4VFH8XYubWmMSJ2BdnbrZnpoeUg72hcYraa9sp3Fn6uiZmpUdeWMAbtJvT8 WYmcI7U1KRjOfo9UJhfJHomYYuaeBmeyRDzJ52eBQgxEOLLZP6anH0KrVG9f7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P8O2liocHHobhyfEvVkGKYN4LMkUafdqFcYDpcFZUro=; b=iZwcpKL9o+Vh6uqI91yiQCIjOGlUB3FPkN8TvA3oXF8NrcxWXa7OsKF0il+SifsjXVCqyC ULysIXasqOaJKm4Pl59Y10i/noeKf1BbVGOC6UNEHe5Y0H6/6fQB8BIVIzT1Zn82z3IyZd 1mpWUWIPKuB7wJxrYOH+L1EhvRIjqFV5o4wGRoX2txzoMWjKFhoB1yUvFmeNVHhwmvih+R oDCyyrO8mytjWJblp5yvDd/y9g8Uv3qC9IQcNo9bdnE3Q4YHPotSl0WVtRJAuu+LHznSLJ I6Asdum0J5mrqKbkz4A3Cgki9TjvDYeAY7R1HKdSFXiABEWH7Wg6eyfBp6NbSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548572; a=rsa-sha256; cv=none; b=G20G8cUj2v/aTC2vHf3PYml0qphU2wAow84mAOoXSbvolatnoAbpYjj6FXGUFrcUItxh+x SM5WPZ2D+ffayBEo1xSt+zmJSn4mDaebm5hsuqgLJgsxisTP3CeBhg7LqTliBP9LoLeyKW 91VH53H9gNj/CHPN1wHXzoKYwR3AZTBDbheYV58RqFzXU5V5snNoxpILuaVxzxM3SIbkfe UY65M53IYY8mwArXiTGfGnuLLqRerhVx3V3zE9eBXEOBq6X1wgm8YsLASwfNSgl6egkQCx Hdortlzn1T+zyXRk5duXkUhgnSLVj4ggCGELAkzCaVhmnLDlEWhAi7tyuYgqew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLg3kCVz13H8; Thu, 16 Feb 2023 11:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuBli055742; Thu, 16 Feb 2023 11:56:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuBb0055741; Thu, 16 Feb 2023 11:56:11 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:11 GMT Message-Id: <202302161156.31GBuBb0055741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 970fd5aa41cc - stable/13 - linuxkpi: Define `might_alloc()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 970fd5aa41ccef06ce8990743d1bd05de5829899 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=970fd5aa41ccef06ce8990743d1bd05de5829899 commit 970fd5aa41ccef06ce8990743d1bd05de5829899 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-19 00:15:35 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:16 +0000 linuxkpi: Define `might_alloc()` ... as a no-op. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38146 (cherry picked from commit 19be627cfda7e509fc3444fd57de8a0a501aee04) --- sys/compat/linuxkpi/common/include/linux/mm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index be3890edb5cf..9eb5ce7c5280 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -348,6 +348,11 @@ void lkpi_unmap_mapping_range(void *obj, loff_t const holebegin __unused, void vma_set_file(struct vm_area_struct *vma, struct linux_file *file); +static inline void +might_alloc(gfp_t gfp_mask __unused) +{ +} + #define is_cow_mapping(flags) (false) #endif /* _LINUXKPI_LINUX_MM_H_ */ From nobody Thu Feb 16 11:56:12 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLn2sB1z3q5p4; Thu, 16 Feb 2023 11:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLh71X8z49mb; Thu, 16 Feb 2023 11:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DiC1iZtqDz5M7wQY4Zls+JF1RjkCGRL3KeIMQg2M3y8=; b=yZ1JMOGyj01YCHo1y1wa1KexWpKRYpaGfBXlRAhI+laUelc+Olbg3aHquAKyNGPJP9JYlK NUdJ00CqIax1Xd+M/IbK+fNPZF0xJFscApJqZ6ZTdqDyknjQT4ZOCDvSXAvXpedYGcrfZX kqqfofukm9RP4Mln5jqHM4TQkdpKFeeYOxu+T6T0cqEL8ZxNlj1IPg5plZu5u9xSEz78p7 4cKFJkONrr20BmkTQriw7+EVCtFWAWavZ31kWCSEyvjQtUZpK68GI8GCmR6fYDYJ2BjhHD B//ElPhv19SDclEVqD4xzhsw1qW4nDywps+S3H4r+8/8IXrpJWekXKyX61Jtqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DiC1iZtqDz5M7wQY4Zls+JF1RjkCGRL3KeIMQg2M3y8=; b=VELeyt8usSgoIV9d8c0xkxI0a+gLkyKYu1yfeOQ1sibr0QdC2LQm/D1hz+fDk8pv1WsHY/ Q3f9VBTZHGah6C6I+Z5cDVNLqEigOIpCJu0hKZVADPLKiMnQNEaKs/xLdYFGup+ggng8+o TGY0ionkV2Od9XmNSo03WQ+0FfRlkz8w6XkMgfZdlgyiSDtnRsrEiVxJxClGeBy1C3afQL FJmHYeLG1Gk0AfCz6xrly7XpkJC8iXEK07oLRW1sTqupdn2kX8iydo7z3r3BwW92egaFrG ClVm9m4Bxeeg7Qwd7wPOiiz+wJNa9rIZC14qjW40LiR6WQKzVzRPtnJbQFUSUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548573; a=rsa-sha256; cv=none; b=AVgDGQxTRTEkHYq8gv6RxN8txQie8ZN5stWdiVSsYokeppMBnqzRATqMb0+FQwVA9UWXhy 8S0Az5rCr656Cbz9Rw3LYzMYAms6qVTaUnagARFqyWv08OWr00VUAxgNgMQ+GNIPX6cYrv xjF5M/XzeQT72Qefn6Zh4MGQsvX4fOiHZyd/Y/j1q48k68/trsXj/0vLEdyV5J+t4mdldb JNvTcn0w7qIQyq0wrJPSsi+x7muIDAO8gQ6HEzbAoGwLNbsDGLPTpVclD/JCnmcPcuV/+o n4B8BhyNyeEMPaI0sblTKBlUd2/4trtW0LrX4Qc6NPKLkEaKdjeINIuG1HpyVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLh5JX5z1354; Thu, 16 Feb 2023 11:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuCfm055771; Thu, 16 Feb 2023 11:56:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuCLk055770; Thu, 16 Feb 2023 11:56:12 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:12 GMT Message-Id: <202302161156.31GBuCLk055770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 0424ff9e19a6 - stable/13 - linuxkpi: Add List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0424ff9e19a6a424aad0bb76d5ed8bb33f832e42 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0424ff9e19a6a424aad0bb76d5ed8bb33f832e42 commit 0424ff9e19a6a424aad0bb76d5ed8bb33f832e42 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-19 17:45:28 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:17 +0000 linuxkpi: Add For now, it's empty. It is included by the DRM drivers but nothing is missing otherwise. Perhaps something we already defined should be in `limits.h` instead of another header. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38147 (cherry picked from commit 25faccaaca6a0bddd60fbad0033606435a13e6b8) --- sys/compat/linuxkpi/dummy/include/linux/limits.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/limits.h b/sys/compat/linuxkpi/dummy/include/linux/limits.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Thu Feb 16 11:56:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLn3Plqz3q5tq; Thu, 16 Feb 2023 11:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLj68vGz49dw; Thu, 16 Feb 2023 11:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UGA8po/J5bq41jDWFl1cEgPwcdotgWdCi9sN881k33M=; b=SGbYL1KLqYXUy3UxBOvZbK9KOxFpuN3hLDULLURG2GiqT3FUpVZjA6uop7eAcMix2SCiUe dndRJA0EA/VO7fp0lOPjAmwrFGYq+WxTZ0VW0uytSLeTv9A6anl9mrZIM6YXh1nEuG+ECV YW6sNKLmOU/pOK03m/ZdOADWvG502WxTv9dpAAR3scXkCgQ9pkBORaAsuOdICD+93GR2vZ dybydFtFthHjZaf/lZlirIIq9VsYLYMhr8QLd+EgW2C0hXRJkL7j71SpkIiGgxnP6RZ9o4 jNxCu8ebPoNHqirwLEu1ttOOhy6GWXTxiw7GbNYIXWGsX/MpTk0xLW8aEDg8Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UGA8po/J5bq41jDWFl1cEgPwcdotgWdCi9sN881k33M=; b=bBsIfDfLQv8+MnXq+v1JuU41XaF9lzdeSjXMPqzGNnnp3W7rVmvDTs3QMrBLZ7Au2EWxe0 d5AV0y049B2eir8xyAAAKnic9BfBqZ3GPgH82cPgaaX470qR5oELcfochzIwDRx0ExCddy Rfvd52VecSic1UjgsJj5Mw6Gy6BPnaWnZDtYoT608VXCat+O6j960XCFUr1uo43AvjxtaQ k7bMjDyAUMUiuGdNUg8pxcEgc/bjFVrQiFG/PX38HLg4sAZYWaqSUC0IVr5tsrn8T1MLmF g0edK03t+ZjVJcTKsUNaswdfC5qODpBEaAxsgW0CdwdgnR4dz3XSLk8+xip8pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548573; a=rsa-sha256; cv=none; b=ow39v38ChV8XLVQXk8Y9YGHLOshO08kjUR9uL2Z8TLj+0phmUBdKHfrmU+hgs8jEjv9MJl pJihoqOJj+ZhsmpGnPSJm0f20aNZzj/88yVNN8M8N7Ida2aA1en2Q8vbgk+blp73QI2YbB F1DfgCOEvhFgJQrGFQ56n+9tRAzwKvgiEHANS5H8rS5bz1sNUUolKxWfx0EtHaCqFKdbM6 h78yhbO5LQX38mt8ZJ+E/8ApLbFB4iz/oh6dVLwgVxxUKCMH8cLaOsQJWqpo6TMjNcpbTo 8VaKL0dkDgKfgbU2fnfHrVlG+ZI3bgyY5pjXt0IvxTsLhSaydd+XBhfENia0Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLj5C4tz137g; Thu, 16 Feb 2023 11:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuD4J055800; Thu, 16 Feb 2023 11:56:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuD1s055799; Thu, 16 Feb 2023 11:56:13 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:13 GMT Message-Id: <202302161156.31GBuD1s055799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 46a8154651aa - stable/13 - linuxkpi: Add List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 46a8154651aab6abb03cba09e80882139ed466aa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=46a8154651aab6abb03cba09e80882139ed466aa commit 46a8154651aab6abb03cba09e80882139ed466aa Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 17:50:39 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:17 +0000 linuxkpi: Add For now, it's empty. It is included by the DRM drivers but nothing is missing otherwise. Perhaps something we already defined should be in `pgtable.h` instead of another header. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38153 (cherry picked from commit 7649b89cc12696d540b20ad2f5896827b102225e) --- sys/compat/linuxkpi/dummy/include/linux/pgtable.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/pgtable.h b/sys/compat/linuxkpi/dummy/include/linux/pgtable.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Thu Feb 16 11:56:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLn4vDxz3q5lq; Thu, 16 Feb 2023 11:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLn1dxhz49pr; Thu, 16 Feb 2023 11:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kI2c1FjaRIDzF052D0wJVTlbPYRGm/+ZvNriP3Ke1iU=; b=PBsflafrYNewmsWhiRr925fEMVI3zZa/6ZfX55RlTortiDAX0f1FwU2ejhxiugV3OnVvQG 57B/GvDBP4FXVDXGq0JN+VpzMrEoaJ+0aPD1RZ7ZUwVMKCW7Z7yk3XHhKZtekZ7UD10iCD o1R48KTX43SNB7Ov+W/q/NPl52KHccDoug432xNMuNds8DXBYfBmHwJ8sYdFdVHKIUiFbI 06iZGe3ORS67Yv7T52Mz4rtFYBuacuLZzsomMZyzBXm8plbDtfFvDoF+Des9li3sNiZGD7 TCO+1CTjyGWw/7QqZgt8Hip8rH0MuQpQ6C1Y0Sk7+vnijD6RRg/Cl/A+mPcbfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kI2c1FjaRIDzF052D0wJVTlbPYRGm/+ZvNriP3Ke1iU=; b=qepNjbethzTWpaNX5mESDXiKHrgUNeTy3UBNXz4/mtOqCtt6WbVov48iGQsqj/jylicZ0F ycUAWwrxHJaXnzCZLKb8b1YCIdtDhxX3R5h2yKFi3UqKidS1GdU4JmPPopPDBdL2NXZ6ut erb/29JF3CqIbxd3qdzBzRWXNryIC+Z0B6r9yxK547WvQG/z/b0Mu5xYEz5RpMQi2KYnAl kxqGei3JsHzk5+HpgTpTWbv5TFwxnTmEeTONUCUKINuzFHkbABxCLE2NKLdhR/15Bm/6VE +0L+GK5avPGuAfRkwOhz3AP0mlWRpZQQakDpBRX42Mu6bZuxNK7O3KvQWbqJew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548577; a=rsa-sha256; cv=none; b=Nr8hdO6HI4idA6kaXwspLvWGEAFBusVoXn4KluHO0tDr9kDPz9tc2c3744s0FaokTnyRN/ N6yopYNEpIs2TLpnadzyEuDAcrGe99Mhq2kblKjwGRU/JQAlRYv9L2CtZdv48OyttH6Ffb 7eaa9A0boOn8XGXsSfNXEcry9uxqanBQKIKxRx1IBuv5GCiU6LPX8z9OpucWs/6AUPmWcy omaDLRqwMYVIMfxAYkkdnGBQw/KwMfzmhElynNiSPSjuqLh1jAAGtk7meq7RJ7a5z68uCU U5abZ9gKssgqi0kBa25BBjgM2MeaxQXcqD7TQ5dLlxmOVwnQOY1BDg+U8wSUaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLm040fz12W7; Thu, 16 Feb 2023 11:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuFQ3055864; Thu, 16 Feb 2023 11:56:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuFfv055863; Thu, 16 Feb 2023 11:56:15 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:15 GMT Message-Id: <202302161156.31GBuFfv055863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 3037900f4198 - stable/13 - linuxkpi: Add `io_mapping_map_local_wc()` and `io_mapping_unmap_local()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3037900f419825bc2193269f554ae80d2c5211c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3037900f419825bc2193269f554ae80d2c5211c9 commit 3037900f419825bc2193269f554ae80d2c5211c9 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 17:53:49 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:17 +0000 linuxkpi: Add `io_mapping_map_local_wc()` and `io_mapping_unmap_local()` `io_mapping_map_local_wc()` is synonymous to `io_mapping_map_atomic_wc()`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38156 (cherry picked from commit 29d0c85c86347cd3eafe3c8974c693abf8d9ca51) --- sys/compat/linuxkpi/common/include/linux/io-mapping.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/io-mapping.h b/sys/compat/linuxkpi/common/include/linux/io-mapping.h index e874c5bcadc7..b8f075491d1d 100644 --- a/sys/compat/linuxkpi/common/include/linux/io-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/io-mapping.h @@ -93,6 +93,18 @@ io_mapping_unmap_atomic(void *vaddr) { } +static inline void * +io_mapping_map_local_wc(struct io_mapping *mapping, unsigned long offset) +{ + + return (io_mapping_map_atomic_wc(mapping, offset)); +} + +static inline void +io_mapping_unmap_local(void *vaddr __unused) +{ +} + static inline void * io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset, unsigned long size) From nobody Thu Feb 16 11:56:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLn4M4Qz3q5p8; Thu, 16 Feb 2023 11:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLl2JwLz49bL; Thu, 16 Feb 2023 11:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KSXwgFwaNknXci83HiLyD9gpg0nfQkiNrm17scKWbcY=; b=IeFP+juSAkGX+HbPljmW5xH+AwClNL76WIiLFXNpytHosTFzJLXHA3AWx8uGsYfHOM3oR1 eeJ88TRHc3WUfuF3HtZIgRGFkUmjr5FtdNKd8kmMhHblLV9kfN2JbIQU8e3vHrvvGa0B/i wNENOA2yZbco/ME4e3nvJzM2QCjA+R2ldFKyw1jNi/mE0E7dKCNw0I2+04BDmwTIA+tJ1m jd+xJ1jnJLQdHWlvwTyEUbT5vyb0SptnLGxS4JlunoBovyraQwbeHUcc23Bh2kwmXUkqLe FRoIW/BEL1X8pdOIBJsOHwc+EshAfwzBAvwBooiMCAbY/d8ar2gErv1w8Oj4cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KSXwgFwaNknXci83HiLyD9gpg0nfQkiNrm17scKWbcY=; b=mpVCbdDip1Ij0oyrVn/o6glSJcnbbE8yWYVJfbV1KYZC0wQGUNHNKQCRzgBy3ejOaZEUVv UViOfN+D7Y2mBw6mK8vNmkCCUBqEBN+Mv9Bhysts8MGKw01tdhmOOf3vFKi4BIWqXy4G9Z xAd3Dq/BFrPPoWOLxTbjYmaAthftTDw0ZLq2dRHvriLQb3NxElD12sMIXCwm5t2bejn4yX MsFlqepTDLouwPBG42Kamy/rAEpBIFWatts4RIcewEV+1D63+KzcDZ1L9edz8ci2zv6xS2 PVOni5PE1z+9x95x3XKk9X4cFO7pX6tVK4nDcCfWnulbHXMkklcNwRjeqnZY/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548575; a=rsa-sha256; cv=none; b=RAeR88Z27OGlxn7yu1ZnxLfho+Ehaz0mY7p2gARw9BHLPnG1/w/nBbHxCWy0UJ7+fZmYli 6jjIRt5E0aLHEImoNmFctzSk4Brhb0vd6qIAImWaTvF7jZHe8e3LzLNkL2uiJB7cpUR8Sk +EDAoTKYTkiBAfPHjsLS6Vt0J7MxlHY7D2Ibx3JmwgAIHnGaluW17E3Wa39l97MAkjA1Zs ryV3iWR5siZS+3SAmFwREkVq+Aoejj4QsrbQm93+3K7Hb3MRSTLReIDOiHrmlVQaPmbA0A dGKs03mLJczDaZ9+oVC08UTI/hmeYVct4kq2Wz5APWylq5JWK+H21/Q6P/AaLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLk6sJxz13H9; Thu, 16 Feb 2023 11:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuEYu055829; Thu, 16 Feb 2023 11:56:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuEgS055828; Thu, 16 Feb 2023 11:56:14 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:14 GMT Message-Id: <202302161156.31GBuEgS055828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a6ffaf995b44 - stable/13 - linuxkpi: Add `kmap_local_page_prot()` and `kunmap_local()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a6ffaf995b44553b65c8493af38d627d21bfb47d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a6ffaf995b44553b65c8493af38d627d21bfb47d commit a6ffaf995b44553b65c8493af38d627d21bfb47d Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 17:52:39 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:17 +0000 linuxkpi: Add `kmap_local_page_prot()` and `kunmap_local()` They are synonymous to `kmap_atomic_prot()` and `kunmap_atomic()` respectively. While here, fix several style(9) issues. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38155 (cherry picked from commit 9dafbd0c69a6aade69b23a649548b6c7133f1091) --- sys/compat/linuxkpi/common/include/linux/highmem.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/highmem.h b/sys/compat/linuxkpi/common/include/linux/highmem.h index 53efbec06385..0056b590f239 100644 --- a/sys/compat/linuxkpi/common/include/linux/highmem.h +++ b/sys/compat/linuxkpi/common/include/linux/highmem.h @@ -50,6 +50,7 @@ static inline vm_page_t kmap_to_page(void *addr) { + return (virt_to_page(addr)); } @@ -88,9 +89,17 @@ kmap_atomic_prot(vm_page_t page, pgprot_t prot) static inline void * kmap_atomic(vm_page_t page) { + return (kmap_atomic_prot(page, VM_PROT_ALL)); } +static inline void * +kmap_local_page_prot(vm_page_t page, pgprot_t prot) +{ + + return (kmap_atomic_prot(page, prot)); +} + static inline void kunmap(vm_page_t page) { @@ -111,8 +120,16 @@ kunmap(vm_page_t page) static inline void kunmap_atomic(void *vaddr) { + if (!PMAP_HAS_DMAP) kunmap(virt_to_page(vaddr)); } +static inline void +kunmap_local(void *addr) +{ + + kunmap_atomic(addr); +} + #endif /* _LINUXKPI_LINUX_HIGHMEM_H_ */ From nobody Thu Feb 16 11:56:16 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLp2fBCz3q5ZV; Thu, 16 Feb 2023 11:56:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLn4Z57z49xj; Thu, 16 Feb 2023 11:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbYTipWTS1RGQV/Li5SHK7OhWrL4umAV9RCbDgf9V2M=; b=ArYFuh1YUJJtTRXfYCGVXqt70coZv1N9CE0mxLVbBW3RizllpLHBV/TLJrVDkeP9Ugkuf2 XZeFBLrRSaBsocx7qQ60MauOdiINa9xhjIMQbJGsSZc27UvBC45ErwvV7ssp/5Tv3fSwhR AJIH5lzbSsV9TJoP31iVVcvzSbG9mhXX3OncE+pV47jbVKm/9/TnaXw4n064P+RE+lJoPM XOqM702AHFq96dw01KX2t9NNOOUk8Ax+g+tIfh2o/E90vDwiTTuYU9uxhnA2a7cr5vcoje KB4cDQ1n7csVLIBr2c8ZuLlrjX66X2TAtpR0p+6wxyxU1AuvwhNWBozly5m1SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbYTipWTS1RGQV/Li5SHK7OhWrL4umAV9RCbDgf9V2M=; b=wlCkbuCVEZ8J6kP/k9g0FkK0RhYCujXNbNEuQpmyXqRqFkznN/Z7YG+cQaJtKxLWC/l/4j yYjm225zmgiidQMOaHV6QuuoRrPAK4GJDqm46RUnUx2KoBJ/B+J/q0Fgl0JxkRFMim2znG 00jSBdCQoIXTz7DmmAWF3/+/AaRCRm1UwE851TyXTZ6jxtz5nmpnsgzIC27UDX02wOckvu uKZioRfcSCgmBhd1t7Fw/HVy0SLcnRzAnGmYJkJat0pUAs9T8EFEZmPZTLRtbkMK7d+yFQ ecKXoEPb0x/icjYtEUnNaFsseA5CPuf+OwvoxVtKQrJaS5seODjJOHZ76kMAFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548577; a=rsa-sha256; cv=none; b=fxzSpDTTIoV6OggcWADyTcTs00z1nsVDLIxUeICkQEhExRy0IRyycMt+rZCX/kcu1AXspN 3o2Wf1AnUzwu9chS2MlXCGEFfMXMN9JGkwA+d4m9CgBRm78Pyo+QCYaBd/sCs41L40rH0z 1y4TcjAZtrKbMnDtKUftjQnrMSut4nmy4Tt5Q1Qfwg1iR2xlXBX1MQuO4MvmtxR+wS29md aDpfBhHBfQlktnv4G6mjXfn92vr6B8okf4E8Hni3FJi6dcnCymhEjUeYR5AjuOn48zYt6X U5Z1yoH0jCQj/Nvu1QaI7UuD47kROUUsUMSRivx1QaJVJ24STr/KwI8lI3vSxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLn28dzz12j1; Thu, 16 Feb 2023 11:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuGST055893; Thu, 16 Feb 2023 11:56:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuGHC055892; Thu, 16 Feb 2023 11:56:16 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:16 GMT Message-Id: <202302161156.31GBuGHC055892@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 8045ace7fc32 - stable/13 - linuxkpi: Try to solve headers dependencies List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8045ace7fc3225be4779a542e12e2ffed6b7963b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8045ace7fc3225be4779a542e12e2ffed6b7963b commit 8045ace7fc3225be4779a542e12e2ffed6b7963b Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 18:08:39 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:17 +0000 linuxkpi: Try to solve headers dependencies I'm sure I got it wrong but at least the DRM drivers compile. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38157 (cherry picked from commit 11aaefc9ca8537be0ea5f62a5927dd39a6109e4f) --- sys/compat/linuxkpi/common/include/asm/smp.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/smp.h b/sys/compat/linuxkpi/common/include/asm/smp.h index c349edb16bf4..523e35d1562b 100644 --- a/sys/compat/linuxkpi/common/include/asm/smp.h +++ b/sys/compat/linuxkpi/common/include/asm/smp.h @@ -29,6 +29,10 @@ #ifndef _LINUXKPI_ASM_SMP_H_ #define _LINUXKPI_ASM_SMP_H_ +#include +#include +#include + #if defined(__i386__) || defined(__amd64__) #define wbinvd_on_all_cpus() linux_wbinvd_on_all_cpus() From nobody Thu Feb 16 11:56:18 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLr0zxTz3q5v1; Thu, 16 Feb 2023 11:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLp3TkJz49qB; Thu, 16 Feb 2023 11:56:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ulFoEiiyZe32yud+HNm2B2jx6tbD2xRIcf59dQoRjj4=; b=q8jjqeD4WZmedY8nYmHdOIf07didZuWn5hIuMYx/S+WUD+kqclOUNIEafBBFJTqwhO/40Z 1lKk8epF0rvejG1eEQVGasXO17juIOuBCcgQymFPGYQ503GKDfhA5k3Lc8RwUg2ZA+x4UG nr57qqWw1JlKhXcZ9K4yMdG2xOOAiV5WDqZ0uWEWfKLwvGQGy+YBb8dTdl/RIpZ0+2fJBX d8u3Ag6jCDgCVJ6iEZo7ElyDmuLCHxFMNvr5A7EFNzk8OcRg1O+2UqPTNBcEyH02nx+BZQ zuB5//x/zwmqrm4IY7tB08HyQ2GMz/lFq5PvLkrRgk+p6uXF0otPRexc4hAPQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ulFoEiiyZe32yud+HNm2B2jx6tbD2xRIcf59dQoRjj4=; b=cbxJQdu+D0ul0PKIgGMGOx0i7vmbYHz8zNRhRnDdLCqcMZOxEuM6qrDqkfjKm6WAx1LfbR 6LwzG7TQ/xQnUSTm2hCNOm2yJbGjmF84GHflKBBlNhJo7KycuH+ayGW73jEXpvtfB7g2Z9 fUVz0KmRE2YSy6hUnmZ0y4OOJZUVP7MNU+RLFx4vkUcJABfPBTwUguTLzllsR3Wndl2gZw O1OVTOyLn0ZbQ0CTlGSxP24KQ5q6Q1+xmXU/Wz+jMrF6rkh9aSl4BDLuM7MJNEYmcGMaex Um4q+zDq2X8rvoQjXGIVO1vekN2exQvNM50Z4b6qGQ6Qa9BVINaBJlrG8JRJ9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548578; a=rsa-sha256; cv=none; b=BO8jnaTaQY7GWZpuTqRWTamr4r3e7xUDtgiSFpc8FORAD1SiGsJABA2xrcjijULb4z1CGJ STtF9Is2+BMxWbgsqm755V841OXq3F35X5cobpkkAKcU1GIep6DsgkLoAxITltTMkQA2Lf HY0OVRLL8jk80b+qSQSeRNrbfkxoiHqJy2q9xU3SWE6OFzAcotReNhaFOgHBlSka9sPbbk vFs4nolax697VUlRsoqy6g/vfrfroiqvCxMZN/F98JAqvf9YfMOnmy8asjcrh23zALRkSi IsRFHgbHetTPsqLZtumgI3puwu8aaXs2XUh93kNI71U5qgYsBrP9Glx3q/V0/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 4PHYLp25p9z13HB; Thu, 16 Feb 2023 11:56:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuIlo055922; Thu, 16 Feb 2023 11:56:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuI4f055921; Thu, 16 Feb 2023 11:56:18 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:18 GMT Message-Id: <202302161156.31GBuI4f055921@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 6c62af80e347 - stable/13 - linuxkpi: Define `dev_is_platform()` and `to_platform_device()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6c62af80e347980094b1df4de50e66531f49190e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6c62af80e347980094b1df4de50e66531f49190e commit 6c62af80e347980094b1df4de50e66531f49190e Author: Jean-Sébastien Pédron AuthorDate: 2023-01-22 13:46:54 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:18 +0000 linuxkpi: Define `dev_is_platform()` and `to_platform_device()` The former returns false and the latter returns NULL. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38163 (cherry picked from commit b9ef0689433d7d08c96695e571c4c262a3ac9007) --- sys/compat/linuxkpi/common/include/linux/platform_device.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/platform_device.h b/sys/compat/linuxkpi/common/include/linux/platform_device.h index f07b5aac967b..f45cdce829c4 100644 --- a/sys/compat/linuxkpi/common/include/linux/platform_device.h +++ b/sys/compat/linuxkpi/common/include/linux/platform_device.h @@ -42,6 +42,8 @@ struct platform_driver { struct device_driver driver; }; +#define dev_is_platform(dev) (false) +#define to_platform_device(dev) (NULL) static __inline int platform_driver_register(struct platform_driver *pdrv) @@ -76,4 +78,12 @@ platform_driver_unregister(struct platform_driver *pdrv) return; } +static __inline void +platform_device_unregister(struct platform_device *pdev) +{ + + pr_debug("%s: TODO\n", __func__); + return; +} + #endif /* _LINUXKPI_LINUX_PLATFORM_DEVICE_H */ From nobody Thu Feb 16 11:56:19 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLt36h1z3q5gV; Thu, 16 Feb 2023 11:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLr0QNGz49hm; Thu, 16 Feb 2023 11:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vK1A/gfumz2r7ebquu/RUAr+pFbwUT+8ctddu0xGHTQ=; b=dVp0vJV8FEBhp+Kot6YaWdLxZsnZgOQCF4r4H4JNQYPl4dQiF1RG9m8wcL1VH7AZ8Kz3Y0 I52YzaqaPhBW8l8tEkV31StAVO8LVladpPqEgbqkSbi1mFoD1QVWdry262rdcTLLL0v5cD 9/G2pC4Yg2ly4HTogBCf7KAU1l/rsxVVBlcA6xcJXGAnXpvWfPCMyXo7WctUAlyXC80fQN qX8iUREzzzmWYBiANmdEu7NBkm8YLXrMVsYmfM/bORIdkjb3nqrGW8JVTcvB6MvjyIWF8e PH2VnBxFkrH4easDDfkqF5BK4weDqSu45SxCo5hKpoQRdlb5CqYUayuIqv1ujg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vK1A/gfumz2r7ebquu/RUAr+pFbwUT+8ctddu0xGHTQ=; b=jUUAkxV/CATUmUJd8rTltYB0dmKL0JPjfiDs9Q2ospSxeI2XJXx0et64d62OWfWMTm/gCS DS9Dgv3w4wfXayVbsYYXjH3Dq58v4AzPoIbvW80h0ZT02P5s3Wgi9iW9xRkpQ6fQzIKoH2 WHQ1axiPHG8nsSY2rzohVjuDzUNTSoQOAv4rMO1SpBGzkhxFUhKFipcmcdYK6JiREmPTvG ueBlNBm7+gKp8VEliUzxnV3mF03/oztKB1iEuhGkkWjdAfBo6V7iZwSo0hxh5oAd+o/5qO j9CIujmZshRpftO1wA/iYJci7OgKT9P8BBh/PYQ+L/dIk7xm/47kpHeJhC1vvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548580; a=rsa-sha256; cv=none; b=VQ+rkqO3jbbGTW1O8EuwDGKYJldOZUCVju2A4t2jYk+jmvRWdF6xoLh8pUTpkiyZyCyS51 hAr8vbyg1NHoTy1owqibyPZs14Njr4Y0oocJVH12jNiYzkG9Hn7+oD7WBGcMxD/wz9xpBE aFViHudlQPqgKjBSeNWaAA4BliEd99EW7g/Atte4Ykkvh1DUOO6LougPg80p4tP7do1UYd 75I8DDLUBkunow/ukLHHQ3wVj4rOVgjD/1tmfDfx8nIaICoKwS+8Qf7oBb18F9pPWRyPcn JZDEBRvhI8gfPHCeik+3cY4GbiDBkhn9uz6jiLmis9oPD6yJFpgYXKzZnyGp/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLq3f3Xz13HC; Thu, 16 Feb 2023 11:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuJ1N055951; Thu, 16 Feb 2023 11:56:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuJtY055950; Thu, 16 Feb 2023 11:56:19 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:19 GMT Message-Id: <202302161156.31GBuJtY055950@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a56ed557f54e - stable/13 - linuxkpi: list_sort()'s callback now takes list arguments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a56ed557f54ea3216707b1ce4713ea30be1f79f5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a56ed557f54ea3216707b1ce4713ea30be1f79f5 commit a56ed557f54ea3216707b1ce4713ea30be1f79f5 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-11 22:22:07 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:18 +0000 linuxkpi: list_sort()'s callback now takes list arguments This change breaks the API of `list_sort()`. `LINUXKPI_VERSION >= 51300` is used to keep the header compatible with both versions of the prototype. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38082 (cherry picked from commit a83b3ec719eb6c53658656b7b90607564d3c64d3) --- sys/compat/linuxkpi/common/include/linux/list.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index 80ac57fecf6d..6ec715291807 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -504,7 +504,12 @@ static inline int list_is_last(const struct list_head *list, (pos) && ({ n = (pos)->member.next; 1; }); \ pos = hlist_entry_safe(n, typeof(*(pos)), member)) +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 +extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv, + const struct list_head *a, const struct list_head *b)); +#else extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv, struct list_head *a, struct list_head *b)); +#endif #endif /* _LINUXKPI_LINUX_LIST_H_ */ From nobody Thu Feb 16 11:56:20 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLv2LQwz3q5pG; Thu, 16 Feb 2023 11:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLt338mz49nJ; Thu, 16 Feb 2023 11:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEgswwM6CU4ds85Fw96WsVl2IirxYfPENf4Pc/NCCqI=; b=IZRdEB2zECJ73+BPYLuP97t7uYab44cz3wnSV/fiKWWhCz33Ua18s8vyUrBaeElC8WsFaG tVKmdPDfr+AMcOPGtFqGWwmryIs1UvbFflfh4yk4raeh5MHP1t6QhSmJbmXWxc2T4i9jEa M8Qvh9AYlRjyIk63PiNRJuFiHAIcsi0HuQWzUIcfSMsNK2LiuWZTKRT/T1TTg+PnNRQ1d1 xrj7VUBN7G3xMvJzKurqRsFRJ8OWFW67lNipns8p+FNQKL1mEnGpPVj9X+LdLWh8h0WhrR DJ2loZ11moWNgUXQNc95APengDRrTWrEnpDz86pR0ms81zUxZQALv91099hzjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEgswwM6CU4ds85Fw96WsVl2IirxYfPENf4Pc/NCCqI=; b=AucPpUdhYMW7Q3VPpFiBYZMDlR11CzKCdhzqUgRf0zcZNRxxDbFNZAlQScrtB3bLf2NHtZ Oa2g6JNwn2Y4HC9L0eimhrSudETv4053Iv77PnkavTU+stFnBPr0WtHFAHV3EJ8e6MuP/4 PFujAOGn0LF5XRkQ6gRfPGzrzkU8b5NmE9Fgu/ybJiNQ080LHhNcZ/NyzSia9/NOw7pq7v lpHPcoAi/XeHWA1mnrdYY9CMx+Mh+/5WnpGClILCYxKvY1lIfgPWKff9kzAcvBukBPdpNb 2YEVotZPW27B4pjShCh7WYuHZX64ykE89xJtrQbvR1tQEE0yQ096j0tnfj9yyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548582; a=rsa-sha256; cv=none; b=j2DoV1Su5/L+DfHeIVpPlVbhpRIXxJzYOU3ew7n0SsHWg1Gix4oYsTw0MJcYRiwdqVshNR 0aHpujj7gTZ1iDYsmYZi26nJFs6zsdpMZmy/DEwr8qdJO2/EpMn42lc8M5X8E0/Al3R5LQ aLHmPR846daiwVgQRf+xXOHDdlBnwS3ueOaNqz5X+RpXT2ONG9H/tZTSKQWox/1bHcttXm QvHoXOHjydAjanUYFywuO59HaqZZ73XaXNLOOL4zNKtcMSwa2dn/lJDYzTpoeoKyXvwpOf sTWYeHUGyAC22ndxb0OWaWAy64eUkoIvC5b9pg1eDYwbGUGtRIoLDMST61ZwOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLr4bZ0z12W8; Thu, 16 Feb 2023 11:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuKKw055980; Thu, 16 Feb 2023 11:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuKfg055979; Thu, 16 Feb 2023 11:56:20 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:20 GMT Message-Id: <202302161156.31GBuKfg055979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 53c44b917c35 - stable/13 - linuxkpi: Define `backlight_get_brightness()` and `backlight_is_blank()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53c44b917c35cb8df9c464717c9b8df48c2e46c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=53c44b917c35cb8df9c464717c9b8df48c2e46c9 commit 53c44b917c35cb8df9c464717c9b8df48c2e46c9 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:51:16 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:18 +0000 linuxkpi: Define `backlight_get_brightness()` and `backlight_is_blank()` This is not used by the DRM driver yet because we comment out the code calling them, but they are easy to implement. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38530 (cherry picked from commit a82a8a5e193587d819288c3c27f1c9472178e10e) --- sys/compat/linuxkpi/common/include/linux/backlight.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/backlight.h b/sys/compat/linuxkpi/common/include/linux/backlight.h index 9591a4b671ab..5a3c7080b55d 100644 --- a/sys/compat/linuxkpi/common/include/linux/backlight.h +++ b/sys/compat/linuxkpi/common/include/linux/backlight.h @@ -91,6 +91,13 @@ backlight_force_update(struct backlight_device *bd, int reason) bd->props.brightness = bd->ops->get_brightness(bd); } +static inline int +backlight_get_brightness(struct backlight_device *bd) +{ + + return (bd->props.brightness); +} + static inline int backlight_device_set_brightness(struct backlight_device *bd, int brightness) { @@ -119,4 +126,11 @@ backlight_disable(struct backlight_device *bd) return (backlight_update_status(bd)); } +static inline bool +backlight_is_blank(struct backlight_device *bd) +{ + + return (bd->props.power != 0/* FB_BLANK_UNBLANK */); +} + #endif /* _LINUXKPI_LINUX_BACKLIGHT_H_ */ From nobody Thu Feb 16 11:56:21 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLv2KZnz3q5pF; Thu, 16 Feb 2023 11:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLt3JDQz49qT; Thu, 16 Feb 2023 11:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZHuHULtNI7J1iMxVZ61Eh6C3gpVL7qQddoWbRVJqh74=; b=dzRzFTcIc0mN9KzvcyeUJtypnaDiyNPgtAylNgwlwfbfG5XyNv8NSNb6X8zekHqZh8iIJA siJZQhcpeN9DI2Js7rCztmdJFTAiFWyFKnRb7ZzKXbqvoPrAPYmhp8QhhLhtRK7RAStoNy icYALl8Mi97cMBszdvSZqJm6Sfhjb61CEdF/xyWA3jm0Ynb76V77ishJQ2NzKrBFMQskYF m1UnlUZJAe0QoBikX7JdmCXz7FfeXvBP715T4VG4qlBLSDd+V1TmmjAjRqZn5t+AoUhDBU CdPeexDsgm3RcMuhiOFmP5nzGJRCdPod1yo1xqH1OdBdkrnHNQ6oSytMcJ0ORw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZHuHULtNI7J1iMxVZ61Eh6C3gpVL7qQddoWbRVJqh74=; b=CAOKBgQK++1QibjKZpykNZlmN9YhssS3asJenVaO71eqD1KkhR8Uv1TL/gRSXz5IVgDH+g IoW3smaQpjxgb0eKElcVJZAoPXdVgQzACpC3hH5I62GMGdbk2gjSsWY9+SsYaynWL4Q3Ie idg4/8yNcK63ruBJ306aUvsbyzwif7iTHc3hIGDq4JYx/heTUv5lAQbsWN9cB1cTVjITPw rSsMkdD1QUzAAzJGmg1mvh6gbLWXR+a/uTn9EhFEQ1bEWxB4N2xwsydjEMVHNgQ2QMMmPB r7Fx7/13cHdgESG6FnI6PSf+jGF5mGSCeCG/QDtkuisHLgtWeC8wbZoXFuS/ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548582; a=rsa-sha256; cv=none; b=nCzqiIZdX6QXt6pf0AvR9qO849xLEzZttcXRJAruRBmXRq9Fkj48Hcqc5GpdxL0iPba2sJ FPwZTJyA+ymDVDxzPjswhwMD3y9wuAvbG0jpadSBkN0NxyC6AruMmKuDlEjvVcWrFf45Gq EnRcgQMgXHE/dGxiZpz1LSJzSCUiS+vnf8go5o3qN4ZGX4//OxY/Jbw7POQAoaIZRK3uiy DU993P5eAeTp27spy7LgVAITnQOutjw7dHh4h7ynXIxQgdZtWCGbXES4S87k9O0DRmVtYT wLBal7gaXLnEJ2NTiItNnO7OanzlDhBC8VAl/cvTEO8uSZXolZiTGer+3flFbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLs6L43z12W9; Thu, 16 Feb 2023 11:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuLQ7056019; Thu, 16 Feb 2023 11:56:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuLlK056018; Thu, 16 Feb 2023 11:56:21 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:21 GMT Message-Id: <202302161156.31GBuLlK056018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: fdaf6e24e5d1 - stable/13 - linuxkpi: Declare missing `DMI_*` enum entries List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fdaf6e24e5d1144fcb5409c047e575a26e14e04a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fdaf6e24e5d1144fcb5409c047e575a26e14e04a commit fdaf6e24e5d1144fcb5409c047e575a26e14e04a Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:53:23 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:18 +0000 linuxkpi: Declare missing `DMI_*` enum entries Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38532 (cherry picked from commit cf5416908658ed0e4f2ae72916dfe1a84d7fd61c) --- sys/compat/linuxkpi/common/include/linux/mod_devicetable.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h b/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h index 804fbb1df198..076cdffbf2f2 100644 --- a/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h +++ b/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h @@ -36,11 +36,15 @@ enum dmi_field { DMI_BIOS_VENDOR, DMI_BIOS_VERSION, DMI_BIOS_DATE, + DMI_BIOS_RELEASE, + DMI_EC_FIRMWARE_RELEASE, DMI_SYS_VENDOR, DMI_PRODUCT_NAME, DMI_PRODUCT_VERSION, DMI_PRODUCT_SERIAL, DMI_PRODUCT_UUID, + DMI_PRODUCT_SKU, + DMI_PRODUCT_FAMILY, DMI_BOARD_VENDOR, DMI_BOARD_NAME, DMI_BOARD_VERSION, @@ -52,6 +56,7 @@ enum dmi_field { DMI_CHASSIS_SERIAL, DMI_CHASSIS_ASSET_TAG, DMI_STRING_MAX, + DMI_OEM_STRING, }; struct dmi_strmatch { From nobody Thu Feb 16 11:56:22 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLv54wJz3q5Zj; Thu, 16 Feb 2023 11:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLv22ZKz49qd; Thu, 16 Feb 2023 11:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X4cRXHv4gF1AGu5TR0CIxqPmhfKxsLeM0nOS2BF3GJc=; b=v8W+hLlSOXEALX9JYv5XuV9kxy0d36138xGwyXxm655Wd0WIXXfzWf8790sn5AeJap1nWW 1qH/RFp1DfvUphKAgrIshAI97ACgJc+/4LO/VAsSXW6X8DzB/9EwkqBIzlbys8q3kq7mWt LoWC8rIkwymCV//piv7WQhK6Nb3beCbZFqF13MzMcAOYvUNSJ+U/TQBqVpAYCPAhrK3p0U 5gL60ZXcl8UHs29smDRysC7O/xUDTzS+OoaQ7IAk/W5NW/0e5Ziz1SdvZ1moOLfpivFrrV YGe4nTZ/mGApHywpNigzBmoHl0S9CRveinlR4G/p7GnloVRRUaAobBCJgq4/KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X4cRXHv4gF1AGu5TR0CIxqPmhfKxsLeM0nOS2BF3GJc=; b=pcs7hc0+uE5xw5SeH82ohubc+FObP3fGXcHNeZs0wuAryK/kWdIjmmIkbKXpfOX+Dw6BFC FZebHgKHFO6nuztLP5lba/qZNyMPpuvHv9oAuYvQxmxRL6rwYOUzApTEYs3QG+lR73oqSI UMIN32vcC1dNYf+h+Zv5pCPMlH3bz+chbLkF8AGoKY2txM6iLSliElvUd+4k44LPWy3Ct6 VMfZQMqY3ncqok9jYkAVmFw4UJISikgDhVW3pc9kQj6Y+Qg8MSSXSytqY8IV6h+jOmL0+f cxvblk9nd92To5JP+GzRNwOVLEH+U60RCXp5WVg40D/fJtkZwkDCwvZXFhDMqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548583; a=rsa-sha256; cv=none; b=TsxQsZzPpdnhvygHNvND8FPkLv8kaqDEgP2VFGNoaHw26mB96WLgqkx6jHjhVj0BBJySsO CzD2CWLZAXIwAmzrTGFc2rXx0b11oxh5pjcswhhma2/6Dzhjdk6nOwlTnt2ucBSBl5JoF1 XhszwtR79gBWiHrvbUrykx0zJvrtdkpt2gR5zTaJU/cOo2lHI5vh/CGaticshUdHAJpmtp zaT0CqkLL19Oznqe1pKJ8dLgBqR8HSsYVElzcbvnowbKU0q+fTaaAwI/5a+/mV+gck7oI1 6vu9hrGZHt2s9Aoy3/MsXJHIxvSADeFtpPS9QSHRv5uUNRDCWgxQoJp3/mq1wQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLt6ttNz137h; Thu, 16 Feb 2023 11:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuMGP056048; Thu, 16 Feb 2023 11:56:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuM0M056047; Thu, 16 Feb 2023 11:56:22 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:22 GMT Message-Id: <202302161156.31GBuM0M056047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: d94ab63c1102 - stable/13 - linuxkpi: Update `vga_client_register()` and add `vga_client_unregister()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d94ab63c110262283277f3522d190eeea5006089 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d94ab63c110262283277f3522d190eeea5006089 commit d94ab63c110262283277f3522d190eeea5006089 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:53:57 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:18 +0000 linuxkpi: Update `vga_client_register()` and add `vga_client_unregister()` For `vga_client_register()`, the API is modified twice in a row. To keep the API compatible with all commits in the DRM driver, we introduce two `LINUXKPI_VERSION` version bumps. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38533 (cherry picked from commit 1c6d8146fdec8267712615c261bf6c8800f8ecfe) --- sys/compat/linuxkpi/common/include/linux/vgaarb.h | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/vgaarb.h b/sys/compat/linuxkpi/common/include/linux/vgaarb.h index 853927f1c049..d43a88136864 100644 --- a/sys/compat/linuxkpi/common/include/linux/vgaarb.h +++ b/sys/compat/linuxkpi/common/include/linux/vgaarb.h @@ -239,16 +239,43 @@ static inline int vga_conflicts(struct pci_dev *p1, struct pci_dev *p2) * by userspace since we some older X servers have issues. */ #if defined(CONFIG_VGA_ARB) +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501 +int vga_client_register(struct pci_dev *pdev, + unsigned int (*set_vga_decode)(struct pci_dev *pdev, bool state)); +#elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500 +int vga_client_register(struct pci_dev *pdev, void *cookie, + unsigned int (*set_vga_decode)(void *cookie, bool state)); +#else int vga_client_register(struct pci_dev *pdev, void *cookie, void (*irq_set_state)(void *cookie, bool state), unsigned int (*set_vga_decode)(void *cookie, bool state)); +#endif +#else +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501 +static inline int vga_client_register(struct pci_dev *pdev, + unsigned int (*set_vga_decode)(struct pci_dev *pdev, bool state)) +#elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500 +static inline int vga_client_register(struct pci_dev *pdev, void *cookie, + unsigned int (*set_vga_decode)(void *cookie, bool state)) #else static inline int vga_client_register(struct pci_dev *pdev, void *cookie, void (*irq_set_state)(void *cookie, bool state), unsigned int (*set_vga_decode)(void *cookie, bool state)) +#endif { return 0; } + +static inline int vga_client_unregister(struct pci_dev *pdev) +{ +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501 + return (vga_client_register(NULL, NULL)); +#elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500 + return (vga_client_register(NULL, NULL, NULL)); +#else + return (vga_client_register(NULL, NULL, NULL, NULL)); +#endif +} #endif #endif /* _LINUXKPI_LINUX_VGA_H_ */ From nobody Thu Feb 16 11:56:23 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYLx3wqDz3q5sW; Thu, 16 Feb 2023 11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLw4gq3z4B1L; Thu, 16 Feb 2023 11:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XvDusA3jIXb7R593WcWgbTh0Zt1fCDJ/VqSWEKdpLj0=; b=GXodLvh1hFyVN9OrvG7kxMcQAqBU071o7gfnaCwGW8qEvVDrXyIg2iA/64AbkeGqhontQz mHcct71Jpd/7CWUd90BWHvKjc2s8PZkIWQI+ZHOoHGSsvN505CHqXg6fvQeolWb0ha5/IN DosOcxYGRq+6PuefazwEuk5grLiKY84gmvFyMklER2xD1bBBq/JmmUc66dIqveqxmEq/4k QdkNbNHhnRl9QRT3N8oSc64+CEHbq1/4egs5aZYgi2lugqWc8MYibqELZgBUFb22Ota/vH fo9pz8xwcyWAgdFtR+4iDmb27m1R32iUWN2n355HuPqbarcMT9Jil5ARx/l8cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XvDusA3jIXb7R593WcWgbTh0Zt1fCDJ/VqSWEKdpLj0=; b=Ws8IJKM+xXcQ0zG/ilU2z8LLik5sIbBw88lumPVQChAuGZVjmcbPGNNrHXBt99v215H+rV +4H4W/jI557iX/PypqP5tguvY2XmW0y6TWU0T+3nx7D8yhFubly/2Yvrs+Gl+zPLoL7Npb gsi04Z9yhLyOpMp/UZ25WHWZdAx/K5+ELNi1yI+TybwH7STFb96+xyjsIe3uLjwCLg2cOL KaWyzb11lN7FRrCBeNBllBp/s6EP4CAP5akVQz5BY1rlfgjAzGt1J1LMsFP/Eo97hYLiJr lNgZxT0ThBw6j2yh9qmTmDK5ZnNnL0bHxr/qXGk6wbapvq1x8Olyrl7LiukAsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548584; a=rsa-sha256; cv=none; b=sr3rQyf/O93HnGqxa+2ISiN0nchvFlhSfSFnhfA7sB39KGQVxA4KCVjbu1mDN21nBzf+u8 MPt9gFJygy3hdBXsYtAUzJFGs5OMgPx8+H4Mbb1Sp0nEB5yUKm1UkSxz7AH64qBIBqbpNL mZRv5/nxhGMoOwo4zzj7tcYirVMmoW3PrUKcEEYO4qyUN4qPpDuV5Ufma1cNzL8110tmRn fO5AW9e07yUSdMBdXdpG/m8qRwICRGq3pcWhS7WZcEiW9P4JwGKzfBPeTtCayroV4hvFxO R4zO8CBfs6zISnq5T/nSUlYlIeVKLpeomm9egzLpslQ2HUgHNW9EUrWlIhD+tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLw1Cbxz12tk; Thu, 16 Feb 2023 11:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuNXO056086; Thu, 16 Feb 2023 11:56:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuNXN056085; Thu, 16 Feb 2023 11:56:23 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:23 GMT Message-Id: <202302161156.31GBuNXN056085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 313d438a20d1 - stable/13 - linuxkpi: Define `xa_is_err()`, `xa_{store,erase}_irq()` and `xa_{,un}lock_irq*()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 313d438a20d1e9ed527f0a8ac095f81b8ba43250 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=313d438a20d1e9ed527f0a8ac095f81b8ba43250 commit 313d438a20d1e9ed527f0a8ac095f81b8ba43250 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:55:29 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:19 +0000 linuxkpi: Define `xa_is_err()`, `xa_{store,erase}_irq()` and `xa_{,un}lock_irq*()` `xa_is_err()` is synonymous to `IS_ERR()`. Other introduced functions call their equivalent without the `irq*` suffix. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38534 (cherry picked from commit 5542309ec6eba3af9e26c50acd654de462181b8e) --- sys/compat/linuxkpi/common/include/linux/xarray.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/xarray.h b/sys/compat/linuxkpi/common/include/linux/xarray.h index 408906867479..8a9d8fa3ea41 100644 --- a/sys/compat/linuxkpi/common/include/linux/xarray.h +++ b/sys/compat/linuxkpi/common/include/linux/xarray.h @@ -45,6 +45,9 @@ #define XA_ERROR(x) \ ERR_PTR(x) +#define xa_is_err(x) \ + IS_ERR(x) + #define xa_limit_32b XA_LIMIT(0, 0xFFFFFFFF) #define XA_ASSERT_LOCKED(xa) mtx_assert(&(xa)->mtx, MA_OWNED) @@ -87,6 +90,24 @@ void *__xa_store(struct xarray *, uint32_t, void *, gfp_t); bool __xa_empty(struct xarray *); void *__xa_next(struct xarray *, unsigned long *, bool); +#define xa_store_irq(xa, index, ptr, gfp) \ + xa_store((xa), (index), (ptr), (gfp)) + +#define xa_erase_irq(xa, index) \ + xa_erase((xa), (index)) + +#define xa_lock_irqsave(xa, flags) \ + do { \ + xa_lock((xa)); \ + flags = 0; \ + } while (0) + +#define xa_unlock_irqrestore(xa, flags) \ + do { \ + xa_unlock((xa)); \ + flags == 0; \ + } while (0) + static inline int xa_err(void *ptr) { From nobody Thu Feb 16 11:56:24 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM02NVBz3q5gp; Thu, 16 Feb 2023 11:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYLx3rylz49qx; Thu, 16 Feb 2023 11: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=1676548585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fqv4x4hCiuJ/3HeTdrmfVQBXB/HEbqZpeUxUb30EiAs=; b=ANVcFEOn+z/YmxlMx/bVsCW1Nk70hk1fgqmfkeLgihVyOfWsEMUU85SEwMyAe6OW994hHz AdPWrPH/5smLEkwqH4El4+eFGrKiZWkJY46WoPY1tcNX7oVP8GbuQ+6NrAXrGTlGpt4ba0 hwztDUoLSx7ug8spO547O+8tOrXy5r0DX8gM1gzlZ45L1wlJ2SBDiFs3btFWomJJAJgvsk qNEPK7VoHUPRqzlDjyOU4fOvzo74pwnzD8JeSqc+XYZjMyjSNak+qu1TNDabFY7Fg26fVW M2YrmBfuy5toUmnNgXTpMESV/iq68wrw31L/58UlpYdDH+TUZYnU6tU2rNF/rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fqv4x4hCiuJ/3HeTdrmfVQBXB/HEbqZpeUxUb30EiAs=; b=TqkOmA5cY1ogdm7PF+TPKt38cQaNcmr6zKuz00uj+zdEw6AFa5HTgfFWI980fSqKX1gDlG j/I0URwaPYGccosvVwRBfAWVKYX5iJa3BSjM3u8JxMOyD/RbeyaNS+qD4W2kAzh57tGEae QbhhJvGRCON+foZOwXElNFmA+RuoKn/BXbKAiQJun31Bl4KZpZuRDUO6HmlABE2RrZUpAS /fkxaZdlFQZ6DC7rCt/U6kQjHF9++CObFx5ptwwllft5mKzaKAGUmnfshozxtc1crtsTn3 JutzuX95+jhkf8VvvgQW+/JkAgK+MIoA7OHUWW524j2UtwaaLONvUfYkdwpuSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548585; a=rsa-sha256; cv=none; b=dZYVS2TCYZrw1XFsy2Gvm4r0hFgilEnc1YU9NQdKAzo6pWtC4EAuJH8XTQy5pnL6E1WDq5 Br+PWBFpobW6YIwZtFYT9DgzeFoGDicRd+X0TxbHKG/Xgt8ivJTYnSVc8qyEorrya4wnQY aJuEAyzJAqFeDLBa88VC0X0J1syx6EfzBf9pyG0FwQSlIgm6hPIhskErB9ts5jnVeuYTKz /AEemCV5Mdr+Bo/liZddO5gdKjx64SAWz3WXKRtH2ZiXq9uOC2+g38SoS0G8uXu+SEKVpu yRc++ql4VqeJmrFBsP1vvJ2aOEE45EZoz8XE4yVBqgn4Mdl5jUjNQBew3R82og== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLx1H41z133s; Thu, 16 Feb 2023 11:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuOt6056115; Thu, 16 Feb 2023 11:56:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuOpq056114; Thu, 16 Feb 2023 11:56:24 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:24 GMT Message-Id: <202302161156.31GBuOpq056114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 43f2fdb20510 - stable/13 - linuxkpi: Add `i2c_adapter_quirks` support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 43f2fdb205104dae32326d074367aa0eb251f8ec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=43f2fdb205104dae32326d074367aa0eb251f8ec commit 43f2fdb205104dae32326d074367aa0eb251f8ec Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:57:32 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:19 +0000 linuxkpi: Add `i2c_adapter_quirks` support While here, also declare `I2C_CLASS_HWMON`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38535 (cherry picked from commit 83276e1f952d720c23092ea17e95c03fef8476b7) --- sys/compat/linuxkpi/common/include/linux/i2c.h | 25 ++++++ sys/compat/linuxkpi/common/src/linux_i2c.c | 113 +++++++++++++++++++++++++ 2 files changed, 138 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/i2c.h b/sys/compat/linuxkpi/common/include/linux/i2c.h index 365ab893fdfd..f24d282586f6 100644 --- a/sys/compat/linuxkpi/common/include/linux/i2c.h +++ b/sys/compat/linuxkpi/common/include/linux/i2c.h @@ -46,6 +46,7 @@ #define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0 #define I2C_FUNC_10BIT_ADDR 0 +#define I2C_CLASS_HWMON 0x1 #define I2C_CLASS_DDC 0x8 #define I2C_CLASS_SPD 0x80 @@ -58,6 +59,7 @@ struct i2c_adapter { const struct i2c_lock_operations *lock_ops; const struct i2c_algorithm *algo; + const struct i2c_adapter_quirks *quirks; void *algo_data; int retries; @@ -82,6 +84,29 @@ struct i2c_lock_operations { void (*unlock_bus)(struct i2c_adapter *, unsigned int); }; +struct i2c_adapter_quirks { + uint64_t flags; + int max_num_msgs; + uint16_t max_write_len; + uint16_t max_read_len; + uint16_t max_comb_1st_msg_len; + uint16_t max_comb_2nd_msg_len; +}; + +#define I2C_AQ_COMB BIT(0) +#define I2C_AQ_COMB_WRITE_FIRST BIT(1) +#define I2C_AQ_COMB_READ_SECOND BIT(2) +#define I2C_AQ_COMB_SAME_ADDR BIT(3) +#define I2C_AQ_COMB_WRITE_THEN_READ \ + (I2C_AQ_COMB | I2C_AQ_COMB_WRITE_FIRST | \ + I2C_AQ_COMB_READ_SECOND | I2C_AQ_COMB_SAME_ADDR) +#define I2C_AQ_NO_CLK_STRETCH BIT(4) +#define I2C_AQ_NO_ZERO_LEN_READ BIT(5) +#define I2C_AQ_NO_ZERO_LEN_WRITE BIT(6) +#define I2C_AQ_NO_ZERO_LEN \ + (I2C_AQ_NO_ZERO_LEN_READ | I2C_AQ_NO_ZERO_LEN_WRITE) +#define I2C_AQ_NO_REP_START BIT(7) + int lkpi_i2c_add_adapter(struct i2c_adapter *adapter); int lkpi_i2c_del_adapter(struct i2c_adapter *adapter); diff --git a/sys/compat/linuxkpi/common/src/linux_i2c.c b/sys/compat/linuxkpi/common/src/linux_i2c.c index a94ed630ab73..c01c88a1fafa 100644 --- a/sys/compat/linuxkpi/common/src/linux_i2c.c +++ b/sys/compat/linuxkpi/common/src/linux_i2c.c @@ -169,6 +169,116 @@ lkpi_i2c_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) return (0); } +static int i2c_check_for_quirks(struct i2c_adapter *adapter, + struct iic_msg *msgs, uint32_t nmsgs) +{ + const struct i2c_adapter_quirks *quirks; + device_t dev; + int i, max_nmsgs; + bool check_len; + + dev = adapter->dev.parent->bsddev; + quirks = adapter->quirks; + if (quirks == NULL) + return (0); + + check_len = true; + max_nmsgs = quirks->max_num_msgs; + + if (quirks->flags & I2C_AQ_COMB) { + max_nmsgs = 2; + + if (nmsgs == 2) { + if (quirks->flags & I2C_AQ_COMB_WRITE_FIRST && + msgs[0].flags & IIC_M_RD) { + device_printf(dev, + "Error: " + "first combined message must be write\n"); + return (EOPNOTSUPP); + } + if (quirks->flags & I2C_AQ_COMB_READ_SECOND && + !(msgs[1].flags & IIC_M_RD)) { + device_printf(dev, + "Error: " + "second combined message must be read\n"); + return (EOPNOTSUPP); + } + + if (quirks->flags & I2C_AQ_COMB_SAME_ADDR && + msgs[0].slave != msgs[1].slave) { + device_printf(dev, + "Error: " + "combined message must be use the same " + "address\n"); + return (EOPNOTSUPP); + } + + if (quirks->max_comb_1st_msg_len && + msgs[0].len > quirks->max_comb_1st_msg_len) { + device_printf(dev, + "Error: " + "message too long: %hu > %hu max\n", + msgs[0].len, + quirks->max_comb_1st_msg_len); + return (EOPNOTSUPP); + } + if (quirks->max_comb_2nd_msg_len && + msgs[1].len > quirks->max_comb_2nd_msg_len) { + device_printf(dev, + "Error: " + "message too long: %hu > %hu max\n", + msgs[1].len, + quirks->max_comb_2nd_msg_len); + return (EOPNOTSUPP); + } + + check_len = false; + } + } + + if (max_nmsgs && nmsgs > max_nmsgs) { + device_printf(dev, + "Error: too many messages: %d > %d max\n", + nmsgs, max_nmsgs); + return (EOPNOTSUPP); + } + + for (i = 0; i < nmsgs; i++) { + if (msgs[i].flags & IIC_M_RD) { + if (check_len && quirks->max_read_len && + msgs[i].len > quirks->max_read_len) { + device_printf(dev, + "Error: " + "message %d too long: %hu > %hu max\n", + i, msgs[i].len, quirks->max_read_len); + return (EOPNOTSUPP); + } + if (quirks->flags & I2C_AQ_NO_ZERO_LEN_READ && + msgs[i].len == 0) { + device_printf(dev, + "Error: message %d of length 0\n", i); + return (EOPNOTSUPP); + } + } else { + if (check_len && quirks->max_write_len && + msgs[i].len > quirks->max_write_len) { + device_printf(dev, + "Message %d too long: %hu > %hu max\n", + i, msgs[i].len, quirks->max_write_len); + return (EOPNOTSUPP); + } + if (quirks->flags & I2C_AQ_NO_ZERO_LEN_WRITE && + msgs[i].len == 0) { + device_printf(dev, + "Error: message %d of length 0\n", i); + return (EOPNOTSUPP); + } + } + } + + return (0); +} + static int lkpi_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) { @@ -179,6 +289,9 @@ lkpi_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) sc = device_get_softc(dev); if (sc->adapter == NULL) return (ENXIO); + ret = i2c_check_for_quirks(sc->adapter, msgs, nmsgs); + if (ret != 0) + return (ret); linux_set_current(curthread); linux_msgs = malloc(sizeof(struct i2c_msg) * nmsgs, From nobody Thu Feb 16 11:56:26 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM03cFBz3q5Zp; Thu, 16 Feb 2023 11:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM023pSz49yp; Thu, 16 Feb 2023 11:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ecz7lBowRWZ1uB+ThKBbFddbDFjOkTgBsAOE91DWQY=; b=wZFn09AbFvSDK/6VoUu428y2S3fc+6ANhBzKhxM1f7a29edNW28Pg570JBvqayFJFLwsAC xj/2ebLzTrwfNXuRmxG+pntKyWLqaF2ehz6A8H+sxuPTIVcbCp7aCDcYrd3FLnFvOxjVgV 74aVLPqmtdQ7vk00NsNEpwkXbZMAc30qBOfDgkfBVo6TDBJmmabnrZTKHl+Rt7yIbMHhOM 479NH6Q8/YNV4oyB+R48CEUX8U+MXctyzipMRBicen5lBcUI88sv46AiREaTMV3COFFabj BemZdv8WFjZllMRCgqkoDC8+NesmowqUsZgKCOfK6m3QwUNhVzV2FL/7Y0DgSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ecz7lBowRWZ1uB+ThKBbFddbDFjOkTgBsAOE91DWQY=; b=atXRgCfTjgDf3lM7Nkb8vey1SqF5uefuhvy2NXf/eprgcdoMsio4QM6CPZ/ziPC4dZSAbg oIR0Y+P/+XIbOE+EJXPYgqEgaqY9SuXLQBrPMihkd/jdGAnCUBbDKpn1FBL2+GYCvxvpMW d4ORIly7GfoGn4xdI068QTzExhtpOlKeSzh7XTjpQq4I8pePdMdp6H+XP8847p9+/gMW67 CpDHGQsJC0MM/+I9bdNjjXQaeFWUFiFT3tk+5I49DV2AMY6We34Pv2VnId/8EzTeQECfhH Q9+2nVrmmfZFIL4wbmKBC3VpITEfz+BBnGCEoh45Q6PgsLh9mOBE+FB5vBzEWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548588; a=rsa-sha256; cv=none; b=ZBTpeCDWQ87+TMDngjFyQ2HWWK9qtjkVfF3z+y4GQr+p5MifQ41K4+2yv+0v0J5UwCb5C7 mKPKIweUEqMzc7/ed5OeOpNzhsbh3XLaczipsNl4R6CnbvV1h4NtQ+lteo6iExZkVOtiHr J4hvDNT4pZd1ctG+gkzUu+QFe4VlfbQWSHtq8c823T4ilBcQ0OrHUAbGaQxwBo9DzWzy8F nUsDed1jhjojBPBrlbov2gfD/GcIuwNo+SeNylwRZu8w6oN9q8JROL6E1w9zkqhCw4xby8 j4u8dEQu2haGv/1QQoPhSNNNMs5Ae9IK4+qi52cV2sZkqhlq3knKq5rNBLhVbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLy2BWNz133t; Thu, 16 Feb 2023 11:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuQ18056152; Thu, 16 Feb 2023 11:56:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuQ7E056151; Thu, 16 Feb 2023 11:56:26 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:26 GMT Message-Id: <202302161156.31GBuQ7E056151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 8fa54d4e40f0 - stable/13 - linuxkpi: Define `FIELD_FIT()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8fa54d4e40f0cb3bb4b5c92ecc1a0c26a7289851 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8fa54d4e40f0cb3bb4b5c92ecc1a0c26a7289851 commit 8fa54d4e40f0cb3bb4b5c92ecc1a0c26a7289851 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 23:38:22 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:19 +0000 linuxkpi: Define `FIELD_FIT()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38536 (cherry picked from commit bf6f6650813959ecf3469854ad266c5a5590c754) --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index c22757d54290..d21c7f9868dd 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -127,6 +127,9 @@ _uX_replace_bits(8) #define __bf_shf(x) (__builtin_ffsll(x) - 1) +#define FIELD_FIT(_mask, _value) \ + (!(((typeof(_mask))(_value) << __bf_shf(_mask)) & ~(_mask))) + #define FIELD_PREP(_mask, _value) \ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) From nobody Thu Feb 16 11:56:27 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM03Zlxz3q5jg; Thu, 16 Feb 2023 11:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM025dSz49r6; Thu, 16 Feb 2023 11:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ic6jj4R4KzwGKSVyhttX0vpzDOL3zqzpV8DuLZg/U2w=; b=E31PWDldFx/3USnvqWRyrJCqvy6Plp+nl3u/O5OA0u3LZMNlTFZ6igs3KeyB9PpPrrCUeQ Fh3EMFKPWrqnoOSQAnP+QxmWsXY/lUSrhsHLFDmGI0d6aR3uMbFAGl5+Y+goCyS2R1e8LP fr8HzF7TGwyx4IFfI+7n0uOwVoD6VOavRFHWe0joDRFXU+Tws+YUnpOfH/cmAmjkYtl+B2 85jrWKZp5g0EPjj2hvULPT3I/DaEclREI5tn2Io/i3fOme2sR2jNIG2qHjVBDLlc0qNALT 4RGeVlpZzHgWqOqVx3AYeuORAsUjEUSIQTOX9kGofA5rQ/qPI/yabn9rcrhDWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ic6jj4R4KzwGKSVyhttX0vpzDOL3zqzpV8DuLZg/U2w=; b=P2d8sAevcYnJVeWGEhhE30zl2npU64ZKVjL19eJJlhq1p1midBmmd6Ym2tOXdMDCU28zj0 YL3ro9iDkFccPkXLMQYlKSaxmwSeJL/lYJowpPY9HEucuC49M1k/Jp/FsXnZ0UvbVFLKsa wfbi4LsWgZK/w/Pagiq3oZGqRivRD3LRy4BZfqTcX16mXhJD1SnxbFkvqEn/v0biTU0CZG wymyjITuIJWxWUtfhmzZW9Wgm0MrHd5HGqEW26N0R1HryQ7/mYBh/DTJb11TjGoxBXgbgm HcJHDr0fuOOeZ8HdZBIwfENVeXrYKN4L8+8eL33iLzle24H0zzEAfJhWvLfFew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548588; a=rsa-sha256; cv=none; b=Xr3baC0n4df5oWIrav/c694DO/Fy2mHWsPk+lyQYmE2sD1xtNQsl0uc264ogVX39IN4Lgi D+O063XAxC2fHxy/ZGOPqHhy+eqO31atfvJ8xAGW8BmaSVv2U43k83po1qFF8VeCFWquuU z8N0UKei+Msn+U7D27pUqxyn4ZM1JmKTQz24kNRlnCj3r4nwK1O96GJ3V/5HQUzVTA8jPp hgoeIs7rgjYpTOXHtTEuiqu2/NrSuOpYV3R97KJFyjcA4VWWK/pnL6uSpK8/EudBt91rla 38HXVhwjb73DfAFykEK9xO4tEazwniW3yo6SC1L/+6Nje/79NKdvKpvaFo0Dow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYLz3vQCz13HD; Thu, 16 Feb 2023 11:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuR5l056187; Thu, 16 Feb 2023 11:56:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuRcI056186; Thu, 16 Feb 2023 11:56:27 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:27 GMT Message-Id: <202302161156.31GBuRcI056186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 8240c14d2e80 - stable/13 - linuxkpi: Move definition of `struct list_head` to List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8240c14d2e80ac73e7bfa7f2ee12f17d8020da3d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8240c14d2e80ac73e7bfa7f2ee12f17d8020da3d commit 8240c14d2e80ac73e7bfa7f2ee12f17d8020da3d Author: Jean-Sébastien Pédron AuthorDate: 2023-02-09 12:11:34 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:19 +0000 linuxkpi: Move definition of `struct list_head` to This is the case on Linux. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38537 (cherry picked from commit 54606590dffcd23136af1c26da38206f4d3a6269) --- sys/compat/linuxkpi/common/include/linux/list.h | 8 -------- sys/compat/linuxkpi/common/include/linux/types.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index 6ec715291807..46da7cc7bc8e 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -86,14 +86,6 @@ #define LINUX_LIST_HEAD(name) \ struct list_head name = LINUX_LIST_HEAD_INIT(name) -#ifndef LIST_HEAD_DEF -#define LIST_HEAD_DEF -struct list_head { - struct list_head *next; - struct list_head *prev; -}; -#endif - static inline void INIT_LIST_HEAD(struct list_head *list) { diff --git a/sys/compat/linuxkpi/common/include/linux/types.h b/sys/compat/linuxkpi/common/include/linux/types.h index dab5e6ddce42..aa19163ddd26 100644 --- a/sys/compat/linuxkpi/common/include/linux/types.h +++ b/sys/compat/linuxkpi/common/include/linux/types.h @@ -79,6 +79,14 @@ typedef unsigned long kernel_ulong_t; typedef unsigned long irq_hw_number_t; +#ifndef LIST_HEAD_DEF +#define LIST_HEAD_DEF +struct list_head { + struct list_head *next; + struct list_head *prev; +}; +#endif + struct rcu_head { void *raw[2]; } __aligned(sizeof(void *)); From nobody Thu Feb 16 11:56:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM22FTfz3q5vL; Thu, 16 Feb 2023 11:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM040qxz49ww; Thu, 16 Feb 2023 11:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHqvxcTOaknCmN3EpejhGdteKq3UyeaC+pXYV6Xwf+U=; b=LyPAJY6J+V7Bop6UsHCLC+yrLY5D6f936wSGJwevQt8cNHOFNgKMwIP4q4eTwXis0tKY0I RaaMX2kkGTAjPdsbz2axxTvv5tVZl2+Y16wROYtsO0MTnEdxRXpAp5CLGRHByeDOiTpsIh YPiUwNjhefzIdZnpoW0lp+UpLyds8xbCX9rZ5KW554GbcOWfW26KKrdVPBP5SQiXKn+qvM toqlEr5y1sG9QTUyp1HPyE/WuRPyroaMAP+it8rmo92XBZf4QPv12qJteaU9RRei1NsXRp ESBtacha39qmkz0FWHbqAur9S4q7o8ZIoT2x3N5jOZW8vege8wiOIyntwp5CzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHqvxcTOaknCmN3EpejhGdteKq3UyeaC+pXYV6Xwf+U=; b=x57ykF6855lI4AElHXH2orKiXE1NoU6E27LW5ctJR2ki9kWXb8ap+qT142ITrLsML1A0eN QxovY8ZYVwUlz1H88Up4hrNfygAeixfqDIsbNOiZ+KwkIehZrkD6D+vQNpQPZ5wcAWllL7 kqsUZFt4UR3+6rINaFA9MgQZ0+oXCPB5xDM4b6AxFODKGlrLNLl8r81Jpbc5fSIyYlvqMI I7YlKSieB4A2BVNwTkKd5nH+XsQtgUWf7aqUDBaz9ZCbWRHiKxfJcruzXZ2nvFrY9wpomK q6d0DbT9axuXzgovfNr80nMlcdUaQIah59OK9FtX/0sEVe12p+26KQT1YnLDeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548588; a=rsa-sha256; cv=none; b=F36kLnq5drmq1CiN/fAceQzVFMWtDM6qNnLM0P+Q864npO7iCgxc5uEaRZj2GJP2XsWqLd B8yZMZT35zmeEpTzaOg3crxjK2yYb+LimJl/pB3f2W3BLhnmAW7o1amE8LkNvFqmif3ZdD vCZ1ddDy5J38am9OmI1X7TvAWkuSaDJ4xIQYl3aKoVAezNElmPZOpoJf23hTTipp6FdYJo 4AXXR2nYkAL9YipET0uKiOvpkkO5QkT5np12xFV2eqvI+05C54YPXRCuw2u57tlBd0wf8m gTF7JbfY9ItFHVVga8fYRbl66nMPaPyNcRcQGaJ2JLsI84PWBUPEu4bBLh6Ahw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM031llz12j2; Thu, 16 Feb 2023 11:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuST4056216; Thu, 16 Feb 2023 11:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuS5d056215; Thu, 16 Feb 2023 11:56:28 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:28 GMT Message-Id: <202302161156.31GBuS5d056215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a1fc49b1ec37 - stable/13 - linuxkpi: Define `lockdep_assert{,_once}()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a1fc49b1ec377c80cd596f48b00a9edac919b15e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a1fc49b1ec377c80cd596f48b00a9edac919b15e commit a1fc49b1ec377c80cd596f48b00a9edac919b15e Author: Jean-Sébastien Pédron AuthorDate: 2023-02-09 22:04:26 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:19 +0000 linuxkpi: Define `lockdep_assert{,_once}()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38538 (cherry picked from commit b82bcfb66fa5ef30939f3f5169a07bf4bc139e71) --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index f1bec0efeee8..41b4b71ffb20 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -52,6 +52,9 @@ struct pin_cookie { #define lockdep_unregister_key(key) do { } while(0) #ifdef INVARIANTS +#define lockdep_assert(cond) do { WARN_ON(!cond); } while (0) +#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!cond); } while (0) + #define lockdep_assert_not_held(m) do { \ struct lock_object *__lock = (struct lock_object *)(m); \ LOCK_CLASS(__lock)->lc_assert(__lock, LA_UNLOCKED); \ @@ -81,6 +84,9 @@ lockdep_is_held(void *__m) #define lockdep_is_held_type(_m, _t) lockdep_is_held(_m) #else +#define lockdep_assert(cond) do { } while (0) +#define lockdep_assert_once(cond) do { } while (0) + #define lockdep_assert_not_held(m) do { (void)(m); } while (0) #define lockdep_assert_held(m) do { (void)(m); } while (0) #define lockdep_assert_none_held_once() do { } while (0) From nobody Thu Feb 16 11:56:29 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM3404Xz3q5vP; Thu, 16 Feb 2023 11:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM30QpPz49x0; Thu, 16 Feb 2023 11:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0IZMDKw5J4XSpyWoJQs3Qbao3h6UEyIJj4Qf27BYHk=; b=I72VUCv0hKx+wEuPQbkXa7o9krm65hUyTSlbJlhOJjk27ONsZYwqwWCxvChcjitIDUbb1V x2HCWRCn3JEXWqXgkmYuW9iEwRT507HNiwCHwpBlea1rk043ZcdzZdm2SXgDp2msQ3ytGE +FTqZA15HF9YAF5o8RqI07vORA45OmzlZAthJW0svPdJ9agRZaQAsZF+qFzQ0h7Mn6jEdu A6GOed9ejrdniB3+M25ZneL0lM9DTTxSqiTY+ye9BxiyYb41fh5hguGzNdxR6A26lvORjg G0hfjEndZOBLWqecYybH9rgjEAwoZ+vQY70zfUa38RLQ7IcxVRKntNuAmdZYlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0IZMDKw5J4XSpyWoJQs3Qbao3h6UEyIJj4Qf27BYHk=; b=jwtJ3bpJ3vbQmyNlXSmMG6yj1USpDgJvS5+gBlVyMSilFCEW5/YYDrva/FOTayWwg7XyGo LuWBSAAI8nYFlaOq+Ma7IASa+KCA0n4d7ZYf20GQi76Ik61XAlBwkSDwPoi9cOWc/aBuId nKVdV/gxIZjU52tawH6V/PiQkIrs07u1Chz55MZF84siPdo8KFmUp5CyvscH4RF3zR17RC nLA8krCpDD43Je6hyTm5LReC2gdHY7cKKOctbo/x1EA6UnGCszVsLLUUhKFfVlHejRY9LV 19oEv9rpumA8I+jX8VMHC6VwcCc0D9fVttLmsRygx8agt2Lb01as9YtnzLKCRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548591; a=rsa-sha256; cv=none; b=aFArHI7ZUxvAlPSZ5YWKi8nPyXVPA0VEt9NlgS6XRXU1lIJFeY11bR+nzD84jWTe4SWa67 foO0O5QXnRltANjbhtSzJd+BijiDTgfY7YUP0ngj5ulmsMQf1tOy0aaB8Nr+uOwpBlZjLJ Y4oYW9umL2Zgord6PgybAqIb41dbe1RL6WhuUJF+IAvhvfD2xtWRHBjRrbRqs9bZSW2few eU+Vn6CYZaZ8ul4Xc9RDhoqOZOChWpSsAWQuOHzsDvym7AeKVQ1YW2o7FsASgs6J9/idFJ YuHEsPPQ47odeMLx7oQS6kq2Qw65H3X3R/i/CsmU52sDVut3OSdh4GX/v8XvWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM14Jqlz12fY; Thu, 16 Feb 2023 11:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuTEd056245; Thu, 16 Feb 2023 11:56:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuTOv056244; Thu, 16 Feb 2023 11:56:29 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:29 GMT Message-Id: <202302161156.31GBuTOv056244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 056408aababf - stable/13 - linuxkpi: Define `IRQ_NOTCONNECTED` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 056408aababf58e5c1b7d251619243bf9f36e508 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=056408aababf58e5c1b7d251619243bf9f36e508 commit 056408aababf58e5c1b7d251619243bf9f36e508 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-10 10:26:17 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:20 +0000 linuxkpi: Define `IRQ_NOTCONNECTED` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38539 (cherry picked from commit 210e756d4b32f43e8cc5f748456158757892a46a) --- sys/compat/linuxkpi/common/include/linux/interrupt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h index 3bc98aa88ba4..8c394aa2a690 100644 --- a/sys/compat/linuxkpi/common/include/linux/interrupt.h +++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h @@ -44,6 +44,8 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); #define IRQF_SHARED RF_SHAREABLE +#define IRQ_NOTCONNECTED (1U << 31) + struct irq_ent; void linux_irq_handler(void *); From nobody Thu Feb 16 11:56:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM36ZsHz3q5vQ; Thu, 16 Feb 2023 11:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM315Ycz4B1n; Thu, 16 Feb 2023 11:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kSWTWD9VWIBCgteBHLRYvy6iXHsAqd13h6vWf6tiHa4=; b=kKTTOLioBx058kSQWuMcFWurZavSmfn9a7b0kLBIe7VYREaEKjjcAThKizw+JAgL4Lqu1h 4bFxIVgvLekqPVKyKs7SPTAcd8UUu+RTs3GPvgPfH/uRYm1w51ldq1IbKgV8/5pslewzWd iy4JOPMZAcPJ7ezgrePB05kFMkqenjY/krfcMuz5LaQLr0cgBcf649Gw0IXrTRgvyAFcay vNVO2WrQDtPU9alfUr29U1Ms1WMyUm8pTBOtBmxWdxUptqTK33xpQJ+HWhPDnL1Wccm2Ek R7vUPA3S/1MgaHiShGkrH6F39KeIFMw5pp/qI0wH7sf2QpY/6TSuAsBwTnJGfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kSWTWD9VWIBCgteBHLRYvy6iXHsAqd13h6vWf6tiHa4=; b=KGjMhdVN0zrHydKaTMFRiXvfF85UtnGD5d1hw/NF6C/1cQMmNNbU6AcDquszfFtEv6oqRP g4+d1drNx3ClUECh8wbRgG83MHoo7DMqyzEDyUHP46YQarYoSGVeKml7L+hBOCXT1pZBsI l6HjtTQkmeC9RX38DvhOgwqx3/WdTrDPYd448Kye1pLawHkpU9i+39Sb38ZV4BNs+NW3n0 JgPJHu37cFTGXS3OQy8esrskUOFDjVp5hrVPf7gex9BsQgq4vdhRV4MJUi+I+TWpJsZ4VK pUvfICb3WQG3XG5NOA27qJjraK6ecT4l+fiE4f4Lxdiop+32XuqXeuJlGLRLzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548591; a=rsa-sha256; cv=none; b=XGOlFF9J0W8o+h2adfTr1qo+dEuk4ElPd9Diyk0KxShRKlhs7SDiwOQgZzP2cSeVD+F89d 5vlbnqUbAB3Tb5oo7/mtEiDiccQND/yj2r3kwRJpZEjtv4vjYXB9oA4uNF1Uh9GS6jrOol 75zX2ww054m8lWIQSHQYB3g2e154FuSeCa4Rp/tsy5cuosLz4LJ4F6uuIcE7QAtrBZE4eS hN+dmyRUyC7Z0ibN19wZPvLUz/e+PN9bpAiooOhLWPyYlAc9admoMOgOxnskKWJTf3RbL5 uKpSdXBdIEEXACUdAkoeVl5xiLQn11cAaaYbBk5NS9/kAtrHv9L8sLavEvqkXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM259Szz12WB; Thu, 16 Feb 2023 11:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuUrT056274; Thu, 16 Feb 2023 11:56:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuUFI056273; Thu, 16 Feb 2023 11:56:30 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:30 GMT Message-Id: <202302161156.31GBuUFI056273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 9410b6b99446 - stable/13 - linuxkpi: Add + include it from List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9410b6b994469040262200f1465fb30c9cd8b64b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=9410b6b994469040262200f1465fb30c9cd8b64b commit 9410b6b994469040262200f1465fb30c9cd8b64b Author: Jean-Sébastien Pédron AuthorDate: 2023-02-10 10:52:12 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:20 +0000 linuxkpi: Add + include it from The header was moved in Linux 5.15. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38540 (cherry picked from commit d91cf060205cfe479675d7fb4ec95d2ed6a9b76c) --- sys/compat/linuxkpi/common/include/linux/kernel.h | 2 +- sys/compat/linuxkpi/common/include/linux/stdarg.h | 33 +++++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/string.h | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 54b558d0bea2..aee299efa732 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -58,7 +58,7 @@ #include #include -#include +#include #define KERN_CONT "" #define KERN_EMERG "<0>" diff --git a/sys/compat/linuxkpi/common/include/linux/stdarg.h b/sys/compat/linuxkpi/common/include/linux/stdarg.h new file mode 100644 index 000000000000..b6141038d69a --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/stdarg.h @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Vladimir Kondratyev + * + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_STDARG_H_ +#define _LINUXKPI_STDARG_H_ + +#include + +#endif /* _LINUXKPI_STDARG_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 932bed81d034..65422cac629c 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -39,6 +39,7 @@ #include #include #include /* for BITS_PER_LONG */ +#include #include From nobody Thu Feb 16 11:56:31 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM42YtWz3q5b2; Thu, 16 Feb 2023 11:56:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM36ngrz4BFY; Thu, 16 Feb 2023 11:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g4enAOA1NFegUZVC86+LeKlnFEQlKozW0JoyuiOTGy4=; b=XEWwLipUtO4SA2fdHYGNAFCvzqCFrV0tKLw9ORJGjbUqYkSmpUcZQD30NN0VU9ak6ZQZHy HbKMltH4xW6CCzI4E0BQ8MXThF5TUNGivh9Vosgp4xzdPZLwJBXpQf+9y2Kyhxw8XmdI1V WosB83HpiDuFpYGzvXTXU1WIbF11sBpYf/Y2bLA4s6u9fYnViCYidndrte1MLrIlXRV5mb SQNnlbRFwtON05mu65QsV5V/0VLRtmNdBFJ/I3XuH+U1slK4enD+vJMwqQBP7yvLFR1UEC F2PQBOZxXHxDF7NY7yygNqnDQY5swYyIJzP28rQ1vcfFSfuKm4AHojuTBs39ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g4enAOA1NFegUZVC86+LeKlnFEQlKozW0JoyuiOTGy4=; b=pJWNe2NrBFeMp41jtW56+Ge1aeXd9YBpCccyE+PlruorKX2yyljT7bio+THZasCCzzxon9 RsLgFIgwivnypn79nV/Jo8VT2ulRIpgl+nFfJlkQKdSlU2fK01tCQEqCsz3Ut4BkaWQLpN sHR26TKYfAqyJiVHArGdCTnTJr9XjJKyUH50BFThNb+nDT52HHijm31VN/fwpZYjPGhpdS uNvtPQuvf0i0S51ufxcVA8+MQ6IFu1GfJ+ljl4HK7HRoLI1FhabvmT8g8YueX/S6sC43N7 Tn35VBse9cZ94cBFc3KN3Fw3O7P7pD2zynPpyEoM2tsU0UofJoN/Ls7nn1cFtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548592; a=rsa-sha256; cv=none; b=bGpzWYKpFd0aGUEp5ipx/qNVzCkHHyv4UhHLylxapFwZPsw5HGyTD1wECx++Cbx2PwyDVS QFOd8pYyLIdJzzsmdFHjeY6m0QBq1sr53IIajj3EMUUwQ+0MjuN8DmaRa9+63v2MOfwufv FFYIvftgssrFXrFsnFDW0ePR6FoU1HYPzH7z2rbRQFLcwz+MJr7X9H73PYItGP/eJcw/Lk XIzEUaSDv4rTdwfaqCaP0qHRlSUCLXh+jEidQVcsEUzMSi4OFaoeiQRNKzKBH3myMYjfhK mo7ByJjcLU2RQMJmxbABAXJkNy4zJY6hBESNX7i0Q0dU78QCVlhbH64APkk7KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM35lq1z1355; Thu, 16 Feb 2023 11:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuVto056303; Thu, 16 Feb 2023 11:56:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuVTt056302; Thu, 16 Feb 2023 11:56:31 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:31 GMT Message-Id: <202302161156.31GBuVTt056302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 1d5100d9be2d - stable/13 - linuxkpi: Add `sg_alloc_table_from_pages_segment()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1d5100d9be2d97d2c74fe15f29a7a42cbada144b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1d5100d9be2d97d2c74fe15f29a7a42cbada144b commit 1d5100d9be2d97d2c74fe15f29a7a42cbada144b Author: Jean-Sébastien Pédron AuthorDate: 2023-02-10 15:37:31 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:20 +0000 linuxkpi: Add `sg_alloc_table_from_pages_segment()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38541 (cherry picked from commit f3490083b731700f2aa7c17ac6fe159826dc59a5) --- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index d1a71258c27d..fe4bce06819d 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -427,6 +427,20 @@ sg_alloc_table_from_pages(struct sg_table *sgt, #endif } +static inline int +sg_alloc_table_from_pages_segment(struct sg_table *sgt, + struct page **pages, unsigned int count, unsigned int off, + unsigned long size, unsigned int max_segment, gfp_t gfp_mask) +{ +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 + return (PTR_ERR_OR_ZERO(__sg_alloc_table_from_pages(sgt, pages, count, off, size, + max_segment, NULL, 0, gfp_mask))); +#else + return (__sg_alloc_table_from_pages(sgt, pages, count, off, size, + max_segment, gfp_mask)); +#endif +} + static inline int sg_nents(struct scatterlist *sg) { From nobody Thu Feb 16 11:56:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM51kxLz3q5xF; Thu, 16 Feb 2023 11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM50lQ7z4BGr; Thu, 16 Feb 2023 11: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=1676548593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kPdEn97Af+GPo1ETBrfm1j2N9RwOPGsFTKg+jWD/Pa0=; b=A1i6DdAgPIJkeUUmvEKHvWCezBQW2ZUDyj4jYeW98wrqE+edLXztWpp7tNOvH/KvZa7Syx 63tMv+wUtLPWCnPVpPwmpNezO1uEURNbX1A0KliADKGwQKVufKddxQrGIXafI63m99Joez m6/pQUQ641Dw2yHSM7Usd/7+8OzSR7zu7LOpUNxr7TvR7GSK5Rxi8K3YPLQsQ2Odk0bmcT wClP8LvaQXTL5YvNwfB0CR1qi8l0k6MoDEaRA+gDIwwew/pX4ucEtcegjqclnzK/Za9f1K GFx3EnSl2GfQTdvUOdSNKPsAaj67855+7QX6f6h1FsLigU8IptNPZk+N7tgkvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kPdEn97Af+GPo1ETBrfm1j2N9RwOPGsFTKg+jWD/Pa0=; b=x3P74tiOX1n6lGPtadHOdinwnyAcNyPmQeBtmz4KYUIvaScZtzpn+eDLXeXURC+DbRG0Vy GyrxrxuiYqi272Y8ZxVzCs9nYT/RKe0bkV0EnWlIbYJ7uI4667Ws30ThxvV9bu/MOCfv1k 4OVgj6v/3AHq9npARaKbkZnCvvQ6yOpAt0vMpi7BFC6rd4GzogxIDDct2KQOf9D1aamKEc CZGlJ67s149VAgqkfgm6t07fiyY4BQsg0LoSfBl7CrKF0hS2p37hY4hlQ75r3CojBQTQCY LSEOkBoQe9qg6xta4VFSEa5ndcIO/qp/as67dgKMmJgT0UwfrAOT/ELSqKXvSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548593; a=rsa-sha256; cv=none; b=AXqGeA4LyzKdTzZggb700orIwl2YnjPZwrXO91qmWuG3D2tZb/uiJCcsDXj9P4bGzN5qna wIwwKka9LNZYk+SM74rHYjWt/42DqQ8V3LYld89PdvX+9aZ1QsFxKhScNcVmyXF4LnEZvL eScxNv5iUQ4+7w/8UcpjoGfDNF98CpldPYntcZWlsx8yvd0v/EHTEGHcTZPcW9uU/3f8XY PMZKPBVzhdlnCzotqcA4wPZBhN4PlVL4sHRpSQAs/MRPO7KPRbeZ7T7EZjBclRAS0wVKJI 1d6hLVyz1CyxpzGR4WZN8Xsm1+5cuc89MYt6DFXydcdTCpN+bLtBtg4qd33xFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM46jg5z137k; Thu, 16 Feb 2023 11:56:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuWce056338; Thu, 16 Feb 2023 11:56:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuWC7056337; Thu, 16 Feb 2023 11:56:32 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:32 GMT Message-Id: <202302161156.31GBuWC7056337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 708dc3db0417 - stable/13 - linuxkpi: Define `cpu_data(cpu)` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 708dc3db0417b2e53d70e88cabb48a3018b632f3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=708dc3db0417b2e53d70e88cabb48a3018b632f3 commit 708dc3db0417b2e53d70e88cabb48a3018b632f3 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-10 15:38:43 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:20 +0000 linuxkpi: Define `cpu_data(cpu)` `cpu_data(cpu)` evaluates to a `struct cpuinfo_x86` filled with attributes of the given CPU number. The CPU number is an index in the `__cpu_data[]` array with MAXCPU entries. On FreeBSD, we simply initialize all of them like we do with `boot_cpu_data`. While here, we add the `x86_model` field to the `struct cpuinfo_x86`. We use `CPUID_TO_MODEL()` to set it. At the same time, we fix the value of `x86` which should have been set to the CPU family. It was using the same implementation as `CPUID_TO_MODEL()` before. It now uses `CPUID_TO_FAMILY()`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38542 (cherry picked from commit a27902c1838836b3fb00cd660ce37a4f20bd7991) --- sys/compat/linuxkpi/common/include/asm/intel-family.h | 3 +++ sys/compat/linuxkpi/common/include/asm/processor.h | 3 +++ sys/compat/linuxkpi/common/src/linux_compat.c | 11 ++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/asm/intel-family.h b/sys/compat/linuxkpi/common/include/asm/intel-family.h new file mode 100644 index 000000000000..1dae979b3c5e --- /dev/null +++ b/sys/compat/linuxkpi/common/include/asm/intel-family.h @@ -0,0 +1,3 @@ +/* Public domain. */ + +#define INTEL_FAM6_ROCKETLAKE 0xA7 diff --git a/sys/compat/linuxkpi/common/include/asm/processor.h b/sys/compat/linuxkpi/common/include/asm/processor.h index 86d4ab9de98f..9e784396c63a 100644 --- a/sys/compat/linuxkpi/common/include/asm/processor.h +++ b/sys/compat/linuxkpi/common/include/asm/processor.h @@ -35,11 +35,14 @@ #if defined(__i386__) || defined(__amd64__) struct cpuinfo_x86 { uint8_t x86; + uint8_t x86_model; uint16_t x86_clflush_size; uint16_t x86_max_cores; }; extern struct cpuinfo_x86 boot_cpu_data; +extern struct cpuinfo_x86 __cpu_data[]; +#define cpu_data(cpu) __cpu_data[cpu] #endif #define cpu_relax() cpu_spinwait() diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 0714106ca418..4ceb33c348f6 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2747,6 +2747,7 @@ io_mapping_create_wc(resource_size_t base, unsigned long size) #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; +struct cpuinfo_x86 __cpu_data[MAXCPU]; #endif cpumask_t * @@ -2769,7 +2770,15 @@ linux_compat_init(void *arg) linux_cpu_has_clflush = (cpu_feature & CPUID_CLFSH); boot_cpu_data.x86_clflush_size = cpu_clflush_line_size; boot_cpu_data.x86_max_cores = mp_ncpus; - boot_cpu_data.x86 = ((cpu_id & 0xf0000) >> 12) | ((cpu_id & 0xf0) >> 4); + boot_cpu_data.x86 = CPUID_TO_FAMILY(cpu_id); + boot_cpu_data.x86_model = CPUID_TO_MODEL(cpu_id); + + for (i = 0; i < MAXCPU; i++) { + __cpu_data[i].x86_clflush_size = cpu_clflush_line_size; + __cpu_data[i].x86_max_cores = mp_ncpus; + __cpu_data[i].x86 = CPUID_TO_FAMILY(cpu_id); + __cpu_data[i].x86_model = CPUID_TO_MODEL(cpu_id); + } #endif rw_init(&linux_vma_lock, "lkpi-vma-lock"); From nobody Thu Feb 16 11:56:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM62r7Hz3q5hD; Thu, 16 Feb 2023 11:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM61cvnz4BHx; Thu, 16 Feb 2023 11:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rYQR+E8BrZx5ecV82eo6u1PymT1tmh01tZ6bekcyxH0=; b=TC9bY2ZFbFqBvmazUOsoGftv/qQIRLqDev4KCuDuNHfkGPyynYHJv7nYNxxQdEt4BedHEC Be8NMJ4XHCNn+fuWb0+dKcI+jOuPJ+0cSC2cjxwTwtbyzq6cqWUEvO69BuUPUg/kVX10Wy ziwkYdbHBaX8HSfBgu4wP7D+TgdGhtBP0b6kg2zHaIm1BeZWnBV4WjL9km/FVe8WFbywrI eRq5S4qiitub7xKNwSgwM7AiaSo4CWg31mNnFEXBeEi8lCO0XxQMHiUu6lEDPnnho6Zrwd yaG6uVdJ3OADKZ/2rq3QtdiRHaEIK7zTdv563FrRhbKrBbNdDhpkwJE56OMX2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rYQR+E8BrZx5ecV82eo6u1PymT1tmh01tZ6bekcyxH0=; b=q4fmmitIffsipadmy+9j16pDvJYj+zlKxH5kmeAYGx7oI6E/r3KwibqlAk+eKNGrdaq28g US9HrY2ArAzzTJXon/zY3qMAC4UIEK8zeY0BSNNW8EdVS/80Tcuf1ydwPUYaoJHoWEAbJ1 dHEwEPPi/RXl/p4ftKCRIft17JvswKxfG2ZMDVsxuRhW0tmyTNUiUG0wWnmGu2+QwUhNbv Pz90KAirBm4F2y89q3ZBZPzg0s4oqlprOKmZ1/FqH5+bEma+GJrV6B6FomJG5FfAELxv+r GfIdZC5ygQuiTLrqnQEBZJpSIfw9lDCDE2JqcxdHa1eQR9iJAKC2hWKerNQdOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548594; a=rsa-sha256; cv=none; b=JFSz4a1d39omYoBJQGEWbly5ozQoN+PH81esuVrQ6P9gni7UezCdOk7u7oAE47tx2WMqQ5 OMnVcEljQSaEWdjeuz66gCE0s/qh3PYSC1ihwnqqIVd3KlramvgOFRY5mbr6GBGRW0Ikv8 kcJOHPjxxNyCgT/ehi2dVX0Vucl6KOV+/jyQvKcKFFigbkHbDphbC6wVQE6r24OdkaxZao MYuPhNt/VNuH0y07jS7gnUfNiXGFWt8IIFPQZpSbtAeUjOa9dX2xvNmUgQhRxapX77VzFn f1/9UD6M/nCDo7yd1GRNG3W6A2kmrGfQ0xqtt+o9j9iLdtjlU1TA3vUMMijXgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM60k1Bz12fZ; Thu, 16 Feb 2023 11:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuYW0056367; Thu, 16 Feb 2023 11:56:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuXXo056366; Thu, 16 Feb 2023 11:56:33 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:33 GMT Message-Id: <202302161156.31GBuXXo056366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 895d286a36cf - stable/13 - linuxkpi: Accept NULL as a value in `linux_xarray` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 895d286a36cf70fa527538ca3c9a1a545f81a9cd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=895d286a36cf70fa527538ca3c9a1a545f81a9cd commit 895d286a36cf70fa527538ca3c9a1a545f81a9cd Author: Jean-Sébastien Pédron AuthorDate: 2023-02-11 10:12:08 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:20 +0000 linuxkpi: Accept NULL as a value in `linux_xarray` Linux' XArray allows to store a NULL pointer as a value. `xa_load()` would return NULL for both an unused index and an index set to NULL. But it impacts `xa_alloc()` which needs to find the next available index. However, our implementation relies on a radix tree (see `linux_radix.c`) which does not accept NULL pointers as values. I'm not sure if this is a limitation or a feature, so to work around this, a NULL value is replaced by `NULL_VALUE`, an unlikely address, when we pass it to linux_radix. Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D38543 (cherry picked from commit 3102ea3b15b6c3ed1ea50716d65980b680375ebc) --- sys/compat/linuxkpi/common/src/linux_xarray.c | 38 ++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_xarray.c b/sys/compat/linuxkpi/common/src/linux_xarray.c index a41784103852..e8a107fa6f27 100644 --- a/sys/compat/linuxkpi/common/src/linux_xarray.c +++ b/sys/compat/linuxkpi/common/src/linux_xarray.c @@ -31,6 +31,18 @@ __FBSDID("$FreeBSD$"); #include +/* + * Linux' XArray allows to store a NULL pointer as a value. xa_load() would + * return NULL for both an unused index and an index set to NULL. But it + * impacts xa_alloc() which needs to find the next available index. + * + * However, our implementation relies on a radix tree (see `linux_radix.c`) + * which does not accept NULL pointers as values. I'm not sure this is a + * limitation or a feature, so to work around this, a NULL value is replaced by + * `NULL_VALUE`, an unlikely address, when we pass it to linux_radix. + */ +#define NULL_VALUE (void *)0x1 + /* * This function removes the element at the given index and returns * the pointer to the removed element, if any. @@ -38,9 +50,15 @@ __FBSDID("$FreeBSD$"); void * __xa_erase(struct xarray *xa, uint32_t index) { + void *retval; + XA_ASSERT_LOCKED(xa); - return (radix_tree_delete(&xa->root, index)); + retval = radix_tree_delete(&xa->root, index); + if (retval == NULL_VALUE) + retval = NULL; + + return (retval); } void * @@ -68,6 +86,9 @@ xa_load(struct xarray *xa, uint32_t index) retval = radix_tree_lookup(&xa->root, index); xa_unlock(xa); + if (retval == NULL_VALUE) + retval = NULL; + return (retval); } @@ -109,6 +130,8 @@ __xa_alloc(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask, gfp_t MPASS((mask & (mask + 1)) == 0); *pindex = (xa->flags & XA_FLAGS_ALLOC1) != 0 ? 1 : 0; + if (ptr == NULL) + ptr = NULL_VALUE; retry: retval = radix_tree_insert(&xa->root, *pindex, ptr); @@ -137,6 +160,9 @@ xa_alloc(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask, gfp_t gf { int retval; + if (ptr == NULL) + ptr = NULL_VALUE; + xa_lock(xa); retval = __xa_alloc(xa, pindex, ptr, mask, gfp); xa_unlock(xa); @@ -166,6 +192,8 @@ __xa_alloc_cyclic(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask, MPASS((mask & (mask + 1)) == 0); *pnext_index = (xa->flags & XA_FLAGS_ALLOC1) != 0 ? 1 : 0; + if (ptr == NULL) + ptr = NULL_VALUE; retry: retval = radix_tree_insert(&xa->root, *pnext_index, ptr); @@ -220,6 +248,8 @@ __xa_insert(struct xarray *xa, uint32_t index, void *ptr, gfp_t gfp) int retval; XA_ASSERT_LOCKED(xa); + if (ptr == NULL) + ptr = NULL_VALUE; retry: retval = radix_tree_insert(&xa->root, index, ptr); @@ -262,11 +292,15 @@ __xa_store(struct xarray *xa, uint32_t index, void *ptr, gfp_t gfp) int retval; XA_ASSERT_LOCKED(xa); + if (ptr == NULL) + ptr = NULL_VALUE; retry: retval = radix_tree_store(&xa->root, index, &ptr); switch (retval) { case 0: + if (ptr == NULL_VALUE) + ptr = NULL; break; case -ENOMEM: if (likely(gfp & M_WAITOK)) { @@ -374,6 +408,8 @@ __xa_next(struct xarray *xa, unsigned long *pindex, bool not_first) found = radix_tree_iter_find(&xa->root, &iter, &ppslot); if (likely(found)) { retval = *ppslot; + if (retval == NULL_VALUE) + retval = NULL; *pindex = iter.index; } else { retval = NULL; From nobody Thu Feb 16 11:56:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM753B2z3q5k4; Thu, 16 Feb 2023 11:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM72n3mz4Bpf; Thu, 16 Feb 2023 11:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9gEQQ5jr70Dxbu8j+j4SoiVEeDRnolunI3RQ2rXEkw4=; b=CoZU7EJpu7LOZ7uNM+IRL+1/i9ZaZ76rC3jQ0QqZMlwclABPjPfCYI+PUeSOnBI+yiRNuU XaBN9gI80RtmXKdFmaVkZuUXDYqs6Mp0u5HCBy/5NrNjKCIvvgYXTcW8ncbn60wbqtlnHs gv9cWmPDPxpfc0StXar0nSUCpul/hSKsxLiEhLpjcRj6EUVuK5fPZnT8pWuJ+bVIXIY85G qNGsweUEImHrkqZ97Vn48V0vhS7dww5CQKIH3EDQdK9of/B0aOs1e1UJBiN767ODcLkg/z Vz7SNBXHy3Xtv/+wTimwR2ws7Z7rp+PDK+3yZb35gMH6rizM218F9SJFyIOFGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9gEQQ5jr70Dxbu8j+j4SoiVEeDRnolunI3RQ2rXEkw4=; b=c3ffW4qepqdM/iNOFFCBks+qgQSBAxSVrXbIQY6X0rZkot11vKYZcJ0YW3vEYnqchqoICW V7xe8s015aHAVMprQGXsLpZZarX1KXqgVOk8Ky2cPJdY7ykaNUn7Al14XUcOMs4pd161aP 4PyW1sm4Yakgdwnp8vw+8ND+DsUNZzdqP29/PO99GYxeY93uQRbZzRuHYEtKFgV1alBgeb Zl8znBFvS1SJPMR0uC/c/JBVc3j+0QEOug9EMt6dBWp/OnvPNJ1I2LnOa3m6TkgcmSGIt0 /fp6Upt9HNnqNYN2QtlHF7fJU/6p/Y5KAZ8fxk2k5PkK5Apx54cKk4R9Vy8wcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548595; a=rsa-sha256; cv=none; b=LODacB+Hmg2VBvG03cyiNQXKDE58HldvlY6Obyuw+9JJg04vVpfehvNttGm0j0PpyUxryv yNZ3tB6Mav0bOj7KTh1T+xMFtVIWz/qi1pgQxW8YmmciGhT36mBpMaAD2OmEjCipzf9We6 0L9ihooK7IMu63v86CSRCk02oHKKgz6NmOJ1EvE7IqB0G5Jt+6cVrGXfyVrl+xFc39cNZ3 EzbP4yh4kl/oPN9nSjFjZ5eKbqETvWVuS5kxJAtonCPkkxZNWv7WE/uYO6l1e0IskaTJG5 EYLMwdLuuUbHRNNhMZiVGc+K0szQgukVhYEKI4RUKzMrjkd6UmrrHOV2KfCjhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM71bn4z12j3; Thu, 16 Feb 2023 11:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuZMF056396; Thu, 16 Feb 2023 11:56:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuZWX056395; Thu, 16 Feb 2023 11:56:35 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:35 GMT Message-Id: <202302161156.31GBuZWX056395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 01b3fc89ddd8 - stable/13 - linuxkpi: Add `synchronize_shrinkers()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 01b3fc89ddd8e48c6dfe584d44b6018edc4f3a5f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=01b3fc89ddd8e48c6dfe584d44b6018edc4f3a5f commit 01b3fc89ddd8e48c6dfe584d44b6018edc4f3a5f Author: Jean-Sébastien Pédron AuthorDate: 2023-02-13 20:49:28 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:20 +0000 linuxkpi: Add `synchronize_shrinkers()` It takes the lock and release it immediately to make sure no shrinkers are running in parallel. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38565 (cherry picked from commit 83636727291714c235726da987a02c5b1d51bb54) --- sys/compat/linuxkpi/common/include/linux/shrinker.h | 2 ++ sys/compat/linuxkpi/common/src/linux_shrinker.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/shrinker.h b/sys/compat/linuxkpi/common/include/linux/shrinker.h index 39ea35f0a862..04e96a12c4bd 100644 --- a/sys/compat/linuxkpi/common/include/linux/shrinker.h +++ b/sys/compat/linuxkpi/common/include/linux/shrinker.h @@ -51,8 +51,10 @@ struct shrinker { int linuxkpi_register_shrinker(struct shrinker *s); void linuxkpi_unregister_shrinker(struct shrinker *s); +void linuxkpi_synchronize_shrinkers(void); #define register_shrinker(s) linuxkpi_register_shrinker(s) #define unregister_shrinker(s) linuxkpi_unregister_shrinker(s) +#define synchronize_shrinkers() linuxkpi_synchronize_shrinkers() #endif /* _LINUXKPI_LINUX_SHRINKER_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_shrinker.c b/sys/compat/linuxkpi/common/src/linux_shrinker.c index b48e491a4e2f..227ef3261cb3 100644 --- a/sys/compat/linuxkpi/common/src/linux_shrinker.c +++ b/sys/compat/linuxkpi/common/src/linux_shrinker.c @@ -64,6 +64,14 @@ linuxkpi_unregister_shrinker(struct shrinker *s) sx_xunlock(&sx_shrinker); } +void +linuxkpi_synchronize_shrinkers(void) +{ + + sx_xlock(&sx_shrinker); + sx_xunlock(&sx_shrinker); +} + #define SHRINKER_BATCH 512 static void From nobody Thu Feb 16 11:56:36 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM86MdVz3q5bC; Thu, 16 Feb 2023 11:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM83wgVz4BKd; Thu, 16 Feb 2023 11:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=McTVBSpGNf7qgDT4Xiyy63s2U6jhvCPKU3xhc+vS9Gs=; b=IsPxRYcRfKMGXfxJ9z3Lbo+yTytcqxHl73Hapa+U9bN1CUDp4a6WkkFPNeQaPNagXszSVv cX860WXLwKoJ5BN+wgzlnnO4BMgMomkJ7qf8CTgW2MouYTSRMSzAssnxn9mBDw8DwQu0Dq zVXXEGW6OOCcZ/Z8shltZ/MCx7niFdctvOZx7J1h0XpL0V5P/q5Omr5AifcSDM5n6oIRxy vwvU4mnxPHG1hPp4c1Tj+gVWdIPFj1BB3/nvbZzjXpvtQ8fjZ3eP44J/5DJCu6UoticiJd n+dxGXTdoAu2HfOzFHZfiOcQBYnKopicl8tnCyo6+ePo5UNQJQxWKCLxsVfq8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=McTVBSpGNf7qgDT4Xiyy63s2U6jhvCPKU3xhc+vS9Gs=; b=JemUjpxiwo7gmQaoTjp7138D04m2+NdEJfgPCuMlzqG7Jd5/oFNUdjdB/kTWqDN/s3v4hs 7wWYy/itchFnQwLmt8vqive3b9P5sduqIbni+8NAYTdvxYcsjwak9yC0EyeuJ/1opn6e37 LPFw5KP35LTlNKQ17w9ypJ1Z66fUQDjYmkbrsMazEcLhs+BpOY2mptg5U/xwbSXaZDYxyl t8i3mEIensqdZRiek5jegLHndiby+mbqsyWtz1w3tmAVMVlUL2RIt1B9uo234UJPSxyULn l/LG9WYuUpURCH/jt8siU5+lAVWytzyiGHYcoUkDGL7CISHW7qY8bB8Wj40kBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548596; a=rsa-sha256; cv=none; b=n7dgiOAwsiiozLdvjPXLPPh2uX6cHqEq/FDWczImwQ8mhgFpX+LiHUF2ELHKJOnM9MWTuA aar6ZdLpsNILB6ynlT1ZVCL0GeMJZTZKQvAPUgYWB4dTj64H1/UYJf6il+/AskAfn/UlUw habaQDqhXGnRBthHz5ZHjmIWPo8HOYbfmkM8y3t99hQruYqY3uusvjq0vsWVCFfwKQtZwp uwwRxNgeBBUHvyQSpRz+sgqdWmHjRyfOBRYStOXxwC3oJI1o2Ly+hirMu3YXF98CRFGQYc a2HQ2YvNoI1cf8kkxgPaheBG8vL0S510F/tl1Hfxzr3s3Uoy458+1gP3blf0IQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM831kjz12fb; Thu, 16 Feb 2023 11:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuah9056428; Thu, 16 Feb 2023 11:56:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuauj056427; Thu, 16 Feb 2023 11:56:36 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:36 GMT Message-Id: <202302161156.31GBuauj056427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 3a8e16e47b41 - stable/13 - linuxkpi: Declare `struct fwnode_handle` in List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3a8e16e47b41b27c8ccf4a3dc66656d9b19fa764 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3a8e16e47b41b27c8ccf4a3dc66656d9b19fa764 commit 3a8e16e47b41b27c8ccf4a3dc66656d9b19fa764 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-13 20:51:00 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:21 +0000 linuxkpi: Declare `struct fwnode_handle` in Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38566 (cherry picked from commit 7d03acf065ed96fd04a54bf8e1c83a032ffed097) --- sys/compat/linuxkpi/common/include/linux/device.h | 2 +- sys/compat/linuxkpi/common/include/linux/fwnode.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 01a1729830c4..d91c14bd87b7 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -48,13 +48,13 @@ #include #include #include /* via linux/dev_printk.h */ +#include #include #include #include struct device; -struct fwnode_handle; struct class { const char *name; diff --git a/sys/compat/linuxkpi/common/include/linux/fwnode.h b/sys/compat/linuxkpi/common/include/linux/fwnode.h new file mode 100644 index 000000000000..a1fbc1b6d6a3 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/fwnode.h @@ -0,0 +1,10 @@ +/* Public domain. */ + +#ifndef _LINUXKPI_LINUX_FWNODE_H_ +#define _LINUXKPI_LINUX_FWNODE_H_ + +struct fwnode_handle { + struct fwnode_handle *secondary; +}; + +#endif /* _LINUXKPI_LINUX_FWNODE_H_ */ From nobody Thu Feb 16 11:56:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYM95zTdz3q5vb; Thu, 16 Feb 2023 11:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYM94yjCz4CMn; Thu, 16 Feb 2023 11:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RxAvSj1qyfiKvQ5SDNz997gUM7GmFh9NCesSwSMroqk=; b=fF0rkyjN1w51L8snOu6Lj4IeSjoaYrCM1M1BP53hkEidespfr8yLnRsK3aJlvmyS2ERmq1 q0VKdq5zrDDjGPqlYWYZLLocg2ZtQ90SoqSVzYlbdR7n9Zus3jL/PYv8iY+QafRwl7OFJd YHrvKIigOVb5r2BMbvce3b7RsskipNq6Nwh7PGGTPVb4xU9fvNAOHIixEWqUjuWNA7muQu vMHfL/LG3fCbjF58d3gU9+F4mIpQduGvxF2kCz8BcgYTtbwxQ7gKnRrR77PVXDQTh9QDbL HLVu5hDAT0sgKLlXpjy0BnQpHYcWbz9VfCOjU4IE44nrEjThiX/64giF4tdSwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RxAvSj1qyfiKvQ5SDNz997gUM7GmFh9NCesSwSMroqk=; b=XhvyGiQgc8bHwlrRIMz+HP0k2Iy61VEuKpJvQnactRuBftOrjXmWZrXhtXiq9tvNr1dbQ3 PRLDbW1Svo1tCD+Tsu3NuBU+y5lOrRFK+2obeW8YRFX+HHURDDu858ZOmCXwgdIHwwBJ1G TAPTNkDh/E+3VZw2XF8sS1eOonjLob+cx+qQ2nuHnzjswV3MwbqFCpbIYmyn9+4ti7D9YF moJvtK9Tu9UBK0S4skF41YUSX69QUvTmouAUKZK0iN8gquG/NsF6Jp8yE3EYRt6TFm9IYu 8TzWxgpQ5ddnGDcZFDrPo0VkUWWFyOOOnm9XVuwp1LxTo4q7VZCJQNkrNsuoVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548597; a=rsa-sha256; cv=none; b=sJ1x/gls5w33FxDes0IKi9FdkcX8HjhrL+6MzP7CRBx+ifnYVGc9kviXUbTOP2e5xU+Tht s6Ts8NrnuWhc1C4PF7Ypo53YOXXyu55Cc7rgMV7V6WYEYY/Jw47Fy8LcCdk8TzMvtPh4Jv oBmjOEztoMKH9tzvhMJwPihQNtoo53dDDUDpa4yUXGiaYBgW20/rX9XccGEEQkAgesEg52 6hoKwEBM+VWjBU+mTl8ji2theVQCwKRtNFZJ81qrHVofBoQP3wefdA/S71VOhLOAsDspg9 Tk3VwL8lizNTmny3ZnkS+Prmu2Ix7FibWqAk7pXPj0Z81BzlQnJAzNbxem9eMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYM93vqVz13HF; Thu, 16 Feb 2023 11:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBub6I056457; Thu, 16 Feb 2023 11:56:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBubOl056456; Thu, 16 Feb 2023 11:56:37 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:37 GMT Message-Id: <202302161156.31GBubOl056456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: e8a65c48fa1a - stable/13 - linuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e8a65c48fa1a8aab8af47bd6144870fc71ae7370 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e8a65c48fa1a8aab8af47bd6144870fc71ae7370 commit e8a65c48fa1a8aab8af47bd6144870fc71ae7370 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-13 22:22:54 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:21 +0000 linuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16 It gains new `struct ww_acquire_ctx *` argument we don't use currently. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38568 (cherry picked from commit e6f7fe74a903b4085d60b0054ff75ee677beaf76) --- sys/compat/linuxkpi/common/include/linux/ww_mutex.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ww_mutex.h b/sys/compat/linuxkpi/common/include/linux/ww_mutex.h index d0dd7cd52601..651b39a45b15 100644 --- a/sys/compat/linuxkpi/common/include/linux/ww_mutex.h +++ b/sys/compat/linuxkpi/common/include/linux/ww_mutex.h @@ -72,8 +72,13 @@ struct ww_mutex { #define ww_mutex_lock_slow_interruptible(_m, _x) \ ww_mutex_lock_interruptible(_m, _x) +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51600 +static inline int __must_check +ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx __unused) +#else static inline int __must_check ww_mutex_trylock(struct ww_mutex *lock) +#endif { return (mutex_trylock(&lock->base)); } From nobody Thu Feb 16 11:56:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYMB6VGjz3q5bS; Thu, 16 Feb 2023 11:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYMB5sbzz4Bt5; Thu, 16 Feb 2023 11:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WTr4SYXLC1c2gHub5i8dkPAVU5/BNhP1FVNxn7NtIBk=; b=C7+v4QKGAK8dGo42igmyI18a058pv94M7eFetPiDPsVpXdfBceKxUyMhcX07N8Md1x/1+h Zh/1VFuRpeAHKNfB0OifbmTWRR90csVkfx0WQ958dj71vW8b3LVy5lZKsZqpkYJYqnxPOZ AE3tnCW1QGe10i+lZzUo5RkoO2JXCFebXP/P68z+g+Sl5xoaFm08a1RWxRHe9pjiVmsLgc OKbFpEvlAipI3JWPalqwIx8Ls4eIX5NwDX1/UAXIORF2G8a2ttSpnboC3+hqT3elGoo4tk RxC98oI57C9pWppttvTDR4EJ2FXsGG+kfEZGWLIxzHstUQ0hQmRB8SvVlVGOYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WTr4SYXLC1c2gHub5i8dkPAVU5/BNhP1FVNxn7NtIBk=; b=yxY2HmKVBtlKec7kAv/3xpfxHmmBKckYTcMM2CyCLPXp36btd+LlYqUMvKfM/jDbfAdn76 smBdvjzCKd1koh2pWdBoS6mfhAkqcuorcCn5Q/Bj0jbY2KwlzXMXX/ZMsRgTxkRI2/AYWE BsEWd9y0uuGU81PFtI2cFCrs1hwlDMPzEW6h9+LDwlohizW9zk9DNf3i1N250EXBSB+O0l 6AaK88Jj+Pmb2pGeObZn/ZDEeX/9rC0aryRiseh7xFX+n9rUYgUSAPgE7ZPG0z8XKfZ8Ci D0Ou/VAkNS23noZvz0/gyFcSraiISyH2h6cAbFUiPKKjxnXYi5KlHznHhK4Kyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548598; a=rsa-sha256; cv=none; b=hJj1EkfosG1BpaOvanrIi1Q8h4wDBMpzAMFKYCtSMQTOYVbFYtvbA7s1LbmhRH8UUcXRTI 6ZAN10WLIqbG3l/2sktsMR+GSo24YUsj4VaAN9V34pibbl5xDhqw5VsAJITMFm5qwWHpTI /3N5XatawSj6GxmVzgjOsPG04eXDh04QOWTiUbsB88GU6WP2DOJLiAgtgUHVomhlAkyagg F2GYSzifGvqfM+v8hP7g8eXcLGcO0C3RKrrqCvxHqpOw1O+wLSwRKTxBPq3sCaapneS0Nq IhBVxQCfSbj1fy+vrqaw7+IEb0cn6vQPgu3Pr402eWzUgSXhyQ9xBv6esMTKXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYMB4x3wz137l; Thu, 16 Feb 2023 11:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBucPj056492; Thu, 16 Feb 2023 11:56:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBucqx056491; Thu, 16 Feb 2023 11:56:38 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:38 GMT Message-Id: <202302161156.31GBucqx056491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 19b261f1788d - stable/13 - linuxkpi: Add List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 19b261f1788da0037d76188ae3152b301eb47d81 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=19b261f1788da0037d76188ae3152b301eb47d81 commit 19b261f1788da0037d76188ae3152b301eb47d81 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-14 21:44:21 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:21 +0000 linuxkpi: Add It defines the `cc_platform_has()` function. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38596 (cherry picked from commit 96e16cf368f6d8aa3c0efd44db4c4678892e1fea) --- sys/compat/linuxkpi/common/include/linux/cc_platform.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cc_platform.h b/sys/compat/linuxkpi/common/include/linux/cc_platform.h new file mode 100644 index 000000000000..727dbc98dab2 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/cc_platform.h @@ -0,0 +1,17 @@ +/* Public domain. */ + +#ifndef _LINUXKPI_LINUX_CC_PLATFORM_H_ +#define _LINUXKPI_LINUX_CC_PLATFORM_H_ + +enum cc_attr { + CC_ATTR_MEM_ENCRYPT, +}; + +static inline bool +cc_platform_has(enum cc_attr attr __unused) +{ + + return (false); +} + +#endif /* _LINUXKPI_LINUX_CC_PLATFORM_H_ */ From nobody Thu Feb 16 11:56:39 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYMD1nRhz3q5vd; Thu, 16 Feb 2023 11:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYMC6wfcz4CZd; Thu, 16 Feb 2023 11:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nZTWJq0DiVLJ72rC2sWWm8dTH5w9akSi4hKBmn9Nasc=; b=POsjQaD8Zo49UZ9WdFSN8NEhsDgsJjV11hzIX84QWvHN0RYZKY5/14pRd9xrFYkW1J6TTK C+dsbJT9rzRY6HQsCnKCTmB4gpV6unzGXkJroaTcosq5c2E8gwy1msTNUv0Y4KfPA52AFt cPcW8RAHw3KzkOW8OmF5VcJcKv1ZSTnWLpaS/0XR9iF84b14B506JKLnQWM9gheBT4lSzq PQwxbGF52acBu4OZJ93maYU0l+VoRB51SGGRfAar9SEq0JzEumseI+y5HcKriihN0L/NLs 1OxN6smMsIbRRe9FHueOduxraCJPAfXP6nuuObiPAQUoTbg+OWpZ0AxX5e7EEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nZTWJq0DiVLJ72rC2sWWm8dTH5w9akSi4hKBmn9Nasc=; b=iEn+WXIzLOo2Hk/tAzJMP+v/C/mgG+ezvkqPVXvkEXuNua+V6Ychz1P1nUNAfpLY5kPiE7 0s+tE2/mgVtZynQYLK93GzxbUgAHOBdfmCKrVUeg+qmcWfcmfETX1W/LP6vdAL1veA6upR seOWLEKyNpGix6x1qGWmZfmegKdjwtCci/em2zguBRbFzUU0yysFjqB2Yyfkep/Wr0LUmG 2O9xmsEs9FgTb4kBHi8c7z0toHuBjfRmgTvJQvUJTnuY34PQNgi6LnZq9RdzZk5O5QG3Az gSF+1xSUg1CWwjOGnNeEoJaJPtKUlgtnDRIE++jIwipBZeOPdtfDrVpODybGcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548600; a=rsa-sha256; cv=none; b=RwKhDZkBpOMmf6wXbSyYrs7Atftv5DCJtk+T62BadUJ1WsWQkwLN3zxPhgZ5Fc4f6zxOp/ a9twtxf0d7hy2aj4rAhSe9c6JjV/vWtYN33A8Zhgd0pLGvErlL7T5HwuX4PaikR26yBi+k JVWZ3RwqhI3bsxVLE/SvSJG4co80EPeOhsuKE3MYwe1nM7e1fpO5kTTUnZ6CXdDgobRDrn pjSwNFdP0ok20sZMLVnxiNkYjIDnOiRn2nPYiZ9/IlgB4HyHlu/DC1Wn371y8D/+8nUeE4 IHIDaY0dpE6uCnktVDpPoOyitIVSyTu10rEP+cCk7ImA1BeJcYTjzaPRQiFc/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 4PHYMC61znz137m; Thu, 16 Feb 2023 11:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuds0056521; Thu, 16 Feb 2023 11:56:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBudRB056520; Thu, 16 Feb 2023 11:56:39 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:39 GMT Message-Id: <202302161156.31GBudRB056520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 070d7997501f - stable/13 - linuxkpi: Move `IS_ENABLED()` and friends to List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 070d7997501f39ec351e2872b86407dacc12bc8a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=070d7997501f39ec351e2872b86407dacc12bc8a commit 070d7997501f39ec351e2872b86407dacc12bc8a Author: Jean-Sébastien Pédron AuthorDate: 2023-02-13 20:52:08 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:21 +0000 linuxkpi: Move `IS_ENABLED()` and friends to The header is included in like it is on Linux. Some DRM code depends on this header "pollution". Reviewed by: bz Approved by: bz Differential Revision: https://reviews.freebsd.org/D38567 (cherry picked from commit 4b0552d5f4ea0bd09d7f0f178810886472e84d63) --- sys/compat/linuxkpi/common/include/linux/kconfig.h | 78 ++++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/kernel.h | 43 +----------- sys/compat/linuxkpi/common/include/linux/xarray.h | 1 + 3 files changed, 80 insertions(+), 42 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kconfig.h b/sys/compat/linuxkpi/common/include/linux/kconfig.h new file mode 100644 index 000000000000..b109d664ce8f --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/kconfig.h @@ -0,0 +1,78 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed 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 + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUXKPI_LINUX_KCONFIG_H_ +#define _LINUXKPI_LINUX_KCONFIG_H_ + +/* + * Checking if an option is defined would be easy if we could do CPP inside CPP. + * The defined case whether -Dxxx or -Dxxx=1 are easy to deal with. In either + * case the defined value is "1". A more general -Dxxx= case will require + * more effort to deal with all possible "true" values. Hope we do not have + * to do this as well. + * The real problem is the undefined case. To avoid this problem we do the + * concat/varargs trick: "yyy" ## xxx can make two arguments if xxx is "1" + * by having a #define for yyy_1 which is "ignore,". + * Otherwise we will just get "yyy". + * Need to be careful about variable substitutions in macros though. + * This way we make a (true, false) problem a (don't care, true, false) or a + * (don't care true, false). Then we can use a variadic macro to only select + * the always well known and defined argument #2. And that seems to be + * exactly what we need. Use 1 for true and 0 for false to also allow + * #if IS_*() checks pre-compiler checks which do not like #if true. + */ +#define ___XAB_1 dontcare, +#define ___IS_XAB(_ignore, _x, ...) (_x) +#define __IS_XAB(_x) ___IS_XAB(_x 1, 0) +#define _IS_XAB(_x) __IS_XAB(__CONCAT(___XAB_, _x)) + +/* This is if CONFIG_ccc=y. */ +#define IS_BUILTIN(_x) _IS_XAB(_x) +/* This is if CONFIG_ccc=m. */ +#define IS_MODULE(_x) _IS_XAB(_x ## _MODULE) +/* This is if CONFIG_ccc is compiled in(=y) or a module(=m). */ +#define IS_ENABLED(_x) (IS_BUILTIN(_x) || IS_MODULE(_x)) +/* + * This is weird case. If the CONFIG_ccc is builtin (=y) this returns true; + * or if the CONFIG_ccc is a module (=m) and the caller is built as a module + * (-DMODULE defined) this returns true, but if the callers is not a module + * (-DMODULE not defined, which means caller is BUILTIN) then it returns + * false. In other words, a module can reach the kernel, a module can reach + * a module, but the kernel cannot reach a module, and code never compiled + * cannot be reached either. + * XXX -- I'd hope the module-to-module case would be handled by a proper + * module dependency definition (MODULE_DEPEND() in FreeBSD). + */ +#define IS_REACHABLE(_x) (IS_BUILTIN(_x) || \ + (IS_MODULE(_x) && IS_BUILTIN(MODULE))) + +#endif /* _LINUXKPI_LINUX_KCONFIG_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index aee299efa732..22b25a202395 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -760,46 +761,4 @@ mac_pton(const char *macin, uint8_t *macout) #define DECLARE_FLEX_ARRAY(_t, _n) \ struct { struct { } __dummy_ ## _n; _t _n[0]; } -/* - * Checking if an option is defined would be easy if we could do CPP inside CPP. - * The defined case whether -Dxxx or -Dxxx=1 are easy to deal with. In either - * case the defined value is "1". A more general -Dxxx= case will require - * more effort to deal with all possible "true" values. Hope we do not have - * to do this as well. - * The real problem is the undefined case. To avoid this problem we do the - * concat/varargs trick: "yyy" ## xxx can make two arguments if xxx is "1" - * by having a #define for yyy_1 which is "ignore,". - * Otherwise we will just get "yyy". - * Need to be careful about variable substitutions in macros though. - * This way we make a (true, false) problem a (don't care, true, false) or a - * (don't care true, false). Then we can use a variadic macro to only select - * the always well known and defined argument #2. And that seems to be - * exactly what we need. Use 1 for true and 0 for false to also allow - * #if IS_*() checks pre-compiler checks which do not like #if true. - */ -#define ___XAB_1 dontcare, -#define ___IS_XAB(_ignore, _x, ...) (_x) -#define __IS_XAB(_x) ___IS_XAB(_x 1, 0) -#define _IS_XAB(_x) __IS_XAB(__CONCAT(___XAB_, _x)) - -/* This is if CONFIG_ccc=y. */ -#define IS_BUILTIN(_x) _IS_XAB(_x) -/* This is if CONFIG_ccc=m. */ -#define IS_MODULE(_x) _IS_XAB(_x ## _MODULE) -/* This is if CONFIG_ccc is compiled in(=y) or a module(=m). */ -#define IS_ENABLED(_x) (IS_BUILTIN(_x) || IS_MODULE(_x)) -/* - * This is weird case. If the CONFIG_ccc is builtin (=y) this returns true; - * or if the CONFIG_ccc is a module (=m) and the caller is built as a module - * (-DMODULE defined) this returns true, but if the callers is not a module - * (-DMODULE not defined, which means caller is BUILTIN) then it returns - * false. In other words, a module can reach the kernel, a module can reach - * a module, but the kernel cannot reach a module, and code never compiled - * cannot be reached either. - * XXX -- I'd hope the module-to-module case would be handled by a proper - * module dependency definition (MODULE_DEPEND() in FreeBSD). - */ -#define IS_REACHABLE(_x) (IS_BUILTIN(_x) || \ - (IS_MODULE(_x) && IS_BUILTIN(MODULE))) - #endif /* _LINUXKPI_LINUX_KERNEL_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/xarray.h b/sys/compat/linuxkpi/common/include/linux/xarray.h index 8a9d8fa3ea41..004efebc55d6 100644 --- a/sys/compat/linuxkpi/common/include/linux/xarray.h +++ b/sys/compat/linuxkpi/common/include/linux/xarray.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include From nobody Thu Feb 16 11:56:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYMF2vxJz3q5xR; Thu, 16 Feb 2023 11:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYMF0wFWz4Cdh; Thu, 16 Feb 2023 11:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dwiX1AOKUeWkWWU8vfhzrK3bI69XptA7L8Ka1/mJasU=; b=pk1qqWMBk+/xGqZBghIQT0mF1Dsg0nv+Y2P00oJFpZvhHkmIheV/EdycAA8+YSRP8RCQr2 DBhmmENZ/2M++FaMfGWQ9YLg72Ju227ZWOD63rSBSd6syrZ9h/Jahir2fqEnG4HwcuLRyf MA4UZloVQHZC0jK05AIoi4lMEXYZu3Bp1uzWJvSVoGkVdo1X+DGCuigm131pr0A2QX212a xjV1ZI64J801diw0s3h2RLWl7agWVPJBZ2XM3oii1IMnCxbF1xch1RYTBGYa67ne2oWt5a qRbWJhlZ2r5STtGmqvIW6sOxSJ+xC95m70hOmgjlKvJu/1+S3aGnHTrhzUPpUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dwiX1AOKUeWkWWU8vfhzrK3bI69XptA7L8Ka1/mJasU=; b=bam0c0q9fdb2fpXTmpwqgUaqaAKLFdNV5S0obECYAp/9FiHtJ1Wrz8vGLtBE3zfPzPgabJ 3I2TM1yfuRUVQX31y9AIASoeOzWEqlNIP/mNVpp3xNwy99hR/3ZjnytJ1cIeek0sN717E+ fjyJratyPV707Kr44Sh/tGlI2g6wGcWRpsdlOdDdFgrDKlslpC0OFAUe3l/cTpks7LuiK/ LnSS7gNKWeiAPKhmA9qAV5EZ3bHGS3ZW8AYdDQ11+Wlp5PUikmy05nR1vDroUZpJPIfUFI ap0PchgNypPWbMRi6tXYd1YcrX7x7MNNsHU9VS+dvCc27YmDlCdFVWunm+H6iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548601; a=rsa-sha256; cv=none; b=hJaR3xFoqvg/h7+RbVA4AaWWlfRIAII6GZ61S4ZmhqFskowKsh2irkzFGQfyc+8Tkqnw8w RlaeNG4a25Yt3d2ZG8rIjejvIoqybzmVVw1hkLcBkKjTcPo0F/0rsXzWcNZSmQH8AwjDvv +qgmFUIzHilBNjhI+RpECj1tjK/iiQ0wvPkkhgxnLZ8UwaYJoNQqNP8vEsl8P0LIldDVOA jVGCWh6jbeN/gmvp3RHUJl9HB36AG0UyVXNJ7lVwnv0O4/2PlfpyTPdME2ahw73D7xZsWZ 7FRythU3gkkxtrhKX9E7TcKkCB0iAtAO1Z/vGS0kopRM0WV0Ff4lnkhXKV6hsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYMF00FFz12WC; Thu, 16 Feb 2023 11:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBueJE056550; Thu, 16 Feb 2023 11:56:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBueVJ056549; Thu, 16 Feb 2023 11:56:40 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:40 GMT Message-Id: <202302161156.31GBueVJ056549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 431a3c0b2b52 - stable/13 - linuxkpi: Define `debugfs_initialized()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 431a3c0b2b526b1264660fd7e06fa307fe3c9fb4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=431a3c0b2b526b1264660fd7e06fa307fe3c9fb4 commit 431a3c0b2b526b1264660fd7e06fa307fe3c9fb4 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-14 23:38:59 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:21 +0000 linuxkpi: Define `debugfs_initialized()` It always return true on FreeBSD, at least for now, because all DRM drivers using it depend on lindebugfs. Reviewed by: manu Approved by: manu (cherry picked from commit 4dac88cd150b444cf67a09f7c0c8af795e9c1bd6) --- sys/compat/linuxkpi/common/include/linux/debugfs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/debugfs.h b/sys/compat/linuxkpi/common/include/linux/debugfs.h index abda2d149582..734682cd7013 100644 --- a/sys/compat/linuxkpi/common/include/linux/debugfs.h +++ b/sys/compat/linuxkpi/common/include/linux/debugfs.h @@ -52,6 +52,13 @@ struct debugfs_blob_wrapper { size_t size; }; +static inline bool +debugfs_initialized(void) +{ + + return (true); +} + struct dentry *debugfs_create_file(const char *name, umode_t mode, struct dentry *parent, void *data, const struct file_operations *fops); From nobody Thu Feb 16 11:56:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYMG2xRmz3q5tG; Thu, 16 Feb 2023 11:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYMG2GWjz4Cr1; Thu, 16 Feb 2023 11:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YfWx/oc9Wnkg/gtiyUIgaJeRxxobb2Hr/to1J2C5Zs8=; b=tiRmyA0hmio7ludgMoFCh462JWHtw1m8+0KAcASkwDKxotGgG21FfFa4fZ7HMHWhSY5m+Z cd37SOA6DLitYO6eGF7aBPa+FPS5NJ563tOvd9kbiolgf/5GWKuEA8GqGW/4yXTxy3Hz+7 1oIf3vjorjPJ5z4o2SotvQiTWDT4tnLPp0iiA/dTN1+rsJqSw5wUAMxabeTHM/uz4Q+k/T yglpsDTW5xzFXwnVaQvnX5OzYb3PPrFSEHpUna15HwYHQNOmQ1pd/s7le1IX2zBE2XR1sK 3FafXh8rXLoOcuY/fJS5bx+mb+FcQuEDsvkmJnnsTD1KogDEVBHRC4Mx1N0OFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YfWx/oc9Wnkg/gtiyUIgaJeRxxobb2Hr/to1J2C5Zs8=; b=ObHGS40SptZRCGWxvlZ5NcJFDUhZodvUe05nci+x6ibmNdx+29xhyTX3TbhwMK25mHiq8f 1VIbRZ20NQOPzL7Bw/qAuI8mDLuLsU+47upU5zDoHTy4dngcD4ot4CeaALOB7HMakRei9G 9MCgCJA1k/i6dBKO7hva6/VrzbZpUOND36Jf4N80ckGDDcq9sgc2a14xnlnlhcPrF7gF82 UnZZ0KKpaWhX7CJU2psajDlRTrOuQd8OKMRB95ooD/oAIWRE23JD0E/Kdcdyml3UfQSwl3 QMpKqg1ilFFBpmDkzoq7MB3I+/D4Z+azot6n4dk1u9epx81qAI99fOk6N+OSdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548602; a=rsa-sha256; cv=none; b=eEcKnXAKjMsAE1dHt5X1VDEdZGmMYWXAfFSPgnw+tuMe9soXKFc6mYAMjiVSRexHs4zRQe 2s7HZapQSwqXF8/Fw6o/gFF5QDSOK+uFATWdTFqscFe5L4PnJlCWJpH2o52znQXWPUxqyf y7wbhYzdKy5EaGRWAX61EhbPuquXIU0hlqDChcHYBPmaCPkI9bHOHe9Y7uRShXIg/FBtvY sLjeNTyoHM7VpeLHhhJYx77XzHOX9ngtdSj/U9BYq5h/W3Qf2MGfkkjIx7CqwccyUx9J4d +eXkI3bNY2/Sf+2Zm7zhjC+pFbQZbtdRH2amptg7DMQRG/skC/WpplQ9sj7qzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYMG1BXsz12tl; Thu, 16 Feb 2023 11:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBugWM056580; Thu, 16 Feb 2023 11:56:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBugxw056579; Thu, 16 Feb 2023 11:56:42 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:42 GMT Message-Id: <202302161156.31GBugxw056579@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 9752a6c97383 - stable/13 - linuxkpi: Add `strscpy_pad()` to List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9752a6c97383d2b65a1e9f363e9ea6a7308c60dd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=9752a6c97383d2b65a1e9f363e9ea6a7308c60dd commit 9752a6c97383d2b65a1e9f363e9ea6a7308c60dd Author: Jean-Sébastien Pédron AuthorDate: 2023-02-14 23:46:13 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:22 +0000 linuxkpi: Add `strscpy_pad()` to It's the same as `strscpy()` except that it fills the rest of the destination buffer with zeroes if the source buffer is shorter. Reviewed by: manu Approved by: manu (cherry picked from commit b1a9e570fe2da0a43c41327d7ce21b27bf8257b8) --- sys/compat/linuxkpi/common/include/linux/string.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 65422cac629c..20c3729aaf12 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -207,6 +207,15 @@ strscpy(char* dst, const char* src, size_t len) return (-E2BIG); } +static inline ssize_t +strscpy_pad(char* dst, const char* src, size_t len) +{ + + bzero(dst, len); + + return (strscpy(dst, src, len)); +} + static inline void * memset32(uint32_t *b, uint32_t c, size_t len) { From nobody Thu Feb 16 11:56:43 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYMH4FSjz3q5xT; Thu, 16 Feb 2023 11:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYMH38kKz4ClY; Thu, 16 Feb 2023 11:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=05P1exlyOZVnrusW7jKyf2hf0yiMCTRI1Dus79oLjEE=; b=recYn3VbUFsE4RbjCHr2saE5EZoxRNaBv6gQXbht7ZM+P/owqjwiGQnYxajmfUV9++pxLv X6UGaF6YsoYJ83FJAqKMyJCE0In0ovUCB1iquuyT/jzs7z7phh3APH8aBazirbu2BygwYW /E2632VbuY3YnfklJU6sIeb9ItcfkvvcYg/fytu2uY6W3TiAZlweb7/zrd5vQ8jGBQaI9n PQpnLlj8++q2J/6gTolwZhRCmXT+w+kOgjR9014B4KfqxS6axzoiRvNBccytOCMqT9TLwQ LxSfydNfl+gP727ztJbrOz7Pw74qbvkmjkKGkqGSA/5oc9XrKs6DdzKouzJgWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=05P1exlyOZVnrusW7jKyf2hf0yiMCTRI1Dus79oLjEE=; b=TUmqyHBjmKEFsw8lJeiQ3cM9pGFo0dkziYncZL8TIZvGafrxZJsgQj4B6gx3uPwIBvJmxr tR3ldlyg9VXiFGD2Q9Ac02dnLY7ipZhXHYnyZqT0U2rNRhgXBCks+ytrPOpc84H2ctAiG8 4BciXL1bk1UdigZMCFduz34BiuB25+If9vurRMjK7qyU3eawAmGVS4f6pG3HjmdaWlI07H +H1tbb0XXeVyEh2QBtVcuKiiFOB3BvqcHMAvWdTHlmvqje2JXinlKKNu7LBI5rk/AvfVOX VbqdQIDNHFolTcTCV7HjXq1C5PRPhdrYcw60neMw6rYk/A/CiggIkzcLo0rLEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548603; a=rsa-sha256; cv=none; b=kg6S95yF2XOdy9wAqYAb/NtUIWuL0X6lGMpoZc2/br+y9KcFPqn325EtgmxB/XtnQQhsvd yvqU+T4r/lY4v+LiUPVF198tHRNVUrgcAR/sS/JC+2iNMCqDNdKrRUseme5RBcyoyHcJUe gyDUI6g+afhzOlzmP4xByVZoJfMTa98OjvaNgl7EMldW7HBGDLNVkzx2cvlpAT+9DYdf5d mr8YvuQR+ofbYYrnXIjTEjMIxXRMhs48EGF2yWnaJOb3saF0GuiaPpFUR240qOiiYzaMM1 htWQUN4s/Byi0sf16HeY4pI8PSgMZ85CL5N0zH/MPt8rj+S0ahAYIHVacJxddw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYMH21fpz12j4; Thu, 16 Feb 2023 11:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuhV6056610; Thu, 16 Feb 2023 11:56:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuhMl056609; Thu, 16 Feb 2023 11:56:43 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:43 GMT Message-Id: <202302161156.31GBuhMl056609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a88628ff0cca - stable/13 - linuxkpi: Define `totalram_pages()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a88628ff0ccae15eb8fb87a4b8f75c1f2766e4f4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a88628ff0ccae15eb8fb87a4b8f75c1f2766e4f4 commit a88628ff0ccae15eb8fb87a4b8f75c1f2766e4f4 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:52:43 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:22 +0000 linuxkpi: Define `totalram_pages()` It returns `physmem`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38531 (cherry picked from commit 53da54b936e646ba1216c0cc19582dad058ca5d0) --- sys/compat/linuxkpi/common/include/linux/mm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 9eb5ce7c5280..c1011b56fe24 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -340,6 +340,12 @@ unlock_page(struct page *page) extern int is_vmalloc_addr(const void *addr); void si_meminfo(struct sysinfo *si); +static inline unsigned long +totalram_pages(void) +{ + return ((unsigned long)physmem); +} + #define unmap_mapping_range(...) lkpi_unmap_mapping_range(__VA_ARGS__) void lkpi_unmap_mapping_range(void *obj, loff_t const holebegin __unused, loff_t const holelen, int even_cows __unused); From nobody Thu Feb 16 11:56:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHYMK0bN7z3q5tP; Thu, 16 Feb 2023 11:56:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHYMJ5KXTz4CgN; Thu, 16 Feb 2023 11:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NQAPBKJeHwN1NUHF0pwErjprXasPM+Adl1NjXLTAtrU=; b=CQEl+ztyTfnux/WHvgeC6Qxw2z0uGLVorlq4D0TxWbZeF4clXzgtVciDmsRZEYILzU4Kxz 2owsJv7Ov4w+wRinOV/8u6ip9FCjJiCtwYAM+ueqQ7SjP7dT9gdb16Zib5cgdlulkBoEXt Oa9hoFCGq2QbFoD09//os6rvChKOjx3rJAlUxXPM1T6xTTubVSizdXFmXBE9C5u5kb/2zu qdk6BGd2TiksTxlJTxMq7iyktenS/KOrASmqGTRZg9RuiHHRPOb3LeR/2z4pGuPBFeHzYZ ULW9GfIEI96pm1+8HChPqpA734xo4K1vU9qXUUyCfE/TWUCv+QHvIBgHtbGvKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NQAPBKJeHwN1NUHF0pwErjprXasPM+Adl1NjXLTAtrU=; b=LhC2sQzsY9Vh8RFZiLxKGh6xsxL9NnNnOD/SQbPnzV5lG7/gAfZ/4UDAIercT1CQE+l5Qq qnYnyW9xuDdu0vdNGGHPLuJXkIxohJjoEyAQKAg0MF6CT7f2B+zT9d0gSdCcJAkT0T2mVX OBh+LHVrLaznYztZs/SGUSpp4m4TjTYobspnQD0RW6SqsilzfARvb513ffH0IjRhD7q38e L0yk/4dswqm0mv2zUemvFNUT+3y32FB6wrjL1itfEtJcHVjgz8pCkn/61kWYSqXifGRFow NFKC+ShLE4SzAlSwmZPeH+sBuA0m4LBCq871gcCHNTR/pmKZPnqpCeie4SsI+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548604; a=rsa-sha256; cv=none; b=MInit+VpZkkbzKPI+UTJqLuUQcxl0zB+Lzmz2nifMEPq+BBbHk14A37/9FKgzHTrZ4A8Pj ZGbW9vAHXvRC8NJz2zw6tls6V0U0LBpIZWfsT8/1PgxRK84jQL2bt513tbhky4vSDo04+7 qTzsN6NF3xBPhkObybdxjRLl88edpA7Fcq/QvoIpwfz3IrNV2i6eXRxzVV9HVaEIsxtDPP q3pj5XYO4L+vejNavScVA6QnxYXrSrbZZ8kz7pLS2PF4JdsDE/4kkO2TWT7jjVPIMxaCjP B+6EXfUhbEdFTfk5CA/hbZdzueHVMDtHm7lEFnfW4IcrnnQkBJye21co94aVKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHYMJ3FrYz13HG; Thu, 16 Feb 2023 11:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GBuipT056645; Thu, 16 Feb 2023 11:56:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuiDd056644; Thu, 16 Feb 2023 11:56:44 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:44 GMT Message-Id: <202302161156.31GBuiDd056644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: e3068d2655e2 - stable/13 - Bump __FreeBSD_version to 1302501 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e3068d2655e2aea3e0b462a7298a68d344769ec6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e3068d2655e2aea3e0b462a7298a68d344769ec6 commit e3068d2655e2aea3e0b462a7298a68d344769ec6 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-16 10:27:43 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:22 +0000 Bump __FreeBSD_version to 1302501 ... after adding `totalram_pages()` to linuxkpi. This is needed by the DRM drivers. Approved by: manu --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 2fa6e9df4fca..9b33cfb5a062 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1302500 /* Master, propagated to newvers */ +#define __FreeBSD_version 1302501 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Thu Feb 16 16:22:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgFw5x2hz3r8Cl; Thu, 16 Feb 2023 16:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgFw5TMvz42sh; Thu, 16 Feb 2023 16:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676564548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6cfnFUr1wgcWfzSvSwDd8b1v8HrH5r49cgHsExLUhmk=; b=pMasxFXYYsW6OP8sVi/Oqb4duwBhsr7q3R6ptmRK6gvOgTjvCZPiCPZDAKffrbRtZ/Hmuw mnZZivjFQqV0oTWWlro5RET/Yy9lktA/7+zv4GNruX60nzsMmGd1GVks9irzW54riHfTCi hF8x9nz9F8et5k48tnM+6T4Z7vCUwAUBzGyOCjIFlJrpg2cSmxW82I3ucenYAl15aA4eZ4 Q/d64yR2Myv8ukizQkIpyMzDlaj50BKMZyeYGSS7mJdh9tbhrAsm8aOcxszd7QbyDLzSKj UlgLbPxEtya+MWx/Ok1W70a6/6j4bNvM1ajVa8FIWLPpjYNHTpbanECd+qknZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676564548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6cfnFUr1wgcWfzSvSwDd8b1v8HrH5r49cgHsExLUhmk=; b=fFNWC6gyJlOf2szw4ZIlfUkdOXdHSe7WbuJVWpzeToScZiTdufvZxLt5YTsfwEXYH7WH+E 9k5Lw06uBdLJFYFpkXFL3uO+wRkKBW+jVaggn5PJx3SdWQ7rXFd2LH/UC6Idt1vOIv6+gq ZA8SicLITUOTiTcOu28DKj8+yCRypR/ge2e0wdYnGSsJc1BpiCtbwU2rDXFBaDnqoefnna iq6gNKdTnucrCAH9EbR/6Z8J9fnBNLyWEhglTyZfd36v5dAMQHkc/e0L/ztBe/JyO1neVN ZcdcASLfzg27ozBsItZN9AMLij5N5H906jgLs36rk8drWq6+IV+PlrI2yBr2iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676564548; a=rsa-sha256; cv=none; b=u3E+bg4O3Mp7uIYWuro+c8hY+Fp1PtpZSzoZ1NJG8MPBlwJYZGMSB9OOdrGYD84CzSUY0J h5vjJxvTc5XBeHh2kuVTj58EL4hH2d911Khkmchc7eQ1x076pcnB8nRumpr8VhMakhOqVk IEgmyrJhYCIML0v0Cy0CQ1VltalCSHXW9ppq7F+9zYRuMb1myh7xbRrFxQc9x4aMC31jzd zMYKF2g4EfxJHxhoUK/qwfhKZzOfIn2GMGRyRaDVBHrTrZ8DkAOYBbUvF5VGQ4I/s3wJkx Pou4PnR+YR/rhiTW8/zT+yBDZbm6A4e4MTfABkwmzTOe+2QFS11Zeh6SigLC0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgFw4DT3z19Kd; Thu, 16 Feb 2023 16:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGMS1V042829; Thu, 16 Feb 2023 16:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGMS5s042828; Thu, 16 Feb 2023 16:22:28 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:22:28 GMT Message-Id: <202302161622.31GGMS5s042828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: beffd5c0c12f - stable/13 - Change "ctlstat -P"'s schema List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: beffd5c0c12f3f10c46512ed410e36e41e5a239d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=beffd5c0c12f3f10c46512ed410e36e41e5a239d commit beffd5c0c12f3f10c46512ed410e36e41e5a239d Author: Alan Somers AuthorDate: 2023-01-25 18:00:49 +0000 Commit: Alan Somers CommitDate: 2023-02-16 16:21:42 +0000 Change "ctlstat -P"'s schema It now reports stats separately for both ports and luns. Also, prohibit using both "-p" and "-P" at the same time. Sponsored by: Axcient Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D38500 (cherry picked from commit 4c163a5480809d0dc8b68dd00bf2ba7d882450f9) --- usr.bin/ctlstat/ctlstat.c | 226 +++++++++++++++++++++++++++++----------------- 1 file changed, 141 insertions(+), 85 deletions(-) diff --git a/usr.bin/ctlstat/ctlstat.c b/usr.bin/ctlstat/ctlstat.c index 50b9e3b1445b..d607ab9f4523 100644 --- a/usr.bin/ctlstat/ctlstat.c +++ b/usr.bin/ctlstat/ctlstat.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -137,6 +138,7 @@ struct ctlstat_context { struct cctl_portlist_data { int level; struct sbuf *cur_sb[32]; + int id; int lun; int ntargets; char *target; @@ -149,7 +151,8 @@ struct cctl_portlist_data { static void usage(int error); static int getstats(int fd, int *alloc_items, int *num_items, - struct ctl_io_stats **xstats, struct timespec *cur_time, int *time_valid); + struct ctl_io_stats **xstats, struct timespec *cur_time, int *time_valid, + bool ports); static int getcpu(struct ctl_cpu_stats *cpu_stats); static void compute_stats(struct ctl_io_stats *cur_stats, struct ctl_io_stats *prev_stats, @@ -168,7 +171,7 @@ usage(int error) static int getstats(int fd, int *alloc_items, int *num_items, struct ctl_io_stats **stats, - struct timespec *cur_time, int *flags) + struct timespec *cur_time, int *flags, bool ports) { struct ctl_get_io_stats get_stats; int more_space_count = 0; @@ -184,8 +187,8 @@ retry: memset(*stats, 0, get_stats.alloc_len); get_stats.stats = *stats; - if (ioctl(fd, (*flags & CTLSTAT_FLAG_PORTS) ? CTL_GET_PORT_STATS : - CTL_GET_LUN_STATS, &get_stats) == -1) + if (ioctl(fd, ports ? CTL_GET_PORT_STATS : CTL_GET_LUN_STATS, + &get_stats) == -1) err(1, "CTL_GET_*_STATS ioctl returned error"); switch (get_stats.status) { @@ -395,24 +398,33 @@ ctlstat_json(struct ctlstat_context *ctx) { printf("]}"); } -#define CTLSTAT_PROMETHEUS_LOOP(field) \ +#define CTLSTAT_PROMETHEUS_LOOP(field, collector) \ for (i = n = 0; i < ctx->cur_items; i++) { \ if (F_MASK(ctx) && bit_test(ctx->item_mask, \ (int)stats[i].item) == 0) \ continue; \ for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; iotype++) { \ - int lun = stats[i].item; \ - if (lun >= targdata.ntargets) \ - errx(1, "LUN %u out of range", lun); \ - printf("iscsi_target_" #field "{" \ - "lun=\"%u\",target=\"%s\",type=\"%s\"} %" PRIu64 \ + int idx = stats[i].item; \ + /* \ + * Note that Prometheus considers a label value of "" \ + * to be the same as no label at all \ + */ \ + const char *target = ""; \ + if (strcmp(collector, "port") == 0 && \ + targdata.targets[idx] != NULL) \ + { \ + target = targdata.targets[idx]; \ + } \ + printf("iscsi_%s_" #field "{" \ + "%s=\"%u\",target=\"%s\",type=\"%s\"} %" PRIu64 \ "\n", \ - lun, targdata.targets[lun], iotypes[iotype], \ + collector, collector, \ + idx, target, iotypes[iotype], \ stats[i].field[iotype]); \ } \ } \ -#define CTLSTAT_PROMETHEUS_TIMELOOP(field) \ +#define CTLSTAT_PROMETHEUS_TIMELOOP(field, collector) \ for (i = n = 0; i < ctx->cur_items; i++) { \ if (F_MASK(ctx) && bit_test(ctx->item_mask, \ (int)stats[i].item) == 0) \ @@ -420,20 +432,29 @@ ctlstat_json(struct ctlstat_context *ctx) { for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; iotype++) { \ uint64_t us; \ struct timespec ts; \ - int lun = stats[i].item; \ - if (lun >= targdata.ntargets) \ - errx(1, "LUN %u out of range", lun); \ + int idx = stats[i].item; \ + /* \ + * Note that Prometheus considers a label value of "" \ + * to be the same as no label at all \ + */ \ + const char *target = ""; \ + if (strcmp(collector, "port") == 0 && \ + targdata.targets[idx] != NULL) \ + { \ + target = targdata.targets[idx]; \ + } \ bintime2timespec(&stats[i].field[iotype], &ts); \ us = ts.tv_sec * 1000000 + ts.tv_nsec / 1000; \ - printf("iscsi_target_" #field "{" \ - "lun=\"%u\",target=\"%s\",type=\"%s\"} %" PRIu64 \ + printf("iscsi_%s_" #field "{" \ + "%s=\"%u\",target=\"%s\",type=\"%s\"} %" PRIu64 \ "\n", \ - lun, targdata.targets[lun], iotypes[iotype], us); \ + collector, collector, \ + idx, target, iotypes[iotype], us); \ } \ } \ static void -cctl_start_pelement(void *user_data, const char *name, const char **attr __unused) +cctl_start_pelement(void *user_data, const char *name, const char **attr) { struct cctl_portlist_data* targdata = user_data; @@ -448,9 +469,24 @@ cctl_start_pelement(void *user_data, const char *name, const char **attr __unuse err(1, "%s: Unable to allocate sbuf", __func__); if (strcmp(name, "targ_port") == 0) { + int i = 0; + targdata->lun = -1; + targdata->id = -1; free(targdata->target); targdata->target = NULL; + while (attr[i]) { + if (strcmp(attr[i], "id") == 0) { + /* + * Well-formed XML always pairs keys with + * values in attr + */ + assert(attr[i + 1]); + targdata->id = atoi(attr[i + 1]); + } + i += 2; + } + } } @@ -486,25 +522,22 @@ cctl_end_pelement(void *user_data, const char *name) if (strcmp(name, "target") == 0) { free(targdata->target); targdata->target = str; - } else if (strcmp(name, "lun") == 0) { - targdata->lun = atoi(str); - free(str); } else if (strcmp(name, "targ_port") == 0) { - if (targdata->lun >= 0 && targdata->target != NULL) { - if (targdata->lun >= targdata->ntargets) { + if (targdata->id >= 0 && targdata->target != NULL) { + if (targdata->id >= targdata->ntargets) { /* * This can happen for example if there are - * holes in CTL's lunlist. + * targets with no LUNs. */ targdata->ntargets = MAX(targdata->ntargets * 2, - targdata->lun + 1); + targdata->id + 1); size_t newsize = targdata->ntargets * sizeof(char*); targdata->targets = rallocx(targdata->targets, newsize, MALLOCX_ZERO); } - free(targdata->targets[targdata->lun]); - targdata->targets[targdata->lun] = targdata->target; + free(targdata->targets[targdata->id]); + targdata->targets[targdata->id] = targdata->target; targdata->target = NULL; } free(str); @@ -514,7 +547,7 @@ cctl_end_pelement(void *user_data, const char *name) } static void -ctlstat_prometheus(int fd, struct ctlstat_context *ctx) { +ctlstat_prometheus(int fd, struct ctlstat_context *ctx, bool ports) { struct ctl_io_stats *stats = ctx->cur_stats; struct ctl_lun_list list; struct cctl_portlist_data targdata; @@ -522,6 +555,7 @@ ctlstat_prometheus(int fd, struct ctlstat_context *ctx) { char *port_str = NULL; int iotype, i, n, retval; int port_len = 4096; + const char *collector; bzero(&targdata, sizeof(targdata)); targdata.ntargets = ctx->cur_items; @@ -556,30 +590,23 @@ retry: } XML_ParserFree(parser); - /* - * NB: Some clients will print a warning if we don't set Content-Length, - * but they still work. And the data still gets into Prometheus. - */ - printf("HTTP/1.1 200 OK\r\n" - "Connection: close\r\n" - "Content-Type: text/plain; version=0.0.4\r\n" - "\r\n"); - - printf("# HELP iscsi_target_bytes Number of bytes\n" - "# TYPE iscsi_target_bytes counter\n"); - CTLSTAT_PROMETHEUS_LOOP(bytes); - printf("# HELP iscsi_target_dmas Number of DMA\n" - "# TYPE iscsi_target_dmas counter\n"); - CTLSTAT_PROMETHEUS_LOOP(dmas); - printf("# HELP iscsi_target_operations Number of operations\n" - "# TYPE iscsi_target_operations counter\n"); - CTLSTAT_PROMETHEUS_LOOP(operations); - printf("# HELP iscsi_target_time Cumulative operation time in us\n" - "# TYPE iscsi_target_time counter\n"); - CTLSTAT_PROMETHEUS_TIMELOOP(time); - printf("# HELP iscsi_target_dma_time Cumulative DMA time in us\n" - "# TYPE iscsi_target_dma_time counter\n"); - CTLSTAT_PROMETHEUS_TIMELOOP(dma_time); + collector = ports ? "port" : "lun"; + + printf("# HELP iscsi_%s_bytes Number of bytes\n" + "# TYPE iscsi_%s_bytes counter\n", collector, collector); + CTLSTAT_PROMETHEUS_LOOP(bytes, collector); + printf("# HELP iscsi_%s_dmas Number of DMA\n" + "# TYPE iscsi_%s_dmas counter\n", collector, collector); + CTLSTAT_PROMETHEUS_LOOP(dmas, collector); + printf("# HELP iscsi_%s_operations Number of operations\n" + "# TYPE iscsi_%s_operations counter\n", collector, collector); + CTLSTAT_PROMETHEUS_LOOP(operations, collector); + printf("# HELP iscsi_%s_time Cumulative operation time in us\n" + "# TYPE iscsi_%s_time counter\n", collector, collector); + CTLSTAT_PROMETHEUS_TIMELOOP(time, collector); + printf("# HELP iscsi_%s_dma_time Cumulative DMA time in us\n" + "# TYPE iscsi_%s_dma_time counter\n", collector, collector); + CTLSTAT_PROMETHEUS_TIMELOOP(dma_time, collector); for (i = 0; i < targdata.ntargets; i++) free(targdata.targets[i]); @@ -779,6 +806,45 @@ ctlstat_standard(struct ctlstat_context *ctx) { } } +static void +get_and_print_stats(int fd, struct ctlstat_context *ctx, bool ports) +{ + struct ctl_io_stats *tmp_stats; + int c; + + tmp_stats = ctx->prev_stats; + ctx->prev_stats = ctx->cur_stats; + ctx->cur_stats = tmp_stats; + c = ctx->prev_alloc; + ctx->prev_alloc = ctx->cur_alloc; + ctx->cur_alloc = c; + c = ctx->prev_items; + ctx->prev_items = ctx->cur_items; + ctx->cur_items = c; + ctx->prev_time = ctx->cur_time; + ctx->prev_cpu = ctx->cur_cpu; + if (getstats(fd, &ctx->cur_alloc, &ctx->cur_items, + &ctx->cur_stats, &ctx->cur_time, &ctx->flags, ports) != 0) + errx(1, "error returned from getstats()"); + + switch(ctx->mode) { + case CTLSTAT_MODE_STANDARD: + ctlstat_standard(ctx); + break; + case CTLSTAT_MODE_DUMP: + ctlstat_dump(ctx); + break; + case CTLSTAT_MODE_JSON: + ctlstat_json(ctx); + break; + case CTLSTAT_MODE_PROMETHEUS: + ctlstat_prometheus(fd, ctx, ports); + break; + default: + break; + } +} + int main(int argc, char **argv) { @@ -787,7 +853,6 @@ main(int argc, char **argv) int fd, retval; size_t size; struct ctlstat_context ctx; - struct ctl_io_stats *tmp_stats; /* default values */ retval = 0; @@ -890,10 +955,11 @@ main(int argc, char **argv) if (ctx.mode == CTLSTAT_MODE_PROMETHEUS) { if ((count != -1) || (waittime != 1) || + (F_PORTS(&ctx)) || /* NB: -P could be compatible with -t in the future */ (ctx.flags & CTLSTAT_FLAG_TOTALS)) { - errx(1, "Option -P is exclusive with -c, -w, and -t"); + errx(1, "Option -P is exclusive with -p, -c, -w, and -t"); } count = 1; } @@ -908,37 +974,27 @@ main(int argc, char **argv) if ((fd = open(CTL_DEFAULT_DEV, O_RDWR)) == -1) err(1, "cannot open %s", CTL_DEFAULT_DEV); + if (ctx.mode == CTLSTAT_MODE_PROMETHEUS) { + /* + * NB: Some clients will print a warning if we don't set + * Content-Length, but they still work. And the data still + * gets into Prometheus. + */ + printf("HTTP/1.1 200 OK\r\n" + "Connection: close\r\n" + "Content-Type: text/plain; version=0.0.4\r\n" + "\r\n"); + } + for (;count != 0;) { - tmp_stats = ctx.prev_stats; - ctx.prev_stats = ctx.cur_stats; - ctx.cur_stats = tmp_stats; - c = ctx.prev_alloc; - ctx.prev_alloc = ctx.cur_alloc; - ctx.cur_alloc = c; - c = ctx.prev_items; - ctx.prev_items = ctx.cur_items; - ctx.cur_items = c; - ctx.prev_time = ctx.cur_time; - ctx.prev_cpu = ctx.cur_cpu; - if (getstats(fd, &ctx.cur_alloc, &ctx.cur_items, - &ctx.cur_stats, &ctx.cur_time, &ctx.flags) != 0) - errx(1, "error returned from getstats()"); - - switch(ctx.mode) { - case CTLSTAT_MODE_STANDARD: - ctlstat_standard(&ctx); - break; - case CTLSTAT_MODE_DUMP: - ctlstat_dump(&ctx); - break; - case CTLSTAT_MODE_JSON: - ctlstat_json(&ctx); - break; - case CTLSTAT_MODE_PROMETHEUS: - ctlstat_prometheus(fd, &ctx); - break; - default: - break; + bool ports; + + if (ctx.mode == CTLSTAT_MODE_PROMETHEUS) { + get_and_print_stats(fd, &ctx, false); + get_and_print_stats(fd, &ctx, true); + } else { + ports = ctx.flags & CTLSTAT_FLAG_PORTS; + get_and_print_stats(fd, &ctx, ports); } fprintf(stdout, "\n"); From nobody Thu Feb 16 16:54:36 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz04S58z3rB95; Thu, 16 Feb 2023 16:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz03pR1z45hX; Thu, 16 Feb 2023 16:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=skX7rRxM4MennM8KJzGD4HwWDi1wN4s7f/2SZc/7Zl8=; b=Q//ZyxzRa6qQDx8LN+TRYKs7wyyIOu3NGIL2jXILacWm47c3HkTHGl1O/F50zfgz1eKNWr oW7Ev2rdLCrooFRAHSBjH81jt0i1jibzu9gfB9vVxn+cShdE7QxDKwAROW+i640F/68RPV eCJQ2Cuh6t6QmD/c/3/OtLZbCkTHf3hc/GObTyl8TInkQPWQqg27eTG2BUWH6rBj17g/7g PftKw2wKtzoWqFhnnMpU0t7O+1CB3oPVfnaP2h8VyuVRgZ7V4GnlEVH7uCeScJv1VALWnX Exvre+klrABD9q+O8/QRjKNupYJyhXkuS6XDrMyN4sUY/qz5CsNhOSmDlyG6qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=skX7rRxM4MennM8KJzGD4HwWDi1wN4s7f/2SZc/7Zl8=; b=baKa7UXIKmbRLY0KFgcJtxljdrzHTlFbOVunWU7n5cEEAU99Ssi8jojKpAMEyEns46XVxZ jNwqKVLa3FiSSMYtH3foX5//ZJdzvXNHld2/1uC7lIGhQuirzRKqsQ7bgP/OYtzo3Wo6ci Ohtf8Q143vZK2AGA0s5t4RuhBZ9Pfxqts21gP4QLD6pHecWr1fR8+gTdxjpIk6GGv+jtRm dyJHyO7RwDITIGqCY59d30Bba+cclSFcsHx01x0YXGt6NWQBtDAqMYNgUik2ooR8kp5Ecf oaY2y5BYxirrurHzoAe5vTA24HVUTvj9kpUIpN06/2omC9IglKqX5Oq7LsaPyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566476; a=rsa-sha256; cv=none; b=D+hkjJ9VVe1Dz1+ng4gFGP/0ev5a835tJHYQNYARGhNSd3UgBjaAHYjwZrYDmI1xWxISK2 jMLdC0W+vDMmPOynjNEvmOHRzLvncxFhn7NMZjojjv5DS+INzyByz9jo5NzA/4NDkta79v SHail7+zs54kVKaX+FcoEaL8hVeVl/CGYQ1LlTHOkdP3Yc/0tgQy99A0vkZEtDd/E1aF1M +W5k1r7dgDncrB8IOq++zQLreSYVS4a0wzwcXX0vC9C+aeu60FuJyuAN4EhZTbNKiXdlVT NUOVz6DAqV8vNVWhXuRSmQo05lYig49vJ6iLRqBXlKnS47Bb4AmE2e/ul9o1/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 4PHgz02ZFFz19w2; Thu, 16 Feb 2023 16:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsajC085444; Thu, 16 Feb 2023 16:54:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsaWU085443; Thu, 16 Feb 2023 16:54:36 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:36 GMT Message-Id: <202302161654.31GGsaWU085443@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7324f2b89f2c - stable/13 - usb: Add Huawei 4G Modem devices (2022) to usbdevs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7324f2b89f2cacecb0ce73e06297205891e7929a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7324f2b89f2cacecb0ce73e06297205891e7929a commit 7324f2b89f2cacecb0ce73e06297205891e7929a Author: Michael Paepcke AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:32 +0000 usb: Add Huawei 4G Modem devices (2022) to usbdevs ADD [sys/dev/usb/usbdevs] - add new Huawei 4G E3372_NCM 0x1505 - add new Huawei 4G E3372v153_NCM 0x155f - add new Huawei 4G E5573Cs322_NCM 0x155e - add new Huawei 4G E5573Cs322_ECM 0x14db - add new Huawei 4G E5573Cs322_ACM 0x1442 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/633 (cherry picked from commit 2c6b88da7174b02c98b87cd4b7251ccf9d7acbae) --- sys/dev/usb/usbdevs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 6960ac8a33e2..01612662fd4d 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2564,6 +2564,13 @@ product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E173 0x1c05 3G modem product HUAWEI E173_INIT 0x1c0b 3G modem initial product HUAWEI E3272 0x1c1e LTE modem +product HUAWEI E3372_INIT 0x1f01 LTE modem initial +product HUAWEI E3372_NCM 0x1506 LTE modem in NCM mode +product HUAWEI E3372v153_INIT 0x14fe LTE modem initial +product HUAWEI E3372v153_NCM 0x155f LTE modem in NCM mode +product HUAWEI E5573Cs322_NCM 0x155e LTE AP modem NCM mode +product HUAWEI E5573Cs322_ECM 0x14db LTE AP modem ECM mode +product HUAWEI E5573Cs322_ACM 0x1442 LTE AP modem ACM mode /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g From nobody Thu Feb 16 16:54:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz14Yxmz3r9nQ; Thu, 16 Feb 2023 16:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz13ZJJz45qJ; Thu, 16 Feb 2023 16:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tam1Sdr2VMSIeSyHmuTrQBV4CwBFAYmr/vOdMZiHCJA=; b=UMyDg/fKAS0aHHXuq6fUUx76oKmY+sEJBufdPabU0e2GCewLMzXLIkyPHZjXnm0d50lp0P 9xtIKPfztUflaHlv6pqqIhpgpELDxX5S9xmF2w8YsDyYFj3pjntqCjSHQMhhjJ7wONlDND RUCxUfjecxSGCCD7z9/buUXKpK25HlX+6jKVDo5OIoE+b/4MsBq/vmiMGAApxfbZzpf2xf nCkg1aRlY3foCJHQNKc6k1/vrgSDdO7YWyMddUzQyvHczpmBgpzKQOjJ9YjSJhGpod4/i7 FrQa6QTqmySNBc0WHgS933h2cppH9bwNF5Swmcd/TBjaxkDNugXLbUoVCqlgpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tam1Sdr2VMSIeSyHmuTrQBV4CwBFAYmr/vOdMZiHCJA=; b=mAHp4cGVU570KPOzYfPolCyn3YgvDITWCtdWdpScQRHG/CsuV0shAEbgCjSVMdOhS4F+vl 1K2F5zA3u1K0ikn/RQvtydv4wuqD3TCkWYydFw68Nip/dkpGQit2V5P5ARcwXG6l5CiwB8 wFNzpk2lsR9DMnyeGu/TQFwFaqi0vi7rhZONEcuPBprfIQDgsaA8qeOFlkSSqrVNVIRUHR EuFunESqCp5RwwleCZWxzCXaVEy0pywPFyO9LgVRgIvTVW1llB9HENznwVM0E+HOd2DpK4 Qnz70TkY+NsHDEh70UolTdkMtZt3nEVTTVCJsq+P32xhCrf57Xwn9kQfJljR1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566477; a=rsa-sha256; cv=none; b=JA/nrnC0+4MxfVtaQLV21iol7IHidh/ZpnycWfJswxDLFxy/edFo32NY7VE0Ri169rkea/ soFPhpXz2Ot0qYHctk/wKDKN8Gkaf7fb29lpJ57hpUsyb2mw3E002xEZis6ZEb9M5M8S1L tW7CitGWTywBcfFXgyaX/uf6ja/3Gfx+hg1kM4jGxWMacfvVlVw5gqVRpyDCF9vqRTdb8L xvxHqsLjGIySe9/6vWI3xQGNKDw9SJ9skDEnOJvwvexHF29xiMAbZA+XuHLyb6F+WQUQmO 58rVl2RfgkCCIq4PqYwVBPMOH/QSmYab2QiiW4XYjFvTlw/LBqN/DxUu/EfzsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgz12gbyz19yq; Thu, 16 Feb 2023 16:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsbJA085468; Thu, 16 Feb 2023 16:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsbSc085467; Thu, 16 Feb 2023 16:54:37 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:37 GMT Message-Id: <202302161654.31GGsbSc085467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 1d31c745cfe6 - stable/13 - usb: add new scsi_huawei eject3 & eject4 quirks List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1d31c745cfe60d7a81fd91efdcfecd0405888af2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d31c745cfe60d7a81fd91efdcfecd0405888af2 commit 1d31c745cfe60d7a81fd91efdcfecd0405888af2 Author: Michael Paepcke AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:34 +0000 usb: add new scsi_huawei eject3 & eject4 quirks Add new scsi_huawei eject3 & eject4 mode driver to usb quirks Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/633 (cherry picked from commit 64fd867f8cdbad24d7af678ee17bd3893832b905) --- sys/dev/usb/quirk/usb_quirk.c | 2 ++ sys/dev/usb/quirk/usb_quirk.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 3dd2aa735fb3..bb02b90ba4bd 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -696,6 +696,8 @@ static const char *usb_quirk_str[USB_QUIRK_MAX] = { [UQ_MSC_EJECT_SAEL_M460] = "UQ_MSC_EJECT_SAEL_M460", [UQ_MSC_EJECT_HUAWEISCSI] = "UQ_MSC_EJECT_HUAWEISCSI", [UQ_MSC_EJECT_HUAWEISCSI2] = "UQ_MSC_EJECT_HUAWEISCSI2", + [UQ_MSC_EJECT_HUAWEISCSI3] = "UQ_MSC_EJECT_HUAWEISCSI3", + [UQ_MSC_EJECT_HUAWEISCSI4] = "UQ_MSC_EJECT_HUAWEISCSI4", [UQ_MSC_EJECT_TCT] = "UQ_MSC_EJECT_TCT", [UQ_BAD_MIDI] = "UQ_BAD_MIDI", [UQ_AU_VENDOR_CLASS] = "UQ_AU_VENDOR_CLASS", diff --git a/sys/dev/usb/quirk/usb_quirk.h b/sys/dev/usb/quirk/usb_quirk.h index 755465576684..399c8d3f65b4 100644 --- a/sys/dev/usb/quirk/usb_quirk.h +++ b/sys/dev/usb/quirk/usb_quirk.h @@ -108,6 +108,8 @@ enum { UQ_MSC_EJECT_SAEL_M460, /* ejects after Sael USB commands */ UQ_MSC_EJECT_HUAWEISCSI, /* ejects after Huawei SCSI command */ UQ_MSC_EJECT_HUAWEISCSI2, /* ejects after Huawei SCSI 2 command */ + UQ_MSC_EJECT_HUAWEISCSI3, /* ejects after Huawei SCSI 3 command */ + UQ_MSC_EJECT_HUAWEISCSI4, /* ejects after Huawei SCSI 4 command */ UQ_MSC_EJECT_TCT, /* ejects after TCT SCSI command */ UQ_BAD_MIDI, /* device claims MIDI class, but isn't */ From nobody Thu Feb 16 16:54:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz25HkYz3r9qw; Thu, 16 Feb 2023 16:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz24cqwz45j5; Thu, 16 Feb 2023 16:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TBYwRyVKf8LxNdlRSUPKsVnjBvvysckXWa5HoYhvBvI=; b=SBBYysAe++dT2YC+NJxaAUhyjx2K86cMo6lXiO0P10lJ1Vho3C+TtCHnQAzFQIuypfVAXa iTPdf8kWKJ5sexHXAZ8xmSGU9lVSRtf6+7v0ZviPllufsZaP6NI5h9J6e8fDoF90Zod7aS vAPvdoJg9uBNQeg50p9HSCZHBPoxhcwE8tM1h/kxWkO2jnlbkfPG2jxTCDxbOMEbA3nJvR YgdmIygNJM8Fzw8TQ6mogpxB2bhGnAFgW+8nkrVNECaM1dy7hxMj3V7abngd1wGjYT14tr Z7hR7J/3cfuz/7lHHjvPuCWXAJK+2NZQF1wtfass/15P1fq/ukliaEdJzBD7GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TBYwRyVKf8LxNdlRSUPKsVnjBvvysckXWa5HoYhvBvI=; b=v/tvVJSPW95idnKnWbs+plsqHWpz82EFtY1pk0rvgk1fugDw5rM11je7X/vSo7kY0ePY90 FNR9tybxzUsb5FGHRRMzpIocTizWFjxz3pz1CgBDMd8Qhg0fJiicwLXMnjVWy8hLQtNDtC yKnbLRkNBxqV3s2g36+9U8UvrEBNDEGOK5HRWkG4oYTZm2Dsnl8UIPvJ2GQ73WTcN+R9+b PTb1wARABShpgqqxho0j+r98W7n8AOEQt1zs+ZVRYxXs7NRXASHpSRYIhTm6FftOybTQlu +CjcQlXglV9K3vmjDU8tFwvj7ASp5A30B8WcLwjRlL5ZgFoI5alvrBrieQNsfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566478; a=rsa-sha256; cv=none; b=oAn6XkquzQyXtxc8/zWQWhK3sm0mZH5zv6o28LNYJ8YvnYxUCclN0q5p8VCUiDcjc2pvmU DfOiCsxW/rJrqcxzAZN3FSuoSAoJfxcQqC4bfbbLvRvnDudkBrHe0eTfKfHkW3diTviydh fyrr5wT/TIHxnozo3tXLjk5GFXarPFrKLrLeRPwGXE0JpS9e6zA/RAU3kij+jX6hdPG6+2 wgViidONbAcOF028ADl6SUpbPaQ8OKBeuA/4DYmrdYBNnd/TvgC7QJYOF26gEaM0Qjo/16 IfFQlWMsDtgnNVI2WbX7x5x6Q/Vz6qSISAhX+l2k6Ok2LkszrcHyiMLc8QOAUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgz23Xpnz19yr; Thu, 16 Feb 2023 16:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGscb0085492; Thu, 16 Feb 2023 16:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGscmF085491; Thu, 16 Feb 2023 16:54:38 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:38 GMT Message-Id: <202302161654.31GGscmF085491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 356e03eace32 - stable/13 - usb: add new scsi_huawei eject3 & eject4 sequences List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 356e03eace327e3b255834d4a1e6a7278663ce85 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=356e03eace327e3b255834d4a1e6a7278663ce85 commit 356e03eace327e3b255834d4a1e6a7278663ce85 Author: Michael Paepcke AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:37 +0000 usb: add new scsi_huawei eject3 & eject4 sequences Add new Huawei eject3 and eject4 command sequences. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/633 (cherry picked from commit 7d4b2b5834dba66732596d68d7f817d18affb67f) --- sys/dev/usb/usb_msctest.c | 16 ++++++++++++++++ sys/dev/usb/usb_msctest.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index 5dcf8d151119..338c17983d92 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -107,6 +107,12 @@ static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, static uint8_t scsi_huawei_eject2[] = { 0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_huawei_eject3[] = { 0x11, 0x06, 0x20, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_huawei_eject4[] = { 0x11, 0x06, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_tct_eject[] = { 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 }; static uint8_t scsi_sync_cache[] = { 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -1005,6 +1011,16 @@ usb_msc_eject(struct usb_device *udev, uint8_t iface_index, int method) &scsi_huawei_eject2, sizeof(scsi_huawei_eject2), USB_MS_HZ); break; + case MSC_EJECT_HUAWEI3: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_huawei_eject3, sizeof(scsi_huawei_eject3), + USB_MS_HZ); + break; + case MSC_EJECT_HUAWEI4: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_huawei_eject4, sizeof(scsi_huawei_eject4), + USB_MS_HZ); + break; case MSC_EJECT_TCT: /* * TCTMobile needs DIR_IN flag. To get it, we diff --git a/sys/dev/usb/usb_msctest.h b/sys/dev/usb/usb_msctest.h index ba4e094bab60..08a7de1b5b9c 100644 --- a/sys/dev/usb/usb_msctest.h +++ b/sys/dev/usb/usb_msctest.h @@ -36,6 +36,8 @@ enum { MSC_EJECT_CMOTECH, MSC_EJECT_HUAWEI, MSC_EJECT_HUAWEI2, + MSC_EJECT_HUAWEI3, + MSC_EJECT_HUAWEI4, MSC_EJECT_TCT, }; From nobody Thu Feb 16 16:54:39 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz3685kz3rB9G; Thu, 16 Feb 2023 16:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz35TpSz45wb; Thu, 16 Feb 2023 16:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BsqjoaSq2Vb6domIzfg8RHVJsRT4M1ZuVF/XiFUF9Fc=; b=WNrPbCSlE7mLrxII3kDDhyC6VI1pIzTemAaFjElWCtX0rCQydkGIE9fQrDXUa5iHAoWnT1 IDvfEdMVhDgg6+PV8iie5zAoo5cF63n/V8KI0DyZSh9RhBIUYYWnXj2eIZYi5gIC3fXnXK ada4ffr+V+JOcq5RL+3QIIvVYNrPliDP16ijWX40OfD3yaS9PX+nWkKh20R6AZ8/h0/Mib 9VPwpbCOdxYfRHGjB9gKWbaRPSrprUo38HrVYUmMxhA8+aQaQYDhhXt7GhWh5z94ltiEjD NDxhGH4IuepsLgt7g1Q9F0LAiHD3o7+Ux3RQBK85XHBJLhFA+exMRhbqRRm/Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BsqjoaSq2Vb6domIzfg8RHVJsRT4M1ZuVF/XiFUF9Fc=; b=jSiPT5/jEZtU4fsJ3IcQ4QVfaq16Mpp3A+TA/yPww0bhlBsb1quw8dCG7bTbacl9RAGrcf uwrNo7a4XHDM2R5jU9rdXz+7Rb+3WkFdywrVQQp3B5iNfyk2vjZpyH6FAH5KktBDtGU/dB Lp+cqP4Gv77W+IW4oDZn+RErhwfkC4is7GiXEWwb+wudugqC32JrA1d4p+DkRR6gonNGX3 ExDkcJA7w+EwByj8FH/Aw7o+8ieBkmMnl8X50NkDeOL7gn/YTvYIP5vJ2UvC4NcNNe98jh lnVfZUfReuPuMEJ8Vo5+W3aCXU0fEEDffaLLh16gLZtwhYan2guqA2PsvKjs5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566479; a=rsa-sha256; cv=none; b=jv+IXZMUYr7oTYxJfBjKlO4ieUE2OilBwebGWjJfxNrJ2PXzVNPJ5zAUKWI+2OkIIkNQhu GOYphSSfnSiK1ZxaZqURUGTYClSOa24mGwZ/mp4qYNDWSSjPRkz5hnGLeUvUWdfulQuqEb Uloxgqrz20SoHBFRHVKDEi7uo0NKPq/B+MZT7+TndG1Dj0odMz+rh0g/T+tUxM2XF5A5wp xaaKmZTSwXi9kDukU5YY/cd4ONhK9z1I9G9L3YMjUdt7XDbP1T/+909BYfQNbaANHjlD9c 3e8TYPAITgBsFIGkqsETON7nKLcuwY67ACc6vucFdgl0S1zMJEY30rhnvqpjNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgz34Y44z1BBJ; Thu, 16 Feb 2023 16:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsdcf085517; Thu, 16 Feb 2023 16:54:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsdPn085516; Thu, 16 Feb 2023 16:54:39 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:39 GMT Message-Id: <202302161654.31GGsdPn085516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e20b6a8ec68e - stable/13 - usb: add new scsi_huawei eject3 & eject4 driver support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e20b6a8ec68e3f6805a5281d2691c2ac97f6bb93 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e20b6a8ec68e3f6805a5281d2691c2ac97f6bb93 commit e20b6a8ec68e3f6805a5281d2691c2ac97f6bb93 Author: Michael Paepcke AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:39 +0000 usb: add new scsi_huawei eject3 & eject4 driver support Add initialization for new Huawei 4G E3372_NCM, E3372v153_NCM, E5573Cs322_NCM, E5573Cs322_ECM, and E5573Cs322_ACM. Remove now-obsolete Huawei 3G E3131 init sequence. These devices are obsolete, share IDs with new devices and the 3G networks are shutdown. These old devices work correctly via the 4G code while still allowing the shared IDs to work differently for the new devices. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/633 (cherry picked from commit 1997d3a4a9f20a846cf762306fd5193526a1d603) --- sys/dev/usb/net/if_cdce.c | 2 ++ sys/dev/usb/serial/u3g.c | 24 ++++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index f3c73567b7ce..0b6445e5908d 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -266,6 +266,8 @@ static int cdce_driver_loaded(struct module *, int, void *); static const STRUCT_USB_HOST_ID cdce_switch_devs[] = { {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3272_INIT, MSC_EJECT_HUAWEI2)}, + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3372v153_INIT, MSC_EJECT_HUAWEI2)}, + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3372_INIT, MSC_EJECT_HUAWEI3)}, }; static const STRUCT_USB_HOST_ID cdce_host_devs[] = { diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 0b020af53b71..0e20f42feb39 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -89,7 +89,9 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RWTUN, #define U3GINIT_SAEL_M460 8 /* Requires vendor init */ #define U3GINIT_HUAWEISCSI 9 /* Requires Huawei SCSI init command */ #define U3GINIT_HUAWEISCSI2 10 /* Requires Huawei SCSI init command (2) */ -#define U3GINIT_TCT 11 /* Requires TCT Mobile init command */ +#define U3GINIT_HUAWEISCSI3 11 /* Requires Huawei SCSI init command (3) */ +#define U3GINIT_HUAWEISCSI4 12 /* Requires Huawei SCSI init command (4) */ +#define U3GINIT_TCT 13 /* Requires TCT Mobile init command */ enum { U3G_BULK_WR, @@ -319,8 +321,6 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(HUAWEI, E143F, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E173, 0), U3G_DEV(HUAWEI, E173_INIT, U3GINIT_HUAWEISCSI), - U3G_DEV(HUAWEI, E3131, 0), - U3G_DEV(HUAWEI, E3131_INIT, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, E180V, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), @@ -343,6 +343,12 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(HUAWEI, ETS2055, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E3272_INIT, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, E3272, 0), + U3G_DEV(HUAWEI, E3372_INIT, U3GINIT_HUAWEISCSI3), + U3G_DEV(HUAWEI, E3372v153_INIT, U3GINIT_HUAWEISCSI2), + U3G_DEV(HUAWEI, E3372v153_NCM, 0), + U3G_DEV(HUAWEI, E5573Cs322_NCM, 0), + U3G_DEV(HUAWEI, E5573Cs322_ECM, 0), + U3G_DEV(HUAWEI, E5573Cs322_ACM, 0), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), @@ -814,6 +820,10 @@ u3g_test_autoinst(void *arg, struct usb_device *udev, method = U3GINIT_HUAWEISCSI; else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI2)) method = U3GINIT_HUAWEISCSI2; + else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI3)) + method = U3GINIT_HUAWEISCSI3; + else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI4)) + method = U3GINIT_HUAWEISCSI4; else if (usb_test_quirk(uaa, UQ_MSC_EJECT_TCT)) method = U3GINIT_TCT; else if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa) == 0) @@ -837,6 +847,12 @@ u3g_test_autoinst(void *arg, struct usb_device *udev, case U3GINIT_HUAWEISCSI2: error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI2); break; + case U3GINIT_HUAWEISCSI3: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI3); + break; + case U3GINIT_HUAWEISCSI4: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI4); + break; case U3GINIT_SCSIEJECT: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); break; @@ -887,7 +903,7 @@ u3g_driver_loaded(struct module *mod, int what, void *arg) default: return (EOPNOTSUPP); } - return (0); + return (0); } static int From nobody Thu Feb 16 16:54:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz501cbz3rB9N; Thu, 16 Feb 2023 16:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz46PJLz460s; Thu, 16 Feb 2023 16:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cuD0j6/rjAKKZO4HsKJ0aLUswxQJcxWHXF3dhHdM5Cs=; b=wlFtxKklfeEovZq5Kg1QTUNCP8HiuTV+BLqSzg74xbvdnMQKc3feasGU8xY+P0Mx7G9ScV xa6SwWCyN88ThfPkrAGcPI/fCtu4lpoxNgT14jcMbENAChv9rQQw0fn5zut5YDSneFaoE7 f7gHIvPhLwXMViRyt6BCdMJq0yqQUSaKi+/xbd6+a/IXp7mbfv1r71eakYUrrUyPlKUo92 V8qoFKneozCX4Ed9NRTIxm8lsAEzU76FlM23mEffYf1E8rFw+foSc6CjTEY8i6JiNZJ2lm Jw0q05bJzHjif700Vi77Vsx/GK12KWVK+5Dw7xP0OuVtdu36jDbqQ06WfCyDpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cuD0j6/rjAKKZO4HsKJ0aLUswxQJcxWHXF3dhHdM5Cs=; b=Q0/j2q8zNY+4mJQ9Ka2nlzLvLhIrLM/g5vWu3vy7fsDFuKZSyTSnCicHglmxH9cfQXN+tD foYwNU5OW6r6tQz3KgCH9lssFV/VRF0Dcznp57qq/LqzqDPaa0OTWBcsERHMRCwBUqYVL/ lO5/Dp6MQ0IWlaQMzOXq8eMzMSN5ByiCnX0tqGcWBFh6o2eujYhHdALNpG4JYESlqnjSTO P4IJahu3gtoJxvr31d3649dWtbSuk7OE32hqxGrpEtUR+dbAIbWzMtWejgrOWN0u+tyt/L IFE9PyQBSh9zLCsLK28bP9dmOUewODbNDmjXhW7B6IfLTNuN9Q5hn3jd31BMFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566480; a=rsa-sha256; cv=none; b=PX7DVO9cF7Oah61upaOzo2ALYHXbS0H8WvAySGUMy5ccTQObdvD72+brcKwUH4mWmqgram s0eFwHK4lVca5Z6djqjEbqNctgiLA940q/Bisbl54CH1DxGJ0M/q8hhtjsZmMoXDjeI/FZ tE7de6qXUelVIMJiAtRAyQ48TAVxMt1cXPIFGzHaj73py/6zTEMZrpfUeWZS2VxjJEGlO3 xOejR4dzFTRWrEYad5MFxhjrgLi7lxaMFvAWGARDSkAULoPANGco9WwuYa8ekRFolwKFmP NEYgho9qhSW8u1WmjdNcyr0Q+LvoR2dg1/7aIeX23oGLw/V8EKaEJUF4G21lkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgz45T3hz19w3; Thu, 16 Feb 2023 16:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsen9085548; Thu, 16 Feb 2023 16:54:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGse5R085547; Thu, 16 Feb 2023 16:54:40 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:40 GMT Message-Id: <202302161654.31GGse5R085547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 623346ecb9b3 - stable/13 - usb: add support for Huawei E5573Cs322 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 623346ecb9b3f4390e9f13df4b19e6e41c4e53ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=623346ecb9b3f4390e9f13df4b19e6e41c4e53ee commit 623346ecb9b3f4390e9f13df4b19e6e41c4e53ee Author: Michael Paepcke AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:41 +0000 usb: add support for Huawei E5573Cs322 Switch the now added E5573Cs322_ECM (0x14db) as well per default to NCM. With this patch we default all devices to simple NCM mode to avoid the problem and get a consistent reliable behavior. No matter what firmware version and provider mix are involved. Rationale: Even the bigger SOC shows under complex load in ECM (double-nat) mode the same performance drop from 25Mbit to 2Mbit Line Speed, similar to E3372h. Reason: Thermal problems (reported via serial debug interface in ACM Mode) after 2-3 minutes load. Fix the root cause and bundle a working firmware is out of reach because Huawei sells the same hardware, different (crippled) firmware versions at different price points in different markets as strategy. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/633 (cherry picked from commit e66352013a67183dfeec14b2a22913305c26e838) --- sys/dev/usb/net/if_cdce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index 0b6445e5908d..bb2d08c2a282 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -267,7 +267,8 @@ static int cdce_driver_loaded(struct module *, int, void *); static const STRUCT_USB_HOST_ID cdce_switch_devs[] = { {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3272_INIT, MSC_EJECT_HUAWEI2)}, {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3372v153_INIT, MSC_EJECT_HUAWEI2)}, - {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3372_INIT, MSC_EJECT_HUAWEI3)}, + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3372_INIT, MSC_EJECT_HUAWEI4)}, + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E5573Cs322_ECM, MSC_EJECT_HUAWEI3)}, }; static const STRUCT_USB_HOST_ID cdce_host_devs[] = { From nobody Thu Feb 16 16:54:41 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz6349Dz3r9wY; Thu, 16 Feb 2023 16:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz60RgHz45vg; Thu, 16 Feb 2023 16:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PlGm4b/TjhzkZE7k+8judUw8Pza8HFDfe+CK+r5cx3I=; b=a2ytwqucB4Z58EUmb2992pn0aK5HRkTxAFYS9OhjbcJThswxyBXlnaiGq1ONP8rcIHhS+A cEgZoy0U3oDspoVJPCo1rJmSTCHFWPvxDA357UimZiVQHCwtSsNTJun10CfXXfUL8FUe22 BZ+4EKOl/AJxXmWxRVMoIRacq9E9dHBvccM90DfhMOrthicMXQvtEOgVi9VpbhzvJMyaLu sbUbnROq6imriAsNZXSlqt5DMdGL/Z2YHyetDBtDIuQY0//MO0M/UFlcG513vGqhcntbFh bzTvw0OTa4iEmBbNm3/zgmzzZgDTeC63GO3wIieL+6VfkjDVnQF3yzXCPANW3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PlGm4b/TjhzkZE7k+8judUw8Pza8HFDfe+CK+r5cx3I=; b=aKpUNvgcFZIzQvhDJoM1NsqxHSBq/HOnrO3JrV0iaGeePHVv0dO96ZT89Wk5WqtXAYFb1W zbThe5J4Xt8PupQ8JgE9plGCQU2KrCQ3qIHT0KD9cEoPDKjBKpiCQ2RGZw4rKFiZJGI/w5 dUi3kbWsPCg3KpHswuoYkXl/o0CR/AQJ4B3/jhB6C6M5j2LiFvRFlR+G7N/f+uc0D391TR MkB0NHv5rWilAKmlAfIxZVVkIYICeVqi99NqVfhirzXF0egVyG7fTUSirrOglwV0wrVIjr 39Ayr1x3tlbeSQDtAh6Yy1WOBNPQHMoViu9ZHzilnl245MHNrBbjxkv+heCfDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566482; a=rsa-sha256; cv=none; b=x8q5SlQYp5N4L6almt2rgi0EAiPIlJowja2pei6u1sQSDRYVIDbX2UY4AUwAAra1gIcYDk 3lNgzdceYQPf3/XpFA0SVlaTdhWnQqbjTTvxuRHfo9GzSjWn/xaJdz77dCDCIYA5hMPDjt /ceQ2TOb56uiV8fpktVSWWhW4d5hxNWdcrKaN0Zkfux8olfCfV6U4kB4jpu9WPNZM86LJT hSQ6a8d63RD7zGvWNyP0ApP23/qW87FFP/E1BmBx5X3AAdAYZguTIHDgdHlrKg/rl1FrN6 sAizj648F5aHgU6Ru5nI9wFcGq1Bh/+xu4Mr2BSF5Y8aN5kMS059Kx6UPpCUWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgz56d8yz19nX; Thu, 16 Feb 2023 16:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsfH4085572; Thu, 16 Feb 2023 16:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsfuO085571; Thu, 16 Feb 2023 16:54:41 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:41 GMT Message-Id: <202302161654.31GGsfuO085571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: b9ddd053e800 - stable/13 - usb: Remove obsolete Huawei 3G from usbdevs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: b9ddd053e800af8e8a4b06b96128f505d45f532f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b9ddd053e800af8e8a4b06b96128f505d45f532f commit b9ddd053e800af8e8a4b06b96128f505d45f532f Author: Michael Paepcke AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:42 +0000 usb: Remove obsolete Huawei 3G from usbdevs - remove Huawei 3G E3131 (E3131_INIT): - frees up 0x1505/0x14fe shared IDs => product is EOL (since...) - 3G networks are shutdown/scheduled - E3131 devices will still work the same via scsi_huawei_eject2 - new 4G devices will switch & report correctly now Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/633 (cherry picked from commit 848ac8451b08d09a81de7bac8ff8fbe0d35df8cb) --- sys/dev/usb/usbdevs | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 01612662fd4d..629b153f995c 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2549,9 +2549,7 @@ product HUAWEI K3770 0x14c9 3G modem product HUAWEI K3771 0x14ca K3771 product HUAWEI K3772 0x14cf K3772 product HUAWEI K3770_INIT 0x14d1 K3770 Initial -product HUAWEI E3131_INIT 0x14fe 3G modem initial product HUAWEI E392 0x1505 LTE modem -product HUAWEI E3131 0x1506 3G modem product HUAWEI K3765_INIT 0x1520 K3765 Initial product HUAWEI K4505_INIT 0x1521 K4505 Initial product HUAWEI K3772_INIT 0x1526 K3772 Initial From nobody Thu Feb 16 16:54:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz72cD0z3r9ym; Thu, 16 Feb 2023 16:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz71Bt9z463s; Thu, 16 Feb 2023 16:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=no6jdDu39rOmkFyibR5XrpdRM5SAvU7vnL6Dyf6lJSI=; b=jrDFL+AQ9kOKNyq1Ftz/iocCoOyag9POCLifQMW89Pr6Tt1DnBR8JSDbCkmhtn/LWaXYTB uVZm9mNk51OrtvF6TWg8SpVLbooBDy1OhssmfaxmpiHKvfJbygZ1Gq3/2h8x7jZqltcWJf ul2xJZN+OQPXP/7E81xelkKULRJuYdcSM6eUF+u4DXH4axyrRwX9zBcJzQ0wx26l981Kmk E3iLekz5V5GN5YECmOI9ZOA7YL7dknm4dDKhrVyX6aJP+B2ZiepxmPLPDmdX5CdxqUUqvw KlDmHeOaGYYShoF2CWKcUkh1srJ6k9QUwP01bK6ob7So17opWLzKKoQWiSOuhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=no6jdDu39rOmkFyibR5XrpdRM5SAvU7vnL6Dyf6lJSI=; b=MMM7u+ulBGPORfMwaryUFDPt0vRhz8oHVwPf2VJeyKQZ6zcPC6Vkd4DkLEl4I4FPaFmgJ9 U2DELe83k2HdZCraXmVqpmN/eUG2adHChcjF3UetuPW7E67y8pjhRphVyXJqER/fmfWOvD k3b/tzXgOL9LHg6lC6hKh6BSIN27jBvYzciEhtiXt7+dhgU/i0Xfkz/iGxi29wHq0UOKHu 15stk+nJOkNm6thHkru8D2JkuzlQhgM5n3dUUX+D0B0GLEW8Os7SPUaWWWUMWrBbSaqxiI c/Ckg8qYKLr5bAK4ZtWdvMsNVLz4FkeKQInN0ksf6/76zekg8zDjngs82L0rGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566483; a=rsa-sha256; cv=none; b=DrEYj2x3OkhnsI+TmBb5fYGyeHVRJfAGYhrKPQ7n/D4nAd83KKT2SGAF738Fzqux99Cw+l KYxA+6gcLrr4aoTaSfRG5gzhAAK8mBwD3AOKZ2TSZabcDzGOxPymYMhMimnKY8Xl4/vilj +vkEeIHkn+3A7Ey6/kgwTMQKxg82QSEX9yeEWqWfBUL6WMvWyJUuMPR4eGcbOuvV73dCt3 sAPhe7OYNFgbjIUiKUwi0pcq+KlpOwja3qCT+aP1P5xeZ7WkTpfUK1i2QLTqNX+VZTqKmY +duyi8aSW5WLtmIG84j3uia+zZm+BPzsANiSKNtMXAKiCzXHcwzFU2JjnouvKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgz70JTTz19w4; Thu, 16 Feb 2023 16:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsgTd085596; Thu, 16 Feb 2023 16:54:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsgav085595; Thu, 16 Feb 2023 16:54:42 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:42 GMT Message-Id: <202302161654.31GGsgav085595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 9786ac44efd6 - stable/13 - u3g: Add new 4G Huawei devices List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9786ac44efd689018ee8dafa4fb231cdba366e94 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9786ac44efd689018ee8dafa4fb231cdba366e94 commit 9786ac44efd689018ee8dafa4fb231cdba366e94 Author: Michael Paepcke AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:44 +0000 u3g: Add new 4G Huawei devices New 4G devices. Longer description of new modes to follow. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/633 (cherry picked from commit 75d41cb6967bef0e534afd6d20ea5eeeb2435e36) --- share/man/man4/u3g.4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/u3g.4 b/share/man/man4/u3g.4 index cf1152a6c1cb..91b3fc0761db 100644 --- a/share/man/man4/u3g.4 +++ b/share/man/man4/u3g.4 @@ -18,12 +18,12 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2018 +.Dd February 4, 2023 .Dt U3G 4 .Os .Sh NAME .Nm u3g -.Nd USB support for 3G datacards +.Nd USB support for 3G and 4G datacards .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -72,7 +72,7 @@ Qualcomm Inc. CDMA MSM .It QUECTEL EC25, EM05, EM12-G. .It -Huawei B190, E180v, E220 ('') +Huawei B190, E180v, E220, E3372, E3372v153, E5573Cs322, ('') .It Novatel U740, MC950D, X950D, etc. .It From nobody Thu Feb 16 16:54:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz82vq4z3r9jB; Thu, 16 Feb 2023 16:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz82C1Tz46KS; Thu, 16 Feb 2023 16:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H2217b+GTKYxNP0v4Jav9j83GZrYemH/ybKbosl42XU=; b=GUOWb4mI3ryuSfKmufKXwZ0dpgIeP4yTK2u5Yv7U4ZCnwefx3tYFJxSOv9JmmYyny4J4+3 OmqcKuoQHxgLETQfWoRA7blf+Ct6NLsac4QbUWfVzTY0UwpinzxsO1EfhkTDXYY4u04Aiy P9vLmPjCv1TkcaTR8aKRyGodEC7ZEtVvFcu4kz62sl1GWc8qNpE7M1XGpVHFzaHZy1Eb6U G7+akaMacxNTkMBmbdbWk8hhU+POP9vzPruiwYvRruqEWoSOtb9zqxll0YsU4/HseZ5n0A tf9y+QQ6DalR4g+je52fBWOUX47ia/taSHPFy8pBsByIU6dJotkdgHw/GI3phQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H2217b+GTKYxNP0v4Jav9j83GZrYemH/ybKbosl42XU=; b=RlvX6luf+tf8LXZ4aDCdHNoEhwjNJ9Vt4DCQHwH0ouIAVpt8kHEoanAJ7AdveWTorYXbuh FbZw8PZhLOBo6ZKl0pKdRhDGzbk7iyNkCdQwSkcFXHXgPJ+d6hqWfe5R5c97ZzzSkrg5jK PCLGeEeKJFj2goxNHDwHx5w1wujVh0HKZU08bL67i3x9if9oixB9FDdmZuU4pcCuFrhvJq ywl6yJZ6Mnxom/8ocQcAFjiutCzuflv1LrGD3AEK7MN96PfxjfjUIexy93thK2zTT8yyEm 7zDD1ezgQpg+/VnaKRDGdWKgjNcdRu/99GC5ArHajUxDOgENTMTJDM6LvLXigA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566484; a=rsa-sha256; cv=none; b=SLvNYBZw/JNUZ/lZmd4uGYJogSFQdw2W8D9/lcD9XRw+ZGTh/7ocPYgsIQUEzleyzbQ1og MB9FGCFkh629SrFKjnd35yhPDFsx2S/1WwenmFzPn4MtdQEfn+3cGcEUaeYWecQ2VFHI1n KCOSvGegIbiTfGbccugzAfUUSpBlfLb7XnOkiQB2pMfwrsa/+6kvXVcRUK6joZJj+pY7zX HJ8KzwE2O6vvllYefdPhFj+V4CE2PcrXyVlG3xYDAGDCiOT+y5JzhgThJZUuph/ithPs0Q 4P9b6r4SViObg+vZOpuulqIhynd7zuagsiwwwmSPKeNk6J0YOKs9czTJJKuAZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgz81GX3z19ys; Thu, 16 Feb 2023 16:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsiwx085620; Thu, 16 Feb 2023 16:54:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsi5L085619; Thu, 16 Feb 2023 16:54:44 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:44 GMT Message-Id: <202302161654.31GGsi5L085619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 1256ad9b27b2 - stable/13 - usb/u3g: Add support for QUECTEL EP06-E 4G modem List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1256ad9b27b2eb34a066640e63039975ab4f8492 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1256ad9b27b2eb34a066640e63039975ab4f8492 commit 1256ad9b27b2eb34a066640e63039975ab4f8492 Author: ev AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:46 +0000 usb/u3g: Add support for QUECTEL EP06-E 4G modem Add QUECTEL EP06-E modem support via USB for FreeBSD. Tested and works like a ppp on FreeBSD-13. Reviewed by: imp PR: 269326 (cherry picked from commit 0cec5b99b3c0484925f3cc0813040c160987bd45) --- share/man/man4/u3g.4 | 2 +- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man4/u3g.4 b/share/man/man4/u3g.4 index 91b3fc0761db..c4d9b4ee3460 100644 --- a/share/man/man4/u3g.4 +++ b/share/man/man4/u3g.4 @@ -70,7 +70,7 @@ Vodafone Mobile Broadband K3772-Z .It Qualcomm Inc. CDMA MSM .It -QUECTEL EC25, EM05, EM12-G. +QUECTEL EC25, EM05, EM12-G, EP06-E. .It Huawei B190, E180v, E220, E3372, E3372v153, E5573Cs322, ('') .It diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 0e20f42feb39..2186cd8e383d 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -514,6 +514,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUECTEL, EC25, 0), U3G_DEV(QUECTEL, EM05, 0), U3G_DEV(QUECTEL, EM12_G, 0), + U3G_DEV(QUECTEL, EP06_E, 0), U3G_DEV(SIERRA, AC402, 0), U3G_DEV(SIERRA, AC595U, 0), U3G_DEV(SIERRA, AC313U, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 629b153f995c..81abe91d93b4 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3983,6 +3983,7 @@ product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS /* Quectel products */ product QUECTEL EC25 0x0125 LTE modem product QUECTEL EM05 0x0127 LTE modem +product QUECTEL EP06_E 0x0306 LTE modem product QUECTEL EM12_G 0x0512 LTE modem /* Quickshot products */ From nobody Thu Feb 16 16:54:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgz93mcLz3r9nc; Thu, 16 Feb 2023 16:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgz938Brz46NF; Thu, 16 Feb 2023 16:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=04CduH2kr1begVWG5UW8zrPthUR+XDS/ONeMc1D6EyE=; b=sXfDjPkSpKl5lTyhLCr/x171KBg8CV4dUSWMxj/5c0UXB0UqN8Uf92fNf5yq+lSAvaE31T Uyig/aLJmpfHXAW2JTIij9J7EFQhE0lW6z4ZarwreD3A2ZC9Bh8dGP5fKMO/MkcNQ+VHnR 4wPGP5LXj34OHzWFP5nQneMW8e3sm2QM7ASKfjUstXyEDLY2yhTMDPXvBkjEPihCSqHjlf YF5hrbM/nXyHreqPYGhJAOdrf+76qQOwnywiCQeWF+/T4c0s+z3nYu28KBk1vW7ocdr4sa ZLU6xcSNg/WUnxrvMcD6YO5toWHYyQe856oQDNmA/oonegxvpi21sgVewZIHsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=04CduH2kr1begVWG5UW8zrPthUR+XDS/ONeMc1D6EyE=; b=fRxFic5hfMU8CZT7Olr9/G+o8ywyUWrFa02hqafzK0XPiaeENtAQVRRCZ+rdj7vKrtp67J MrbRAkVj7M/Eq3qw3XA01BJTvFJsHxZ+Vwoom1W7j8bWVSQIp+NOxSSeuZxaBWpu3SFYwX WIJhnhTT4+VDr1wPaNDtEaiv7f7qMZ45epb8YigVGWlpJJ2ZmRDIVCYwIe0N7zk8CBDOTe e31AUG+muAfBKHnMQsXM+bljMBO0IMu5VkGU+7edr/WKx+njn9AmQmrxIIkHamA0m4DwK4 5IjfggJditgtxeRL6lOMzRS2FYEIjfCTpoq4Hq+lqXQBuI6Wr8v6X9ADUlYN2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566485; a=rsa-sha256; cv=none; b=kUW8l9kJuQgC1cQ6QiWDZdjVtWRB4g/Fa2+fpVK1B5x0gxW338XlSDZu0NZAXX8pw03VhC vuUsQFw27LJuc2bH8bh1tnscsOc/Hcge15x4i6xN4evSliIdibGeqrqZbsmdeC0UE4Wq/1 4QXMiRUyzZwG/0oSv0zh6VJrPabMK40wUMSaYlLuikoqbthCXag7zV0jdw7i+G7w/BQUC7 aC52pDQvMdOLdL6AbB1upCjOOWvrTm9aicWd0GjbwvIk+miSNm2X2sYDyuB0cu23C1UNcj vwz2hHoNmTOCJxnY6xmLYLKWWBMiZRGmnDBCIh+SphSQMBE19+S1pwbwoaPxpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgz92FWBz19yt; Thu, 16 Feb 2023 16:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsj2E085644; Thu, 16 Feb 2023 16:54:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsjgb085643; Thu, 16 Feb 2023 16:54:45 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:45 GMT Message-Id: <202302161654.31GGsjgb085643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 38a2e8fff2f7 - stable/13 - u3g: add huawei device id List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 38a2e8fff2f7ede285fa66b765e5387026d779f6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=38a2e8fff2f7ede285fa66b765e5387026d779f6 commit 38a2e8fff2f7ede285fa66b765e5387026d779f6 Author: Michael Paepcke AuthorDate: 2023-02-16 16:49:00 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:49:21 +0000 u3g: add huawei device id Add missing entry for E3372h Model already in NCM mode Noticed by: David BOYER Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/645 (cherry picked from commit 08ecb40e88a0d34cf6a177218a22f07431cadf3c) --- sys/dev/usb/serial/u3g.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 2186cd8e383d..d577508fff37 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -343,6 +343,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(HUAWEI, ETS2055, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E3272_INIT, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, E3272, 0), + U3G_DEV(HUAWEI, E3372_NCM, 0), U3G_DEV(HUAWEI, E3372_INIT, U3GINIT_HUAWEISCSI3), U3G_DEV(HUAWEI, E3372v153_INIT, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, E3372v153_NCM, 0), From nobody Thu Feb 16 16:54:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgzB63N3z3r9nk; Thu, 16 Feb 2023 16:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgzB40F6z46Qm; Thu, 16 Feb 2023 16:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=trIyelVifLKzzeX4Cw3EVfRVrj85rwd4oWulPIpBGJ0=; b=JAz80L5jQxJ+kYPL2FItYE9E7vSfBezkfZDbtiYy1ZCSq3AFa5heYsXyw/ka1bCZZjRsHp iN2znrrH08C5DSr51s6Z/K88426LQT+81mbBUbDbPtrVX0Dfkd37LL/suNJg6vH0wIObI1 lzpaluCkr6WqxOEqKPW0yNh0WZxNQqaNtTdjHVCM5j7gXFdCHBL5UQXwWBSUFj5PHVgYIE tOjcEtgrS9n8Do5rPOdwz0r0z3pqvw5H4hpl8hZO0FpuX0ePpInSaAVw3HMDnrg3u39Bo2 srEOpnPATU6QXUlxZsUdUgD8lbZJ9WVbozkATPZ8NXhY99ac1EdhGjOcbWZGoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=trIyelVifLKzzeX4Cw3EVfRVrj85rwd4oWulPIpBGJ0=; b=o7AaxwJbnCTgRZxHnJsHojWTyNqOj646HFqgFhqJU+Lfj4BlIxF+5oWuqUbKLATZlqMwVh jODXpA08z2Z8TGa+RI8wmxY9FFEDHNLVn5ZTDOQe4wW/ATVyMyYcouv3Ys2ShGTyjsSZvX 8dQIT0PzC3iINzhIznLcOPnjWflXvWLdJnwRwb3r3cxvDllOKzGPJR9FGUJ06okZizzvvL CEAzreDq9ebnRIswZj8BlgwxWiLuTcnXKtj64sDZ8DDxSB0KWbJJjPXAdPTc0mG9snWM+O Pgv1u7/Y/ZOAivv2PQGW24dy8SnO+07VqfJDPrfnFk9LFw3wMMxTks8oCyNsEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566486; a=rsa-sha256; cv=none; b=Pk0Mcj32dDNBVFrQLA0VSS/aPTEktLSigt0JpQbZ/nGH795XSmkfxvG1kRmiifErIH1MDg 9uRqexEs5i+ohJyNVjZg62EFDbaAU/3FnksUWDP76khqo3MgqQ4AL4E/UXfP9H5xQZRffO Kizt44FYUnY+iwdCTtHs1hfjp6gGlWcAGxNIccbPZdIxUkfGUaWpgVrC8Qaxeq2E+Voq3r kNfFVf0yW3BMMjPw+fUCnbRsTVrtAHVTZpRFt2j55kHjpQvWfg2rSKs8cUszqzTKrYElWN D8/g/HPgRUTH3ZVGOl6c9oR/18BHRSfWZHmfO7w33d9nxLTnWzvbqTDKaza2Ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgzB32sYz1B21; Thu, 16 Feb 2023 16:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsk77085684; Thu, 16 Feb 2023 16:54:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGskuY085683; Thu, 16 Feb 2023 16:54:46 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:46 GMT Message-Id: <202302161654.31GGskuY085683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 6c9ad7b8bc7d - stable/13 - cdce: add to cdce.4 information about NCM network mode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6c9ad7b8bc7dbc17f41ddab6779548fb2728608a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6c9ad7b8bc7dbc17f41ddab6779548fb2728608a commit 6c9ad7b8bc7dbc17f41ddab6779548fb2728608a Author: Michael Paepcke AuthorDate: 2023-02-16 16:50:18 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:52:06 +0000 cdce: add to cdce.4 information about NCM network mode add a new section how to use NCM network mode and specify the required kernel modules Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/646 (cherry picked from commit 58e1d01022415e29d3e08c4d3936b6631c27406c) --- share/man/man4/cdce.4 | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/share/man/man4/cdce.4 b/share/man/man4/cdce.4 index b27d89bc1639..99d04bd12d07 100644 --- a/share/man/man4/cdce.4 +++ b/share/man/man4/cdce.4 @@ -28,7 +28,7 @@ .\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ .\" $FreeBSD$ .\" -.Dd July 10, 2019 +.Dd February 10, 2023 .Dt CDCE 4 .Os .Sh NAME @@ -47,6 +47,13 @@ kernel configuration file: .Cd "device cdce" .Ed .Pp +Mobile Devices (eg. Huawei E3372, E5573 and others) +may need additionally the u3g command port: +.Bd -ragged -offset indent +.Cd "device ucom" +.Cd "device u3g" +.Ed +.Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : @@ -77,6 +84,13 @@ received and transmitted over separate USB bulk transfer endpoints. The .Nm driver does not support different media types or options. +.Pp +Mobile +.Nm +Network Devices may need a connect command sequence via u3g +serial command port before they activate the NCM/ECM/ACM network +interface. Example: echo 'AT^NDISUP=1,1,"internet"' > /dev/cuaU[0].0, +where "internet" is your providers apn name. .Sh HARDWARE The following devices are supported by the .Nm @@ -93,6 +107,8 @@ Terayon TJ-715 DOCSIS Cable Modem Realtek RTL8156 USB GBE/2.5G Ethernet Family Controller .It Planex USB-LAN2500R +.It +Huawei 3G/4G LTE (eg. E3372, E5573) and other mobile network devices .El .Sh DIAGNOSTICS .Bl -diag @@ -127,6 +143,8 @@ is running low on mbufs. .Xr netintro 4 , .Xr urndis 4 , .Xr usb 4 , +.Xr ucom 4 , +.Xr u3g 4 , .Xr ifconfig 8 .Rs .%T "Universal Serial Bus Class Definitions for Communication Devices" From nobody Thu Feb 16 16:54:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgzC5NjNz3r9wk; Thu, 16 Feb 2023 16:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgzC4x3Rz46JL; Thu, 16 Feb 2023 16:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPCe8fIDSw0avi3CTQhS9HOPDaWZZFXZgxIjlW9FRYs=; b=Ju+AkCQ0/MQsd19M9lQ5TRXyn/O/UYWtmITPlRfNwd6cthQwLtVhZ0ou8ADEv75tDpvLLv VHn24W8/7uQ8Vy1NFcNhVNS1fkG6SDEaEu5sqabOjH204cBCjr0f3pL5+5/NlyFMptc6Qw 9V8dV1AAeBKOq40WqC/vOc0OU8sxB1rvCgHgvd/z9TjHYoSlDtF44QcckVL7XaYAyPm3k4 T2u+7UZsnZjTfRa95dZOzjj7p1O/NKYCs36PKUOXhdkTAJdPmI7CmY0XQXLakeweh43aTT C7srep2Oob5zKpMZI+ynAQrbt4HBir/c6Ywsi6GVPuCOEZDd7N6DcXngapNyAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPCe8fIDSw0avi3CTQhS9HOPDaWZZFXZgxIjlW9FRYs=; b=RHmuEZ36KzeNuvbnDC0u1gr+pXAj+TXOsBJiqFfWSfvxbcIdATsFHVexv0gcVL1Tl/cdcU iqkdmJNKReL+gPcgu+AOWjjTRxT8Lu/jCJOVhe2IEuk78gFOhLOuFiIXbujokvPv23uG1e fkLvv8FRUH5T+WEVz90ijNgYlYxkShp4gohmH0yOqr1MI3VDdNGD2HBE9AKtuy/xkxhupD vXwFUe6aDH8Fpa5AYAngEDAOjuNc8M8hMXG+nOv00rmfCHOj1y4KsPGxK0HBBRWDNt/Na9 PFlR0UOL75aMf24vX8tWbs3J6zCoOaqzD1CyScahZV1uL6OEhGOSPkusg+B6Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566487; a=rsa-sha256; cv=none; b=wJDT3qA8rYVxdLTAb1Sy02pzmjpuYUHsOZOZXa+5TJZkOPkD/i08Y3/yqNVF0j1UB1VUrI kNpagWx1DDd0eHdpKQvqB4TW+HFKcY97bEH1gYjf5uP9vrXP9pTs0tDAr2SRXbPzVJChdV vzKI7pdhgt0OLNdjm91HhRgl1MO3SWE3uXAQEed4BEPSngNqGFlYW2uCdsGj6KcU9XIIxJ vkaSzy132cliswuj0nHfdm9hGnZ4tp/7nwgkQKdLzne74oj4xfe8LrrikGdE66097uz4MI PGa/OJhsbbdyXh7Gny1A0vUDAXGeSOFYEEzh6uSBapCpoHulo+anbHjCKo5iXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgzC3tVSz19MR; Thu, 16 Feb 2023 16:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsldu085709; Thu, 16 Feb 2023 16:54:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGslBY085708; Thu, 16 Feb 2023 16:54:47 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:47 GMT Message-Id: <202302161654.31GGslBY085708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: a86b9ed22ece - stable/13 - powerpc: Drop old workaround for old gcc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a86b9ed22ece362331f44a933bbf5426a06f527a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a86b9ed22ece362331f44a933bbf5426a06f527a commit a86b9ed22ece362331f44a933bbf5426a06f527a Author: Warner Losh AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:52:06 +0000 powerpc: Drop old workaround for old gcc Very old versions of gcc defined _BIG_ENDIAN and _LITTLE_ENDIAN. So to work around that, we undefined them here. However, that causes problems for programs that do: (and many other variations on that theme). Since this often is the result of weirdly nested includes in the ports world that are hard to unwind, drop this workaround to help more ports build out of the box. If there's still an issue here (and my testing hasn't shown it), we'll fix the issue in a brand-new way once I have a reproducer. This fixes the mesa-devel build, and others Sponsored by: Netflix Tested by: pkubaj MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D38564 (cherry picked from commit e35448a901aa56aa232efbc4fe7a73a9bdac3511) --- sys/powerpc/include/endian.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/sys/powerpc/include/endian.h b/sys/powerpc/include/endian.h index 9e28237bfd24..0fac50361632 100644 --- a/sys/powerpc/include/endian.h +++ b/sys/powerpc/include/endian.h @@ -36,18 +36,6 @@ #define _MACHINE_ENDIAN_H_ #include - -/* - * GCC defines _BIG_ENDIAN and _LITTLE_ENDIAN equal to __BIG_ENDIAN__ - * and __LITTLE_ENDIAN__ (resp). - */ -#ifdef _BIG_ENDIAN -#undef _BIG_ENDIAN -#endif -#ifdef _LITTLE_ENDIAN -#undef _LITTLE_ENDIAN -#endif - #include #endif /* !_MACHINE_ENDIAN_H_ */ From nobody Thu Feb 16 16:54:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHgzD6dfvz3rB01; Thu, 16 Feb 2023 16:54:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHgzD5wYRz46fx; Thu, 16 Feb 2023 16:54:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AVnmioQWt0EmQTMDr7Da44ZDaxsyG1NqPUDLFgY4Xi8=; b=k2cpdjDvuKnbl8W5mJvX/vvL9DPliN5PJ0+XJf8vLfv3EQdcDSs5BxhNwkyQ43IHbImM9k U+pKrwYC00c+zBkXfPwN/1hgpBK7iAnzTEHLGNYpdOUFH984QEaxGLVlZdPbLGRgCIfRod bN8BIRR02hZpgzG8zNnIWOvtoh7eQBdpWdaotbbJyTipAmFlbsI/9F8fRoOG0neOntyqxq 23igQZ4vgp1y7M08d3C5NR6UXzb4moUpGiSE8VavM3m2PfyZ4QQ2Oenk6Jisap9jfuL5aF EOAizyy+1VSnWn3aNsy0qQG7H6vVTWuGWsKUJbx7W+EliRS1UkBiDqC95B6FEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AVnmioQWt0EmQTMDr7Da44ZDaxsyG1NqPUDLFgY4Xi8=; b=wUBo0wSdcjR+jge8Nd7qQnreDu0L7K9apRn1CBuuEVDmQ+QcnpmXeMoHd2GePYB4AhYKVe oTky3U0NZ0SyRoNzC0rDPel+q/JYQtxwXG4SYfVMgD3/QWpJgy8MJvxm14MNTVJnFXROdu 9B1a21T9PpxtOSPGOMgabnMm63VHrnI9rOcOM+Agradbwiv9kwz4qEudNkeRuBuqLmkK+T 3dL8ncwVLZqqZ5xm43T4Zml/IRO2poFf/XZmKJNAKB+Sv5IzfPix0rLIMr/Ay3XXJBkWph pwOOznhN3ZGIS2mvOHxXwFgpTqzp3EN/5BGrZsNI8FZrn+OvvdSLz1sN1CZdfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566488; a=rsa-sha256; cv=none; b=IVsFJDSiYUyOktOhEwxEitLaeD5NCtqxECBClkAYhka7T4TwpbXNkMTpPmtg/cFnx6mYt4 s+EVvTxAt4VXL9H36ZELq+iEDhKT+7MIB45i8FZG53/UR4OCP128TEgdCyBn1n6lnHNS8M 06BSZ/EweT4DY5brkFooceltHgJ8DcfsfYBar/pZ7H7XK5LsYP1z35fyw45p3vsP0IAQ4o LcZoTy8isIsRBJjUpvaH1geKJeP0DU5D6BTka2VtgvGAWJh4O5L/j2Ua/zBok28WWcmQ/c FKZGNsTw3Ba7pOMXa3LVZcVj97nyXYVX9jRkcGACRgu+fwgPWB/s0wKMLjNYoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHgzD4vDfz19nY; Thu, 16 Feb 2023 16:54:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GGsmOj085733; Thu, 16 Feb 2023 16:54:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsmCP085732; Thu, 16 Feb 2023 16:54:48 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:48 GMT Message-Id: <202302161654.31GGsmCP085732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 07e39710b170 - stable/13 - sys/_endian.h: Move powerpc workaround into _endian.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 07e39710b170859ef6a57185f9a775973f3eeffe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=07e39710b170859ef6a57185f9a775973f3eeffe commit 07e39710b170859ef6a57185f9a775973f3eeffe Author: Warner Losh AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:52:07 +0000 sys/_endian.h: Move powerpc workaround into _endian.h Powerpc compilers often define _BIG_ENDIAN or _LITTLE_ENDIAN depending on the byte order of the target. This interfers with the endian.h and sys/endian.h APIs which expect those two to be 4321 or 1234. Unconditionally undefine these two before we define them to work around this issue. By including endian.h, the programmer is saying they want this API not the native one. This matches historic practice as well. Fixes: e35448a901aa Sponsored by: Netflix Noticed by: powerpc, powerpc64 CI jobs (cherry picked from commit 6f23df1ae7f6ec3cd06a15c87f0aaaa770b2941b) --- sys/sys/_endian.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/sys/_endian.h b/sys/sys/_endian.h index ff909f532663..7ac39386e2e1 100644 --- a/sys/sys/_endian.h +++ b/sys/sys/_endian.h @@ -41,9 +41,13 @@ /* * Definitions for byte order, according to byte significance from low - * address to high. + * address to high. We undefine any prior definition of them because + * powerpc compilers define _LITTLE_ENDIAN and _BIG_ENDIAN to mean + * something else. */ +#undef _LITTLE_ENDIAN #define _LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ /* LSB first: 1234 */ +#undef _BIG_ENDIAN #define _BIG_ENDIAN __ORDER_BIG_ENDIAN__ /* MSB first: 4321 */ #define _PDP_ENDIAN __ORDER_PDP_ENDIAN__ /* LSB first in word, * MSW first in long: 3412 */ From nobody Thu Feb 16 17:03:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHh9T1pWxz3rBpR; Thu, 16 Feb 2023 17:03:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHh9T1K7dz4CXw; Thu, 16 Feb 2023 17:03:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676567021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UHyzaSweO21gcfrsWAgwSnfoMc5HY2GNrkgGT5byp14=; b=uxAgtu6pE9XZY1t9vXAc1OJeBQTKccpSbyEZHx0b7809AB9sk98gaOTxBaI9yYFXrSq0xl Yuemnercmq9FqHM88VA5vgSm/RPF8fAMTjP6yMiJiy2/QYGq9LcLnyV5/Mn6EH5Wex/s1w NuKSBLVmh9LnaHnnbPZ79sVkM6J4lwcGKgQ217+aVEu2IJeqIYkV3riCjZ2MPPMVi1C2V7 kvOangpoXn6TSnLBRGgELi8w/iXqaMXaIz3Senmz0RRFBqLAc0ojSTjza1/2v+H1Jnzn9e jetuaFUfTHCGxzLvJVsDH7P4aHULEPGN/4qhM/6L0ZESoqBnwv1nS/Byh6VfPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676567021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UHyzaSweO21gcfrsWAgwSnfoMc5HY2GNrkgGT5byp14=; b=OYoWwqKBz/Kxwb8ivIp2I0duP1Ao7QiFoRQisqtYFHyCCnf+SAgYIUaGmT3yBB1pgqhjhP J3GZ3llyNeB8sUf1oCF98fCSa2TMvCqkXtWGXzAcmaOxc6nUkJQZf2gnX2ijKdLZgycnuw TXUt3zquRJAUgwoE19VpTgkcFheChHoAac7xLnFLGzxkAR/yGGA/CTeLpLRkj6oQ2yR2x7 eAXY4ZhghwAoNkyxgKGrFL/kEvydmzZRys9osDHPsrNIsjcj9BXZnsgrkniF40mmHZS+eJ IqTWTFuajSg5yGtN4/yEXzBB7SQVyf6kMFbxdveMRGvLTeFkZrSS1VWx1rV+Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676567021; a=rsa-sha256; cv=none; b=X/NgxqfODJGoUXbAr7vQje/NQKq739FTeQId8VYOvyC1jddfrNJ4Vo6B/IJlvvchcxI9Em DdIeKuPDOdCDx6BC+kw/rSG0RcmCyb+QY1myEM5HGTSRpsYkBnThYkVaWIwYZOLZOVAprx F5sCSurb5LFXXeTfTzLYPyAM0oWwINW+Qmwd+nNZ2FzCwZL9bAoJNVOyOIgIcu9wCmtaxY 3tPl8xrca4fAQgSOlttE7puMt23o7m9kbpNm7OnV90/NGPupO8hdgBVcwBE2RGx8W5pfwy TpKJkZJIr6CSryL3TkN7yjRPidq/wgHRpyQVEI02smxJVC725DWiqy8Na0V8wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHh9T0P1bz1BRl; Thu, 16 Feb 2023 17:03:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GH3ep8000946; Thu, 16 Feb 2023 17:03:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GH3ews000945; Thu, 16 Feb 2023 17:03:40 GMT (envelope-from git) Date: Thu, 16 Feb 2023 17:03:40 GMT Message-Id: <202302161703.31GH3ews000945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: a064fe6ba9d5 - releng/13.2 - Change "ctlstat -P"'s schema List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: a064fe6ba9d569233a6927cc4aabeb8210fd5f3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=a064fe6ba9d569233a6927cc4aabeb8210fd5f3f commit a064fe6ba9d569233a6927cc4aabeb8210fd5f3f Author: Alan Somers AuthorDate: 2023-01-25 18:00:49 +0000 Commit: Alan Somers CommitDate: 2023-02-16 16:24:51 +0000 Change "ctlstat -P"'s schema It now reports stats separately for both ports and luns. Also, prohibit using both "-p" and "-P" at the same time. Sponsored by: Axcient Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D38500 Approved by: re (cperciva) (cherry picked from commit 4c163a5480809d0dc8b68dd00bf2ba7d882450f9) --- usr.bin/ctlstat/ctlstat.c | 226 +++++++++++++++++++++++++++++----------------- 1 file changed, 141 insertions(+), 85 deletions(-) diff --git a/usr.bin/ctlstat/ctlstat.c b/usr.bin/ctlstat/ctlstat.c index 50b9e3b1445b..d607ab9f4523 100644 --- a/usr.bin/ctlstat/ctlstat.c +++ b/usr.bin/ctlstat/ctlstat.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -137,6 +138,7 @@ struct ctlstat_context { struct cctl_portlist_data { int level; struct sbuf *cur_sb[32]; + int id; int lun; int ntargets; char *target; @@ -149,7 +151,8 @@ struct cctl_portlist_data { static void usage(int error); static int getstats(int fd, int *alloc_items, int *num_items, - struct ctl_io_stats **xstats, struct timespec *cur_time, int *time_valid); + struct ctl_io_stats **xstats, struct timespec *cur_time, int *time_valid, + bool ports); static int getcpu(struct ctl_cpu_stats *cpu_stats); static void compute_stats(struct ctl_io_stats *cur_stats, struct ctl_io_stats *prev_stats, @@ -168,7 +171,7 @@ usage(int error) static int getstats(int fd, int *alloc_items, int *num_items, struct ctl_io_stats **stats, - struct timespec *cur_time, int *flags) + struct timespec *cur_time, int *flags, bool ports) { struct ctl_get_io_stats get_stats; int more_space_count = 0; @@ -184,8 +187,8 @@ retry: memset(*stats, 0, get_stats.alloc_len); get_stats.stats = *stats; - if (ioctl(fd, (*flags & CTLSTAT_FLAG_PORTS) ? CTL_GET_PORT_STATS : - CTL_GET_LUN_STATS, &get_stats) == -1) + if (ioctl(fd, ports ? CTL_GET_PORT_STATS : CTL_GET_LUN_STATS, + &get_stats) == -1) err(1, "CTL_GET_*_STATS ioctl returned error"); switch (get_stats.status) { @@ -395,24 +398,33 @@ ctlstat_json(struct ctlstat_context *ctx) { printf("]}"); } -#define CTLSTAT_PROMETHEUS_LOOP(field) \ +#define CTLSTAT_PROMETHEUS_LOOP(field, collector) \ for (i = n = 0; i < ctx->cur_items; i++) { \ if (F_MASK(ctx) && bit_test(ctx->item_mask, \ (int)stats[i].item) == 0) \ continue; \ for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; iotype++) { \ - int lun = stats[i].item; \ - if (lun >= targdata.ntargets) \ - errx(1, "LUN %u out of range", lun); \ - printf("iscsi_target_" #field "{" \ - "lun=\"%u\",target=\"%s\",type=\"%s\"} %" PRIu64 \ + int idx = stats[i].item; \ + /* \ + * Note that Prometheus considers a label value of "" \ + * to be the same as no label at all \ + */ \ + const char *target = ""; \ + if (strcmp(collector, "port") == 0 && \ + targdata.targets[idx] != NULL) \ + { \ + target = targdata.targets[idx]; \ + } \ + printf("iscsi_%s_" #field "{" \ + "%s=\"%u\",target=\"%s\",type=\"%s\"} %" PRIu64 \ "\n", \ - lun, targdata.targets[lun], iotypes[iotype], \ + collector, collector, \ + idx, target, iotypes[iotype], \ stats[i].field[iotype]); \ } \ } \ -#define CTLSTAT_PROMETHEUS_TIMELOOP(field) \ +#define CTLSTAT_PROMETHEUS_TIMELOOP(field, collector) \ for (i = n = 0; i < ctx->cur_items; i++) { \ if (F_MASK(ctx) && bit_test(ctx->item_mask, \ (int)stats[i].item) == 0) \ @@ -420,20 +432,29 @@ ctlstat_json(struct ctlstat_context *ctx) { for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; iotype++) { \ uint64_t us; \ struct timespec ts; \ - int lun = stats[i].item; \ - if (lun >= targdata.ntargets) \ - errx(1, "LUN %u out of range", lun); \ + int idx = stats[i].item; \ + /* \ + * Note that Prometheus considers a label value of "" \ + * to be the same as no label at all \ + */ \ + const char *target = ""; \ + if (strcmp(collector, "port") == 0 && \ + targdata.targets[idx] != NULL) \ + { \ + target = targdata.targets[idx]; \ + } \ bintime2timespec(&stats[i].field[iotype], &ts); \ us = ts.tv_sec * 1000000 + ts.tv_nsec / 1000; \ - printf("iscsi_target_" #field "{" \ - "lun=\"%u\",target=\"%s\",type=\"%s\"} %" PRIu64 \ + printf("iscsi_%s_" #field "{" \ + "%s=\"%u\",target=\"%s\",type=\"%s\"} %" PRIu64 \ "\n", \ - lun, targdata.targets[lun], iotypes[iotype], us); \ + collector, collector, \ + idx, target, iotypes[iotype], us); \ } \ } \ static void -cctl_start_pelement(void *user_data, const char *name, const char **attr __unused) +cctl_start_pelement(void *user_data, const char *name, const char **attr) { struct cctl_portlist_data* targdata = user_data; @@ -448,9 +469,24 @@ cctl_start_pelement(void *user_data, const char *name, const char **attr __unuse err(1, "%s: Unable to allocate sbuf", __func__); if (strcmp(name, "targ_port") == 0) { + int i = 0; + targdata->lun = -1; + targdata->id = -1; free(targdata->target); targdata->target = NULL; + while (attr[i]) { + if (strcmp(attr[i], "id") == 0) { + /* + * Well-formed XML always pairs keys with + * values in attr + */ + assert(attr[i + 1]); + targdata->id = atoi(attr[i + 1]); + } + i += 2; + } + } } @@ -486,25 +522,22 @@ cctl_end_pelement(void *user_data, const char *name) if (strcmp(name, "target") == 0) { free(targdata->target); targdata->target = str; - } else if (strcmp(name, "lun") == 0) { - targdata->lun = atoi(str); - free(str); } else if (strcmp(name, "targ_port") == 0) { - if (targdata->lun >= 0 && targdata->target != NULL) { - if (targdata->lun >= targdata->ntargets) { + if (targdata->id >= 0 && targdata->target != NULL) { + if (targdata->id >= targdata->ntargets) { /* * This can happen for example if there are - * holes in CTL's lunlist. + * targets with no LUNs. */ targdata->ntargets = MAX(targdata->ntargets * 2, - targdata->lun + 1); + targdata->id + 1); size_t newsize = targdata->ntargets * sizeof(char*); targdata->targets = rallocx(targdata->targets, newsize, MALLOCX_ZERO); } - free(targdata->targets[targdata->lun]); - targdata->targets[targdata->lun] = targdata->target; + free(targdata->targets[targdata->id]); + targdata->targets[targdata->id] = targdata->target; targdata->target = NULL; } free(str); @@ -514,7 +547,7 @@ cctl_end_pelement(void *user_data, const char *name) } static void -ctlstat_prometheus(int fd, struct ctlstat_context *ctx) { +ctlstat_prometheus(int fd, struct ctlstat_context *ctx, bool ports) { struct ctl_io_stats *stats = ctx->cur_stats; struct ctl_lun_list list; struct cctl_portlist_data targdata; @@ -522,6 +555,7 @@ ctlstat_prometheus(int fd, struct ctlstat_context *ctx) { char *port_str = NULL; int iotype, i, n, retval; int port_len = 4096; + const char *collector; bzero(&targdata, sizeof(targdata)); targdata.ntargets = ctx->cur_items; @@ -556,30 +590,23 @@ retry: } XML_ParserFree(parser); - /* - * NB: Some clients will print a warning if we don't set Content-Length, - * but they still work. And the data still gets into Prometheus. - */ - printf("HTTP/1.1 200 OK\r\n" - "Connection: close\r\n" - "Content-Type: text/plain; version=0.0.4\r\n" - "\r\n"); - - printf("# HELP iscsi_target_bytes Number of bytes\n" - "# TYPE iscsi_target_bytes counter\n"); - CTLSTAT_PROMETHEUS_LOOP(bytes); - printf("# HELP iscsi_target_dmas Number of DMA\n" - "# TYPE iscsi_target_dmas counter\n"); - CTLSTAT_PROMETHEUS_LOOP(dmas); - printf("# HELP iscsi_target_operations Number of operations\n" - "# TYPE iscsi_target_operations counter\n"); - CTLSTAT_PROMETHEUS_LOOP(operations); - printf("# HELP iscsi_target_time Cumulative operation time in us\n" - "# TYPE iscsi_target_time counter\n"); - CTLSTAT_PROMETHEUS_TIMELOOP(time); - printf("# HELP iscsi_target_dma_time Cumulative DMA time in us\n" - "# TYPE iscsi_target_dma_time counter\n"); - CTLSTAT_PROMETHEUS_TIMELOOP(dma_time); + collector = ports ? "port" : "lun"; + + printf("# HELP iscsi_%s_bytes Number of bytes\n" + "# TYPE iscsi_%s_bytes counter\n", collector, collector); + CTLSTAT_PROMETHEUS_LOOP(bytes, collector); + printf("# HELP iscsi_%s_dmas Number of DMA\n" + "# TYPE iscsi_%s_dmas counter\n", collector, collector); + CTLSTAT_PROMETHEUS_LOOP(dmas, collector); + printf("# HELP iscsi_%s_operations Number of operations\n" + "# TYPE iscsi_%s_operations counter\n", collector, collector); + CTLSTAT_PROMETHEUS_LOOP(operations, collector); + printf("# HELP iscsi_%s_time Cumulative operation time in us\n" + "# TYPE iscsi_%s_time counter\n", collector, collector); + CTLSTAT_PROMETHEUS_TIMELOOP(time, collector); + printf("# HELP iscsi_%s_dma_time Cumulative DMA time in us\n" + "# TYPE iscsi_%s_dma_time counter\n", collector, collector); + CTLSTAT_PROMETHEUS_TIMELOOP(dma_time, collector); for (i = 0; i < targdata.ntargets; i++) free(targdata.targets[i]); @@ -779,6 +806,45 @@ ctlstat_standard(struct ctlstat_context *ctx) { } } +static void +get_and_print_stats(int fd, struct ctlstat_context *ctx, bool ports) +{ + struct ctl_io_stats *tmp_stats; + int c; + + tmp_stats = ctx->prev_stats; + ctx->prev_stats = ctx->cur_stats; + ctx->cur_stats = tmp_stats; + c = ctx->prev_alloc; + ctx->prev_alloc = ctx->cur_alloc; + ctx->cur_alloc = c; + c = ctx->prev_items; + ctx->prev_items = ctx->cur_items; + ctx->cur_items = c; + ctx->prev_time = ctx->cur_time; + ctx->prev_cpu = ctx->cur_cpu; + if (getstats(fd, &ctx->cur_alloc, &ctx->cur_items, + &ctx->cur_stats, &ctx->cur_time, &ctx->flags, ports) != 0) + errx(1, "error returned from getstats()"); + + switch(ctx->mode) { + case CTLSTAT_MODE_STANDARD: + ctlstat_standard(ctx); + break; + case CTLSTAT_MODE_DUMP: + ctlstat_dump(ctx); + break; + case CTLSTAT_MODE_JSON: + ctlstat_json(ctx); + break; + case CTLSTAT_MODE_PROMETHEUS: + ctlstat_prometheus(fd, ctx, ports); + break; + default: + break; + } +} + int main(int argc, char **argv) { @@ -787,7 +853,6 @@ main(int argc, char **argv) int fd, retval; size_t size; struct ctlstat_context ctx; - struct ctl_io_stats *tmp_stats; /* default values */ retval = 0; @@ -890,10 +955,11 @@ main(int argc, char **argv) if (ctx.mode == CTLSTAT_MODE_PROMETHEUS) { if ((count != -1) || (waittime != 1) || + (F_PORTS(&ctx)) || /* NB: -P could be compatible with -t in the future */ (ctx.flags & CTLSTAT_FLAG_TOTALS)) { - errx(1, "Option -P is exclusive with -c, -w, and -t"); + errx(1, "Option -P is exclusive with -p, -c, -w, and -t"); } count = 1; } @@ -908,37 +974,27 @@ main(int argc, char **argv) if ((fd = open(CTL_DEFAULT_DEV, O_RDWR)) == -1) err(1, "cannot open %s", CTL_DEFAULT_DEV); + if (ctx.mode == CTLSTAT_MODE_PROMETHEUS) { + /* + * NB: Some clients will print a warning if we don't set + * Content-Length, but they still work. And the data still + * gets into Prometheus. + */ + printf("HTTP/1.1 200 OK\r\n" + "Connection: close\r\n" + "Content-Type: text/plain; version=0.0.4\r\n" + "\r\n"); + } + for (;count != 0;) { - tmp_stats = ctx.prev_stats; - ctx.prev_stats = ctx.cur_stats; - ctx.cur_stats = tmp_stats; - c = ctx.prev_alloc; - ctx.prev_alloc = ctx.cur_alloc; - ctx.cur_alloc = c; - c = ctx.prev_items; - ctx.prev_items = ctx.cur_items; - ctx.cur_items = c; - ctx.prev_time = ctx.cur_time; - ctx.prev_cpu = ctx.cur_cpu; - if (getstats(fd, &ctx.cur_alloc, &ctx.cur_items, - &ctx.cur_stats, &ctx.cur_time, &ctx.flags) != 0) - errx(1, "error returned from getstats()"); - - switch(ctx.mode) { - case CTLSTAT_MODE_STANDARD: - ctlstat_standard(&ctx); - break; - case CTLSTAT_MODE_DUMP: - ctlstat_dump(&ctx); - break; - case CTLSTAT_MODE_JSON: - ctlstat_json(&ctx); - break; - case CTLSTAT_MODE_PROMETHEUS: - ctlstat_prometheus(fd, &ctx); - break; - default: - break; + bool ports; + + if (ctx.mode == CTLSTAT_MODE_PROMETHEUS) { + get_and_print_stats(fd, &ctx, false); + get_and_print_stats(fd, &ctx, true); + } else { + ports = ctx.flags & CTLSTAT_FLAG_PORTS; + get_and_print_stats(fd, &ctx, ports); } fprintf(stdout, "\n"); From nobody Thu Feb 16 18:01:29 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjS93n9Yz3rFs1; Thu, 16 Feb 2023 18:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjS93RdKz4HvM; Thu, 16 Feb 2023 18:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2qfwTQZXzVuP+c1uett2H89mT/3p2cBNJu8ynReKfRY=; b=Sb885TocjAnujRvC2ftLLKhifecp7kHHc9pIfFq6VkkxzKs5DC3sjP8hjPkg7nspLsFRxw 7weViEagwatjmGwBkTt37CDn92omZWgz+AHX2smp+SjGErpyVSlM9J7vilQ1OFrLaXkSHq Dk0TVB8KJDLpKnA9ObuNmT3npN2BysdSAg3JBaqJUP6Y060i58aAd0LP1T7kPM7qITj/8W jhtPTDm3L6zFlkbGDbmmdJcjgWbvV6XUXnA6LZ8my7hQVSIbKH01Uv28AV5I1z5WptYK68 hw70x/glE6uhWCQndf0wLDDWvNivFwTAlNnmCDLMfSMcNNkVAmoyhEdVgoubcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2qfwTQZXzVuP+c1uett2H89mT/3p2cBNJu8ynReKfRY=; b=jQxc1eBkZB1qDVobnOiVS5HbsOJb36yv0sG+lpX07+6jl4EIVyiY3hYn1SpXmoHmqjHAWU H1QthW/aH+dJtmE0C+kCped0e7AeBjV0WlGP8F5ircTU6SO3YsqpHIYZtpD5T50i0WAg6S Br3tKjiGO47mBmPKSa6JWMyIs5mL6nYK4SKlQ9pKzJzxBRLgfH+tHxm0zn0KTgxSHbN88P 3/8lSnUSCtbUWzeyrU4Ey9+Psz9pIQ1xOTFDwwbhmvN+WvIIXQCfzwTjRRulM8VDbNR+xD Rua022T9TgaY/kh+8czEuM12f1izLAB7j+RBj0t9KYkJ91DSYET732Ts8h9XaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676570489; a=rsa-sha256; cv=none; b=MJyRFdEkdMmXkS7Va6syldEMGhF1bpAt1+hjSOcxj2nJ94uyCel0sI/7naxBaeot7NU64Y OGdw4MT3SixQcoMlPIpOk3mfap3Ed0havQWerBDLSgTtDjaTrUb5xJyOKmrqwfUHF3etKI OcF1jSfnldYe32FAROZGhtH8KFyRcJnj4N0o31CzTv8Fyqs7H8jrRQ3XaPcZ+cVYw9Phwj uVbC19W21YwFd2WOOLxZ0Hf1mpJOO6vN4GmhdUXBeWWby1ZHZmfyIdz3Z0Bz+sevD3x14D IL2XPuhBgHi1OwfTiDtXeCJe7tzURGkNSnsVHREeKHoWUQI9ddXzzR7TVTbZHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHjS92X4Tz1CbL; Thu, 16 Feb 2023 18:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GI1T8j081895; Thu, 16 Feb 2023 18:01:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GI1TB5081894; Thu, 16 Feb 2023 18:01:29 GMT (envelope-from git) Date: Thu, 16 Feb 2023 18:01:29 GMT Message-Id: <202302161801.31GI1TB5081894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: e237b128e080 - releng/13.1 - Fix multiple OpenSSL vulnerabilities. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: e237b128e080f98e91c43c7050409a817d007672 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=e237b128e080f98e91c43c7050409a817d007672 commit e237b128e080f98e91c43c7050409a817d007672 Author: Gordon Tetlow AuthorDate: 2023-02-16 17:20:43 +0000 Commit: Gordon Tetlow CommitDate: 2023-02-16 17:58:13 +0000 Fix multiple OpenSSL vulnerabilities. Approved by: so Security: FreeBSD-SA-23:03.openssl Security: CVE-2023-0286 Security: CVE-2023-0215 Security: CVE-2022-4450 Security: CVE-2022-4304 --- crypto/openssl/crypto/asn1/bio_ndef.c | 39 +- crypto/openssl/crypto/bn/bn_blind.c | 14 - crypto/openssl/crypto/bn/bn_err.c | 2 + crypto/openssl/crypto/bn/bn_local.h | 14 + crypto/openssl/crypto/bn/rsa_sup_mul.c | 614 ++++++++++++++++++++++++++++++++ crypto/openssl/crypto/err/openssl.txt | 3 +- crypto/openssl/crypto/pem/pem_lib.c | 2 + crypto/openssl/crypto/rsa/rsa_ossl.c | 17 +- crypto/openssl/crypto/x509v3/v3_genn.c | 2 +- crypto/openssl/include/crypto/bn.h | 5 + crypto/openssl/include/openssl/bnerr.h | 1 + crypto/openssl/include/openssl/x509v3.h | 2 +- secure/lib/libcrypto/Makefile | 1 + 13 files changed, 688 insertions(+), 28 deletions(-) diff --git a/crypto/openssl/crypto/asn1/bio_ndef.c b/crypto/openssl/crypto/asn1/bio_ndef.c index 760e4846a474..f8d4b1b9aa67 100644 --- a/crypto/openssl/crypto/asn1/bio_ndef.c +++ b/crypto/openssl/crypto/asn1/bio_ndef.c @@ -49,12 +49,19 @@ static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg); static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg); +/* + * On success, the returned BIO owns the input BIO as part of its BIO chain. + * On failure, NULL is returned and the input BIO is owned by the caller. + * + * Unfortunately cannot constify this due to CMS_stream() and PKCS7_stream() + */ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) { NDEF_SUPPORT *ndef_aux = NULL; BIO *asn_bio = NULL; const ASN1_AUX *aux = it->funcs; ASN1_STREAM_ARG sarg; + BIO *pop_bio = NULL; if (!aux || !aux->asn1_cb) { ASN1err(ASN1_F_BIO_NEW_NDEF, ASN1_R_STREAMING_NOT_SUPPORTED); @@ -69,21 +76,39 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) out = BIO_push(asn_bio, out); if (out == NULL) goto err; + pop_bio = asn_bio; - BIO_asn1_set_prefix(asn_bio, ndef_prefix, ndef_prefix_free); - BIO_asn1_set_suffix(asn_bio, ndef_suffix, ndef_suffix_free); + if (BIO_asn1_set_prefix(asn_bio, ndef_prefix, ndef_prefix_free) <= 0 + || BIO_asn1_set_suffix(asn_bio, ndef_suffix, ndef_suffix_free) <= 0 + || BIO_ctrl(asn_bio, BIO_C_SET_EX_ARG, 0, ndef_aux) <= 0) + goto err; /* - * Now let callback prepends any digest, cipher etc BIOs ASN1 structure - * needs. + * Now let the callback prepend any digest, cipher, etc., that the BIO's + * ASN1 structure needs. */ sarg.out = out; sarg.ndef_bio = NULL; sarg.boundary = NULL; - if (aux->asn1_cb(ASN1_OP_STREAM_PRE, &val, it, &sarg) <= 0) + /* + * The asn1_cb(), must not have mutated asn_bio on error, leaving it in the + * middle of some partially built, but not returned BIO chain. + */ + if (aux->asn1_cb(ASN1_OP_STREAM_PRE, &val, it, &sarg) <= 0) { + /* + * ndef_aux is now owned by asn_bio so we must not free it in the err + * clean up block + */ + ndef_aux = NULL; goto err; + } + + /* + * We must not fail now because the callback has prepended additional + * BIOs to the chain + */ ndef_aux->val = val; ndef_aux->it = it; @@ -91,11 +116,11 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) ndef_aux->boundary = sarg.boundary; ndef_aux->out = out; - BIO_ctrl(asn_bio, BIO_C_SET_EX_ARG, 0, ndef_aux); - return sarg.ndef_bio; err: + /* BIO_pop() is NULL safe */ + (void)BIO_pop(pop_bio); BIO_free(asn_bio); OPENSSL_free(ndef_aux); return NULL; diff --git a/crypto/openssl/crypto/bn/bn_blind.c b/crypto/openssl/crypto/bn/bn_blind.c index 76fc7ebcffc0..6e9d23932119 100644 --- a/crypto/openssl/crypto/bn/bn_blind.c +++ b/crypto/openssl/crypto/bn/bn_blind.c @@ -13,20 +13,6 @@ #define BN_BLINDING_COUNTER 32 -struct bn_blinding_st { - BIGNUM *A; - BIGNUM *Ai; - BIGNUM *e; - BIGNUM *mod; /* just a reference */ - CRYPTO_THREAD_ID tid; - int counter; - unsigned long flags; - BN_MONT_CTX *m_ctx; - int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); - CRYPTO_RWLOCK *lock; -}; - BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod) { BN_BLINDING *ret = NULL; diff --git a/crypto/openssl/crypto/bn/bn_err.c b/crypto/openssl/crypto/bn/bn_err.c index dd87c152cf37..3dd8d9a5682b 100644 --- a/crypto/openssl/crypto/bn/bn_err.c +++ b/crypto/openssl/crypto/bn/bn_err.c @@ -73,6 +73,8 @@ static const ERR_STRING_DATA BN_str_functs[] = { {ERR_PACK(ERR_LIB_BN, BN_F_BN_SET_WORDS, 0), "bn_set_words"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_STACK_PUSH, 0), "BN_STACK_push"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_USUB, 0), "BN_usub"}, + {ERR_PACK(ERR_LIB_BN, BN_F_OSSL_BN_RSA_DO_UNBLIND, 0), + "ossl_bn_rsa_do_unblind"}, {0, NULL} }; diff --git a/crypto/openssl/crypto/bn/bn_local.h b/crypto/openssl/crypto/bn/bn_local.h index 8ad69ccd3639..096513533b70 100644 --- a/crypto/openssl/crypto/bn/bn_local.h +++ b/crypto/openssl/crypto/bn/bn_local.h @@ -263,6 +263,20 @@ struct bn_gencb_st { } cb; }; +struct bn_blinding_st { + BIGNUM *A; + BIGNUM *Ai; + BIGNUM *e; + BIGNUM *mod; /* just a reference */ + CRYPTO_THREAD_ID tid; + int counter; + unsigned long flags; + BN_MONT_CTX *m_ctx; + int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); + CRYPTO_RWLOCK *lock; +}; + /*- * BN_window_bits_for_exponent_size -- macro for sliding window mod_exp functions * diff --git a/crypto/openssl/crypto/bn/rsa_sup_mul.c b/crypto/openssl/crypto/bn/rsa_sup_mul.c new file mode 100644 index 000000000000..acafefd5febf --- /dev/null +++ b/crypto/openssl/crypto/bn/rsa_sup_mul.c @@ -0,0 +1,614 @@ +#include +#include +#include +#include +#include +#include +#include +#include "internal/numbers.h" +#include "internal/constant_time.h" +#include "bn_local.h" + +# if BN_BYTES == 8 +typedef uint64_t limb_t; +# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ == 16 +/* nonstandard; implemented by gcc on 64-bit platforms */ +typedef __uint128_t limb2_t; +# define HAVE_LIMB2_T +# endif +# define LIMB_BIT_SIZE 64 +# define LIMB_BYTE_SIZE 8 +# elif BN_BYTES == 4 +typedef uint32_t limb_t; +typedef uint64_t limb2_t; +# define LIMB_BIT_SIZE 32 +# define LIMB_BYTE_SIZE 4 +# define HAVE_LIMB2_T +# else +# error "Not supported" +# endif + +/* + * For multiplication we're using schoolbook multiplication, + * so if we have two numbers, each with 6 "digits" (words) + * the multiplication is calculated as follows: + * A B C D E F + * x I J K L M N + * -------------- + * N*F + * N*E + * N*D + * N*C + * N*B + * N*A + * M*F + * M*E + * M*D + * M*C + * M*B + * M*A + * L*F + * L*E + * L*D + * L*C + * L*B + * L*A + * K*F + * K*E + * K*D + * K*C + * K*B + * K*A + * J*F + * J*E + * J*D + * J*C + * J*B + * J*A + * I*F + * I*E + * I*D + * I*C + * I*B + * + I*A + * ========================== + * N*B N*D N*F + * + N*A N*C N*E + * + M*B M*D M*F + * + M*A M*C M*E + * + L*B L*D L*F + * + L*A L*C L*E + * + K*B K*D K*F + * + K*A K*C K*E + * + J*B J*D J*F + * + J*A J*C J*E + * + I*B I*D I*F + * + I*A I*C I*E + * + * 1+1 1+3 1+5 + * 1+0 1+2 1+4 + * 0+1 0+3 0+5 + * 0+0 0+2 0+4 + * + * 0 1 2 3 4 5 6 + * which requires n^2 multiplications and 2n full length additions + * as we can keep every other result of limb multiplication in two separate + * limbs + */ + +#if defined HAVE_LIMB2_T +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + limb2_t t; + /* + * this is idiomatic code to tell compiler to use the native mul + * those three lines will actually compile to single instruction + */ + + t = (limb2_t)a * b; + *hi = t >> LIMB_BIT_SIZE; + *lo = (limb_t)t; +} +#elif (BN_BYTES == 8) && (defined _MSC_VER) +/* https://learn.microsoft.com/en-us/cpp/intrinsics/umul128?view=msvc-170 */ +#pragma intrinsic(_umul128) +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + *lo = _umul128(a, b, hi); +} +#else +/* + * if the compiler doesn't have either a 128bit data type nor a "return + * high 64 bits of multiplication" + */ +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + limb_t a_low = (limb_t)(uint32_t)a; + limb_t a_hi = a >> 32; + limb_t b_low = (limb_t)(uint32_t)b; + limb_t b_hi = b >> 32; + + limb_t p0 = a_low * b_low; + limb_t p1 = a_low * b_hi; + limb_t p2 = a_hi * b_low; + limb_t p3 = a_hi * b_hi; + + uint32_t cy = (uint32_t)(((p0 >> 32) + (uint32_t)p1 + (uint32_t)p2) >> 32); + + *lo = p0 + (p1 << 32) + (p2 << 32); + *hi = p3 + (p1 >> 32) + (p2 >> 32) + cy; +} +#endif + +/* add two limbs with carry in, return carry out */ +static ossl_inline limb_t _add_limb(limb_t *ret, limb_t a, limb_t b, limb_t carry) +{ + limb_t carry1, carry2, t; + /* + * `c = a + b; if (c < a)` is idiomatic code that makes compilers + * use add with carry on assembly level + */ + + *ret = a + carry; + if (*ret < a) + carry1 = 1; + else + carry1 = 0; + + t = *ret; + *ret = t + b; + if (*ret < t) + carry2 = 1; + else + carry2 = 0; + + return carry1 + carry2; +} + +/* + * add two numbers of the same size, return overflow + * + * add a to b, place result in ret; all arrays need to be n limbs long + * return overflow from addition (0 or 1) + */ +static ossl_inline limb_t add(limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + limb_t c = 0; + ossl_ssize_t i; + + for(i = n - 1; i > -1; i--) + c = _add_limb(&ret[i], a[i], b[i], c); + + return c; +} + +/* + * return number of limbs necessary for temporary values + * when multiplying numbers n limbs large + */ +static ossl_inline size_t mul_limb_numb(size_t n) +{ + return 2 * n * 2; +} + +/* + * multiply two numbers of the same size + * + * multiply a by b, place result in ret; a and b need to be n limbs long + * ret needs to be 2*n limbs long, tmp needs to be mul_limb_numb(n) limbs + * long + */ +static void limb_mul(limb_t *ret, limb_t *a, limb_t *b, size_t n, limb_t *tmp) +{ + limb_t *r_odd, *r_even; + size_t i, j, k; + + r_odd = tmp; + r_even = &tmp[2 * n]; + + memset(ret, 0, 2 * n * sizeof(limb_t)); + + for (i = 0; i < n; i++) { + for (k = 0; k < i + n + 1; k++) { + r_even[k] = 0; + r_odd[k] = 0; + } + for (j = 0; j < n; j++) { + /* + * place results from even and odd limbs in separate arrays so that + * we don't have to calculate overflow every time we get individual + * limb multiplication result + */ + if (j % 2 == 0) + _mul_limb(&r_even[i + j], &r_even[i + j + 1], a[i], b[j]); + else + _mul_limb(&r_odd[i + j], &r_odd[i + j + 1], a[i], b[j]); + } + /* + * skip the least significant limbs when adding multiples of + * more significant limbs (they're zero anyway) + */ + add(ret, ret, r_even, n + i + 1); + add(ret, ret, r_odd, n + i + 1); + } +} + +/* modifies the value in place by performing a right shift by one bit */ +static ossl_inline void rshift1(limb_t *val, size_t n) +{ + limb_t shift_in = 0, shift_out = 0; + size_t i; + + for (i = 0; i < n; i++) { + shift_out = val[i] & 1; + val[i] = shift_in << (LIMB_BIT_SIZE - 1) | (val[i] >> 1); + shift_in = shift_out; + } +} + +/* extend the LSB of flag to all bits of limb */ +static ossl_inline limb_t mk_mask(limb_t flag) +{ + flag |= flag << 1; + flag |= flag << 2; + flag |= flag << 4; + flag |= flag << 8; + flag |= flag << 16; +#if (LIMB_BYTE_SIZE == 8) + flag |= flag << 32; +#endif + return flag; +} + +/* + * copy from either a or b to ret based on flag + * when flag == 0, then copies from b + * when flag == 1, then copies from a + */ +static ossl_inline void cselect(limb_t flag, limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + /* + * would be more efficient with non volatile mask, but then gcc + * generates code with jumps + */ + volatile limb_t mask; + size_t i; + + mask = mk_mask(flag); + for (i = 0; i < n; i++) { +#if (LIMB_BYTE_SIZE == 8) + ret[i] = constant_time_select_64(mask, a[i], b[i]); +#else + ret[i] = constant_time_select_32(mask, a[i], b[i]); +#endif + } +} + +static limb_t _sub_limb(limb_t *ret, limb_t a, limb_t b, limb_t borrow) +{ + limb_t borrow1, borrow2, t; + /* + * while it doesn't look constant-time, this is idiomatic code + * to tell compilers to use the carry bit from subtraction + */ + + *ret = a - borrow; + if (*ret > a) + borrow1 = 1; + else + borrow1 = 0; + + t = *ret; + *ret = t - b; + if (*ret > t) + borrow2 = 1; + else + borrow2 = 0; + + return borrow1 + borrow2; +} + +/* + * place the result of a - b into ret, return the borrow bit. + * All arrays need to be n limbs long + */ +static limb_t sub(limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + limb_t borrow = 0; + ossl_ssize_t i; + + for (i = n - 1; i > -1; i--) + borrow = _sub_limb(&ret[i], a[i], b[i], borrow); + + return borrow; +} + +/* return the number of limbs necessary to allocate for the mod() tmp operand */ +static ossl_inline size_t mod_limb_numb(size_t anum, size_t modnum) +{ + return (anum + modnum) * 3; +} + +/* + * calculate a % mod, place the result in ret + * size of a is defined by anum, size of ret and mod is modnum, + * size of tmp is returned by mod_limb_numb() + */ +static void mod(limb_t *ret, limb_t *a, size_t anum, limb_t *mod, + size_t modnum, limb_t *tmp) +{ + limb_t *atmp, *modtmp, *rettmp; + limb_t res; + size_t i; + + memset(tmp, 0, mod_limb_numb(anum, modnum) * LIMB_BYTE_SIZE); + + atmp = tmp; + modtmp = &tmp[anum + modnum]; + rettmp = &tmp[(anum + modnum) * 2]; + + for (i = modnum; i 0; i--, rp--) { + v = _mul_add_limb(rp, mod, modnum, rp[modnum - 1] * ni0, tmp2); + v = v + carry + rp[-1]; + carry |= (v != rp[-1]); + carry &= (v <= rp[-1]); + rp[-1] = v; + } + + /* perform the final reduction by mod... */ + carry -= sub(ret, rp, mod, modnum); + + /* ...conditionally */ + cselect(carry, ret, rp, ret, modnum); +} + +/* allocated buffer should be freed afterwards */ +static void BN_to_limb(const BIGNUM *bn, limb_t *buf, size_t limbs) +{ + int i; + int real_limbs = (BN_num_bytes(bn) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + limb_t *ptr = buf + (limbs - real_limbs); + + for (i = 0; i < real_limbs; i++) + ptr[i] = bn->d[real_limbs - i - 1]; +} + +#if LIMB_BYTE_SIZE == 8 +static ossl_inline uint64_t be64(uint64_t host) +{ + const union { + long one; + char little; + } is_endian = { 1 }; + + if (is_endian.little) { + uint64_t big = 0; + + big |= (host & 0xff00000000000000) >> 56; + big |= (host & 0x00ff000000000000) >> 40; + big |= (host & 0x0000ff0000000000) >> 24; + big |= (host & 0x000000ff00000000) >> 8; + big |= (host & 0x00000000ff000000) << 8; + big |= (host & 0x0000000000ff0000) << 24; + big |= (host & 0x000000000000ff00) << 40; + big |= (host & 0x00000000000000ff) << 56; + return big; + } else { + return host; + } +} + +#else +/* Not all platforms have htobe32(). */ +static ossl_inline uint32_t be32(uint32_t host) +{ + const union { + long one; + char little; + } is_endian = { 1 }; + + if (is_endian.little) { + uint32_t big = 0; + + big |= (host & 0xff000000) >> 24; + big |= (host & 0x00ff0000) >> 8; + big |= (host & 0x0000ff00) << 8; + big |= (host & 0x000000ff) << 24; + return big; + } else { + return host; + } +} +#endif + +/* + * We assume that intermediate, possible_arg2, blinding, and ctx are used + * similar to BN_BLINDING_invert_ex() arguments. + * to_mod is RSA modulus. + * buf and num is the serialization buffer and its length. + * + * Here we use classic/Montgomery multiplication and modulo. After the calculation finished + * we serialize the new structure instead of BIGNUMs taking endianness into account. + */ +int ossl_bn_rsa_do_unblind(const BIGNUM *intermediate, + const BN_BLINDING *blinding, + const BIGNUM *possible_arg2, + const BIGNUM *to_mod, BN_CTX *ctx, + unsigned char *buf, int num) +{ + limb_t *l_im = NULL, *l_mul = NULL, *l_mod = NULL; + limb_t *l_ret = NULL, *l_tmp = NULL, l_buf; + size_t l_im_count = 0, l_mul_count = 0, l_size = 0, l_mod_count = 0; + size_t l_tmp_count = 0; + int ret = 0; + size_t i; + unsigned char *tmp; + const BIGNUM *arg1 = intermediate; + const BIGNUM *arg2 = (possible_arg2 == NULL) ? blinding->Ai : possible_arg2; + + l_im_count = (BN_num_bytes(arg1) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + l_mul_count = (BN_num_bytes(arg2) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + l_mod_count = (BN_num_bytes(to_mod) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + + l_size = l_im_count > l_mul_count ? l_im_count : l_mul_count; + l_im = OPENSSL_zalloc(l_size * LIMB_BYTE_SIZE); + l_mul = OPENSSL_zalloc(l_size * LIMB_BYTE_SIZE); + l_mod = OPENSSL_zalloc(l_mod_count * LIMB_BYTE_SIZE); + + if ((l_im == NULL) || (l_mul == NULL) || (l_mod == NULL)) + goto err; + + BN_to_limb(arg1, l_im, l_size); + BN_to_limb(arg2, l_mul, l_size); + BN_to_limb(to_mod, l_mod, l_mod_count); + + l_ret = OPENSSL_malloc(2 * l_size * LIMB_BYTE_SIZE); + + if (blinding->m_ctx != NULL) { + l_tmp_count = mul_limb_numb(l_size) > mod_montgomery_limb_numb(l_mod_count) ? + mul_limb_numb(l_size) : mod_montgomery_limb_numb(l_mod_count); + l_tmp = OPENSSL_malloc(l_tmp_count * LIMB_BYTE_SIZE); + } else { + l_tmp_count = mul_limb_numb(l_size) > mod_limb_numb(2 * l_size, l_mod_count) ? + mul_limb_numb(l_size) : mod_limb_numb(2 * l_size, l_mod_count); + l_tmp = OPENSSL_malloc(l_tmp_count * LIMB_BYTE_SIZE); + } + + if ((l_ret == NULL) || (l_tmp == NULL)) + goto err; + + if (blinding->m_ctx != NULL) { + limb_mul(l_ret, l_im, l_mul, l_size, l_tmp); + mod_montgomery(l_ret, l_ret, 2 * l_size, l_mod, l_mod_count, + blinding->m_ctx->n0[0], l_tmp); + } else { + limb_mul(l_ret, l_im, l_mul, l_size, l_tmp); + mod(l_ret, l_ret, 2 * l_size, l_mod, l_mod_count, l_tmp); + } + + /* modulus size in bytes can be equal to num but after limbs conversion it becomes bigger */ + if (num < BN_num_bytes(to_mod)) { + BNerr(BN_F_OSSL_BN_RSA_DO_UNBLIND, ERR_R_PASSED_INVALID_ARGUMENT); + goto err; + } + + memset(buf, 0, num); + tmp = buf + num - BN_num_bytes(to_mod); + for (i = 0; i < l_mod_count; i++) { +#if LIMB_BYTE_SIZE == 8 + l_buf = be64(l_ret[i]); +#else + l_buf = be32(l_ret[i]); +#endif + if (i == 0) { + int delta = LIMB_BYTE_SIZE - ((l_mod_count * LIMB_BYTE_SIZE) - num); + + memcpy(tmp, ((char *)&l_buf) + LIMB_BYTE_SIZE - delta, delta); + tmp += delta; + } else { + memcpy(tmp, &l_buf, LIMB_BYTE_SIZE); + tmp += LIMB_BYTE_SIZE; + } + } + ret = num; + + err: + OPENSSL_free(l_im); + OPENSSL_free(l_mul); + OPENSSL_free(l_mod); + OPENSSL_free(l_tmp); + OPENSSL_free(l_ret); + + return ret; +} diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index 846c896359cb..d2f67d611790 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -1,4 +1,4 @@ -# Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1999-2023 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -232,6 +232,7 @@ BN_F_BN_RSHIFT:146:BN_rshift BN_F_BN_SET_WORDS:144:bn_set_words BN_F_BN_STACK_PUSH:148:BN_STACK_push BN_F_BN_USUB:115:BN_usub +BN_F_OSSL_BN_RSA_DO_UNBLIND:151:ossl_bn_rsa_do_unblind BUF_F_BUF_MEM_GROW:100:BUF_MEM_grow BUF_F_BUF_MEM_GROW_CLEAN:105:BUF_MEM_grow_clean BUF_F_BUF_MEM_NEW:101:BUF_MEM_new diff --git a/crypto/openssl/crypto/pem/pem_lib.c b/crypto/openssl/crypto/pem/pem_lib.c index 2de093595d0d..173045be21ea 100644 --- a/crypto/openssl/crypto/pem/pem_lib.c +++ b/crypto/openssl/crypto/pem/pem_lib.c @@ -957,7 +957,9 @@ int PEM_read_bio_ex(BIO *bp, char **name_out, char **header, *data = pem_malloc(len, flags); if (*header == NULL || *data == NULL) { pem_free(*header, flags, 0); + *header = NULL; pem_free(*data, flags, 0); + *data = NULL; goto end; } BIO_read(headerB, *header, headerlen); diff --git a/crypto/openssl/crypto/rsa/rsa_ossl.c b/crypto/openssl/crypto/rsa/rsa_ossl.c index b52a66f6a628..6c3c0cf78d30 100644 --- a/crypto/openssl/crypto/rsa/rsa_ossl.c +++ b/crypto/openssl/crypto/rsa/rsa_ossl.c @@ -465,11 +465,20 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from, BN_free(d); } - if (blinding) - if (!rsa_blinding_invert(blinding, ret, unblind, ctx)) + if (blinding) { + /* + * ossl_bn_rsa_do_unblind() combines blinding inversion and + * 0-padded BN BE serialization + */ + j = ossl_bn_rsa_do_unblind(ret, blinding, unblind, rsa->n, ctx, + buf, num); + if (j == 0) goto err; - - j = BN_bn2binpad(ret, buf, num); + } else { + j = BN_bn2binpad(ret, buf, num); + if (j < 0) + goto err; + } switch (padding) { case RSA_PKCS1_PADDING: diff --git a/crypto/openssl/crypto/x509v3/v3_genn.c b/crypto/openssl/crypto/x509v3/v3_genn.c index 87a5eff47cd9..e54ddc55c957 100644 --- a/crypto/openssl/crypto/x509v3/v3_genn.c +++ b/crypto/openssl/crypto/x509v3/v3_genn.c @@ -98,7 +98,7 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) return -1; switch (a->type) { case GEN_X400: - result = ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address); + result = ASN1_STRING_cmp(a->d.x400Address, b->d.x400Address); break; case GEN_EDIPARTY: diff --git a/crypto/openssl/include/crypto/bn.h b/crypto/openssl/include/crypto/bn.h index 60afda1dadee..b5f36fb25aa2 100644 --- a/crypto/openssl/include/crypto/bn.h +++ b/crypto/openssl/include/crypto/bn.h @@ -86,5 +86,10 @@ int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); +int ossl_bn_rsa_do_unblind(const BIGNUM *intermediate, + const BN_BLINDING *blinding, + const BIGNUM *possible_arg2, + const BIGNUM *to_mod, BN_CTX *ctx, + unsigned char *buf, int num); #endif diff --git a/crypto/openssl/include/openssl/bnerr.h b/crypto/openssl/include/openssl/bnerr.h index 9f3c7cfaab67..a0752cea52d7 100644 --- a/crypto/openssl/include/openssl/bnerr.h +++ b/crypto/openssl/include/openssl/bnerr.h @@ -72,6 +72,7 @@ int ERR_load_BN_strings(void); # define BN_F_BN_SET_WORDS 144 # define BN_F_BN_STACK_PUSH 148 # define BN_F_BN_USUB 115 +# define BN_F_OSSL_BN_RSA_DO_UNBLIND 151 /* * BN reason codes. diff --git a/crypto/openssl/include/openssl/x509v3.h b/crypto/openssl/include/openssl/x509v3.h index 90fa3592ce58..e61c0f29d4b4 100644 --- a/crypto/openssl/include/openssl/x509v3.h +++ b/crypto/openssl/include/openssl/x509v3.h @@ -136,7 +136,7 @@ typedef struct GENERAL_NAME_st { OTHERNAME *otherName; /* otherName */ ASN1_IA5STRING *rfc822Name; ASN1_IA5STRING *dNSName; - ASN1_TYPE *x400Address; + ASN1_STRING *x400Address; X509_NAME *directoryName; EDIPARTYNAME *ediPartyName; ASN1_IA5STRING *uniformResourceIdentifier; diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index cf9259a19e16..0ccab90a361d 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -120,6 +120,7 @@ SRCS+= ppc.S ppc-mont.S .else SRCS+= bn_asm.c .endif +SRCS+= rsa_sup_mul.c # buffer SRCS+= buf_err.c buffer.c From nobody Thu Feb 16 18:01:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjSB6z59z3rFfF; Thu, 16 Feb 2023 18:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjSB4rphz4Hvp; Thu, 16 Feb 2023 18:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CeRkcVOv2SJH43NbYHh2kkRXrLaO3C0jT7lzEwQHQWk=; b=X4x74E+EPqySG9helKuuHBHPEejLChDMfCc8941LJxfYXHLc/g41JQzae4EM7vEuI2kPIq Qdu6/NtWaOenj7Y11mClb1xs9GcX0vAkBzvmHfTZl3wNPU7BW6XQntDt0VcwJi2YSI5PUF r8z8n9JZQpAnl8WtJYdc+lXpzRsBbHRDann/6WbzCp9tkrB04W7wF/LX/ii442Qnkq+Mi1 3WS7C55WxrEUvuEbwfsmPlZJZo0o2nD4m6nKyIXsK900ZKJ+esOgH30wJuZrTZuL9vyBQP OFReZ79hR4f+1kSvs7lOI6+BZOzdhqJazRLnByJoOYTv7pduqM5yG8u5dnNGig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CeRkcVOv2SJH43NbYHh2kkRXrLaO3C0jT7lzEwQHQWk=; b=cxjz1k1I8zJkAq2FRDi0zwLu648upOe7FwjP1ffdUYc9uocerX9SBKiG9wTU2R31ksj/pA h8w9LYRseiFewkGDAv4jG+go6akaGZC8f0GJAeISRLFzFT82x+eQV+t9xpsN70wWNOjVwq +RWDBOeqGTlHpesqp1znYyb+GPtIJDD7fTbky01ClZKXwrqQVCOKXyiKq2Bz+J/S4XrQ8/ aZpsbzEC9YVfLG6B1EbCjDFZtU0fPqdigzXklaiHG/nx8BW2VNusRiK28wGNRIin+CEwCz 1ID06jEK7caXaavXIHZdlEDa1Jq4HZQdVf6Hmk7Pv6lCb4EkCB6aEynKSMJbZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676570490; a=rsa-sha256; cv=none; b=xPMDMTY496za2BcxSM8HgiDb3Q1/MKstVIgbq4sjz+V02KBoAl2s/osjq8tV0Uf4gjsDU0 uVzpDd9M6oB6Hqfwtun5hruVLe+2nycdTuOI39TetjSOdFM1sO+6hAYiRsTx1RWqXAgBaD ZS50tdxVKJJrR0LhlcNk25vKGhvx/Rv35kaEmgV0ny53W4rtegQGXpffUidD+0tmzbVIdY 0hn/TOUIcc10GZxnQDhq5TAuanZkNQKin/e/F8bsAziCvQq9sNKYeUO7J+H/dnjC77o/CN IKT6+AAKB3gUwr0nbSGPC7+Ah0/q0hABebXW1TAJX0erGznONdwNa95SF/t9xA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHjSB3HD8z1CJx; Thu, 16 Feb 2023 18:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GI1Ug8081927; Thu, 16 Feb 2023 18:01:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GI1UEt081926; Thu, 16 Feb 2023 18:01:30 GMT (envelope-from git) Date: Thu, 16 Feb 2023 18:01:30 GMT Message-Id: <202302161801.31GI1UEt081926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 00935d2e533c - releng/13.1 - Add UPDATING entries and bump version. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 00935d2e533c82de250332b967127dfff4e44e8d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=00935d2e533c82de250332b967127dfff4e44e8d commit 00935d2e533c82de250332b967127dfff4e44e8d Author: Gordon Tetlow AuthorDate: 2023-02-16 17:56:53 +0000 Commit: Gordon Tetlow CommitDate: 2023-02-16 17:58:28 +0000 Add UPDATING entries and bump version. Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index da209c2d9f37..b534080a5317 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20230216: + 13.1-RELEASE-p7 FreeBSD-SA-23:03.openssl + + Fix multiple OpenSSL vulnerabilities [SA-23:03.openssl] + 20230208: 13.1-RELEASE-p6 FreeBSD-SA-23:01.geli FreeBSD-EN-23:01.tzdata diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 388c21f7d02a..bcacbcebb5ac 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.1" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Thu Feb 16 18:01:58 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjSk219Hz3rF42; Thu, 16 Feb 2023 18:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjSk1TVJz4Jfm; Thu, 16 Feb 2023 18:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vlsoxi0UaxLDKEbq4YseQh8AQp4czMp3SfY2dDUZaEg=; b=TivmDYZ/PCS/N0jYOfGVCx1UNbYns7mEvPxVikGNWMOQZB3GrK2GO7g2CmKCupSfSBn33s Poe28ZQXZOSgH1t/ly1iajS70akvosXGlq/vt2QNajgwhjsm25aXUW/G/yFXVNNxKEJfxs ljJ7aqRv9+jg09HR97ZijAFbnfcMYF8/RMXhssMCpl2n/Huh5gHhZhIJ2XVfioA0XOT/LS qW0JvVljNaXppFCOtRAa4Runu2rASi4df7URQr+sKuRdXPtrEAjoC3vG+2BfgypQxPXkrC 0okHs006PL5WEmT+XH3wXcOXF6/3lV+dMrC3x3765dma9CsQlsnJ5U1gP2ffuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vlsoxi0UaxLDKEbq4YseQh8AQp4czMp3SfY2dDUZaEg=; b=VmiIj3hkMneeBFlyeE3lHmV0PkfMvoy6h+v5MoqINy7kpWTgPzFOg++uWVXe4f88z05kSZ nzi+whhRKJI4MnXiw8MA8TJ9rH+dp5G3iO7sPVajaEckx1f4aqPB7P87htQ6c4+GqEpKqS YIBuElVHugh4qAcdheyoB2PGUa1JT1IeTG3sjVh9I5z/FRS23dK8UkH5g5Kv88O0j89QXM bwPpjJHeKKxKSmo24bHUI+WSioReE2zrmXgGSWNYPzhYFfZKQc1rvmDN0Y2N+MsmTHq1rj a+oyWPuaa8Ulfgam9plckgXNuKecglM42sjMiiE9xSRH13Gha7Wskx0m71o1Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676570518; a=rsa-sha256; cv=none; b=bNpianYJTmcU8InI+VLHMrFGpfgGpMGFK7XToKFIXiP4MPYSYTZiAcfWFcoyUxcM+MWUBj 2RBcePDSPtsBTXxpzRj+6HpMWoaU1P2YDignkUdaR9syx+ohVRaNQTe6JCf0nljFhEWGxQ 5jl5PoeMu3VaR0nfcpmabI8wXTXxPAq5iq/RY5yg6KqDnpIbcJvXX8oS1J9dKB58m+C44b fE1IAEbWQbzL4v6niE6kUBFw4VQ6WNe/vLBUkQuITinYjaPlJlJ+wjMOVSGFt68GCMfO7O kcDs0pdyBIdklpyNWi/FV8+VY+2Qpd+A8aiLGiyiUbMSKVlNKJSU5DBCA94zCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHjSk0Ymjz1CN0; Thu, 16 Feb 2023 18:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GI1wXC085223; Thu, 16 Feb 2023 18:01:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GI1wir085222; Thu, 16 Feb 2023 18:01:58 GMT (envelope-from git) Date: Thu, 16 Feb 2023 18:01:58 GMT Message-Id: <202302161801.31GI1wir085222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: e87e8c20e647 - releng/12.4 - ssh: fix double-free caused by compat_kex_proposal() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.4 X-Git-Reftype: branch X-Git-Commit: e87e8c20e64753a25743d546e2a8b8619efd83c6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.4 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=e87e8c20e64753a25743d546e2a8b8619efd83c6 commit e87e8c20e64753a25743d546e2a8b8619efd83c6 Author: Ed Maste AuthorDate: 2023-02-06 16:26:08 +0000 Commit: Gordon Tetlow CommitDate: 2023-02-16 17:12:39 +0000 ssh: fix double-free caused by compat_kex_proposal() Approved by: so Security: FreeBSD-SA-23:02.openssh Security: CVE-2023-25136 Obtained from: OpenSSH-portable commit 12da78233364 Sponsored by: The FreeBSD Foundation (cherry picked from commit fe1371e8f3d7336748d291a7360b2aacce943fb1) (cherry picked from commit 296ec8eae0c834088a491643a937d881bfb4b5dd) (cherry picked from commit 2caac96a666ce99703b16e4d59a417bab8f91d3c) --- crypto/openssh/compat.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crypto/openssh/compat.c b/crypto/openssh/compat.c index 46dfe3a9c2e7..478a9403eeaa 100644 --- a/crypto/openssh/compat.c +++ b/crypto/openssh/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.120 2022/07/01 03:35:45 dtucker Exp $ */ +/* $OpenBSD: compat.c,v 1.121 2023/02/02 12:10:05 djm Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -190,26 +190,26 @@ compat_pkalg_proposal(struct ssh *ssh, char *pkalg_prop) char * compat_kex_proposal(struct ssh *ssh, char *p) { - char *cp = NULL; + char *cp = NULL, *cp2 = NULL; if ((ssh->compat & (SSH_BUG_CURVE25519PAD|SSH_OLD_DHGEX)) == 0) return xstrdup(p); debug2_f("original KEX proposal: %s", p); if ((ssh->compat & SSH_BUG_CURVE25519PAD) != 0) - if ((p = match_filter_denylist(p, + if ((cp = match_filter_denylist(p, "curve25519-sha256@libssh.org")) == NULL) fatal("match_filter_denylist failed"); if ((ssh->compat & SSH_OLD_DHGEX) != 0) { - cp = p; - if ((p = match_filter_denylist(p, + if ((cp2 = match_filter_denylist(cp ? cp : p, "diffie-hellman-group-exchange-sha256," "diffie-hellman-group-exchange-sha1")) == NULL) fatal("match_filter_denylist failed"); free(cp); + cp = cp2; } - debug2_f("compat KEX proposal: %s", p); - if (*p == '\0') + if (cp == NULL || *cp == '\0') fatal("No supported key exchange algorithms found"); - return p; + debug2_f("compat KEX proposal: %s", cp); + return cp; } From nobody Thu Feb 16 18:01:59 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjSl2W52z3rFhF; Thu, 16 Feb 2023 18:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjSl240mz4Jns; Thu, 16 Feb 2023 18:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKdw3Pf/sBzCe+cPejkvKDUwrzi2rmPdkHHHG6Drp68=; b=I5Hlp3JNxqi8TVjV/qumLEjs+M5ymZ3qJyigcY4wJvFx71IVOhAvVWlcMr2tz65WXvUHfG 66XEKrhiJ4pODQZm8WU13NpTHUs8gZJ8awgjkkJb8QSZRrCYMmOHUdAA8bcWhwXKPyCF9g Xz0no35zgeIORQZHkOjG7sdz6JTEFt7/8QRkHmi/xio6KF6RvstUvDYkS2gVlvi69g/8gI sOJvC1h7BwmdtP7gJCS01p3EMs9M7G71bdXui7FIuCKZN9fMDJ3jwiMSfpa/qc17Z6n/TA YoSI5iAEZPF0aqVIfA7x9o72pszStzErIM1GGJUuZt+wh/rWOIxRuYgGReIFpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKdw3Pf/sBzCe+cPejkvKDUwrzi2rmPdkHHHG6Drp68=; b=FV/vQigczTXwb9rvE4zs88Zmsfend9aPTNMVMeTWvzdwPvERoL+ktXcXKRWhyDwqqmoiT+ CLM8gbm+tooQGcplBhHX0Tq9rV0DxH12I3R1IEh4F7zwTrzLtQEHO6nR+wilN5XhJHszwr KF+GYdev8reWelRdsmZL9TFxamJA2L03ENkClnR9US4C6P6CmtE9511xvvz1hiOKBFtDLy DqlWTOoAn+0htEAIe7NHAjLSzp+yv1/oyEbKyT3bZfPt4Tnpj75KzpmM7Wy8Hw7mF1MWaA 56yKHKP7qSW7fgQOp3HbLChkRZY4K5JkiV5LMUs/uwtfZ2k8+wEBX1S9YMAPYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676570519; a=rsa-sha256; cv=none; b=IUOh7l3qQKioTQjHeqyPupCMM2D/LfUsApxpFIdHGawrYRR+ssRQMwsBHQ76i+NvPvd0PR 6vWi++i8zApiexniUzRruGMP2sZsTE4rgfAmQch3S3XWNst86CODJM8Xl9bAt2P+tdS0r6 1q84HeUiAawunqr2k//wlnzz3j+RfdmgQMVJ4UCAH+Aec2bYxVgGG5ZLNMgS3pIF/woZVA 9xub12130TuVghz4oUDMpHymjqQ4HDNMM7c2MaICxISvv/LSrOJBZby3YcXSeIKdBMc5my WIHHT++yoFeIAEKoXgzMPLGn/1qsjTLx+etc30TbbsTOlJ0MO0zhSJfCHVy6Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHjSl18fdz1CN1; Thu, 16 Feb 2023 18:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GI1xNu085255; Thu, 16 Feb 2023 18:01:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GI1x3P085254; Thu, 16 Feb 2023 18:01:59 GMT (envelope-from git) Date: Thu, 16 Feb 2023 18:01:59 GMT Message-Id: <202302161801.31GI1x3P085254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: c6444607997d - releng/12.4 - Fix multiple OpenSSL vulnerabilities. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.4 X-Git-Reftype: branch X-Git-Commit: c6444607997d64d67c888f8009aabf4e1f3d2a15 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.4 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=c6444607997d64d67c888f8009aabf4e1f3d2a15 commit c6444607997d64d67c888f8009aabf4e1f3d2a15 Author: Gordon Tetlow AuthorDate: 2023-02-16 17:22:14 +0000 Commit: Gordon Tetlow CommitDate: 2023-02-16 18:00:09 +0000 Fix multiple OpenSSL vulnerabilities. Approved by: so Security: FreeBSD-SA-23:03.openssl Security: CVE-2023-0286 Security: CVE-2023-0215 Security: CVE-2022-4450 Security: CVE-2022-4304 --- crypto/openssl/crypto/asn1/bio_ndef.c | 39 +- crypto/openssl/crypto/bn/bn_blind.c | 14 - crypto/openssl/crypto/bn/bn_err.c | 2 + crypto/openssl/crypto/bn/bn_local.h | 14 + crypto/openssl/crypto/bn/rsa_sup_mul.c | 614 ++++++++++++++++++++++++++++++++ crypto/openssl/crypto/err/openssl.txt | 3 +- crypto/openssl/crypto/pem/pem_lib.c | 2 + crypto/openssl/crypto/rsa/rsa_ossl.c | 17 +- crypto/openssl/crypto/x509v3/v3_genn.c | 2 +- crypto/openssl/include/crypto/bn.h | 5 + crypto/openssl/include/openssl/bnerr.h | 1 + crypto/openssl/include/openssl/x509v3.h | 2 +- secure/lib/libcrypto/Makefile | 1 + 13 files changed, 688 insertions(+), 28 deletions(-) diff --git a/crypto/openssl/crypto/asn1/bio_ndef.c b/crypto/openssl/crypto/asn1/bio_ndef.c index 760e4846a474..f8d4b1b9aa67 100644 --- a/crypto/openssl/crypto/asn1/bio_ndef.c +++ b/crypto/openssl/crypto/asn1/bio_ndef.c @@ -49,12 +49,19 @@ static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg); static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg); +/* + * On success, the returned BIO owns the input BIO as part of its BIO chain. + * On failure, NULL is returned and the input BIO is owned by the caller. + * + * Unfortunately cannot constify this due to CMS_stream() and PKCS7_stream() + */ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) { NDEF_SUPPORT *ndef_aux = NULL; BIO *asn_bio = NULL; const ASN1_AUX *aux = it->funcs; ASN1_STREAM_ARG sarg; + BIO *pop_bio = NULL; if (!aux || !aux->asn1_cb) { ASN1err(ASN1_F_BIO_NEW_NDEF, ASN1_R_STREAMING_NOT_SUPPORTED); @@ -69,21 +76,39 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) out = BIO_push(asn_bio, out); if (out == NULL) goto err; + pop_bio = asn_bio; - BIO_asn1_set_prefix(asn_bio, ndef_prefix, ndef_prefix_free); - BIO_asn1_set_suffix(asn_bio, ndef_suffix, ndef_suffix_free); + if (BIO_asn1_set_prefix(asn_bio, ndef_prefix, ndef_prefix_free) <= 0 + || BIO_asn1_set_suffix(asn_bio, ndef_suffix, ndef_suffix_free) <= 0 + || BIO_ctrl(asn_bio, BIO_C_SET_EX_ARG, 0, ndef_aux) <= 0) + goto err; /* - * Now let callback prepends any digest, cipher etc BIOs ASN1 structure - * needs. + * Now let the callback prepend any digest, cipher, etc., that the BIO's + * ASN1 structure needs. */ sarg.out = out; sarg.ndef_bio = NULL; sarg.boundary = NULL; - if (aux->asn1_cb(ASN1_OP_STREAM_PRE, &val, it, &sarg) <= 0) + /* + * The asn1_cb(), must not have mutated asn_bio on error, leaving it in the + * middle of some partially built, but not returned BIO chain. + */ + if (aux->asn1_cb(ASN1_OP_STREAM_PRE, &val, it, &sarg) <= 0) { + /* + * ndef_aux is now owned by asn_bio so we must not free it in the err + * clean up block + */ + ndef_aux = NULL; goto err; + } + + /* + * We must not fail now because the callback has prepended additional + * BIOs to the chain + */ ndef_aux->val = val; ndef_aux->it = it; @@ -91,11 +116,11 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) ndef_aux->boundary = sarg.boundary; ndef_aux->out = out; - BIO_ctrl(asn_bio, BIO_C_SET_EX_ARG, 0, ndef_aux); - return sarg.ndef_bio; err: + /* BIO_pop() is NULL safe */ + (void)BIO_pop(pop_bio); BIO_free(asn_bio); OPENSSL_free(ndef_aux); return NULL; diff --git a/crypto/openssl/crypto/bn/bn_blind.c b/crypto/openssl/crypto/bn/bn_blind.c index 76fc7ebcffc0..6e9d23932119 100644 --- a/crypto/openssl/crypto/bn/bn_blind.c +++ b/crypto/openssl/crypto/bn/bn_blind.c @@ -13,20 +13,6 @@ #define BN_BLINDING_COUNTER 32 -struct bn_blinding_st { - BIGNUM *A; - BIGNUM *Ai; - BIGNUM *e; - BIGNUM *mod; /* just a reference */ - CRYPTO_THREAD_ID tid; - int counter; - unsigned long flags; - BN_MONT_CTX *m_ctx; - int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); - CRYPTO_RWLOCK *lock; -}; - BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod) { BN_BLINDING *ret = NULL; diff --git a/crypto/openssl/crypto/bn/bn_err.c b/crypto/openssl/crypto/bn/bn_err.c index dd87c152cf37..3dd8d9a5682b 100644 --- a/crypto/openssl/crypto/bn/bn_err.c +++ b/crypto/openssl/crypto/bn/bn_err.c @@ -73,6 +73,8 @@ static const ERR_STRING_DATA BN_str_functs[] = { {ERR_PACK(ERR_LIB_BN, BN_F_BN_SET_WORDS, 0), "bn_set_words"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_STACK_PUSH, 0), "BN_STACK_push"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_USUB, 0), "BN_usub"}, + {ERR_PACK(ERR_LIB_BN, BN_F_OSSL_BN_RSA_DO_UNBLIND, 0), + "ossl_bn_rsa_do_unblind"}, {0, NULL} }; diff --git a/crypto/openssl/crypto/bn/bn_local.h b/crypto/openssl/crypto/bn/bn_local.h index 8ad69ccd3639..096513533b70 100644 --- a/crypto/openssl/crypto/bn/bn_local.h +++ b/crypto/openssl/crypto/bn/bn_local.h @@ -263,6 +263,20 @@ struct bn_gencb_st { } cb; }; +struct bn_blinding_st { + BIGNUM *A; + BIGNUM *Ai; + BIGNUM *e; + BIGNUM *mod; /* just a reference */ + CRYPTO_THREAD_ID tid; + int counter; + unsigned long flags; + BN_MONT_CTX *m_ctx; + int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); + CRYPTO_RWLOCK *lock; +}; + /*- * BN_window_bits_for_exponent_size -- macro for sliding window mod_exp functions * diff --git a/crypto/openssl/crypto/bn/rsa_sup_mul.c b/crypto/openssl/crypto/bn/rsa_sup_mul.c new file mode 100644 index 000000000000..acafefd5febf --- /dev/null +++ b/crypto/openssl/crypto/bn/rsa_sup_mul.c @@ -0,0 +1,614 @@ +#include +#include +#include +#include +#include +#include +#include +#include "internal/numbers.h" +#include "internal/constant_time.h" +#include "bn_local.h" + +# if BN_BYTES == 8 +typedef uint64_t limb_t; +# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ == 16 +/* nonstandard; implemented by gcc on 64-bit platforms */ +typedef __uint128_t limb2_t; +# define HAVE_LIMB2_T +# endif +# define LIMB_BIT_SIZE 64 +# define LIMB_BYTE_SIZE 8 +# elif BN_BYTES == 4 +typedef uint32_t limb_t; +typedef uint64_t limb2_t; +# define LIMB_BIT_SIZE 32 +# define LIMB_BYTE_SIZE 4 +# define HAVE_LIMB2_T +# else +# error "Not supported" +# endif + +/* + * For multiplication we're using schoolbook multiplication, + * so if we have two numbers, each with 6 "digits" (words) + * the multiplication is calculated as follows: + * A B C D E F + * x I J K L M N + * -------------- + * N*F + * N*E + * N*D + * N*C + * N*B + * N*A + * M*F + * M*E + * M*D + * M*C + * M*B + * M*A + * L*F + * L*E + * L*D + * L*C + * L*B + * L*A + * K*F + * K*E + * K*D + * K*C + * K*B + * K*A + * J*F + * J*E + * J*D + * J*C + * J*B + * J*A + * I*F + * I*E + * I*D + * I*C + * I*B + * + I*A + * ========================== + * N*B N*D N*F + * + N*A N*C N*E + * + M*B M*D M*F + * + M*A M*C M*E + * + L*B L*D L*F + * + L*A L*C L*E + * + K*B K*D K*F + * + K*A K*C K*E + * + J*B J*D J*F + * + J*A J*C J*E + * + I*B I*D I*F + * + I*A I*C I*E + * + * 1+1 1+3 1+5 + * 1+0 1+2 1+4 + * 0+1 0+3 0+5 + * 0+0 0+2 0+4 + * + * 0 1 2 3 4 5 6 + * which requires n^2 multiplications and 2n full length additions + * as we can keep every other result of limb multiplication in two separate + * limbs + */ + +#if defined HAVE_LIMB2_T +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + limb2_t t; + /* + * this is idiomatic code to tell compiler to use the native mul + * those three lines will actually compile to single instruction + */ + + t = (limb2_t)a * b; + *hi = t >> LIMB_BIT_SIZE; + *lo = (limb_t)t; +} +#elif (BN_BYTES == 8) && (defined _MSC_VER) +/* https://learn.microsoft.com/en-us/cpp/intrinsics/umul128?view=msvc-170 */ +#pragma intrinsic(_umul128) +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + *lo = _umul128(a, b, hi); +} +#else +/* + * if the compiler doesn't have either a 128bit data type nor a "return + * high 64 bits of multiplication" + */ +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + limb_t a_low = (limb_t)(uint32_t)a; + limb_t a_hi = a >> 32; + limb_t b_low = (limb_t)(uint32_t)b; + limb_t b_hi = b >> 32; + + limb_t p0 = a_low * b_low; + limb_t p1 = a_low * b_hi; + limb_t p2 = a_hi * b_low; + limb_t p3 = a_hi * b_hi; + + uint32_t cy = (uint32_t)(((p0 >> 32) + (uint32_t)p1 + (uint32_t)p2) >> 32); + + *lo = p0 + (p1 << 32) + (p2 << 32); + *hi = p3 + (p1 >> 32) + (p2 >> 32) + cy; +} +#endif + +/* add two limbs with carry in, return carry out */ +static ossl_inline limb_t _add_limb(limb_t *ret, limb_t a, limb_t b, limb_t carry) +{ + limb_t carry1, carry2, t; + /* + * `c = a + b; if (c < a)` is idiomatic code that makes compilers + * use add with carry on assembly level + */ + + *ret = a + carry; + if (*ret < a) + carry1 = 1; + else + carry1 = 0; + + t = *ret; + *ret = t + b; + if (*ret < t) + carry2 = 1; + else + carry2 = 0; + + return carry1 + carry2; +} + +/* + * add two numbers of the same size, return overflow + * + * add a to b, place result in ret; all arrays need to be n limbs long + * return overflow from addition (0 or 1) + */ +static ossl_inline limb_t add(limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + limb_t c = 0; + ossl_ssize_t i; + + for(i = n - 1; i > -1; i--) + c = _add_limb(&ret[i], a[i], b[i], c); + + return c; +} + +/* + * return number of limbs necessary for temporary values + * when multiplying numbers n limbs large + */ +static ossl_inline size_t mul_limb_numb(size_t n) +{ + return 2 * n * 2; +} + +/* + * multiply two numbers of the same size + * + * multiply a by b, place result in ret; a and b need to be n limbs long + * ret needs to be 2*n limbs long, tmp needs to be mul_limb_numb(n) limbs + * long + */ +static void limb_mul(limb_t *ret, limb_t *a, limb_t *b, size_t n, limb_t *tmp) +{ + limb_t *r_odd, *r_even; + size_t i, j, k; + + r_odd = tmp; + r_even = &tmp[2 * n]; + + memset(ret, 0, 2 * n * sizeof(limb_t)); + + for (i = 0; i < n; i++) { + for (k = 0; k < i + n + 1; k++) { + r_even[k] = 0; + r_odd[k] = 0; + } + for (j = 0; j < n; j++) { + /* + * place results from even and odd limbs in separate arrays so that + * we don't have to calculate overflow every time we get individual + * limb multiplication result + */ + if (j % 2 == 0) + _mul_limb(&r_even[i + j], &r_even[i + j + 1], a[i], b[j]); + else + _mul_limb(&r_odd[i + j], &r_odd[i + j + 1], a[i], b[j]); + } + /* + * skip the least significant limbs when adding multiples of + * more significant limbs (they're zero anyway) + */ + add(ret, ret, r_even, n + i + 1); + add(ret, ret, r_odd, n + i + 1); + } +} + +/* modifies the value in place by performing a right shift by one bit */ +static ossl_inline void rshift1(limb_t *val, size_t n) +{ + limb_t shift_in = 0, shift_out = 0; + size_t i; + + for (i = 0; i < n; i++) { + shift_out = val[i] & 1; + val[i] = shift_in << (LIMB_BIT_SIZE - 1) | (val[i] >> 1); + shift_in = shift_out; + } +} + +/* extend the LSB of flag to all bits of limb */ +static ossl_inline limb_t mk_mask(limb_t flag) +{ + flag |= flag << 1; + flag |= flag << 2; + flag |= flag << 4; + flag |= flag << 8; + flag |= flag << 16; +#if (LIMB_BYTE_SIZE == 8) + flag |= flag << 32; +#endif + return flag; +} + +/* + * copy from either a or b to ret based on flag + * when flag == 0, then copies from b + * when flag == 1, then copies from a + */ +static ossl_inline void cselect(limb_t flag, limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + /* + * would be more efficient with non volatile mask, but then gcc + * generates code with jumps + */ + volatile limb_t mask; + size_t i; + + mask = mk_mask(flag); + for (i = 0; i < n; i++) { +#if (LIMB_BYTE_SIZE == 8) + ret[i] = constant_time_select_64(mask, a[i], b[i]); +#else + ret[i] = constant_time_select_32(mask, a[i], b[i]); +#endif + } +} + +static limb_t _sub_limb(limb_t *ret, limb_t a, limb_t b, limb_t borrow) +{ + limb_t borrow1, borrow2, t; + /* + * while it doesn't look constant-time, this is idiomatic code + * to tell compilers to use the carry bit from subtraction + */ + + *ret = a - borrow; + if (*ret > a) + borrow1 = 1; + else + borrow1 = 0; + + t = *ret; + *ret = t - b; + if (*ret > t) + borrow2 = 1; + else + borrow2 = 0; + + return borrow1 + borrow2; +} + +/* + * place the result of a - b into ret, return the borrow bit. + * All arrays need to be n limbs long + */ +static limb_t sub(limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + limb_t borrow = 0; + ossl_ssize_t i; + + for (i = n - 1; i > -1; i--) + borrow = _sub_limb(&ret[i], a[i], b[i], borrow); + + return borrow; +} + +/* return the number of limbs necessary to allocate for the mod() tmp operand */ +static ossl_inline size_t mod_limb_numb(size_t anum, size_t modnum) +{ + return (anum + modnum) * 3; +} + +/* + * calculate a % mod, place the result in ret + * size of a is defined by anum, size of ret and mod is modnum, + * size of tmp is returned by mod_limb_numb() + */ +static void mod(limb_t *ret, limb_t *a, size_t anum, limb_t *mod, + size_t modnum, limb_t *tmp) +{ + limb_t *atmp, *modtmp, *rettmp; + limb_t res; + size_t i; + + memset(tmp, 0, mod_limb_numb(anum, modnum) * LIMB_BYTE_SIZE); + + atmp = tmp; + modtmp = &tmp[anum + modnum]; + rettmp = &tmp[(anum + modnum) * 2]; + + for (i = modnum; i 0; i--, rp--) { + v = _mul_add_limb(rp, mod, modnum, rp[modnum - 1] * ni0, tmp2); + v = v + carry + rp[-1]; + carry |= (v != rp[-1]); + carry &= (v <= rp[-1]); + rp[-1] = v; + } + + /* perform the final reduction by mod... */ + carry -= sub(ret, rp, mod, modnum); + + /* ...conditionally */ + cselect(carry, ret, rp, ret, modnum); +} + +/* allocated buffer should be freed afterwards */ +static void BN_to_limb(const BIGNUM *bn, limb_t *buf, size_t limbs) +{ + int i; + int real_limbs = (BN_num_bytes(bn) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + limb_t *ptr = buf + (limbs - real_limbs); + + for (i = 0; i < real_limbs; i++) + ptr[i] = bn->d[real_limbs - i - 1]; +} + +#if LIMB_BYTE_SIZE == 8 +static ossl_inline uint64_t be64(uint64_t host) +{ + const union { + long one; + char little; + } is_endian = { 1 }; + + if (is_endian.little) { + uint64_t big = 0; + + big |= (host & 0xff00000000000000) >> 56; + big |= (host & 0x00ff000000000000) >> 40; + big |= (host & 0x0000ff0000000000) >> 24; + big |= (host & 0x000000ff00000000) >> 8; + big |= (host & 0x00000000ff000000) << 8; + big |= (host & 0x0000000000ff0000) << 24; + big |= (host & 0x000000000000ff00) << 40; + big |= (host & 0x00000000000000ff) << 56; + return big; + } else { + return host; + } +} + +#else +/* Not all platforms have htobe32(). */ +static ossl_inline uint32_t be32(uint32_t host) +{ + const union { + long one; + char little; + } is_endian = { 1 }; + + if (is_endian.little) { + uint32_t big = 0; + + big |= (host & 0xff000000) >> 24; + big |= (host & 0x00ff0000) >> 8; + big |= (host & 0x0000ff00) << 8; + big |= (host & 0x000000ff) << 24; + return big; + } else { + return host; + } +} +#endif + +/* + * We assume that intermediate, possible_arg2, blinding, and ctx are used + * similar to BN_BLINDING_invert_ex() arguments. + * to_mod is RSA modulus. + * buf and num is the serialization buffer and its length. + * + * Here we use classic/Montgomery multiplication and modulo. After the calculation finished + * we serialize the new structure instead of BIGNUMs taking endianness into account. + */ +int ossl_bn_rsa_do_unblind(const BIGNUM *intermediate, + const BN_BLINDING *blinding, + const BIGNUM *possible_arg2, + const BIGNUM *to_mod, BN_CTX *ctx, + unsigned char *buf, int num) +{ + limb_t *l_im = NULL, *l_mul = NULL, *l_mod = NULL; + limb_t *l_ret = NULL, *l_tmp = NULL, l_buf; + size_t l_im_count = 0, l_mul_count = 0, l_size = 0, l_mod_count = 0; + size_t l_tmp_count = 0; + int ret = 0; + size_t i; + unsigned char *tmp; + const BIGNUM *arg1 = intermediate; + const BIGNUM *arg2 = (possible_arg2 == NULL) ? blinding->Ai : possible_arg2; + + l_im_count = (BN_num_bytes(arg1) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + l_mul_count = (BN_num_bytes(arg2) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + l_mod_count = (BN_num_bytes(to_mod) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + + l_size = l_im_count > l_mul_count ? l_im_count : l_mul_count; + l_im = OPENSSL_zalloc(l_size * LIMB_BYTE_SIZE); + l_mul = OPENSSL_zalloc(l_size * LIMB_BYTE_SIZE); + l_mod = OPENSSL_zalloc(l_mod_count * LIMB_BYTE_SIZE); + + if ((l_im == NULL) || (l_mul == NULL) || (l_mod == NULL)) + goto err; + + BN_to_limb(arg1, l_im, l_size); + BN_to_limb(arg2, l_mul, l_size); + BN_to_limb(to_mod, l_mod, l_mod_count); + + l_ret = OPENSSL_malloc(2 * l_size * LIMB_BYTE_SIZE); + + if (blinding->m_ctx != NULL) { + l_tmp_count = mul_limb_numb(l_size) > mod_montgomery_limb_numb(l_mod_count) ? + mul_limb_numb(l_size) : mod_montgomery_limb_numb(l_mod_count); + l_tmp = OPENSSL_malloc(l_tmp_count * LIMB_BYTE_SIZE); + } else { + l_tmp_count = mul_limb_numb(l_size) > mod_limb_numb(2 * l_size, l_mod_count) ? + mul_limb_numb(l_size) : mod_limb_numb(2 * l_size, l_mod_count); + l_tmp = OPENSSL_malloc(l_tmp_count * LIMB_BYTE_SIZE); + } + + if ((l_ret == NULL) || (l_tmp == NULL)) + goto err; + + if (blinding->m_ctx != NULL) { + limb_mul(l_ret, l_im, l_mul, l_size, l_tmp); + mod_montgomery(l_ret, l_ret, 2 * l_size, l_mod, l_mod_count, + blinding->m_ctx->n0[0], l_tmp); + } else { + limb_mul(l_ret, l_im, l_mul, l_size, l_tmp); + mod(l_ret, l_ret, 2 * l_size, l_mod, l_mod_count, l_tmp); + } + + /* modulus size in bytes can be equal to num but after limbs conversion it becomes bigger */ + if (num < BN_num_bytes(to_mod)) { + BNerr(BN_F_OSSL_BN_RSA_DO_UNBLIND, ERR_R_PASSED_INVALID_ARGUMENT); + goto err; + } + + memset(buf, 0, num); + tmp = buf + num - BN_num_bytes(to_mod); + for (i = 0; i < l_mod_count; i++) { +#if LIMB_BYTE_SIZE == 8 + l_buf = be64(l_ret[i]); +#else + l_buf = be32(l_ret[i]); +#endif + if (i == 0) { + int delta = LIMB_BYTE_SIZE - ((l_mod_count * LIMB_BYTE_SIZE) - num); + + memcpy(tmp, ((char *)&l_buf) + LIMB_BYTE_SIZE - delta, delta); + tmp += delta; + } else { + memcpy(tmp, &l_buf, LIMB_BYTE_SIZE); + tmp += LIMB_BYTE_SIZE; + } + } + ret = num; + + err: + OPENSSL_free(l_im); + OPENSSL_free(l_mul); + OPENSSL_free(l_mod); + OPENSSL_free(l_tmp); + OPENSSL_free(l_ret); + + return ret; +} diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index 902e97b84355..e0f0ab7c76f8 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -1,4 +1,4 @@ -# Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1999-2023 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -232,6 +232,7 @@ BN_F_BN_RSHIFT:146:BN_rshift BN_F_BN_SET_WORDS:144:bn_set_words BN_F_BN_STACK_PUSH:148:BN_STACK_push BN_F_BN_USUB:115:BN_usub +BN_F_OSSL_BN_RSA_DO_UNBLIND:151:ossl_bn_rsa_do_unblind BUF_F_BUF_MEM_GROW:100:BUF_MEM_grow BUF_F_BUF_MEM_GROW_CLEAN:105:BUF_MEM_grow_clean BUF_F_BUF_MEM_NEW:101:BUF_MEM_new diff --git a/crypto/openssl/crypto/pem/pem_lib.c b/crypto/openssl/crypto/pem/pem_lib.c index 2de093595d0d..173045be21ea 100644 --- a/crypto/openssl/crypto/pem/pem_lib.c +++ b/crypto/openssl/crypto/pem/pem_lib.c @@ -957,7 +957,9 @@ int PEM_read_bio_ex(BIO *bp, char **name_out, char **header, *data = pem_malloc(len, flags); if (*header == NULL || *data == NULL) { pem_free(*header, flags, 0); + *header = NULL; pem_free(*data, flags, 0); + *data = NULL; goto end; } BIO_read(headerB, *header, headerlen); diff --git a/crypto/openssl/crypto/rsa/rsa_ossl.c b/crypto/openssl/crypto/rsa/rsa_ossl.c index b52a66f6a628..6c3c0cf78d30 100644 --- a/crypto/openssl/crypto/rsa/rsa_ossl.c +++ b/crypto/openssl/crypto/rsa/rsa_ossl.c @@ -465,11 +465,20 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from, BN_free(d); } - if (blinding) - if (!rsa_blinding_invert(blinding, ret, unblind, ctx)) + if (blinding) { + /* + * ossl_bn_rsa_do_unblind() combines blinding inversion and + * 0-padded BN BE serialization + */ + j = ossl_bn_rsa_do_unblind(ret, blinding, unblind, rsa->n, ctx, + buf, num); + if (j == 0) goto err; - - j = BN_bn2binpad(ret, buf, num); + } else { + j = BN_bn2binpad(ret, buf, num); + if (j < 0) + goto err; + } switch (padding) { case RSA_PKCS1_PADDING: diff --git a/crypto/openssl/crypto/x509v3/v3_genn.c b/crypto/openssl/crypto/x509v3/v3_genn.c index 87a5eff47cd9..e54ddc55c957 100644 --- a/crypto/openssl/crypto/x509v3/v3_genn.c +++ b/crypto/openssl/crypto/x509v3/v3_genn.c @@ -98,7 +98,7 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) return -1; switch (a->type) { case GEN_X400: - result = ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address); + result = ASN1_STRING_cmp(a->d.x400Address, b->d.x400Address); break; case GEN_EDIPARTY: diff --git a/crypto/openssl/include/crypto/bn.h b/crypto/openssl/include/crypto/bn.h index 60afda1dadee..b5f36fb25aa2 100644 --- a/crypto/openssl/include/crypto/bn.h +++ b/crypto/openssl/include/crypto/bn.h @@ -86,5 +86,10 @@ int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); +int ossl_bn_rsa_do_unblind(const BIGNUM *intermediate, + const BN_BLINDING *blinding, + const BIGNUM *possible_arg2, + const BIGNUM *to_mod, BN_CTX *ctx, + unsigned char *buf, int num); #endif diff --git a/crypto/openssl/include/openssl/bnerr.h b/crypto/openssl/include/openssl/bnerr.h index 9f3c7cfaab67..a0752cea52d7 100644 --- a/crypto/openssl/include/openssl/bnerr.h +++ b/crypto/openssl/include/openssl/bnerr.h @@ -72,6 +72,7 @@ int ERR_load_BN_strings(void); # define BN_F_BN_SET_WORDS 144 # define BN_F_BN_STACK_PUSH 148 # define BN_F_BN_USUB 115 +# define BN_F_OSSL_BN_RSA_DO_UNBLIND 151 /* * BN reason codes. diff --git a/crypto/openssl/include/openssl/x509v3.h b/crypto/openssl/include/openssl/x509v3.h index 90fa3592ce58..e61c0f29d4b4 100644 --- a/crypto/openssl/include/openssl/x509v3.h +++ b/crypto/openssl/include/openssl/x509v3.h @@ -136,7 +136,7 @@ typedef struct GENERAL_NAME_st { OTHERNAME *otherName; /* otherName */ ASN1_IA5STRING *rfc822Name; ASN1_IA5STRING *dNSName; - ASN1_TYPE *x400Address; + ASN1_STRING *x400Address; X509_NAME *directoryName; EDIPARTYNAME *ediPartyName; ASN1_IA5STRING *uniformResourceIdentifier; diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 9a57b31a0c87..98c474ea167e 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -101,6 +101,7 @@ SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S .else SRCS+= bn_asm.c .endif +SRCS+= rsa_sup_mul.c # buffer SRCS+= buf_err.c buffer.c From nobody Thu Feb 16 18:02:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjSm3GSkz3rFsc; Thu, 16 Feb 2023 18:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjSm2mQVz4Jp7; Thu, 16 Feb 2023 18:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=boc1eo1aHyswr1iLEBM6n1oRdMDUj+BkyUz6nuobp3E=; b=Y3RWzb3nL7auaxxiyUbF5xjwpkQfH8MRuWUMUMwkUzRoz+QbuoRd5RXjzWir9CdS5ZNuz3 JQmGXfA22wr/GX8oRD2zmY07wO6tR4leYtoV0WYdaIpDZNRRZF3F+0wYb4nc2ZE9FdjWV1 m8o+lDEclEm3s+YCZyulKFjR4qL6e/FEupfrnKZzuwOL4RO6zAQm06Lnq0PKWEO6b4IgU2 /jjeoscHPvArIdb92TWAlVR46NdXA98lkdTnMIF381hcNCpwgTgctPmXslvRbNZ7lWhUaC QZIPBQAEiu2BuRQAwVOTtGcVh4OG23Da74DCgLjud8zLOg4EFSDbL8Hi3XnzZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=boc1eo1aHyswr1iLEBM6n1oRdMDUj+BkyUz6nuobp3E=; b=WYQohZIoskrvgHDouJGKwMePDuxuDayB0Jv1RerNPxcxR7V/VbZCZxix8zXb7+zeA0i/Ej uJ5JT2+coF39OK7Oo68E4SoT5DZB9SxnK5k78aqqhMaSxEsE8LbZnPL8l50YD530nWq5bH g+pLs3YYudPZSIc0BcnvIMh2J0MMG84yJKK62j4f+QGk3n/hFODH1XpRgqCRvTjjORv2dW MmXDoDrispfWLsc5PBzp+xi8kLPH2Ijupn+ReHx26+D4ODTSv1UpoputllT1hLgQjWErcy Vml9XLl8YHbkf5ZOfIrMKeR+qaScfehSEGPKL/NsEUJexRcufjP4d+Ow2suNSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676570520; a=rsa-sha256; cv=none; b=hTmq0ds0xQOWviFCC8I6H1wLl5pgKBVWtd2mAH/7HsklnWZkHFTdl/TPr1nwAdbg21cKtT ZhDSPe9j9Ynwr+cD6+THxcyEzPEW6CbUChmxbPSpJ6gLSaPqNZbNmDhEJEQzAu0iJKvuva /d9yqS3m+wQ7UjuZ+FI1s/A30GP5VCSo1xiT8Dg7sUIaw6Z05lPWJouDWbGlBsnC9Mic+b KRplYCUCMA2xWT+E/bjWqSpkaqiIhXnQyiPf3Qkv43WpKgUBpcp2TB00AnKqui5LL/lGR1 grI9OMYwr65oU2IkDtbBfgWXW7PRuOudHcrPdXjDp0gkYJt2sPyoN6hI1HcRFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHjSm1sSYz1Cgk; Thu, 16 Feb 2023 18:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GI20lm085280; Thu, 16 Feb 2023 18:02:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GI20Be085279; Thu, 16 Feb 2023 18:02:00 GMT (envelope-from git) Date: Thu, 16 Feb 2023 18:02:00 GMT Message-Id: <202302161802.31GI20Be085279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 149768b65d61 - releng/12.4 - Add UPDATING entries and bump version. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.4 X-Git-Reftype: branch X-Git-Commit: 149768b65d619833331bcf0c2fb121b20643f2f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.4 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=149768b65d619833331bcf0c2fb121b20643f2f1 commit 149768b65d619833331bcf0c2fb121b20643f2f1 Author: Gordon Tetlow AuthorDate: 2023-02-16 17:56:20 +0000 Commit: Gordon Tetlow CommitDate: 2023-02-16 18:00:16 +0000 Add UPDATING entries and bump version. Approved by: so --- UPDATING | 8 ++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index d4ff1f64515b..307aca283230 100644 --- a/UPDATING +++ b/UPDATING @@ -17,6 +17,14 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20230216: + 12.4-RELEASE-p2 FreeBSD-SA-23:02.openssh + FreeBSD-SA-23:03.openssl + + OpenSSH pre-authentication double free [SA-23:02.openssh] + + Fix multiple OpenSSL vulnerabilities [SA-23:03.openssl] + 20230208: 12.4-RELEASE-p1 FreeBSD-SA-23:01.geli FreeBSD-EN-23:01.tzdata diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 9103088c96b8..36498714214a 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -49,7 +49,7 @@ TYPE="FreeBSD" REVISION="12.4" -BRANCH="RELEASE-p1" +BRANCH="RELEASE-p2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Thu Feb 16 18:02:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjT14lBnz3rFl5; Thu, 16 Feb 2023 18:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjT13P3Mz4KDf; Thu, 16 Feb 2023 18:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AKiO3G3K6Jcq/PZ9pJqtZDc8VjY49Ez1I31XarQzDPY=; b=HJ55WbSqJCX3HFDwGup2FrCL43k0LabR7cLwclsj8BYY15Po1xxJIfdwK++quXgD3B+GWj m4YEqLy7XY0UkjUI2qdBhMzmz1QPbgxi/sPF66WZTViarW7D2+CSgKUZjtGY5yvZsqHJUA 9j01vfPxBD4FfFBvSXBFQ2qTklD2sPvOlVnH+aFOhhT9etBei1xA9tShu31jD7qfYyYn0s /bc07Fl5aHR1SNXVqAkp8+9YAP/tvDL1ZcUG9DqC0txohU+ZJXdcAKzDCRs9N0Q16bihPX y/gf+JNLRvxXctgamjbg/KWBEoiYPj4JBwAkLfEqiNZq7ZH+GsiSQtuPUuG2kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AKiO3G3K6Jcq/PZ9pJqtZDc8VjY49Ez1I31XarQzDPY=; b=eB1aoEH/v/+303xYZahW/ASdo8eSqjeLNXcy0fNS0ckCsawTty9Ai0dUfQ3oXxJnjEKnin SGRMu551e2WU54yOZEUxuzSbYAa/VbzQ65RU5ufljpDPRjDWT3x2SaOmP0mb8zOEypAuoT D07w1qtnLhqINWBwsywb+CdmIZw7BDNEWZ1fWcCms9y73iZzgyrc6tOGHGVspL5X+zcOF3 G7V7hiTvg1A8GLXlld+kKcs2TvMX0IHTYN42kSonUZ4qGJsav7BMggkjX5NJWlkSsJOiUY uonNOf7Qfg+sn2iG7uFAyBPiHgWT+gt0XrNZi/DhfPjxJqwOPu2I4gBzrsY5PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676570533; a=rsa-sha256; cv=none; b=eBUPF00WJ8g4UEhorAiQmANQ+vM2Y25Nsf0tiCRAmoqj4KlArpdlDNvyGlHBtMzTddzFD9 6zEtmq+E89ALM8m69ojVD4VqPqMMzROAAq5ek/Psh6pc2rN4ikEE6jIi30Oyh8WNfeRKYL t52tKKDS3v5blJ7VYU3TNuRtGRTjPsgcu6OjCXG5sIYxEa4OTeBUzrdCRBMrkE4YwqV36R ArPjyomORDkE0yrNM7E51RJbTuwtq14e/NIx93bfDD0MS4Ek6C9U/ue0nwqKriH03tkFZu MGkSn8qJFtIq51RzmQSBBeIM4Bs9cqADsCjfUdnXHAHXabizufMbj3j/jLdfYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHjT12T7Cz1CPg; Thu, 16 Feb 2023 18:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GI2DX3085422; Thu, 16 Feb 2023 18:02:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GI2DbE085421; Thu, 16 Feb 2023 18:02:13 GMT (envelope-from git) Date: Thu, 16 Feb 2023 18:02:13 GMT Message-Id: <202302161802.31GI2DbE085421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: afb60ed7d8a1 - releng/12.3 - Fix multiple OpenSSL vulnerabilities. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.3 X-Git-Reftype: branch X-Git-Commit: afb60ed7d8a1e91163200fbf0d85b27a1237ea48 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=afb60ed7d8a1e91163200fbf0d85b27a1237ea48 commit afb60ed7d8a1e91163200fbf0d85b27a1237ea48 Author: Gordon Tetlow AuthorDate: 2023-02-16 17:25:39 +0000 Commit: Gordon Tetlow CommitDate: 2023-02-16 18:00:54 +0000 Fix multiple OpenSSL vulnerabilities. Approved by: so Security: FreeBSD-SA-23:03.openssl Security: CVE-2023-0286 Security: CVE-2023-0215 Security: CVE-2022-4450 Security: CVE-2022-4304 --- crypto/openssl/crypto/asn1/bio_ndef.c | 39 +- crypto/openssl/crypto/bn/bn_blind.c | 14 - crypto/openssl/crypto/bn/bn_err.c | 2 + crypto/openssl/crypto/bn/bn_local.h | 14 + crypto/openssl/crypto/bn/rsa_sup_mul.c | 614 ++++++++++++++++++++++++++++++++ crypto/openssl/crypto/err/openssl.txt | 3 +- crypto/openssl/crypto/pem/pem_lib.c | 2 + crypto/openssl/crypto/rsa/rsa_ossl.c | 17 +- crypto/openssl/crypto/x509v3/v3_genn.c | 2 +- crypto/openssl/include/crypto/bn.h | 5 + crypto/openssl/include/openssl/bnerr.h | 1 + crypto/openssl/include/openssl/x509v3.h | 2 +- secure/lib/libcrypto/Makefile | 1 + 13 files changed, 688 insertions(+), 28 deletions(-) diff --git a/crypto/openssl/crypto/asn1/bio_ndef.c b/crypto/openssl/crypto/asn1/bio_ndef.c index 760e4846a474..f8d4b1b9aa67 100644 --- a/crypto/openssl/crypto/asn1/bio_ndef.c +++ b/crypto/openssl/crypto/asn1/bio_ndef.c @@ -49,12 +49,19 @@ static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg); static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg); +/* + * On success, the returned BIO owns the input BIO as part of its BIO chain. + * On failure, NULL is returned and the input BIO is owned by the caller. + * + * Unfortunately cannot constify this due to CMS_stream() and PKCS7_stream() + */ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) { NDEF_SUPPORT *ndef_aux = NULL; BIO *asn_bio = NULL; const ASN1_AUX *aux = it->funcs; ASN1_STREAM_ARG sarg; + BIO *pop_bio = NULL; if (!aux || !aux->asn1_cb) { ASN1err(ASN1_F_BIO_NEW_NDEF, ASN1_R_STREAMING_NOT_SUPPORTED); @@ -69,21 +76,39 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) out = BIO_push(asn_bio, out); if (out == NULL) goto err; + pop_bio = asn_bio; - BIO_asn1_set_prefix(asn_bio, ndef_prefix, ndef_prefix_free); - BIO_asn1_set_suffix(asn_bio, ndef_suffix, ndef_suffix_free); + if (BIO_asn1_set_prefix(asn_bio, ndef_prefix, ndef_prefix_free) <= 0 + || BIO_asn1_set_suffix(asn_bio, ndef_suffix, ndef_suffix_free) <= 0 + || BIO_ctrl(asn_bio, BIO_C_SET_EX_ARG, 0, ndef_aux) <= 0) + goto err; /* - * Now let callback prepends any digest, cipher etc BIOs ASN1 structure - * needs. + * Now let the callback prepend any digest, cipher, etc., that the BIO's + * ASN1 structure needs. */ sarg.out = out; sarg.ndef_bio = NULL; sarg.boundary = NULL; - if (aux->asn1_cb(ASN1_OP_STREAM_PRE, &val, it, &sarg) <= 0) + /* + * The asn1_cb(), must not have mutated asn_bio on error, leaving it in the + * middle of some partially built, but not returned BIO chain. + */ + if (aux->asn1_cb(ASN1_OP_STREAM_PRE, &val, it, &sarg) <= 0) { + /* + * ndef_aux is now owned by asn_bio so we must not free it in the err + * clean up block + */ + ndef_aux = NULL; goto err; + } + + /* + * We must not fail now because the callback has prepended additional + * BIOs to the chain + */ ndef_aux->val = val; ndef_aux->it = it; @@ -91,11 +116,11 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) ndef_aux->boundary = sarg.boundary; ndef_aux->out = out; - BIO_ctrl(asn_bio, BIO_C_SET_EX_ARG, 0, ndef_aux); - return sarg.ndef_bio; err: + /* BIO_pop() is NULL safe */ + (void)BIO_pop(pop_bio); BIO_free(asn_bio); OPENSSL_free(ndef_aux); return NULL; diff --git a/crypto/openssl/crypto/bn/bn_blind.c b/crypto/openssl/crypto/bn/bn_blind.c index 76fc7ebcffc0..6e9d23932119 100644 --- a/crypto/openssl/crypto/bn/bn_blind.c +++ b/crypto/openssl/crypto/bn/bn_blind.c @@ -13,20 +13,6 @@ #define BN_BLINDING_COUNTER 32 -struct bn_blinding_st { - BIGNUM *A; - BIGNUM *Ai; - BIGNUM *e; - BIGNUM *mod; /* just a reference */ - CRYPTO_THREAD_ID tid; - int counter; - unsigned long flags; - BN_MONT_CTX *m_ctx; - int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); - CRYPTO_RWLOCK *lock; -}; - BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod) { BN_BLINDING *ret = NULL; diff --git a/crypto/openssl/crypto/bn/bn_err.c b/crypto/openssl/crypto/bn/bn_err.c index dd87c152cf37..3dd8d9a5682b 100644 --- a/crypto/openssl/crypto/bn/bn_err.c +++ b/crypto/openssl/crypto/bn/bn_err.c @@ -73,6 +73,8 @@ static const ERR_STRING_DATA BN_str_functs[] = { {ERR_PACK(ERR_LIB_BN, BN_F_BN_SET_WORDS, 0), "bn_set_words"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_STACK_PUSH, 0), "BN_STACK_push"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_USUB, 0), "BN_usub"}, + {ERR_PACK(ERR_LIB_BN, BN_F_OSSL_BN_RSA_DO_UNBLIND, 0), + "ossl_bn_rsa_do_unblind"}, {0, NULL} }; diff --git a/crypto/openssl/crypto/bn/bn_local.h b/crypto/openssl/crypto/bn/bn_local.h index 8ad69ccd3639..096513533b70 100644 --- a/crypto/openssl/crypto/bn/bn_local.h +++ b/crypto/openssl/crypto/bn/bn_local.h @@ -263,6 +263,20 @@ struct bn_gencb_st { } cb; }; +struct bn_blinding_st { + BIGNUM *A; + BIGNUM *Ai; + BIGNUM *e; + BIGNUM *mod; /* just a reference */ + CRYPTO_THREAD_ID tid; + int counter; + unsigned long flags; + BN_MONT_CTX *m_ctx; + int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); + CRYPTO_RWLOCK *lock; +}; + /*- * BN_window_bits_for_exponent_size -- macro for sliding window mod_exp functions * diff --git a/crypto/openssl/crypto/bn/rsa_sup_mul.c b/crypto/openssl/crypto/bn/rsa_sup_mul.c new file mode 100644 index 000000000000..acafefd5febf --- /dev/null +++ b/crypto/openssl/crypto/bn/rsa_sup_mul.c @@ -0,0 +1,614 @@ +#include +#include +#include +#include +#include +#include +#include +#include "internal/numbers.h" +#include "internal/constant_time.h" +#include "bn_local.h" + +# if BN_BYTES == 8 +typedef uint64_t limb_t; +# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ == 16 +/* nonstandard; implemented by gcc on 64-bit platforms */ +typedef __uint128_t limb2_t; +# define HAVE_LIMB2_T +# endif +# define LIMB_BIT_SIZE 64 +# define LIMB_BYTE_SIZE 8 +# elif BN_BYTES == 4 +typedef uint32_t limb_t; +typedef uint64_t limb2_t; +# define LIMB_BIT_SIZE 32 +# define LIMB_BYTE_SIZE 4 +# define HAVE_LIMB2_T +# else +# error "Not supported" +# endif + +/* + * For multiplication we're using schoolbook multiplication, + * so if we have two numbers, each with 6 "digits" (words) + * the multiplication is calculated as follows: + * A B C D E F + * x I J K L M N + * -------------- + * N*F + * N*E + * N*D + * N*C + * N*B + * N*A + * M*F + * M*E + * M*D + * M*C + * M*B + * M*A + * L*F + * L*E + * L*D + * L*C + * L*B + * L*A + * K*F + * K*E + * K*D + * K*C + * K*B + * K*A + * J*F + * J*E + * J*D + * J*C + * J*B + * J*A + * I*F + * I*E + * I*D + * I*C + * I*B + * + I*A + * ========================== + * N*B N*D N*F + * + N*A N*C N*E + * + M*B M*D M*F + * + M*A M*C M*E + * + L*B L*D L*F + * + L*A L*C L*E + * + K*B K*D K*F + * + K*A K*C K*E + * + J*B J*D J*F + * + J*A J*C J*E + * + I*B I*D I*F + * + I*A I*C I*E + * + * 1+1 1+3 1+5 + * 1+0 1+2 1+4 + * 0+1 0+3 0+5 + * 0+0 0+2 0+4 + * + * 0 1 2 3 4 5 6 + * which requires n^2 multiplications and 2n full length additions + * as we can keep every other result of limb multiplication in two separate + * limbs + */ + +#if defined HAVE_LIMB2_T +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + limb2_t t; + /* + * this is idiomatic code to tell compiler to use the native mul + * those three lines will actually compile to single instruction + */ + + t = (limb2_t)a * b; + *hi = t >> LIMB_BIT_SIZE; + *lo = (limb_t)t; +} +#elif (BN_BYTES == 8) && (defined _MSC_VER) +/* https://learn.microsoft.com/en-us/cpp/intrinsics/umul128?view=msvc-170 */ +#pragma intrinsic(_umul128) +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + *lo = _umul128(a, b, hi); +} +#else +/* + * if the compiler doesn't have either a 128bit data type nor a "return + * high 64 bits of multiplication" + */ +static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) +{ + limb_t a_low = (limb_t)(uint32_t)a; + limb_t a_hi = a >> 32; + limb_t b_low = (limb_t)(uint32_t)b; + limb_t b_hi = b >> 32; + + limb_t p0 = a_low * b_low; + limb_t p1 = a_low * b_hi; + limb_t p2 = a_hi * b_low; + limb_t p3 = a_hi * b_hi; + + uint32_t cy = (uint32_t)(((p0 >> 32) + (uint32_t)p1 + (uint32_t)p2) >> 32); + + *lo = p0 + (p1 << 32) + (p2 << 32); + *hi = p3 + (p1 >> 32) + (p2 >> 32) + cy; +} +#endif + +/* add two limbs with carry in, return carry out */ +static ossl_inline limb_t _add_limb(limb_t *ret, limb_t a, limb_t b, limb_t carry) +{ + limb_t carry1, carry2, t; + /* + * `c = a + b; if (c < a)` is idiomatic code that makes compilers + * use add with carry on assembly level + */ + + *ret = a + carry; + if (*ret < a) + carry1 = 1; + else + carry1 = 0; + + t = *ret; + *ret = t + b; + if (*ret < t) + carry2 = 1; + else + carry2 = 0; + + return carry1 + carry2; +} + +/* + * add two numbers of the same size, return overflow + * + * add a to b, place result in ret; all arrays need to be n limbs long + * return overflow from addition (0 or 1) + */ +static ossl_inline limb_t add(limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + limb_t c = 0; + ossl_ssize_t i; + + for(i = n - 1; i > -1; i--) + c = _add_limb(&ret[i], a[i], b[i], c); + + return c; +} + +/* + * return number of limbs necessary for temporary values + * when multiplying numbers n limbs large + */ +static ossl_inline size_t mul_limb_numb(size_t n) +{ + return 2 * n * 2; +} + +/* + * multiply two numbers of the same size + * + * multiply a by b, place result in ret; a and b need to be n limbs long + * ret needs to be 2*n limbs long, tmp needs to be mul_limb_numb(n) limbs + * long + */ +static void limb_mul(limb_t *ret, limb_t *a, limb_t *b, size_t n, limb_t *tmp) +{ + limb_t *r_odd, *r_even; + size_t i, j, k; + + r_odd = tmp; + r_even = &tmp[2 * n]; + + memset(ret, 0, 2 * n * sizeof(limb_t)); + + for (i = 0; i < n; i++) { + for (k = 0; k < i + n + 1; k++) { + r_even[k] = 0; + r_odd[k] = 0; + } + for (j = 0; j < n; j++) { + /* + * place results from even and odd limbs in separate arrays so that + * we don't have to calculate overflow every time we get individual + * limb multiplication result + */ + if (j % 2 == 0) + _mul_limb(&r_even[i + j], &r_even[i + j + 1], a[i], b[j]); + else + _mul_limb(&r_odd[i + j], &r_odd[i + j + 1], a[i], b[j]); + } + /* + * skip the least significant limbs when adding multiples of + * more significant limbs (they're zero anyway) + */ + add(ret, ret, r_even, n + i + 1); + add(ret, ret, r_odd, n + i + 1); + } +} + +/* modifies the value in place by performing a right shift by one bit */ +static ossl_inline void rshift1(limb_t *val, size_t n) +{ + limb_t shift_in = 0, shift_out = 0; + size_t i; + + for (i = 0; i < n; i++) { + shift_out = val[i] & 1; + val[i] = shift_in << (LIMB_BIT_SIZE - 1) | (val[i] >> 1); + shift_in = shift_out; + } +} + +/* extend the LSB of flag to all bits of limb */ +static ossl_inline limb_t mk_mask(limb_t flag) +{ + flag |= flag << 1; + flag |= flag << 2; + flag |= flag << 4; + flag |= flag << 8; + flag |= flag << 16; +#if (LIMB_BYTE_SIZE == 8) + flag |= flag << 32; +#endif + return flag; +} + +/* + * copy from either a or b to ret based on flag + * when flag == 0, then copies from b + * when flag == 1, then copies from a + */ +static ossl_inline void cselect(limb_t flag, limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + /* + * would be more efficient with non volatile mask, but then gcc + * generates code with jumps + */ + volatile limb_t mask; + size_t i; + + mask = mk_mask(flag); + for (i = 0; i < n; i++) { +#if (LIMB_BYTE_SIZE == 8) + ret[i] = constant_time_select_64(mask, a[i], b[i]); +#else + ret[i] = constant_time_select_32(mask, a[i], b[i]); +#endif + } +} + +static limb_t _sub_limb(limb_t *ret, limb_t a, limb_t b, limb_t borrow) +{ + limb_t borrow1, borrow2, t; + /* + * while it doesn't look constant-time, this is idiomatic code + * to tell compilers to use the carry bit from subtraction + */ + + *ret = a - borrow; + if (*ret > a) + borrow1 = 1; + else + borrow1 = 0; + + t = *ret; + *ret = t - b; + if (*ret > t) + borrow2 = 1; + else + borrow2 = 0; + + return borrow1 + borrow2; +} + +/* + * place the result of a - b into ret, return the borrow bit. + * All arrays need to be n limbs long + */ +static limb_t sub(limb_t *ret, limb_t *a, limb_t *b, size_t n) +{ + limb_t borrow = 0; + ossl_ssize_t i; + + for (i = n - 1; i > -1; i--) + borrow = _sub_limb(&ret[i], a[i], b[i], borrow); + + return borrow; +} + +/* return the number of limbs necessary to allocate for the mod() tmp operand */ +static ossl_inline size_t mod_limb_numb(size_t anum, size_t modnum) +{ + return (anum + modnum) * 3; +} + +/* + * calculate a % mod, place the result in ret + * size of a is defined by anum, size of ret and mod is modnum, + * size of tmp is returned by mod_limb_numb() + */ +static void mod(limb_t *ret, limb_t *a, size_t anum, limb_t *mod, + size_t modnum, limb_t *tmp) +{ + limb_t *atmp, *modtmp, *rettmp; + limb_t res; + size_t i; + + memset(tmp, 0, mod_limb_numb(anum, modnum) * LIMB_BYTE_SIZE); + + atmp = tmp; + modtmp = &tmp[anum + modnum]; + rettmp = &tmp[(anum + modnum) * 2]; + + for (i = modnum; i 0; i--, rp--) { + v = _mul_add_limb(rp, mod, modnum, rp[modnum - 1] * ni0, tmp2); + v = v + carry + rp[-1]; + carry |= (v != rp[-1]); + carry &= (v <= rp[-1]); + rp[-1] = v; + } + + /* perform the final reduction by mod... */ + carry -= sub(ret, rp, mod, modnum); + + /* ...conditionally */ + cselect(carry, ret, rp, ret, modnum); +} + +/* allocated buffer should be freed afterwards */ +static void BN_to_limb(const BIGNUM *bn, limb_t *buf, size_t limbs) +{ + int i; + int real_limbs = (BN_num_bytes(bn) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + limb_t *ptr = buf + (limbs - real_limbs); + + for (i = 0; i < real_limbs; i++) + ptr[i] = bn->d[real_limbs - i - 1]; +} + +#if LIMB_BYTE_SIZE == 8 +static ossl_inline uint64_t be64(uint64_t host) +{ + const union { + long one; + char little; + } is_endian = { 1 }; + + if (is_endian.little) { + uint64_t big = 0; + + big |= (host & 0xff00000000000000) >> 56; + big |= (host & 0x00ff000000000000) >> 40; + big |= (host & 0x0000ff0000000000) >> 24; + big |= (host & 0x000000ff00000000) >> 8; + big |= (host & 0x00000000ff000000) << 8; + big |= (host & 0x0000000000ff0000) << 24; + big |= (host & 0x000000000000ff00) << 40; + big |= (host & 0x00000000000000ff) << 56; + return big; + } else { + return host; + } +} + +#else +/* Not all platforms have htobe32(). */ +static ossl_inline uint32_t be32(uint32_t host) +{ + const union { + long one; + char little; + } is_endian = { 1 }; + + if (is_endian.little) { + uint32_t big = 0; + + big |= (host & 0xff000000) >> 24; + big |= (host & 0x00ff0000) >> 8; + big |= (host & 0x0000ff00) << 8; + big |= (host & 0x000000ff) << 24; + return big; + } else { + return host; + } +} +#endif + +/* + * We assume that intermediate, possible_arg2, blinding, and ctx are used + * similar to BN_BLINDING_invert_ex() arguments. + * to_mod is RSA modulus. + * buf and num is the serialization buffer and its length. + * + * Here we use classic/Montgomery multiplication and modulo. After the calculation finished + * we serialize the new structure instead of BIGNUMs taking endianness into account. + */ +int ossl_bn_rsa_do_unblind(const BIGNUM *intermediate, + const BN_BLINDING *blinding, + const BIGNUM *possible_arg2, + const BIGNUM *to_mod, BN_CTX *ctx, + unsigned char *buf, int num) +{ + limb_t *l_im = NULL, *l_mul = NULL, *l_mod = NULL; + limb_t *l_ret = NULL, *l_tmp = NULL, l_buf; + size_t l_im_count = 0, l_mul_count = 0, l_size = 0, l_mod_count = 0; + size_t l_tmp_count = 0; + int ret = 0; + size_t i; + unsigned char *tmp; + const BIGNUM *arg1 = intermediate; + const BIGNUM *arg2 = (possible_arg2 == NULL) ? blinding->Ai : possible_arg2; + + l_im_count = (BN_num_bytes(arg1) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + l_mul_count = (BN_num_bytes(arg2) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + l_mod_count = (BN_num_bytes(to_mod) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; + + l_size = l_im_count > l_mul_count ? l_im_count : l_mul_count; + l_im = OPENSSL_zalloc(l_size * LIMB_BYTE_SIZE); + l_mul = OPENSSL_zalloc(l_size * LIMB_BYTE_SIZE); + l_mod = OPENSSL_zalloc(l_mod_count * LIMB_BYTE_SIZE); + + if ((l_im == NULL) || (l_mul == NULL) || (l_mod == NULL)) + goto err; + + BN_to_limb(arg1, l_im, l_size); + BN_to_limb(arg2, l_mul, l_size); + BN_to_limb(to_mod, l_mod, l_mod_count); + + l_ret = OPENSSL_malloc(2 * l_size * LIMB_BYTE_SIZE); + + if (blinding->m_ctx != NULL) { + l_tmp_count = mul_limb_numb(l_size) > mod_montgomery_limb_numb(l_mod_count) ? + mul_limb_numb(l_size) : mod_montgomery_limb_numb(l_mod_count); + l_tmp = OPENSSL_malloc(l_tmp_count * LIMB_BYTE_SIZE); + } else { + l_tmp_count = mul_limb_numb(l_size) > mod_limb_numb(2 * l_size, l_mod_count) ? + mul_limb_numb(l_size) : mod_limb_numb(2 * l_size, l_mod_count); + l_tmp = OPENSSL_malloc(l_tmp_count * LIMB_BYTE_SIZE); + } + + if ((l_ret == NULL) || (l_tmp == NULL)) + goto err; + + if (blinding->m_ctx != NULL) { + limb_mul(l_ret, l_im, l_mul, l_size, l_tmp); + mod_montgomery(l_ret, l_ret, 2 * l_size, l_mod, l_mod_count, + blinding->m_ctx->n0[0], l_tmp); + } else { + limb_mul(l_ret, l_im, l_mul, l_size, l_tmp); + mod(l_ret, l_ret, 2 * l_size, l_mod, l_mod_count, l_tmp); + } + + /* modulus size in bytes can be equal to num but after limbs conversion it becomes bigger */ + if (num < BN_num_bytes(to_mod)) { + BNerr(BN_F_OSSL_BN_RSA_DO_UNBLIND, ERR_R_PASSED_INVALID_ARGUMENT); + goto err; + } + + memset(buf, 0, num); + tmp = buf + num - BN_num_bytes(to_mod); + for (i = 0; i < l_mod_count; i++) { +#if LIMB_BYTE_SIZE == 8 + l_buf = be64(l_ret[i]); +#else + l_buf = be32(l_ret[i]); +#endif + if (i == 0) { + int delta = LIMB_BYTE_SIZE - ((l_mod_count * LIMB_BYTE_SIZE) - num); + + memcpy(tmp, ((char *)&l_buf) + LIMB_BYTE_SIZE - delta, delta); + tmp += delta; + } else { + memcpy(tmp, &l_buf, LIMB_BYTE_SIZE); + tmp += LIMB_BYTE_SIZE; + } + } + ret = num; + + err: + OPENSSL_free(l_im); + OPENSSL_free(l_mul); + OPENSSL_free(l_mod); + OPENSSL_free(l_tmp); + OPENSSL_free(l_ret); + + return ret; +} diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index 902e97b84355..e0f0ab7c76f8 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -1,4 +1,4 @@ -# Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1999-2023 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -232,6 +232,7 @@ BN_F_BN_RSHIFT:146:BN_rshift BN_F_BN_SET_WORDS:144:bn_set_words BN_F_BN_STACK_PUSH:148:BN_STACK_push BN_F_BN_USUB:115:BN_usub +BN_F_OSSL_BN_RSA_DO_UNBLIND:151:ossl_bn_rsa_do_unblind BUF_F_BUF_MEM_GROW:100:BUF_MEM_grow BUF_F_BUF_MEM_GROW_CLEAN:105:BUF_MEM_grow_clean BUF_F_BUF_MEM_NEW:101:BUF_MEM_new diff --git a/crypto/openssl/crypto/pem/pem_lib.c b/crypto/openssl/crypto/pem/pem_lib.c index a26322119aa7..ec657624aeac 100644 --- a/crypto/openssl/crypto/pem/pem_lib.c +++ b/crypto/openssl/crypto/pem/pem_lib.c @@ -954,7 +954,9 @@ int PEM_read_bio_ex(BIO *bp, char **name_out, char **header, *data = pem_malloc(len, flags); if (*header == NULL || *data == NULL) { pem_free(*header, flags, 0); + *header = NULL; pem_free(*data, flags, 0); + *data = NULL; goto end; } BIO_read(headerB, *header, headerlen); diff --git a/crypto/openssl/crypto/rsa/rsa_ossl.c b/crypto/openssl/crypto/rsa/rsa_ossl.c index b52a66f6a628..6c3c0cf78d30 100644 --- a/crypto/openssl/crypto/rsa/rsa_ossl.c +++ b/crypto/openssl/crypto/rsa/rsa_ossl.c @@ -465,11 +465,20 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from, BN_free(d); } - if (blinding) - if (!rsa_blinding_invert(blinding, ret, unblind, ctx)) + if (blinding) { + /* + * ossl_bn_rsa_do_unblind() combines blinding inversion and + * 0-padded BN BE serialization + */ + j = ossl_bn_rsa_do_unblind(ret, blinding, unblind, rsa->n, ctx, + buf, num); + if (j == 0) goto err; - - j = BN_bn2binpad(ret, buf, num); + } else { + j = BN_bn2binpad(ret, buf, num); + if (j < 0) + goto err; + } switch (padding) { case RSA_PKCS1_PADDING: diff --git a/crypto/openssl/crypto/x509v3/v3_genn.c b/crypto/openssl/crypto/x509v3/v3_genn.c index 87a5eff47cd9..e54ddc55c957 100644 --- a/crypto/openssl/crypto/x509v3/v3_genn.c +++ b/crypto/openssl/crypto/x509v3/v3_genn.c @@ -98,7 +98,7 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) return -1; switch (a->type) { case GEN_X400: - result = ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address); + result = ASN1_STRING_cmp(a->d.x400Address, b->d.x400Address); break; case GEN_EDIPARTY: diff --git a/crypto/openssl/include/crypto/bn.h b/crypto/openssl/include/crypto/bn.h index 60afda1dadee..b5f36fb25aa2 100644 --- a/crypto/openssl/include/crypto/bn.h +++ b/crypto/openssl/include/crypto/bn.h @@ -86,5 +86,10 @@ int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); +int ossl_bn_rsa_do_unblind(const BIGNUM *intermediate, + const BN_BLINDING *blinding, + const BIGNUM *possible_arg2, + const BIGNUM *to_mod, BN_CTX *ctx, + unsigned char *buf, int num); #endif diff --git a/crypto/openssl/include/openssl/bnerr.h b/crypto/openssl/include/openssl/bnerr.h index 9f3c7cfaab67..a0752cea52d7 100644 --- a/crypto/openssl/include/openssl/bnerr.h +++ b/crypto/openssl/include/openssl/bnerr.h @@ -72,6 +72,7 @@ int ERR_load_BN_strings(void); # define BN_F_BN_SET_WORDS 144 # define BN_F_BN_STACK_PUSH 148 # define BN_F_BN_USUB 115 +# define BN_F_OSSL_BN_RSA_DO_UNBLIND 151 /* * BN reason codes. diff --git a/crypto/openssl/include/openssl/x509v3.h b/crypto/openssl/include/openssl/x509v3.h index 90fa3592ce58..e61c0f29d4b4 100644 --- a/crypto/openssl/include/openssl/x509v3.h +++ b/crypto/openssl/include/openssl/x509v3.h @@ -136,7 +136,7 @@ typedef struct GENERAL_NAME_st { OTHERNAME *otherName; /* otherName */ ASN1_IA5STRING *rfc822Name; ASN1_IA5STRING *dNSName; - ASN1_TYPE *x400Address; + ASN1_STRING *x400Address; X509_NAME *directoryName; EDIPARTYNAME *ediPartyName; ASN1_IA5STRING *uniformResourceIdentifier; diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index db71e23ef85e..0fd296783667 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -100,6 +100,7 @@ SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S .else SRCS+= bn_asm.c .endif +SRCS+= rsa_sup_mul.c # buffer SRCS+= buf_err.c buffer.c From nobody Thu Feb 16 18:02:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjT26hLVz3rFw2; Thu, 16 Feb 2023 18:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjT25L61z4KVj; Thu, 16 Feb 2023 18:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k1PdIRtEZEiz1M9GwBOhuluq5b0oBBlM+bXVesOyPSs=; b=sXvGmjLAEcWN17hIha1P1DFKcCeZ4Wdf07ySJ0BnnpnJtMJc8q+OqBx0fpbPC63xUL0dVX 87NqyZw340E48JrSeHJ+yDAUFqHCrPxDtkmJFm9NdpRg7PBiJ/RyfLJjonrf7oqIsTsmYd ueH2xVM0lN2sywdFTtUVw5wpm+LoojTE5x64CarcpOcLIauTqVy+uJjL0NNIsf2mV7bXPI djy+WH+1VaL2vbpPQ2zshLNBH9noTNyk0A0x8c1KrKz/J1kmCxGgxDzWOVx3cJXr1bz6PT PmZJcut0rf+ZkO2eD1uzLpSaYhFGWa/BWebchFAA9IjzWrhDYqT2O0EBRADLhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676570534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k1PdIRtEZEiz1M9GwBOhuluq5b0oBBlM+bXVesOyPSs=; b=EDs2xWzl5At8DrJrsII6H5dDgrJEfkKzzMEQnWhCtoHcF3C3uZXeb8eGLASjF3IX7CbVUZ N9fUbbEqfRLKpPALQJekAiIq3MwDYtVG3YMFYwkFDGE6xRv9mIYuVteibM9ae3Drr6G3HW Pb9PSobiZ4XIu0haTxEPahSVOCNj14CXFCqzihJxsfnSTtYKakQBjaQy5g6BT0/h7uof+h aal8a5nwt+PEBEmOaOtW+sV7MG44pEeb/LAwz7VIwGcKpS5KBYkIiR8QV4X2wPXsUgri2J Bz1mTrS7+Jk7WP/NeArqtu/t8HrJlIiuPIAHuECM+xfTkw7kcOFM/VAy4ZGzTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676570534; a=rsa-sha256; cv=none; b=tvAHzKnZ9h3Bma9OmCfiXo4eTaOzn6Dj3OisoYoTIE7AJINofcD9u8LvA9tCm53RQv4Edv NgXzcBkquAHub5k5FeKh/s64FZhfqsmPngs0I+CAb4tJqgPaSBgcXX08JE/fS2ZAJ9fLaJ u1wAANHNc0ovX90N729DLVxoVa81a5kUHfDdvgoLl71gciZhJLpRX1i7eMNkV27ncxE7EB Z/2wuRle/5idIgKDQ572kJ0t91ORuwAuGvYrsDduiLjN5rcdUAO4bAZwpjcSe3cspKCSFB nT9onofXFV3TUL7H7dbh2jPqAwLCv+u+NcWi0536+Ie2qBRcnIboE1/lOkPL5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHjT23Ssxz1CqC; Thu, 16 Feb 2023 18:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GI2ES1085448; Thu, 16 Feb 2023 18:02:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GI2EXI085447; Thu, 16 Feb 2023 18:02:14 GMT (envelope-from git) Date: Thu, 16 Feb 2023 18:02:14 GMT Message-Id: <202302161802.31GI2EXI085447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 7f1c8b021bfe - releng/12.3 - Add UPDATING entries and bump version. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.3 X-Git-Reftype: branch X-Git-Commit: 7f1c8b021bfe060e14e176ef7af3f2259ac6f78a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=7f1c8b021bfe060e14e176ef7af3f2259ac6f78a commit 7f1c8b021bfe060e14e176ef7af3f2259ac6f78a Author: Gordon Tetlow AuthorDate: 2023-02-16 17:55:44 +0000 Commit: Gordon Tetlow CommitDate: 2023-02-16 18:01:02 +0000 Add UPDATING entries and bump version. Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 714de864fb9d..77598db595c6 100644 --- a/UPDATING +++ b/UPDATING @@ -17,6 +17,11 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20230216: + 12.3-RELEASE-p12 FreeBSD-SA-23:03.openssl + + Fix multiple OpenSSL vulnerabilities [SA-23:03.openssl] + 20230208: 12.3-RELEASE-p11 FreeBSD-SA-23:01.geli FreeBSD-EN-23:01.tzdata diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 03f7dfad4abf..6170c6c193ed 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -49,7 +49,7 @@ TYPE="FreeBSD" REVISION="12.3" -BRANCH="RELEASE-p11" +BRANCH="RELEASE-p12" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Thu Feb 16 22:39:31 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHqd01b8jz3qRm1; Thu, 16 Feb 2023 22:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHqd015LHz4HNB; Thu, 16 Feb 2023 22:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676587172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4mTbJohBeJ0q5ss/RxJUlulpI2VNYtqh5pvXPVjOiEA=; b=ijJs981wO/LvjbuHXMx/QDSJek4D+Os1XbyWiRmSV9azVUaj5jPGNHc2VLTDGZUfEy+UVg +pnG+J16gJwQoWbkjIlhgnz8X6X3uBUyqcp2sgfVaxrVIpJ+/DMwIgY5bZXw77YtI58RwI EeU4Gfg6QZeM2vS05hUe/KtUXpkj8jGjVwm3o2sgNTpx/1sy8czZgnFGeTwdtbAPuy93Xu WJ/M9/hbwfxF2V+kGKhS/doF6SUlDqoePzqzLPvgM+7w5KpZFfljAYwE37qxdaNni/zRy9 /7KH++hraj+7xwmq/KcLP9/RqI2Pp95txRfVbX4FlJMyCxyfYXr1ptQjsvNq1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676587172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4mTbJohBeJ0q5ss/RxJUlulpI2VNYtqh5pvXPVjOiEA=; b=ibZ75EZCji0HB4/WnT9ogIC/3ZSOOwh4bto9ES+L58/ZamrksvBTtO7Kn8EtWOSlNkCRsc 1OBDFoE/D85d2dbVZZFQRBEeO0uG4ClEJZXfk4WEAxFo/OI/wUDGfR+HerpgyPcBIfeDJV Poc7W/8zSN4Lhbi6zmdYG/r5xnt4bAxxZcji60HVXjvIZHEYOx3ecnO0q/2VCW947+f+WG W/QKENm86RI/rhHsCjhRc8mCfDblrh15S+rlcK7P8l5EBsUlgyFABTolyjafKyMVa0R5Df +3J6EeC/LdChaGt90+la7BrJGplpfxjyILT9fJqVP5hBN0FFkwgjq2rYDnWPgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676587172; a=rsa-sha256; cv=none; b=KvdrquC2Y7wO9EmKgTK/yZZBKecNDOZn+nGecHK8S8VMVcR4t42bKSqpZbe0sF/kPY9CRl 6rG2wq6GmN88GBUI/0QNysP/B396CHEf37Ls4lNXW7uqAIj0URx4LXuEQuJEguhayK46jd LTrDo3SxzqOTkUSm0vl/z3bKbYQ/TW0QWE3mCPDjK1iKWNegO2V8+RAiztzGmHHIhbVyXw Z0LKkoaOUNffVsjmyjys16b9nCMQWGQB4cD98BZm3lNzutM6shuTFFprDLRI1uX7B+1Ppa l9fglEbqmLZoJDO6p5v8aAF0ouA55Meqo/Y0Ur/pwThD5OiAL67fr4q0Fcct7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHqcz71gnzLj3; Thu, 16 Feb 2023 22:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GMdV6R074998; Thu, 16 Feb 2023 22:39:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GMdVEB074997; Thu, 16 Feb 2023 22:39:31 GMT (envelope-from git) Date: Thu, 16 Feb 2023 22:39:31 GMT Message-Id: <202302162239.31GMdVEB074997@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: 2ca516d1a670 - stable/13 - bridge: Make the ioctl table local to if_bridge.c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 2ca516d1a67025b1bda647d68cb863764f764305 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2ca516d1a67025b1bda647d68cb863764f764305 commit 2ca516d1a67025b1bda647d68cb863764f764305 Author: Mark Johnston AuthorDate: 2023-02-07 19:34:37 +0000 Commit: Mark Johnston CommitDate: 2023-02-16 21:55:25 +0000 bridge: Make the ioctl table local to if_bridge.c No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. (cherry picked from commit 3bc099eb71200b843de94b8e84b30b152a38f2f4) --- sys/net/if_bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index e46c7fb92793..1d1e1cd20bc1 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -476,7 +476,7 @@ struct bridge_control { #define BC_F_COPYOUT 0x02 /* copy arguments out */ #define BC_F_SUSER 0x04 /* do super-user check */ -const struct bridge_control bridge_control_table[] = { +static const struct bridge_control bridge_control_table[] = { { bridge_ioctl_add, sizeof(struct ifbreq), BC_F_COPYIN|BC_F_SUSER }, { bridge_ioctl_del, sizeof(struct ifbreq), @@ -561,7 +561,7 @@ const struct bridge_control bridge_control_table[] = { BC_F_COPYIN|BC_F_SUSER }, }; -const int bridge_control_table_size = nitems(bridge_control_table); +static const int bridge_control_table_size = nitems(bridge_control_table); VNET_DEFINE_STATIC(LIST_HEAD(, bridge_softc), bridge_list); #define V_bridge_list VNET(bridge_list) From nobody Thu Feb 16 22:39:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHqd11rw5z3qRm3; Thu, 16 Feb 2023 22:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHqd11QqFz4H4Y; Thu, 16 Feb 2023 22:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676587173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wy7EJCx6FOwT82ihHX3d1hEMa+pXBXkgv0zB4B+vQ+w=; b=jguFaJHfUS11QnTgmFnZLTiceRMbRL1GoLP9Zefyob7rrt0ZyeIMigi9+Y7aAQYi/v95Nf LGJZnlQp3EUFIHUv50t4f8LNqPncjFQpYqpfYDvocmZ+lhjI7QDj2WJR9cVkzQ1w5dntE/ dgywKEz/jVRYB1AzPXkV56he1/vqM5jDeYXg8N4PMLB69OwX4WqRzuErwP5oF6ZV+pvcjj uIfmKbguZ1ziPuNX2YyrdrzSJFZRm+domjOfoSxGIQ50PG/xfu7J4jGBQBXP7v5a6FM352 E+S//kDrXn/BxwcbPs7A2ZSZbDRv1P7VOISf2dslfJDT9qWH3+L+0HbvQNzESg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676587173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wy7EJCx6FOwT82ihHX3d1hEMa+pXBXkgv0zB4B+vQ+w=; b=cwqFoqibhV/8W5XWJo7zUNSmSWMNBNaqhYkOzb84LpxXbOtexvQnm7FzApXrW1oNZEcoqU lwmFiEl9U/R/U30wCAl6koO1NreklHJzkVtle26UAmQ/p1ZJ4uqf4BgMLwZ6LhxAy1sVon GsXY5AR7fHgo25LQACEywkEs9rMyb6CDU5bqrxlFOcKV23Zt/nRMwpcfJ4MdfYgpycHxvT UeC2msi2dO7b6olLORZ0eWbAUW9M9P5dIIQU1Cx5gICeIbTCVxZ9cF98AVS4X1KD3fQwB3 jxjOkyVjY1dGw/Ja3kKLAFEFUfm8KNFvOfEzb29QMUDjucXNIrDImY0IKGMFLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676587173; a=rsa-sha256; cv=none; b=K5nlPudn6cQPGkKf/1+HpaHkchGO5HNqTJ35RIrUGvkLQGTuDaqStoVmCcq3Ys1HLlPwgD NX5HC/i2m7SCZEg0euz5y2ytHIEcG8b2JahQUUziRr8q5EvI2omq+sgaEVWadzwTwp2gEb evIQ0D+TNYVV0a5OCLRxHL7RvdoLP1007QQAck/218RfnJwqrFWX/k3Aq0LZY2jdRSa8Ak yu/Nzv1jsE3fISYodHmQjKDDL7y91myBn8wcAa3Gn0u/MKPWmYmCYh/mhfooqjD6muZ1H8 ilPmMaUTfxqAUeoCLP+7QU7mhLh43hROZL5PfmC4cAnlWTwGYmhmDz4U262Nrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHqd10J1TzLVJ; Thu, 16 Feb 2023 22:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GMdWOK075022; Thu, 16 Feb 2023 22:39:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GMdWKD075021; Thu, 16 Feb 2023 22:39:32 GMT (envelope-from git) Date: Thu, 16 Feb 2023 22:39:32 GMT Message-Id: <202302162239.31GMdWKD075021@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: 3e554a0ebf0a - stable/13 - atomic: Fix the atomic_load_ptr() *SAN interceptor List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 3e554a0ebf0af4dcb95c5e3ffb7e32001b458dbb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3e554a0ebf0af4dcb95c5e3ffb7e32001b458dbb commit 3e554a0ebf0af4dcb95c5e3ffb7e32001b458dbb Author: Mark Johnston AuthorDate: 2023-02-09 14:54:52 +0000 Commit: Mark Johnston CommitDate: 2023-02-16 21:55:27 +0000 atomic: Fix the atomic_load_ptr() *SAN interceptor The interceptor didn't handle a pointer of type "foo * const *" and in that case we'd get compiler errors 1) an invalid cast to volatile uintptr_t, and 2) an assignment to a variable of type "foo * const" (__retptr). Reported by: mjg MFC after: 1 week (cherry picked from commit 08b0c98006b6b9f3722df0ce462f6a4aa8ee06f2) --- sys/sys/atomic_san.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index beeea82a666b..3a72cb4b4980 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -267,17 +267,11 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); #define atomic_fcmpset_acq_ptr ATOMIC_SAN(fcmpset_acq_ptr) #define atomic_fcmpset_rel_ptr ATOMIC_SAN(fcmpset_rel_ptr) #define atomic_fetchadd_ptr ATOMIC_SAN(fetchadd_ptr) -#define atomic_load_ptr(x) ({ \ - __typeof(*x) __retptr; \ - __retptr = (void *)ATOMIC_SAN(load_ptr)((volatile uintptr_t *)(x)); \ - __retptr; \ -}) +#define atomic_load_ptr(x) \ + ((void *)ATOMIC_SAN(load_ptr)(__DECONST(volatile uintptr_t *, (x)))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) -#define atomic_load_consume_ptr(x) ({ \ - __typeof(*x) __retptr; \ - __retptr = (void *)atomic_load_acq_ptr((volatile uintptr_t *)(x));\ - __retptr; \ -}) +#define atomic_load_consume_ptr(x) \ + ((void *)atomic_load_acq_ptr((volatile uintptr_t *)(x))) #define atomic_readandclear_ptr ATOMIC_SAN(readandclear_ptr) #define atomic_set_ptr ATOMIC_SAN(set_ptr) #define atomic_set_acq_ptr ATOMIC_SAN(set_acq_ptr) From nobody Thu Feb 16 22:39:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHqd22pzHz3qRYM; Thu, 16 Feb 2023 22:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHqd228Lsz4HTZ; Thu, 16 Feb 2023 22:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676587174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7w6uRHtMVoP06Bh577t89f3rEmV2HJj5t9stLFl4DnE=; b=sCrKL1urIftx2r9du0nrdmcH4TR/ivj8VTvUjUEQ/Ejf4yHW9Sw1yC3NyW10ysIbA8EvNt MkbEb07aGE8c4Hr8i7CYoMe2lwPKd0frO6RvoFdTaZrxNzvqdrsu+7QzSLyrmnFYBRT0HS BXVV+hUrcxu46xeFCRUoiI7Zy9bpucjpV9GR56outNa9yOxY0VcIFuYbxqSOgN8BLFvXEH SauyQ9v3xIRxLO19KhP1mA+YOy6Z+f+59jsxUlHdTHR3OPNfUlsuX9r4ercr/C7jKXI+wt P+xLYXQGqdnfgnDBnzZOKEDHtKjUtE7KaFsCss/TRn0a9lQRdBHYZQeO4khs0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676587174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7w6uRHtMVoP06Bh577t89f3rEmV2HJj5t9stLFl4DnE=; b=SGYRUp5m4hU4XyyIRMCCpUe3sbQkslDUtymFveEVjrhff7UnVXBGeOpwCQXmj04mLg+h0C 0aoPurqmYkTEATvxSqpPFl+T7GxkD1i/GzHHJqLmGYOpHkBm3i+wk4gl28LttCuQfF+LRW J6BO5gQCoq9tIqM+raEleC5tPH5u9iqseQlpe/77gdR3IxvtmAjVU267xYZblkRsSio4mX XAVZyeKkvEIkkYUS9+WMA2glwe4aKYtSjKFhxOn5kRO4kqbrwClQqz+9CsM8AG0PTbdAr2 x+vpWgcEDIq8LrcAJ5xCfO27vWlV5nzjGIMS+CgpXHgDEuSTCwdCamg7OwL3bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676587174; a=rsa-sha256; cv=none; b=tbJkeYYQdS8HK2xjBXGU5gMEgANFnet3JUCOxHfk91JmpLAwlSqZAbG5m+nRC741posOzF /twqIxkYqU+gXY6TIeiomViHmnR6DayAa6SskU2ExmTxL8Naoli0NWLyJ/d0ZSzvWOmvsK 9jpLN1TdJXzFUFPBMAXgPUk4BfPmOaV3Nt6aqlL4Bt6++dNXO0JaQ3XIEn6gvon54YpHiO H/4Vascj3BTjp10YHTY2fX3mmSIHQHje9gzshsg4GVwks5vCs7YV1G/zLplETeTCH77zC7 SXmKNtsy7iGU1z9LzExr5+g6GDQMC73TEX/YWWQ56aMt16kU84geZgcF6aaj5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHqd21FVTzLVK; Thu, 16 Feb 2023 22:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GMdYSS075046; Thu, 16 Feb 2023 22:39:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GMdYQ2075045; Thu, 16 Feb 2023 22:39:34 GMT (envelope-from git) Date: Thu, 16 Feb 2023 22:39:34 GMT Message-Id: <202302162239.31GMdYQ2075045@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: 8f3dc8ec46b9 - stable/13 - vmm: Collapse identical case statements in vlapic_icrlo_write_handler() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 8f3dc8ec46b9b1a94ac05ee622acf34cbbe9ce5c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8f3dc8ec46b9b1a94ac05ee622acf34cbbe9ce5c commit 8f3dc8ec46b9b1a94ac05ee622acf34cbbe9ce5c Author: Mark Johnston AuthorDate: 2023-02-09 20:49:40 +0000 Commit: Mark Johnston CommitDate: 2023-02-16 21:55:37 +0000 vmm: Collapse identical case statements in vlapic_icrlo_write_handler() No functional change intended. Reviewed by: jhb, corvink MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38446 (cherry picked from commit f3bbd0e818008ddc4fbf1f6ade0f7e411b1dfee5) --- sys/amd64/vmm/io/vlapic.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c index 44641cc29035..a68c68073893 100644 --- a/sys/amd64/vmm/io/vlapic.c +++ b/sys/amd64/vmm/io/vlapic.c @@ -1118,22 +1118,6 @@ vlapic_icrlo_write_handler(struct vlapic *vlapic, bool *retu) break; case APIC_DELMODE_INIT: - if (!vlapic->ipi_exit) { - if (!phys) - break; - - i = vm_apicid2vcpuid(vlapic->vm, dest); - if (i >= vm_get_maxcpus(vlapic->vm) || - i == vlapic->vcpuid) - break; - - CPU_SETOF(i, &ipimask); - - break; - } - - CPU_COPY(&dmask, &ipimask); - break; case APIC_DELMODE_STARTUP: if (!vlapic->ipi_exit) { if (!phys) From nobody Thu Feb 16 22:39:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHqd33hMYz3qRc1; Thu, 16 Feb 2023 22:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHqd335Z4z4HMd; Thu, 16 Feb 2023 22:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676587175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9XTSf2WP9/FZf0fTJ6DWqLwZlAf/3ekPYRpRFH6qIUE=; b=YdF+hZ2AoEhN2ADR/2aaWSSst75imsUBYnQJqvqavyyRuphXghH/RsLa3iwuIOiX9q8fIe 0QngTbhLLqH/jxQOU0wuzK/8CFYEcpyiN9lsUIpRu9GuOHMpk227i2wJVuETjDIe3LevDJ oIwSAv0LrY3+IL25njpKSOMUytwpOp5RL5HqA+1eJgE5BRFpjXP+IEhga9ECBAdg92sp1u nWz0TChnhIwJcYPWOiJ1bf1rSJF+ukJQfk6MQLvQcL7wtx8LcD4wdWEDrRP+v1q3M7eo6J O+e+JchxTa9FrrsCEzWNO5zZJmymdZU3ToUsrSGlzR/hIbEdrIVQGN4RG86zeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676587175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9XTSf2WP9/FZf0fTJ6DWqLwZlAf/3ekPYRpRFH6qIUE=; b=QLJYy8ZXoHO3WKwfNTXOio0BJH2uXEOjFKkCFwRaCnY6guAYNdCa52fvzDYlnfp5wbjzGF wf0xh1mceuWz49wrPfERZZxjdENu0Qdd43xovsLFt4JpT4HcJdkut6uTDDX/gcXZp2m9+V nvxFyRb7ucJzt7sauRKXMHkW+iZ6mWYw0EQCNGdnJEB2yKHEnGc6zYQ2sk14+HlIuyoSNN lj7xw05df8i3FX0uhxBonrrmE0vUwOQnzMXFlEzUB7qLT17coWKm82DeGX8J7ybdr747bN auFdql7SL6t6wDlwW+gA3YQktukJ/l3c+17NVqlBQdJd7pZnji/vA+gzEDeFqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676587175; a=rsa-sha256; cv=none; b=lfgtrGJi9sdY3oBrbmtxP2YHf0Q3HVlyrZjaO2J9BelJRkjQVk5tzFPRytkAxft9P9GsyP Pxu8tThN1o3u2weLvNARtBVK+s2Pn7PPU9BPWgyPYYA6EpuuI23yy9jtA7uZDxqNJfamiU TYmdnnoxu/hnQT9y+Z8lXzqlCD8UXBoa5NHLk4fApBGV7vRjXglRWR3Gh3+XIuUbgsWcI6 ktWgS7U9k3ZoBBADTIYrX/j8VkEyjUpF/sE9wKsYgb8tQPCyw/mJgufOEPwTg0mmEViXcd kb5A2djaReO2pL171J+FRBAFgp2L+eucJEg47CR/2Y4XNXWbOGNOVULem1Em0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHqd32CRrzLLq; Thu, 16 Feb 2023 22:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GMdZBZ075072; Thu, 16 Feb 2023 22:39:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GMdZB4075071; Thu, 16 Feb 2023 22:39:35 GMT (envelope-from git) Date: Thu, 16 Feb 2023 22:39:35 GMT Message-Id: <202302162239.31GMdZB4075071@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: 0b0e5ae2beaf - stable/13 - vmm: Remove an unneeded initialization of "retu" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 0b0e5ae2beafc7c82133427c54672c4bc3df9ea9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0b0e5ae2beafc7c82133427c54672c4bc3df9ea9 commit 0b0e5ae2beafc7c82133427c54672c4bc3df9ea9 Author: Mark Johnston AuthorDate: 2023-02-09 20:51:11 +0000 Commit: Mark Johnston CommitDate: 2023-02-16 21:55:44 +0000 vmm: Remove an unneeded initialization of "retu" vm_handle_ipi() unconditionally initializes "retu". No functional change intended. Reviewed by: jhb, corvink MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38446 (cherry picked from commit ba34de1b3bf965d15f6c76c97fa7e6d17194d401) --- sys/amd64/vmm/vmm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 123d35a983c0..692b8c991310 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -1930,10 +1930,8 @@ restart: * VM_EXITCODE_INST_EMUL could access the apic which could transform the * exit code into VM_EXITCODE_IPI. */ - if (error == 0 && vme->exitcode == VM_EXITCODE_IPI) { - retu = false; + if (error == 0 && vme->exitcode == VM_EXITCODE_IPI) error = vm_handle_ipi(vcpu, vme, &retu); - } if (error == 0 && retu == false) goto restart; From nobody Fri Feb 17 23:11:31 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJSHS1ZGWz3rvMp; Fri, 17 Feb 2023 23:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJSHS1Mjvz3CZ7; Fri, 17 Feb 2023 23:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676675492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OcM/D0DqXjocgax2Xb2HiOZfgKW0vEgcg1LEMXX4PjM=; b=XRDe2exLxONkIKxHFX8mMEgGy7XvnXDE/JQwNkei6s/mFcUvuVSVy++Y8vxp1XKgoR6USw tvl3Foydgmtft7hYXXUQWQCiizohHGofMiaK4R/FOSOWFv0Q3kl/bUfQ397/HioDgvwu+F rSuPs69Zw73jRH7aaZrAcCiycrArQ+DA+gUCgwJ/at9sPw68I/Eg09vSPW/xoGYEkOpnon dgo4tnMLtJgqDr5+xv19f324DwR2Nd7GUY/mWVCt+gjJ1deErt9Jcvw0X47c0Ym8f9jnj0 bqO2rz9mWjYc5x+GZcJzceMs7TaTqB9Vrb55Ssrz7eNwdDZGFHq12Jn9Reb6MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676675492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OcM/D0DqXjocgax2Xb2HiOZfgKW0vEgcg1LEMXX4PjM=; b=DCxU4892Z5gU2WvXw+ZYfRrYAGeRdyJHnRV5y+DGeFVvk73KeJJOLgD5v0q0aRp+CmTfDt 8Nd3e1z3cdowktpVx0kewBQ7qhUFxt/fCSnO3TooNR+Tqc5KIfM1T7cgOIclex9rkjYs5R sda2DOAkf7RUm8d2v50JtsiXcJc0GRWMsXJMpcNiNKpRzrXSqokjec5cCZBTd5Y6BQtNL8 XnV8XM5CHPg59lFnD8bDhwuTLbZz2KXHareCCpesk4CiICsFZDQxNNOSom/ftfMc2V33PV 4ihPkhaxGikgFbu/XOOUxMw9mQIwunoFXeabMmH3a57+N3ZQqhXdM6+aJfuF1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676675492; a=rsa-sha256; cv=none; b=ZRektZCGipN+Zhml0z70ORkZJTvpn0ekoCshK75lqcukuHkbfjZ5MAvEJTYeJmBKr6bik2 A+HnyoiM/4dGeTbITlAoIig1dt2jZS9YRge5xR046kr34vBCcOKa6FKnExnX2/nJ6lwfLL Oez0sP/JHp7zJtvvgKpFi1GsImwaw/N7bqNRSXykTEfCjYoiCSDXCh4JABRTCl4B6Qb8mJ T7lcpt6Gd1I665ce3fyHP13zhwWhfhGBmb8ZH3R3SH6I64Q3z1nERiBcohbExJJN6KXHe7 jnjrlLjOwNP7FfbSRHbfR2MocxChYg7u6NKztMEjIXimtN/KGK7emTCc+B5bIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJSHS0QzBz10yy; Fri, 17 Feb 2023 23:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNBVle079997; Fri, 17 Feb 2023 23:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNBVat079996; Fri, 17 Feb 2023 23:11:31 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:11:31 GMT Message-Id: <202302172311.31HNBVat079996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: cd280c60a5b8 - stable/13 - ice_ddp: Update package to 1.3.30.0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cd280c60a5b85875b8aeff8d522793914e60d19d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd280c60a5b85875b8aeff8d522793914e60d19d commit cd280c60a5b85875b8aeff8d522793914e60d19d Author: Eric Joyner AuthorDate: 2023-01-24 22:01:57 +0000 Commit: Eric Joyner CommitDate: 2023-02-17 22:52:05 +0000 ice_ddp: Update package to 1.3.30.0 This updated DDP is intended to be used with the forthcoming ice(4) driver update to 1.37.7-k. (But it will still work with the current version.) Co-authored-by: Piotr Kubaj Signed-off-by: Eric Joyner MFC after: 1 week Sponsored by: Intel Corporation (cherry picked from commit 2508da22cd6f0904fe55d2d5f6cab7c6011f918c) --- sys/conf/files.amd64 | 6 +- sys/conf/files.arm64 | 6 +- sys/conf/files.powerpc | 12 +- sys/contrib/dev/ice/README | 168 ++++++++++++++++----- .../dev/ice/{ice-1.3.27.0.pkg => ice-1.3.30.0.pkg} | Bin 676216 -> 692660 bytes sys/modules/ice_ddp/Makefile | 2 +- 6 files changed, 142 insertions(+), 52 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 07987a92017b..d8a20e128c84 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -206,7 +206,7 @@ dev/ice/irdma_if.m optional ice pci \ dev/ice/irdma_di_if.m optional ice pci \ compile-with "${NORMAL_M} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031b00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -215,8 +215,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.27.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.27.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ioat/ioat.c optional ioat pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 563d62859258..88cb483f178f 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -236,7 +236,7 @@ dev/ice/irdma_if.m optional ice pci \ dev/ice/irdma_di_if.m optional ice pci \ compile-with "${NORMAL_M} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031b00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -245,8 +245,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.27.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.27.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 889310c0afaa..c01e0e81ab1a 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -80,18 +80,18 @@ dev/ice/irdma_if.m optional ice pci powerpc64 \ compile-with "${NORMAL_M} -I$S/dev/ice" dev/ice/irdma_di_if.m optional ice pci powerpc64 \ compile-with "${NORMAL_M} -I$S/dev/ice" -ice_ddp.c optional ice_ddp powerpc64 \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031b00 -mice_ddp -c${.TARGET}" \ +ice_ddp.c optional ice_ddp powerpc64 | ice pci powerpc64le \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" -ice_ddp.fwo optional ice_ddp powerpc64 \ +ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ dependency "ice_ddp.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ice_ddp.fwo" -ice_ddp.fw optional ice_ddp powerpc64 \ - dependency "$S/contrib/dev/ice/ice-1.3.27.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.27.0.pkg ice_ddp.fw" \ +ice_ddp.fw optional ice_ddp powerpc64 | ice pci powerpc64le \ + dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ixl/if_ixl.c optional ixl pci powerpc64 \ diff --git a/sys/contrib/dev/ice/README b/sys/contrib/dev/ice/README index e6d126d62877..e2ce84d72e71 100644 --- a/sys/contrib/dev/ice/README +++ b/sys/contrib/dev/ice/README @@ -1,14 +1,16 @@ -OS Default Dynamic Device Personalization (DDP) Package +OS Default Dynamic Device Personalization (DDP) Package ====================================================================== -July 7, 2020 +May 12, 2022 Contents ======== - Overview +- Supported Operating Systems - Safe Mode - Notes -- Installation & Troubleshooting +- Installation +- Troubleshooting - Legal @@ -16,7 +18,7 @@ Overview ======== Devices based on the Intel(R) Ethernet 800 Series require a Dynamic Device Personalization (DDP) package file to enable advanced features (such as dynamic -tunneling, Intel(R) Ethernet Flow Director, RSS, and ADQ). +tunneling, Intel(R) Ethernet Flow Director, RSS, and ADQ). DDP allows you to change the packet processing pipeline of a device by applying a profile package to the device at runtime. Profiles can be used to, for @@ -24,12 +26,13 @@ example, add support for new protocols, change existing protocols, or change default settings. DDP profiles can also be rolled back without rebooting the system. -The DDP package loads during device initialization. The driver checks to see if -the DDP package is present and compatible. If this file exists, the driver will -load it into the device. If the DDP package file is missing or incompatible -with the driver, the driver will go into Safe Mode where it will use the -configuration contained in the device's NVM. Refer to the Intel(R) Ethernet -Adapters and Devices User Guide for more information on Safe Mode. +The DDP package loads during device initialization or driver runtime, depending +on the operating system. The driver checks to see if the DDP package is present +and compatible. If this file exists, the driver will load it into the device. +If the DDP package file is missing or incompatible with the driver, the driver +will go into Safe Mode where it will use the configuration contained in the +device's NVM. Refer to the Intel(R) Ethernet Adapters and Devices User Guide +for more information on Safe Mode. A general-purpose, default DDP package is automatically installed with all supported Intel Ethernet 800 Series drivers on supported operating systems. @@ -59,6 +62,18 @@ The default DDP package supports the following: - MPLS (up to 5 consecutive MPLS labels in the outermost Layer 2 header group) +Supported Operating Systems +=========================== +This DDP package is supported on the following operating systems: +- Microsoft* Windows Server* +- Linux* +- FreeBSD* +- VMware* ESXi* + +Refer to the Intel(R) Ethernet Adapters and Devices User Guide for currently +supported versions of these operating systems. + + Safe Mode ========= Safe Mode disables advanced and performance features, and supports only basic @@ -66,45 +81,44 @@ traffic and minimal functionality, such as updating the NVM or downloading a new driver or DDP package. Refer to the Intel(R) Ethernet Adapters and Devices User Guide for more details -on DDP and Safe Mode. +on DDP and Safe Mode. Notes ===== -- You cannot update the DDP package if any PF drivers are already loaded. To -overwrite a package, unload all PFs and then reload the driver with the new -package. +- In Linux, FreeBSD, and Windows, you cannot update the DDP package if any PF +drivers are already loaded. To overwrite a package, unload all PFs and then +reload the driver with the new package. -- Except for Linux, you can only use one DDP package per driver, even if you -have more than one device installed that uses the driver. +- In ESXi, use esxcli to load and unload DDP packages for specific market +segments during driver runtime. + +- In FreeBSD and Windows, you can only use one DDP package per driver, even if +you have more than one device installed that uses the driver. -- Only the first loaded PF per device can download a package for that device. +- In Linux, FreeBSD, and Windows, only the first loaded PF per device can +download a package for that device. In ESXi, you can load different DDP +packages for different PFs associated with a device. - If you are using DPDK, see the DPDK documentation at https://www.dpdk.org/ for installation instructions and more information. -Installation and Troubleshooting -================================ - -Microsoft* Windows* -------------------- -The DDP package is installed as part of the driver binary. You don't need to -take additional steps to install the DDP package file. +Installation +============ -If you encounter issues with the DDP package file, download the latest driver. - - -ESX ---- -The DDP package is installed as part of the driver binary. You don't need to -take additional steps to install the DDP package file. +Microsoft Windows +----------------- +TO INSTALL THE OS DEFAULT DDP PACKAGE: -If you encounter issues with the DDP package file, download the latest driver. +The default DDP package is installed as part of the driver binary. You don't +need to take additional steps to install the DDP package file. FreeBSD ------- +TO INSTALL THE OS DEFAULT DDP PACKAGE: + The FreeBSD driver automatically installs the default DDP package file during driver installation. See the base driver README for general installation and building instructions. @@ -112,15 +126,14 @@ building instructions. The DDP package loads during device initialization. The driver looks for the ice_ddp module and checks that it contains a valid DDP package file. -If you encounter issues with the DDP package file, you may need to download an -updated driver or ice_ddp module. See the log messages for more information. - NOTE: It's important to do 'make install' during initial ice driver installation so that the driver loads the DDP package automatically. Linux ----- +TO INSTALL THE OS DEFAULT DDP PACKAGE: + The Linux driver automatically installs the default DDP package file during driver installation. Read the base driver README for general installation and building instructions. @@ -131,9 +144,8 @@ intel/ice/ddp/ice.pkg in your firmware root (typically /lib/firmware/ or The ice.pkg file is a symbolic link to the default DDP package file installed by the linux-firmware software package or the out-of-tree driver installation. -If you encounter issues with the DDP package file, you may need to download an -updated driver or DDP package file. Refer to the log messages for more -information. + +TO INSTALL A DDP PACKAGE FOR SPECIFIC MARKET SEGMENTS: You can install specific DDP package files for different physical devices in the same system. To install a specific DDP package: @@ -177,9 +189,87 @@ NOTE: The presence of a device-specific DDP package file overrides the loading of the default DDP package file. +ESX +--- +TO INSTALL THE OS DEFAULT DDP PACKAGE: + +The default DDP package is installed as part of the driver binary. You don't +need to take additional steps to install the DDP package file. + +TO INSTALL A DDP PACKAGE FOR SPECIFIC MARKET SEGMENTS: + +You must first install the Intel(R) ESXCLI Plug-In for Managing Intel(R) +Ethernet Network Adapters to be able to install and load market-specific DDP +packages. Download it from: +https://www.intel.com/content/www/us/en/download/19380/intel-esxcli-plug-in-for- +managing-intel-ethernet-network-adapters.html + +NOTE: ESXi support for DDP packages for specific market segments requires the +following: +- OS: ESXi 6.7 or higher +- Driver: icen 1.9.1.x or higher +- Tool: intnet 1.8.3.x or higher + +To install and load this DDP package: + +1. Download and install the esxcli plug-in from the URL above. + +2. Download the DDP package. + +3. Copy the DDP package file to the following location: /store/intel/icen/ddp/. + If the directory does not yet exist, create it before copying the file. + +4. From the command prompt, run the following command to load the DDP package: + + # esxcli intnet ddp load -n -p -f + + Where: + = the name of the NIC + = the name of the DDP package to load + -f = forces the package to load + + NOTE: This operation will cause the driver to reset. + +5. Wait for the load result status. + + +To list all active DDP packages for all virtual NICs, run the following: + +# esxcli intnet ddp list + +To unload (roll back) a DDP package, run the following: + +# esxcli intnet ddp rollback -n -f + +NOTE: This operation will cause the driver to reset. + + +Troubleshooting +=============== + +Microsoft Windows +----------------- +If you encounter issues with the DDP package file, download the latest driver. + +FreeBSD +------- +If you encounter issues with the DDP package file, you may need to download an +updated driver or ice_ddp module. See the log messages for more information. + +Linux +----- +If you encounter issues with the DDP package file, you may need to download an +updated driver or DDP package file. Refer to the log messages for more +information. + +ESX +--- +If you encounter issues with the DDP package file, download the latest driver. + + Legal / Disclaimers =================== -Copyright (c) 2019 - 2020, Intel Corporation. +Copyright (c) 2019 - 2022, Intel Corporation. Intel and the Intel logo are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or other countries. diff --git a/sys/contrib/dev/ice/ice-1.3.27.0.pkg b/sys/contrib/dev/ice/ice-1.3.30.0.pkg similarity index 79% rename from sys/contrib/dev/ice/ice-1.3.27.0.pkg rename to sys/contrib/dev/ice/ice-1.3.30.0.pkg index 2fcc57d47d5f..454a2a6ea193 100644 Binary files a/sys/contrib/dev/ice/ice-1.3.27.0.pkg and b/sys/contrib/dev/ice/ice-1.3.30.0.pkg differ diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index ef0b064503bb..2735a2ba4da2 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= ice_ddp -FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.27.0.pkg:ice_ddp:0x01031b00 +FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.30.0.pkg:ice_ddp:0x01031e00 .include From nobody Fri Feb 17 23:11:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJSHT4g2yz3rvH5; Fri, 17 Feb 2023 23:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJSHT3YY5z3CX7; Fri, 17 Feb 2023 23:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676675493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TkSm+vovZSaNwH42MdhaLv8jutyds8ePnqYuFGFLtxM=; b=L9FXlvpBw6hHm0diprii4OFiP8vidZhqYIqi+g3KOHAQ0ncBG64lyu3H1uykkhnB3VXF71 vrM7uaPKZGpKx3iJNczgch079BR2DNi5E/oR7vhpgfzn8GLWCX4XnjvD66UGHgNyQjB0Xl 3fNGDW3H/HwmXoRZ73+cSWkAhOJIQ3cOOyqivxu/CltIEWajylpcrpCHcXmcToQuLIu2Jc H+4ef4f/kCyTadpCWpKPfxiYTGKVZ+V7kVq7XfZujctV3vm80h83S2sHSsOsp9OSy9OK7Q gTZ6363V8W3IxzJ4DQSPNJcu7cFzpqSMdPGJlAf7kW003/pHrhEP/gg8MKlBFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676675493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TkSm+vovZSaNwH42MdhaLv8jutyds8ePnqYuFGFLtxM=; b=vj4AF4fD2+HGK5pyjgHYWwjcvSsPWPPhs4e/C8hLcgmGcQPI8t7KCrnUP4XqM5YIBbnOCw 168Dfc6AMNmanTNPI31fg9kPZfj31wpQ50d7DHawor4A8n3Ba/3pEsD/I520qaXr8vKvPw tQ7hFfFMioQXtM3Eptr4NR+C7FFeTV/EoESmqKzVMRsW4sRMBFKwzKbkjBvv3ytp9tXqhS jOvTkBYSSpcjqQiZB48cmb/OsSi06Cr9rZ+GYG9pIEMpkZYhngyrpKeVPgke3LDVKsmrpB SB12kbUD5lodJHCExK/0n3+Ru2Bvx/L1/Otb4W4ja5BtwHMPQWg2lsCHjkyPoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676675493; a=rsa-sha256; cv=none; b=njmxNSZP0wgjmgR7iHYLbdmYkzmgC8gOkJDw6Fdg9rAxrfgveMM40l2GhcYAIg0hjgcgB7 1HUQEPDOeihtgbb5Pd6wZy5Z5pTiaspbfzL+FkpQJrd45tmFYazZrR9ZvzIo8N3tLSkFtp XwOSQ4HI6YIuF66CKUlivqhWzlwcZelqqYq1TMLGfFqNeABdXJlN3dC99Wi4YBT6pF9mG8 lUGms1eVRZmcoOnI4xYKBCco3o40NuDQ0oTF5HyLrHXNXFhIjS6hCpLofSa2AMN7CRJsYa DLj9mQUESrD2vcE9gOI0NIeDkAXfPZ00aGttBV3BiK4c7N8GsiejP2isPCx6Qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJSHT25Z4z1100; Fri, 17 Feb 2023 23:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNBXc2080017; Fri, 17 Feb 2023 23:11:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNBXA5080016; Fri, 17 Feb 2023 23:11:33 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:11:33 GMT Message-Id: <202302172311.31HNBXA5080016@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: ebc914f942f6 - stable/13 - ice(4): Update to 1.37.7-k List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ebc914f942f6655ff4c27f8717630f81c74624cb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=ebc914f942f6655ff4c27f8717630f81c74624cb commit ebc914f942f6655ff4c27f8717630f81c74624cb Author: Piotr Kubaj AuthorDate: 2023-02-14 01:29:44 +0000 Commit: Eric Joyner CommitDate: 2023-02-17 22:54:35 +0000 ice(4): Update to 1.37.7-k Notable changes include: - DSCP QoS Support (leveraging support added in rG9c950139051298831ce19d01ea5fb33ec6ea7f89) - Improved PFC handling and TC queue assignments (now all remaining queues are assigned to TC 0 when more than one TC is enabled and the number of available queues does not evenly divide between them) - Support for dumping the internal FW state for additional debugging by Intel support - Support for allowing "No FEC" to be a valid state for the LESM to negotiate when using non-standard compliant modules Also includes various bug fixes and smaller enhancements, too. Signed-off-by: Eric Joyner Reviewed by: erj@ Tested by: Jeff Pieper MFC after: 3 days Relnotes: yes Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D38109 (cherry picked from commit 8923de59054358980102ea5acda6c6dd58273957) --- sys/conf/files.amd64 | 2 + sys/conf/files.arm64 | 2 + sys/conf/files.powerpc | 44 +- sys/dev/ice/ice_adminq_cmd.h | 142 +- sys/dev/ice/ice_alloc.h | 2 +- sys/dev/ice/ice_bitops.h | 14 +- sys/dev/ice/ice_common.c | 453 ++++-- sys/dev/ice/ice_common.h | 7 +- sys/dev/ice/ice_common_sysctls.h | 17 +- sys/dev/ice/ice_common_txrx.h | 2 +- sys/dev/ice/ice_controlq.c | 31 +- sys/dev/ice/ice_controlq.h | 2 +- sys/dev/ice/ice_dcb.c | 52 +- sys/dev/ice/ice_dcb.h | 4 +- sys/dev/ice/ice_ddp_common.c | 2532 +++++++++++++++++++++++++++++++++ sys/dev/ice/ice_ddp_common.h | 478 +++++++ sys/dev/ice/ice_defs.h | 71 + sys/dev/ice/ice_devids.h | 9 +- sys/dev/ice/ice_drv_info.h | 15 +- sys/dev/ice/ice_features.h | 4 +- sys/dev/ice/ice_flex_pipe.c | 2474 +++++--------------------------- sys/dev/ice/ice_flex_pipe.h | 44 +- sys/dev/ice/ice_flex_type.h | 291 +--- sys/dev/ice/ice_flow.c | 18 +- sys/dev/ice/ice_flow.h | 2 +- sys/dev/ice/ice_fw_logging.c | 2 +- sys/dev/ice/ice_fwlog.c | 2 +- sys/dev/ice/ice_fwlog.h | 4 +- sys/dev/ice/ice_hw_autogen.h | 2 +- sys/dev/ice/ice_iflib.h | 12 +- sys/dev/ice/ice_iflib_recovery_txrx.c | 2 +- sys/dev/ice/ice_iflib_sysctls.h | 2 +- sys/dev/ice/ice_iflib_txrx.c | 27 +- sys/dev/ice/ice_lan_tx_rx.h | 10 +- sys/dev/ice/ice_lib.c | 1489 ++++++++++++++++--- sys/dev/ice/ice_lib.h | 43 +- sys/dev/ice/ice_nvm.c | 37 +- sys/dev/ice/ice_nvm.h | 5 +- sys/dev/ice/ice_opts.h | 2 +- sys/dev/ice/ice_osdep.c | 2 +- sys/dev/ice/ice_osdep.h | 2 +- sys/dev/ice/ice_protocol_type.h | 25 +- sys/dev/ice/ice_rdma.c | 15 +- sys/dev/ice/ice_rdma.h | 2 +- sys/dev/ice/ice_resmgr.c | 2 +- sys/dev/ice/ice_resmgr.h | 2 +- sys/dev/ice/ice_rss.h | 2 +- sys/dev/ice/ice_sbq_cmd.h | 2 +- sys/dev/ice/ice_sched.c | 94 +- sys/dev/ice/ice_sched.h | 13 +- sys/dev/ice/ice_status.h | 2 +- sys/dev/ice/ice_strings.c | 8 +- sys/dev/ice/ice_switch.c | 257 ++-- sys/dev/ice/ice_switch.h | 54 +- sys/dev/ice/ice_type.h | 112 +- sys/dev/ice/ice_vlan_mode.c | 3 +- sys/dev/ice/ice_vlan_mode.h | 2 +- sys/dev/ice/if_ice_iflib.c | 66 +- sys/dev/ice/irdma_di_if.m | 2 +- sys/dev/ice/irdma_if.m | 2 +- sys/dev/ice/virtchnl.h | 186 ++- sys/dev/ice/virtchnl_inline_ipsec.h | 11 +- sys/dev/ice/virtchnl_lan_desc.h | 550 ------- sys/modules/ice/Makefile | 2 +- 64 files changed, 5963 insertions(+), 3806 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index d8a20e128c84..b967a3be2a4f 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -205,6 +205,8 @@ dev/ice/irdma_if.m optional ice pci \ compile-with "${NORMAL_M} -I$S/dev/ice" dev/ice/irdma_di_if.m optional ice pci \ compile-with "${NORMAL_M} -I$S/dev/ice" +dev/ice/ice_ddp_common.c optional ice pci \ + compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 88cb483f178f..6b96de28128d 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -235,6 +235,8 @@ dev/ice/irdma_if.m optional ice pci \ compile-with "${NORMAL_M} -I$S/dev/ice" dev/ice/irdma_di_if.m optional ice pci \ compile-with "${NORMAL_M} -I$S/dev/ice" +dev/ice/ice_ddp_common.c optional ice pci \ + compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index c01e0e81ab1a..05f331e2c3e0 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -38,48 +38,50 @@ dev/iicbus/max6690.c optional max6690 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_opal.c optional powernv ipmi -dev/ice/if_ice_iflib.c optional ice pci powerpc64 \ +dev/ice/if_ice_iflib.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_lib.c optional ice pci powerpc64 \ +dev/ice/ice_lib.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_osdep.c optional ice pci powerpc64 \ +dev/ice/ice_osdep.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_resmgr.c optional ice pci powerpc64 \ +dev/ice/ice_resmgr.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_strings.c optional ice pci powerpc64 \ +dev/ice/ice_strings.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_iflib_recovery_txrx.c optional ice pci powerpc64 \ +dev/ice/ice_iflib_recovery_txrx.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_iflib_txrx.c optional ice pci powerpc64 \ +dev/ice/ice_iflib_txrx.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_common.c optional ice pci powerpc64 \ +dev/ice/ice_common.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_controlq.c optional ice pci powerpc64 \ +dev/ice/ice_controlq.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_dcb.c optional ice pci powerpc64 \ +dev/ice/ice_dcb.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_flex_pipe.c optional ice pci powerpc64 \ +dev/ice/ice_flex_pipe.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_flow.c optional ice pci powerpc64 \ +dev/ice/ice_flow.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_nvm.c optional ice pci powerpc64 \ +dev/ice/ice_nvm.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_sched.c optional ice pci powerpc64 \ +dev/ice/ice_sched.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_switch.c optional ice pci powerpc64 \ +dev/ice/ice_switch.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_vlan_mode.c optional ice pci powerpc64 \ +dev/ice/ice_vlan_mode.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_fw_logging.c optional ice pci powerpc64 \ +dev/ice/ice_fw_logging.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_fwlog.c optional ice pci powerpc64 \ +dev/ice/ice_fwlog.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_rdma.c optional ice pci powerpc64 \ +dev/ice/ice_rdma.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/irdma_if.m optional ice pci powerpc64 \ +dev/ice/irdma_if.m optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_M} -I$S/dev/ice" -dev/ice/irdma_di_if.m optional ice pci powerpc64 \ +dev/ice/irdma_di_if.m optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_M} -I$S/dev/ice" +dev/ice/ice_ddp_common.c optional ice pci powerpc64 | ice pci powerpc64le \ + compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp powerpc64 | ice pci powerpc64le \ compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index a07ca6780a3c..92ad8055b666 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2021, Intel Corporation +/* Copyright (c) 2022, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,10 +37,19 @@ * descriptor format. It is shared between Firmware and Software. */ +#include "ice_osdep.h" +#include "ice_defs.h" +#include "ice_bitops.h" + #define ICE_MAX_VSI 768 #define ICE_AQC_TOPO_MAX_LEVEL_NUM 0x9 #define ICE_AQ_SET_MAC_FRAME_SIZE_MAX 9728 +enum ice_aq_res_access_type { + ICE_RES_READ = 1, + ICE_RES_WRITE +}; + struct ice_aqc_generic { __le32 param0; __le32 param1; @@ -155,9 +164,6 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_TXQS 0x0042 #define ICE_AQC_CAPS_MSIX 0x0043 #define ICE_AQC_CAPS_MAX_MTU 0x0047 -#define ICE_AQC_CAPS_NVM_VER 0x0048 -#define ICE_AQC_CAPS_OROM_VER 0x004A -#define ICE_AQC_CAPS_NET_VER 0x004C #define ICE_AQC_CAPS_CEM 0x00F2 #define ICE_AQC_CAPS_IWARP 0x0051 #define ICE_AQC_CAPS_LED 0x0061 @@ -173,6 +179,10 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_EXT_TOPO_DEV_IMG1 0x0082 #define ICE_AQC_CAPS_EXT_TOPO_DEV_IMG2 0x0083 #define ICE_AQC_CAPS_EXT_TOPO_DEV_IMG3 0x0084 +#define ICE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE 0x0085 +#define ICE_AQC_CAPS_NAC_TOPOLOGY 0x0087 +#define ICE_AQC_CAPS_DYN_FLATTENING 0x0090 +#define ICE_AQC_CAPS_ROCEV2_LAG 0x0092 u8 major_ver; u8 minor_ver; @@ -526,6 +536,7 @@ struct ice_aqc_vsi_props { #define ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_S 0 #define ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_M (0xF << ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_S) #define ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA BIT(0) +#define ICE_AQ_VSI_SW_FLAG_RX_PASS_PRUNE_ENA BIT(3) #define ICE_AQ_VSI_SW_FLAG_LAN_ENA BIT(4) u8 veb_stat_id; #define ICE_AQ_VSI_SW_VEB_STAT_ID_S 0 @@ -836,6 +847,8 @@ struct ice_sw_rule_lkup_rx_tx { #define ICE_SINGLE_ACT_PTR 0x2 #define ICE_SINGLE_ACT_PTR_VAL_S 4 #define ICE_SINGLE_ACT_PTR_VAL_M (0x1FFF << ICE_SINGLE_ACT_PTR_VAL_S) + /* Bit 17 should be set if pointed action includes a FWD cmd */ +#define ICE_SINGLE_ACT_PTR_HAS_FWD BIT(17) /* Bit 18 should be set to 1 */ #define ICE_SINGLE_ACT_PTR_BIT BIT(18) @@ -1017,6 +1030,24 @@ struct ice_aqc_get_topo { __le32 addr_low; }; +/* Get/Set Tx Topology (indirect 0x0418/0x0417) */ +struct ice_aqc_get_set_tx_topo { + u8 set_flags; +#define ICE_AQC_TX_TOPO_FLAGS_CORRER BIT(0) +#define ICE_AQC_TX_TOPO_FLAGS_SRC_RAM BIT(1) +#define ICE_AQC_TX_TOPO_FLAGS_SET_PSM BIT(2) +#define ICE_AQC_TX_TOPO_FLAGS_LOAD_NEW BIT(4) +#define ICE_AQC_TX_TOPO_FLAGS_ISSUED BIT(5) + u8 get_flags; +#define ICE_AQC_TX_TOPO_GET_NO_UPDATE 0 +#define ICE_AQC_TX_TOPO_GET_PSM 1 +#define ICE_AQC_TX_TOPO_GET_RAM 2 + __le16 reserved1; + __le32 reserved2; + __le32 addr_high; + __le32 addr_low; +}; + /* Update TSE (indirect 0x0403) * Get TSE (indirect 0x0404) * Add TSE (indirect 0x0401) @@ -1170,6 +1201,22 @@ struct ice_aqc_rl_profile_elem { __le16 rl_encode; }; +/* Config Node Attributes (indirect 0x0419) + * Query Node Attributes (indirect 0x041A) + */ +struct ice_aqc_node_attr { + __le16 num_entries; /* Number of attributes structures in the buffer */ + u8 reserved[6]; + __le32 addr_high; + __le32 addr_low; +}; + +struct ice_aqc_node_attr_elem { + __le32 node_teid; + __le16 max_children; + __le16 children_level; +}; + /* Configure L2 Node CGD (indirect 0x0414) * This indirect command allows configuring a congestion domain for given L2 * node TEIDs in the scheduler topology. @@ -1335,7 +1382,7 @@ struct ice_aqc_get_phy_caps { #define ICE_PHY_TYPE_HIGH_100G_CAUI2 BIT_ULL(2) #define ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC BIT_ULL(3) #define ICE_PHY_TYPE_HIGH_100G_AUI2 BIT_ULL(4) -#define ICE_PHY_TYPE_HIGH_MAX_INDEX 5 +#define ICE_PHY_TYPE_HIGH_MAX_INDEX 4 struct ice_aqc_get_phy_caps_data { __le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */ @@ -1376,6 +1423,7 @@ struct ice_aqc_get_phy_caps_data { #define ICE_AQC_PHY_FEC_25G_RS_528_REQ BIT(2) #define ICE_AQC_PHY_FEC_25G_KR_REQ BIT(3) #define ICE_AQC_PHY_FEC_25G_RS_544_REQ BIT(4) +#define ICE_AQC_PHY_FEC_DIS BIT(5) #define ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN BIT(6) #define ICE_AQC_PHY_FEC_25G_KR_CLAUSE74_EN BIT(7) #define ICE_AQC_PHY_FEC_MASK MAKEMASK(0xdf, 0) @@ -1484,6 +1532,12 @@ struct ice_aqc_get_link_status { __le32 addr_low; }; +enum ice_get_link_status_data_version { + ICE_GET_LINK_STATUS_DATA_V1 = 1, +}; + +#define ICE_GET_LINK_STATUS_DATALEN_V1 32 + /* Get link status response data structure, also used for Link Status Event */ struct ice_aqc_get_link_status_data { u8 topo_media_conflict; @@ -2078,6 +2132,12 @@ struct ice_aqc_nvm { #define ICE_AQC_NVM_PERST_FLAG 1 #define ICE_AQC_NVM_EMPR_FLAG 2 #define ICE_AQC_NVM_EMPR_ENA BIT(0) /* Write Activate reply only */ + /* For Write Activate, several flags are sent as part of a separate + * flags2 field using a separate byte. For simplicity of the software + * interface, we pass the flags as a 16 bit value so these flags are + * all offset by 8 bits + */ +#define ICE_AQC_NVM_ACTIV_REQ_EMPR BIT(8) /* NVM Write Activate only */ __le16 module_typeid; __le16 length; #define ICE_AQC_NVM_ERASE_LEN 0xFFFF @@ -2108,6 +2168,7 @@ struct ice_aqc_nvm { #define ICE_AQC_NVM_LLDP_STATUS_RD_LEN 4 /* In Bytes */ #define ICE_AQC_NVM_MINSREV_MOD_ID 0x130 +#define ICE_AQC_NVM_TX_TOPO_MOD_ID 0x14B /* Used for reading and writing MinSRev using 0x0701 and 0x0703. Note that the * type field is excluded from the section when reading and writing from @@ -2124,6 +2185,13 @@ struct ice_aqc_nvm_minsrev { __le16 orom_minsrev_h; }; +struct ice_aqc_nvm_tx_topo_user_sel { + __le16 length; + u8 data; +#define ICE_AQC_NVM_TX_TOPO_USER_SEL BIT(4) + u8 reserved; +}; + /* Used for 0x0704 as well as for 0x0705 commands */ struct ice_aqc_nvm_cfg { u8 cmd_flags; @@ -2218,14 +2286,25 @@ struct ice_aqc_lldp_get_mib { #define ICE_AQ_LLDP_TX_ACTIVE 0 #define ICE_AQ_LLDP_TX_SUSPENDED 1 #define ICE_AQ_LLDP_TX_FLUSHED 3 +/* DCBX mode */ +#define ICE_AQ_LLDP_DCBX_S 6 +#define ICE_AQ_LLDP_DCBX_M (0x3 << ICE_AQ_LLDP_DCBX_S) +#define ICE_AQ_LLDP_DCBX_NA 0 +#define ICE_AQ_LLDP_DCBX_CEE 1 +#define ICE_AQ_LLDP_DCBX_IEEE 2 /* The following bytes are reserved for the Get LLDP MIB command (0x0A00) * and in the LLDP MIB Change Event (0x0A01). They are valid for the * Get LLDP MIB (0x0A00) response only. */ - u8 reserved1; + u8 state; +#define ICE_AQ_LLDP_MIB_CHANGE_STATE_S 0 +#define ICE_AQ_LLDP_MIB_CHANGE_STATE_M \ + (0x1 << ICE_AQ_LLDP_MIB_CHANGE_STATE_S) +#define ICE_AQ_LLDP_MIB_CHANGE_EXECUTED 0 +#define ICE_AQ_LLDP_MIB_CHANGE_PENDING 1 __le16 local_len; __le16 remote_len; - u8 reserved2[2]; + u8 reserved[2]; __le32 addr_high; __le32 addr_low; }; @@ -2236,6 +2315,11 @@ struct ice_aqc_lldp_set_mib_change { u8 command; #define ICE_AQ_LLDP_MIB_UPDATE_ENABLE 0x0 #define ICE_AQ_LLDP_MIB_UPDATE_DIS 0x1 +#define ICE_AQ_LLDP_MIB_PENDING_S 1 +#define ICE_AQ_LLDP_MIB_PENDING_M \ + (0x1 << ICE_AQ_LLDP_MIB_PENDING_S) +#define ICE_AQ_LLDP_MIB_PENDING_DISABLE 0 +#define ICE_AQ_LLDP_MIB_PENDING_ENABLE 1 u8 reserved[15]; }; @@ -2580,6 +2664,9 @@ struct ice_aqc_add_rdma_qset_data { /* Move RDMA Queue Set (indirect 0x0C34) */ struct ice_aqc_move_rdma_qset_cmd { u8 num_rdma_qset; /* Used by commands and response */ +#define ICE_AQC_PF_MODE_SAME_PF 0x0 +#define ICE_AQC_PF_MODE_GIVE_OWNERSHIP 0x1 +#define ICE_AQC_PF_MODE_KEEP_OWNERSHIP 0x2 u8 flags; u8 reserved[6]; __le32 addr_high; @@ -2656,8 +2743,8 @@ struct ice_aqc_get_pkg_info_resp { struct ice_aqc_driver_shared_params { u8 set_or_get_op; #define ICE_AQC_DRIVER_PARAM_OP_MASK BIT(0) -#define ICE_AQC_DRIVER_PARAM_SET 0 -#define ICE_AQC_DRIVER_PARAM_GET 1 +#define ICE_AQC_DRIVER_PARAM_SET ((u8)0) +#define ICE_AQC_DRIVER_PARAM_GET ((u8)1) u8 param_indx; #define ICE_AQC_DRIVER_PARAM_MAX_IDX 15 u8 rsvd[2]; @@ -2676,16 +2763,18 @@ struct ice_aqc_event_lan_overflow { /* Debug Dump Internal Data (indirect 0xFF08) */ struct ice_aqc_debug_dump_internals { u8 cluster_id; -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_SW 0 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_TXSCHED 2 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_PROFILES 3 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_SW 0 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_TXSCHED 2 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_PROFILES 3 /* EMP_DRAM only dumpable in device debug mode */ -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_EMP_DRAM 4 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_LINK 5 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_EMP_DRAM 4 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_LINK 5 /* AUX_REGS only dumpable in device debug mode */ -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_AUX_REGS 6 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_DCB 7 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_L2P 8 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_AUX_REGS 6 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_DCB 7 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_L2P 8 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_QUEUE_MNG 9 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_FULL_CSR_SPACE 21 u8 reserved; __le16 table_id; /* Used only for non-memory clusters */ __le32 idx; /* In table entries for tables, in bytes for memory */ @@ -2729,7 +2818,6 @@ enum ice_aqc_fw_logging_mod { ICE_AQC_FW_LOG_ID_MAX, }; - /* Set Health Status (direct 0xFF20) */ struct ice_aqc_set_health_status_config { u8 event_source; @@ -2747,6 +2835,7 @@ struct ice_aqc_set_health_status_config { #define ICE_AQC_HEALTH_STATUS_ERR_MOD_NOT_PRESENT 0x106 #define ICE_AQC_HEALTH_STATUS_INFO_MOD_UNDERUTILIZED 0x107 #define ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_LENIENT 0x108 +#define ICE_AQC_HEALTH_STATUS_ERR_MOD_DIAGNOSTIC_FEATURE 0x109 #define ICE_AQC_HEALTH_STATUS_ERR_INVALID_LINK_CFG 0x10B #define ICE_AQC_HEALTH_STATUS_ERR_PORT_ACCESS 0x10C #define ICE_AQC_HEALTH_STATUS_ERR_PORT_UNREACHABLE 0x10D @@ -2768,7 +2857,16 @@ struct ice_aqc_set_health_status_config { #define ICE_AQC_HEALTH_STATUS_ERR_DDP_AUTH 0x504 #define ICE_AQC_HEALTH_STATUS_ERR_NVM_COMPAT 0x505 #define ICE_AQC_HEALTH_STATUS_ERR_OROM_COMPAT 0x506 +#define ICE_AQC_HEALTH_STATUS_ERR_NVM_SEC_VIOLATION 0x507 +#define ICE_AQC_HEALTH_STATUS_ERR_OROM_SEC_VIOLATION 0x508 #define ICE_AQC_HEALTH_STATUS_ERR_DCB_MIB 0x509 +#define ICE_AQC_HEALTH_STATUS_ERR_MNG_TIMEOUT 0x50A +#define ICE_AQC_HEALTH_STATUS_ERR_BMC_RESET 0x50B +#define ICE_AQC_HEALTH_STATUS_ERR_LAST_MNG_FAIL 0x50C +#define ICE_AQC_HEALTH_STATUS_ERR_RESOURCE_ALLOC_FAIL 0x50D +#define ICE_AQC_HEALTH_STATUS_ERR_FW_LOOP 0x1000 +#define ICE_AQC_HEALTH_STATUS_ERR_FW_PFR_FAIL 0x1001 +#define ICE_AQC_HEALTH_STATUS_ERR_LAST_FAIL_AQ 0x1002 /* Get Health Status codes (indirect 0xFF21) */ struct ice_aqc_get_supported_health_status_codes { @@ -2923,6 +3021,7 @@ struct ice_aq_desc { struct ice_aqc_cfg_l2_node_cgd cfg_l2_node_cgd; struct ice_aqc_query_port_ets port_ets; struct ice_aqc_rl_profile rl_profile; + struct ice_aqc_node_attr node_attr; struct ice_aqc_nvm nvm; struct ice_aqc_nvm_cfg nvm_cfg; struct ice_aqc_nvm_checksum nvm_checksum; @@ -2949,6 +3048,7 @@ struct ice_aq_desc { struct ice_aqc_dis_txqs dis_txqs; struct ice_aqc_move_txqs move_txqs; struct ice_aqc_add_rdma_qset add_rdma_qset; + struct ice_aqc_move_rdma_qset_cmd move_rdma_qset; struct ice_aqc_txqs_cleanup txqs_cleanup; struct ice_aqc_add_get_update_free_vsi vsi_cmd; struct ice_aqc_add_update_free_vsi_resp add_update_free_vsi_res; @@ -2975,6 +3075,7 @@ struct ice_aq_desc { struct ice_aqc_clear_health_status clear_health_status; struct ice_aqc_prog_topo_dev_nvm prog_topo_dev_nvm; struct ice_aqc_read_topo_dev_nvm read_topo_dev_nvm; + struct ice_aqc_get_set_tx_topo get_set_tx_topo; } params; }; @@ -3125,6 +3226,10 @@ enum ice_adminq_opc { ice_aqc_opc_query_node_to_root = 0x0413, ice_aqc_opc_cfg_l2_node_cgd = 0x0414, ice_aqc_opc_remove_rl_profiles = 0x0415, + ice_aqc_opc_set_tx_topo = 0x0417, + ice_aqc_opc_get_tx_topo = 0x0418, + ice_aqc_opc_cfg_node_attr = 0x0419, + ice_aqc_opc_query_node_attr = 0x041A, /* PHY commands */ ice_aqc_opc_get_phy_caps = 0x0600, @@ -3196,6 +3301,7 @@ enum ice_adminq_opc { ice_aqc_opc_lldp_set_local_mib = 0x0A08, ice_aqc_opc_lldp_stop_start_specific_agent = 0x0A09, ice_aqc_opc_lldp_filter_ctrl = 0x0A0A, + ice_execute_pending_lldp_mib = 0x0A0B, /* RSS commands */ ice_aqc_opc_set_rss_key = 0x0B02, diff --git a/sys/dev/ice/ice_alloc.h b/sys/dev/ice/ice_alloc.h index b281958be793..bfcb376d45b2 100644 --- a/sys/dev/ice/ice_alloc.h +++ b/sys/dev/ice/ice_alloc.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2021, Intel Corporation +/* Copyright (c) 2022, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h index 0e04cab87be9..c29963d0a318 100644 --- a/sys/dev/ice/ice_bitops.h +++ b/sys/dev/ice/ice_bitops.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2021, Intel Corporation +/* Copyright (c) 2022, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,15 +33,25 @@ #ifndef _ICE_BITOPS_H_ #define _ICE_BITOPS_H_ +#include "ice_defs.h" +#include "ice_osdep.h" + /* Define the size of the bitmap chunk */ typedef u32 ice_bitmap_t; +/* NOTE! + * Do not use any of the functions declared in this file + * on memory that was not declared with ice_declare_bitmap. + * Not following this rule might cause issues like split + * locks. + */ + /* Number of bits per bitmap chunk */ #define BITS_PER_CHUNK (BITS_PER_BYTE * sizeof(ice_bitmap_t)) /* Determine which chunk a bit belongs in */ #define BIT_CHUNK(nr) ((nr) / BITS_PER_CHUNK) /* How many chunks are required to store this many bits */ -#define BITS_TO_CHUNKS(sz) DIVIDE_AND_ROUND_UP((sz), BITS_PER_CHUNK) +#define BITS_TO_CHUNKS(sz) (((sz) + BITS_PER_CHUNK - 1) / BITS_PER_CHUNK) /* Which bit inside a chunk this bit corresponds to */ #define BIT_IN_CHUNK(nr) ((nr) % BITS_PER_CHUNK) /* How many bits are valid in the last chunk, assumes nr > 0 */ diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index 3ae266b72d1f..c2efddeb4f7c 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2021, Intel Corporation +/* Copyright (c) 2022, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,118 +39,110 @@ #define ICE_PF_RESET_WAIT_COUNT 300 -/** - * dump_phy_type - helper function that prints PHY type strings - * @hw: pointer to the HW structure - * @phy: 64 bit PHY type to decipher - * @i: bit index within phy - * @phy_string: string corresponding to bit i in phy - * @prefix: prefix string to differentiate multiple dumps - */ -static void -dump_phy_type(struct ice_hw *hw, u64 phy, u8 i, const char *phy_string, - const char *prefix) -{ - if (phy & BIT_ULL(i)) - ice_debug(hw, ICE_DBG_PHY, "%s: bit(%d): %s\n", prefix, i, - phy_string); -} +static const char * const ice_link_mode_str_low[] = { + [0] = "100BASE_TX", + [1] = "100M_SGMII", + [2] = "1000BASE_T", + [3] = "1000BASE_SX", + [4] = "1000BASE_LX", + [5] = "1000BASE_KX", + [6] = "1G_SGMII", + [7] = "2500BASE_T", + [8] = "2500BASE_X", + [9] = "2500BASE_KX", + [10] = "5GBASE_T", + [11] = "5GBASE_KR", + [12] = "10GBASE_T", + [13] = "10G_SFI_DA", + [14] = "10GBASE_SR", + [15] = "10GBASE_LR", + [16] = "10GBASE_KR_CR1", + [17] = "10G_SFI_AOC_ACC", + [18] = "10G_SFI_C2C", + [19] = "25GBASE_T", + [20] = "25GBASE_CR", + [21] = "25GBASE_CR_S", + [22] = "25GBASE_CR1", + [23] = "25GBASE_SR", + [24] = "25GBASE_LR", + [25] = "25GBASE_KR", + [26] = "25GBASE_KR_S", + [27] = "25GBASE_KR1", + [28] = "25G_AUI_AOC_ACC", + [29] = "25G_AUI_C2C", + [30] = "40GBASE_CR4", + [31] = "40GBASE_SR4", + [32] = "40GBASE_LR4", + [33] = "40GBASE_KR4", + [34] = "40G_XLAUI_AOC_ACC", + [35] = "40G_XLAUI", + [36] = "50GBASE_CR2", + [37] = "50GBASE_SR2", + [38] = "50GBASE_LR2", + [39] = "50GBASE_KR2", + [40] = "50G_LAUI2_AOC_ACC", + [41] = "50G_LAUI2", + [42] = "50G_AUI2_AOC_ACC", + [43] = "50G_AUI2", + [44] = "50GBASE_CP", + [45] = "50GBASE_SR", + [46] = "50GBASE_FR", + [47] = "50GBASE_LR", + [48] = "50GBASE_KR_PAM4", + [49] = "50G_AUI1_AOC_ACC", + [50] = "50G_AUI1", + [51] = "100GBASE_CR4", + [52] = "100GBASE_SR4", + [53] = "100GBASE_LR4", + [54] = "100GBASE_KR4", + [55] = "100G_CAUI4_AOC_ACC", + [56] = "100G_CAUI4", + [57] = "100G_AUI4_AOC_ACC", + [58] = "100G_AUI4", + [59] = "100GBASE_CR_PAM4", + [60] = "100GBASE_KR_PAM4", + [61] = "100GBASE_CP2", + [62] = "100GBASE_SR2", + [63] = "100GBASE_DR", +}; + +static const char * const ice_link_mode_str_high[] = { + [0] = "100GBASE_KR2_PAM4", + [1] = "100G_CAUI2_AOC_ACC", + [2] = "100G_CAUI2", + [3] = "100G_AUI2_AOC_ACC", + [4] = "100G_AUI2", +}; /** - * ice_dump_phy_type_low - helper function to dump phy_type_low + * ice_dump_phy_type - helper function to dump phy_type * @hw: pointer to the HW structure * @low: 64 bit value for phy_type_low + * @high: 64 bit value for phy_type_high * @prefix: prefix string to differentiate multiple dumps */ static void -ice_dump_phy_type_low(struct ice_hw *hw, u64 low, const char *prefix) +ice_dump_phy_type(struct ice_hw *hw, u64 low, u64 high, const char *prefix) { + u32 i; + ice_debug(hw, ICE_DBG_PHY, "%s: phy_type_low: 0x%016llx\n", prefix, (unsigned long long)low); - dump_phy_type(hw, low, 0, "100BASE_TX", prefix); - dump_phy_type(hw, low, 1, "100M_SGMII", prefix); - dump_phy_type(hw, low, 2, "1000BASE_T", prefix); - dump_phy_type(hw, low, 3, "1000BASE_SX", prefix); - dump_phy_type(hw, low, 4, "1000BASE_LX", prefix); - dump_phy_type(hw, low, 5, "1000BASE_KX", prefix); - dump_phy_type(hw, low, 6, "1G_SGMII", prefix); - dump_phy_type(hw, low, 7, "2500BASE_T", prefix); - dump_phy_type(hw, low, 8, "2500BASE_X", prefix); - dump_phy_type(hw, low, 9, "2500BASE_KX", prefix); - dump_phy_type(hw, low, 10, "5GBASE_T", prefix); - dump_phy_type(hw, low, 11, "5GBASE_KR", prefix); - dump_phy_type(hw, low, 12, "10GBASE_T", prefix); - dump_phy_type(hw, low, 13, "10G_SFI_DA", prefix); - dump_phy_type(hw, low, 14, "10GBASE_SR", prefix); - dump_phy_type(hw, low, 15, "10GBASE_LR", prefix); - dump_phy_type(hw, low, 16, "10GBASE_KR_CR1", prefix); - dump_phy_type(hw, low, 17, "10G_SFI_AOC_ACC", prefix); - dump_phy_type(hw, low, 18, "10G_SFI_C2C", prefix); - dump_phy_type(hw, low, 19, "25GBASE_T", prefix); - dump_phy_type(hw, low, 20, "25GBASE_CR", prefix); - dump_phy_type(hw, low, 21, "25GBASE_CR_S", prefix); - dump_phy_type(hw, low, 22, "25GBASE_CR1", prefix); - dump_phy_type(hw, low, 23, "25GBASE_SR", prefix); - dump_phy_type(hw, low, 24, "25GBASE_LR", prefix); - dump_phy_type(hw, low, 25, "25GBASE_KR", prefix); - dump_phy_type(hw, low, 26, "25GBASE_KR_S", prefix); - dump_phy_type(hw, low, 27, "25GBASE_KR1", prefix); - dump_phy_type(hw, low, 28, "25G_AUI_AOC_ACC", prefix); - dump_phy_type(hw, low, 29, "25G_AUI_C2C", prefix); - dump_phy_type(hw, low, 30, "40GBASE_CR4", prefix); - dump_phy_type(hw, low, 31, "40GBASE_SR4", prefix); - dump_phy_type(hw, low, 32, "40GBASE_LR4", prefix); - dump_phy_type(hw, low, 33, "40GBASE_KR4", prefix); - dump_phy_type(hw, low, 34, "40G_XLAUI_AOC_ACC", prefix); - dump_phy_type(hw, low, 35, "40G_XLAUI", prefix); - dump_phy_type(hw, low, 36, "50GBASE_CR2", prefix); - dump_phy_type(hw, low, 37, "50GBASE_SR2", prefix); - dump_phy_type(hw, low, 38, "50GBASE_LR2", prefix); - dump_phy_type(hw, low, 39, "50GBASE_KR2", prefix); - dump_phy_type(hw, low, 40, "50G_LAUI2_AOC_ACC", prefix); - dump_phy_type(hw, low, 41, "50G_LAUI2", prefix); - dump_phy_type(hw, low, 42, "50G_AUI2_AOC_ACC", prefix); - dump_phy_type(hw, low, 43, "50G_AUI2", prefix); - dump_phy_type(hw, low, 44, "50GBASE_CP", prefix); - dump_phy_type(hw, low, 45, "50GBASE_SR", prefix); - dump_phy_type(hw, low, 46, "50GBASE_FR", prefix); - dump_phy_type(hw, low, 47, "50GBASE_LR", prefix); - dump_phy_type(hw, low, 48, "50GBASE_KR_PAM4", prefix); - dump_phy_type(hw, low, 49, "50G_AUI1_AOC_ACC", prefix); - dump_phy_type(hw, low, 50, "50G_AUI1", prefix); - dump_phy_type(hw, low, 51, "100GBASE_CR4", prefix); - dump_phy_type(hw, low, 52, "100GBASE_SR4", prefix); - dump_phy_type(hw, low, 53, "100GBASE_LR4", prefix); - dump_phy_type(hw, low, 54, "100GBASE_KR4", prefix); - dump_phy_type(hw, low, 55, "100G_CAUI4_AOC_ACC", prefix); - dump_phy_type(hw, low, 56, "100G_CAUI4", prefix); - dump_phy_type(hw, low, 57, "100G_AUI4_AOC_ACC", prefix); - dump_phy_type(hw, low, 58, "100G_AUI4", prefix); - dump_phy_type(hw, low, 59, "100GBASE_CR_PAM4", prefix); - dump_phy_type(hw, low, 60, "100GBASE_KR_PAM4", prefix); - dump_phy_type(hw, low, 61, "100GBASE_CP2", prefix); - dump_phy_type(hw, low, 62, "100GBASE_SR2", prefix); - dump_phy_type(hw, low, 63, "100GBASE_DR", prefix); -} - -/** - * ice_dump_phy_type_high - helper function to dump phy_type_high - * @hw: pointer to the HW structure - * @high: 64 bit value for phy_type_high - * @prefix: prefix string to differentiate multiple dumps - */ -static void -ice_dump_phy_type_high(struct ice_hw *hw, u64 high, const char *prefix) -{ + for (i = 0; i < ARRAY_SIZE(ice_link_mode_str_low); i++) { + if (low & BIT_ULL(i)) + ice_debug(hw, ICE_DBG_PHY, "%s: bit(%d): %s\n", + prefix, i, ice_link_mode_str_low[i]); + } + ice_debug(hw, ICE_DBG_PHY, "%s: phy_type_high: 0x%016llx\n", prefix, (unsigned long long)high); - dump_phy_type(hw, high, 0, "100GBASE_KR2_PAM4", prefix); - dump_phy_type(hw, high, 1, "100G_CAUI2_AOC_ACC", prefix); - dump_phy_type(hw, high, 2, "100G_CAUI2", prefix); - dump_phy_type(hw, high, 3, "100G_AUI2_AOC_ACC", prefix); - dump_phy_type(hw, high, 4, "100G_AUI2", prefix); + for (i = 0; i < ARRAY_SIZE(ice_link_mode_str_high); i++) { + if (high & BIT_ULL(i)) + ice_debug(hw, ICE_DBG_PHY, "%s: bit(%d): %s\n", + prefix, i, ice_link_mode_str_high[i]); + } } /** @@ -227,13 +219,23 @@ bool ice_is_e810t(struct ice_hw *hw) { switch (hw->device_id) { case ICE_DEV_ID_E810C_SFP: - if (hw->subsystem_device_id == ICE_SUBDEV_ID_E810T || - hw->subsystem_device_id == ICE_SUBDEV_ID_E810T2) + switch (hw->subsystem_device_id) { + case ICE_SUBDEV_ID_E810T: + case ICE_SUBDEV_ID_E810T2: + case ICE_SUBDEV_ID_E810T3: + case ICE_SUBDEV_ID_E810T4: + case ICE_SUBDEV_ID_E810T5: + case ICE_SUBDEV_ID_E810T7: return true; + } break; case ICE_DEV_ID_E810C_QSFP: - if (hw->subsystem_device_id == ICE_SUBDEV_ID_E810T2) + switch (hw->subsystem_device_id) { + case ICE_SUBDEV_ID_E810T2: + case ICE_SUBDEV_ID_E810T5: + case ICE_SUBDEV_ID_E810T6: return true; + } break; default: break; @@ -242,6 +244,31 @@ bool ice_is_e810t(struct ice_hw *hw) return false; } +/** + * ice_is_e823 + * @hw: pointer to the hardware structure + * + * returns true if the device is E823-L or E823-C based, false if not. + */ +bool ice_is_e823(struct ice_hw *hw) +{ + switch (hw->device_id) { + case ICE_DEV_ID_E823L_BACKPLANE: + case ICE_DEV_ID_E823L_SFP: + case ICE_DEV_ID_E823L_10G_BASE_T: + case ICE_DEV_ID_E823L_1GBE: + case ICE_DEV_ID_E823L_QSFP: + case ICE_DEV_ID_E823C_BACKPLANE: + case ICE_DEV_ID_E823C_QSFP: + case ICE_DEV_ID_E823C_SFP: + case ICE_DEV_ID_E823C_10G_BASE_T: + case ICE_DEV_ID_E823C_SGMII: + return true; + default: + return false; + } +} + /** * ice_clear_pf_cfg - Clear PF configuration * @hw: pointer to the hardware structure @@ -308,10 +335,10 @@ ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size, if (resp[i].addr_type == ICE_AQC_MAN_MAC_ADDR_TYPE_LAN) { ice_memcpy(hw->port_info->mac.lan_addr, resp[i].mac_addr, ETH_ALEN, - ICE_DMA_TO_NONDMA); + ICE_NONDMA_TO_NONDMA); ice_memcpy(hw->port_info->mac.perm_addr, resp[i].mac_addr, - ETH_ALEN, ICE_DMA_TO_NONDMA); + ETH_ALEN, ICE_NONDMA_TO_NONDMA); break; } return ICE_SUCCESS; @@ -355,23 +382,30 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, cmd->param0 |= CPU_TO_LE16(ICE_AQC_GET_PHY_RQM); cmd->param0 |= CPU_TO_LE16(report_mode); + status = ice_aq_send_cmd(hw, &desc, pcaps, pcaps_size, cd); ice_debug(hw, ICE_DBG_LINK, "get phy caps dump\n"); - if (report_mode == ICE_AQC_REPORT_TOPO_CAP_MEDIA) + switch (report_mode) { + case ICE_AQC_REPORT_TOPO_CAP_MEDIA: prefix = "phy_caps_media"; - else if (report_mode == ICE_AQC_REPORT_TOPO_CAP_NO_MEDIA) + break; + case ICE_AQC_REPORT_TOPO_CAP_NO_MEDIA: prefix = "phy_caps_no_media"; - else if (report_mode == ICE_AQC_REPORT_ACTIVE_CFG) + break; + case ICE_AQC_REPORT_ACTIVE_CFG: prefix = "phy_caps_active"; - else if (report_mode == ICE_AQC_REPORT_DFLT_CFG) + break; + case ICE_AQC_REPORT_DFLT_CFG: prefix = "phy_caps_default"; - else + break; + default: prefix = "phy_caps_invalid"; + } - ice_dump_phy_type_low(hw, LE64_TO_CPU(pcaps->phy_type_low), prefix); - ice_dump_phy_type_high(hw, LE64_TO_CPU(pcaps->phy_type_high), prefix); + ice_dump_phy_type(hw, LE64_TO_CPU(pcaps->phy_type_low), + LE64_TO_CPU(pcaps->phy_type_high), prefix); ice_debug(hw, ICE_DBG_LINK, "%s: report_mode = 0x%x\n", prefix, report_mode); @@ -444,7 +478,7 @@ ice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd, * * Find and return the node handle for a given node type and part number in the * netlist. When found ICE_SUCCESS is returned, ICE_ERR_DOES_NOT_EXIST - * otherwise. If @node_handle provided, it would be set to found node handle. + * otherwise. If node_handle provided, it would be set to found node handle. */ enum ice_status ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number, @@ -452,11 +486,12 @@ ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number, { struct ice_aqc_get_link_topo cmd; u8 rec_node_part_number; - enum ice_status status; u16 rec_node_handle; u8 idx; for (idx = 0; idx < MAX_NETLIST_SIZE; idx++) { + enum ice_status status; + memset(&cmd, 0, sizeof(cmd)); cmd.addr.topo_params.node_type_ctx = @@ -545,7 +580,6 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) case ICE_PHY_TYPE_LOW_1000BASE_LX: case ICE_PHY_TYPE_LOW_10GBASE_SR: case ICE_PHY_TYPE_LOW_10GBASE_LR: - case ICE_PHY_TYPE_LOW_10G_SFI_C2C: case ICE_PHY_TYPE_LOW_25GBASE_SR: case ICE_PHY_TYPE_LOW_25GBASE_LR: case ICE_PHY_TYPE_LOW_40GBASE_SR4: @@ -602,6 +636,7 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) case ICE_PHY_TYPE_LOW_2500BASE_X: case ICE_PHY_TYPE_LOW_5GBASE_KR: case ICE_PHY_TYPE_LOW_10GBASE_KR_CR1: + case ICE_PHY_TYPE_LOW_10G_SFI_C2C: case ICE_PHY_TYPE_LOW_25GBASE_KR: case ICE_PHY_TYPE_LOW_25GBASE_KR1: case ICE_PHY_TYPE_LOW_25GBASE_KR_S: @@ -629,6 +664,8 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) return ICE_MEDIA_UNKNOWN; } +#define ice_get_link_status_datalen(hw) ICE_GET_LINK_STATUS_DATALEN_V1 + /** * ice_aq_get_link_info * @pi: port information structure @@ -668,8 +705,8 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, resp->cmd_flags = CPU_TO_LE16(cmd_flags); resp->lport_num = pi->lport; - status = ice_aq_send_cmd(hw, &desc, &link_data, sizeof(link_data), cd); - + status = ice_aq_send_cmd(hw, &desc, &link_data, + ice_get_link_status_datalen(hw), cd); if (status != ICE_SUCCESS) *** 12049 LINES SKIPPED *** From nobody Fri Feb 17 23:44:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1l1vXqz3rxS7; Fri, 17 Feb 2023 23:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1l1M2Mz3GMp; Fri, 17 Feb 2023 23:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXh1YlHjwH8WSwKRWoZZHlcmJOG2tT8mSVP8Z3BaC6g=; b=LavAifkPR7C58O9VfM7CxX5t/ni753yTM+vwRnBHGoUmziStTNNxSdv/03EDU1SI510YRw 8Id8F3ZGA1eKhXk9tpkXxV9HNUR/M3vgzGitaAw7U4kgLjmu8BVmQRBZe6X7vU2uUtUovl acg/Wk0IP8f/Vl++WKcTJ3IKrxOZZ/GTpQd+ilWTjm5QRpyhc3N5USgTgX1rZyrrHYu13j oeESKXi65wOvvR117+LGt3/Pm+NZDIQPWiXcUJp8TdfCtkSb54zXv5EGV7sviqz0+PxP69 YrS+qO19gz4Rpf46c0UYSqmn51DXd0UtnWR4KHH9HrF6lVdqaKGRKZmX23f9Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXh1YlHjwH8WSwKRWoZZHlcmJOG2tT8mSVP8Z3BaC6g=; b=pVif5KDYITJBZ3ABfUtZELO3hNebzeJKWMql0NS3JjEMEDRHcYEjgMGpPZcq8yg5oGfw0i DXdvd0/xXUFyttmOP4OROnI4LhIcw9q7E8ehbaD+zc6lyU7qL1NlhYvnDOZtgax6lJdLj8 1/20rFa97+vsAN4V92bj2i4j6Jh4LmfLC5Y02nYI0ZonCFsYP42lYoNoN0qZtklwC5Wj+t 1snJTJwMarrcDEur5xAKehV+MJvXWoPb/Zngyo31xojUMk7lGVrN94y2w9Tkw+DmTV0XIy HMmPYBRORHTFlEcFG6WIGx5XUkZQTi4iaSFmSkwKW2G6R5blNNuXi0dV6ipkuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677483; a=rsa-sha256; cv=none; b=sEK+3c7jEtLAPPkVULSeWQMi5ogIKDna4s+g6Mu60C1+ktPEJpKBSmgu1iqkg0oP7p6qDd tJCLN2CDvTNMfzZjmCsPgoLEGxwr80tnwOUHX8YgMlUtLdYEbe+0pWVSOlLhtHfT5qS/GL m8rLd4Jx0bGHwiVYGQGmURNY7Cb/TZLLUAZzi9wrOfJI3vNMehBtUVE0A3s2rmZE7RBy7o ANGN87GaAnRaCeDlQEviC/ov/X2+Tu4T9e3peRfVUa9wkcNiRm+CoPaN7XNxyqsnT5QRiC Z+ZCBJreFNvEpnOWOuDkNMVM/5pNNkh9PTXfSPkziRpOSJ9sq6xG3JSlEpliXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1l0Pk8z11fQ; Fri, 17 Feb 2023 23:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNih2F024974; Fri, 17 Feb 2023 23:44:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNigpD024973; Fri, 17 Feb 2023 23:44:42 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:42 GMT Message-Id: <202302172344.31HNigpD024973@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: 069f504a8c4f - stable/13 - LinuxKPI: linux_pci.c: fix whitespace List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 069f504a8c4f9873ca32637cf0df1b0390b69b6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=069f504a8c4f9873ca32637cf0df1b0390b69b6a commit 069f504a8c4f9873ca32637cf0df1b0390b69b6a Author: Bjoern A. Zeeb AuthorDate: 2023-01-27 15:18:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:14 +0000 LinuxKPI: linux_pci.c: fix whitespace Properly indent a line. No functional change. Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit 68b1d162505149b8629f7e22cecf298cea2ff1f9) --- sys/compat/linuxkpi/common/src/linux_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index e4f85b906563..2db542284332 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1194,7 +1194,7 @@ linuxkpi_dmam_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_ha struct lkpi_devres_dmam_coherent *dr; dr = lkpi_devres_alloc(lkpi_dmam_free_coherent, - sizeof(*dr), GFP_KERNEL | __GFP_ZERO); + sizeof(*dr), GFP_KERNEL | __GFP_ZERO); if (dr == NULL) return (NULL); From nobody Fri Feb 17 23:44:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1m3Bs1z3rx2k; Fri, 17 Feb 2023 23:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1m2W8Xz3GSx; Fri, 17 Feb 2023 23:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPjJH7pbJDjmeaoJL092XYJU1JXmu5pXyVDnSq5C2lY=; b=DlM0EzD83sSTicMNX/JfzMi6UaeRz+/RQIKwdshNlA7z2KIDcGtc12NmXzvmAp350y8PDA BC8UFtPQGsz8IsNAv1loBrVyjerE5hZt5X0VwNBxwmHB22/egXY2Dsg0Sr8/4p/dxYdkK0 w4CSQVIEQa1Hh+PuC4LaR/GS2Fn1gWeFxhkxwbcdgvF0uSHXW+PPXPQ9RXtanTInPdX86Y w3/wwHWh++6+WUbkHLFMW7nvKOGvbu81nF5KEgZZDUZmMGI5VZUtpRWjn59hRY4JmMQm/d usE96RC8u/G4p73R2PZpiit1cklxbdPN42V3J6764zIMLXYA/Jo7rwP+jkJMaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPjJH7pbJDjmeaoJL092XYJU1JXmu5pXyVDnSq5C2lY=; b=aoTNgMn+tJSoIA8FvlPe3k3kWd2wXR5glPIuOzl4LHKKeDflizX99Lat7IlGH26Kbj0H2e QljlVFs8l3FB8gvA+h9/tlqwZfFyvdrEWB7mj+mXxjiHEMoKRJCgqfbpLenUsL21kBuzKi ZVeEuBccAo2wWSv+PolSPERXBWBo1AtbgWEhg+lqSU3grkZAs45X7MqPnF04griXpyMrS4 MruVWb7HIt+bIZ1kfa/K0rEw2VyQEiabXQkpnq6g2W1DSOGhOmXDs04oeWgTmV79kahUoW 4AYLCklcX/GPOjOvYAp22hI7rzVO4fD5KlwngMpC6cIw7dfteM8kzn2BrG9lFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677484; a=rsa-sha256; cv=none; b=gvfdx6ebGwDHXPz9ziMOy1cX6B6TebkAcYCxHR0rU2mWUhZJmNApMh1bIGXsZBBfzp/fTs EBbUDds+or5tCXAZHQa1zJFYOohrAN7GW8l7/fZ/vZBC8etcdF/0loCsEwY5A0aeG5QNNH Lbr/ccG/93izCeW8R40HqwR79t7k7or9vflMJxXXg/jGptRWx8yRmP9kG5w8cTWuLFRuGZ PxMpirriTEIdEV3geDZ1sMQ3wSArxmDJQG6xbBaGVNbYveoPRXckjJWNdLI1j1P91FYqT7 tMjqOLmbGqR91NYgLVsXxAhRNG/hoX3N8w7HfVQ18i0gLUWztaiNhbW8AxXoVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1m1ZYdz11qQ; Fri, 17 Feb 2023 23:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNiiCl024993; Fri, 17 Feb 2023 23:44:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNiiQj024992; Fri, 17 Feb 2023 23:44:44 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:44 GMT Message-Id: <202302172344.31HNiiQj024992@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: 9df37d74c361 - stable/13 - LinuxKPI: pci.h move function declaration to top of file. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 9df37d74c361f14b8315f7f3b20fe3d813af20ca Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9df37d74c361f14b8315f7f3b20fe3d813af20ca commit 9df37d74c361f14b8315f7f3b20fe3d813af20ca Author: Bjoern A. Zeeb AuthorDate: 2023-01-26 14:31:26 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:14 +0000 LinuxKPI: pci.h move function declaration to top of file. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit 0d0ca120a79ff826d7c2ad84c44359c200460640) --- sys/compat/linuxkpi/common/include/linux/pci.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index ab94cbeff6e4..ba4ee8a9b70a 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -361,6 +361,7 @@ struct pcim_iomap_devres { int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name); int pci_alloc_irq_vectors(struct pci_dev *pdev, int minv, int maxv, unsigned int flags); +bool pci_device_is_present(struct pci_dev *pdev); /* Internal helper function(s). */ struct pci_dev *lkpinew_pci_dev(device_t); @@ -1675,6 +1676,4 @@ pci_wait_for_pending_transaction(struct pci_dev *pdev) return (0); } -bool pci_device_is_present(struct pci_dev *pdev); - #endif /* _LINUXKPI_LINUX_PCI_H_ */ From nobody Fri Feb 17 23:44:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1n3nhBz3rxSD; Fri, 17 Feb 2023 23:44:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1n3NC9z3GQP; Fri, 17 Feb 2023 23:44:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZs2qVl1+8HGo7HXegcoPkfgxukLlVQabBMUgLu+6Zs=; b=mVJ8Mc1iao+EJ3GSQgDkPVeVkj/pciuO4gmC2iTyjeeW8UmlKMhbIE67HonSSyoVrUsiKu FBL1UGBxIGfHEkX/B5sbrsmVG183BUBI8A9dhG/+aEaqR9YcyzAfdl59Riw7fWBobvnx5N ihN6Ks7FT3cLIltMrZEvU5UJU09KOxGsQ1eJAJ87cEMhOnfJGEqQlXwv0XgGx0etmhkH2J mOK6bBo6T61TNpcEMGCA7FS0s7ZTpsp+ItBe91z0On2PQqomrS3bWjtyqCQZc0bRlN6+K+ ThXiJye4pTx4L0iSVI5YixOwG+h5jZAKmpP9CTK/JOH9Q3/ecJLJr45EY9tejw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZs2qVl1+8HGo7HXegcoPkfgxukLlVQabBMUgLu+6Zs=; b=jZKA1i2BOd+6ApY2Aa+T/I9AAsNHC6lD+Zciv4eOCIAxxqByo45VpLH5e7CEZBKgHjDzsZ 9KnHx0THzUrAD0kJEJk0zBS8srcUa7156suhoMrYE0m53nnqag5enlGdlmQe7smZq+ot0F /PEx9e8zbS5c2fXbccSl/WgHhx1p/k19RdHGdoEY0eBBJD/dtnw+Hua156FW7VSlbjwjxR XITIv2GP5X+Ng54K+h6xuSHBaqOPkp47/mBcrYC9y+9i5pcUZjhvbcWbz4I43TE04L81iZ QB3qWcPq+kl0Yb5xsmLuID9Irx7KKv15RbEy8QzrFypi2iGzXx/bNfRUxZ/19A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677485; a=rsa-sha256; cv=none; b=bWVGhSGW/hdFvfsTouGrS2PrbcSlVTEiRAatXlsAdBqNJXWk129AbL2JSuRO+cml6Vbg+E 6Acik6jlJERuzQq0LRuUoQYeKwYIEwc3HTkJdbef1ZpbMjbFYB0lSkXcYeYgtxLboR7QXj eowjsXsJzjXovadlzzAduB0sk4AlupCofFE25OtqjoTGynPfO1V56AWuVPpduwBu6T9hF1 IAnNNVB5vFrPdjcjaz8ik3pq6glZXFIks21CYePLaXsI84D8oyC/WBMwoZCapFCk1cifig wECofmDJ0ZD+Ou0qJSbCcvtd4DtTpFkoewmvE+V2ZR157kkm9GoIziWL/Ds6oA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1n2VGBz11Ws; Fri, 17 Feb 2023 23:44:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNijAl025012; Fri, 17 Feb 2023 23:44:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNijq1025011; Fri, 17 Feb 2023 23:44:45 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:45 GMT Message-Id: <202302172344.31HNijq1025011@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: 75727a02155a - stable/13 - LinuxKPI: interrupt.h: add disable_irq_nosync(), irq_set_status_flags() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 75727a02155af29167a6d460de5ce6a9d52e26d8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=75727a02155af29167a6d460de5ce6a9d52e26d8 commit 75727a02155af29167a6d460de5ce6a9d52e26d8 Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 16:11:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:14 +0000 LinuxKPI: interrupt.h: add disable_irq_nosync(), irq_set_status_flags() Add a dummy irq_set_status_flags() along with #defines passed by the driver. Add disable_irq_nosync() as another wrapper to lkpi_disable_irq(). Those are used by wireless drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38241 (cherry picked from commit bc81a2b788f5644ece58defa30880b69c9894981) --- .../linuxkpi/common/include/linux/interrupt.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h index 8c394aa2a690..b51f8f7a9cbc 100644 --- a/sys/compat/linuxkpi/common/include/linux/interrupt.h +++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h @@ -43,6 +43,9 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); #define IRQF_SHARED RF_SHAREABLE +#define IRQF_NOBALANCING 0 + +#define IRQ_DISABLE_UNLAZY 0 #define IRQ_NOTCONNECTED (1U << 31) @@ -107,6 +110,12 @@ disable_irq(unsigned int irq) lkpi_disable_irq(irq); } +static inline void +disable_irq_nosync(unsigned int irq) +{ + lkpi_disable_irq(irq); +} + static inline int bind_irq_to_cpu(unsigned int irq, int cpu_id) { @@ -138,6 +147,18 @@ irq_set_affinity_hint(int vector, cpumask_t *mask) return (-error); } +static inline struct msi_desc * +irq_get_msi_desc(unsigned int irq) +{ + + return (lkpi_pci_msi_desc_alloc(irq)); +} + +static inline void +irq_set_status_flags(unsigned int irq __unused, unsigned long flags __unused) +{ +} + /* * LinuxKPI tasklet support */ From nobody Fri Feb 17 23:44:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1q0GHBz3rxPR; Fri, 17 Feb 2023 23:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1p4H8nz3GQs; Fri, 17 Feb 2023 23:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CJ3OVYy9FfXdvBEWhhBftBqUc8geilqAE1wvtSL/fM=; b=BhADnQ5qZ0CnSDwqrw02c7bAdBG6BKk54efLkvFwq9d7AUkJ4229mU/00mktDwODZbikdi ThdM5bi6qzgPyBvZe+Rg17K+Ojh1J74yge1JRMOYhcYSyZailW2JRoF/yaT9bV5o4gyt7U AH8ai1ve61OtB+udoU0J02X2IWxxwMZ6Cr8CZDwn0ndkWGeR9GEDFaRpALLQzW2H5vU+6k Z16KPF28f2/523OuPK1QfEI5ZKKm8SUuW6urNPgIID5KU+IYzlB2k4k/22I78yJAZ3dXgS FYcwGkG8EBrEAkDBgRa8arOyO5/IGQpNjo7fIKaIW6WuzplC8lbwJs0+pObeUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CJ3OVYy9FfXdvBEWhhBftBqUc8geilqAE1wvtSL/fM=; b=arKl7+EA5lCCqRI9COihML+E3Synfa+S8tEWMrU6vG0z7oqYafM0qJf9G+yqoB+Rb+AV8v UZ2as38rSYGyeB8DOYO81YinOzPTbnTH5u9hStnGrHDBvt4nYJscx0HaIgWXhHEiuDIoYu GG47P4PtndYJ0vPE1twzvKz5quS9atzlQl7lbYd1YaPuNu9Bl23ICLe9zRhrkfjOAP0Qm1 EHMLIldRUrlt6nHLm713ivsJX5CbvFB8pgU8AI2yhBfG4MiFFeXJQjPLLVX2HeYtZHKk1R W7kKuGR4WepRi+Ax49Q5ptDh0Pk3xhQ9D5bPfnVc/Z7ACGwxxMogfp4xk3N76w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677486; a=rsa-sha256; cv=none; b=psdKmTRh3swyQpoZWRlg8wxikvm1loyNL3jY70G3njutpd/+2e14iwDGXpIGgGfteU+V0D PMVpp+EeSetnNZz3kBumtBz7aCdmOqinI4hARvNQbdqimAGIKZ0xidSRx+dos+2TjkWO8Z c+P5M2rskV/cvarlnrT/JVkLc9zSW9FGUrEe+//45P4scEyInxcwYhIS88HAkN0+3CQHB0 tWmqgLTQa4W2PZSSueid1EM9TmBBkk2iLhwJUZQp+6TIfgXDj3X2uNyvTKfiKbHMrrszba sgjDAiIEHIOV/vA1klMEC10c8eMN8giF48IYlIC6FUyx7MpQ91fHkmRkYZcJzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1p3PHSz1239; Fri, 17 Feb 2023 23:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNikSv025038; Fri, 17 Feb 2023 23:44:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNikqe025037; Fri, 17 Feb 2023 23:44:46 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:46 GMT Message-Id: <202302172344.31HNikqe025037@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: 1984e6e4f158 - stable/13 - LinuxKPI: mm.h: implement virt_to_head_page() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 1984e6e4f1583ad1a44b6913e8722121fabe8967 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1984e6e4f1583ad1a44b6913e8722121fabe8967 commit 1984e6e4f1583ad1a44b6913e8722121fabe8967 Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 16:00:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:14 +0000 LinuxKPI: mm.h: implement virt_to_head_page() Implement virt_to_head_page(). Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D38240 (cherry picked from commit 70b97048a051958be37b650b8a67c89203fd6b70) --- sys/compat/linuxkpi/common/include/linux/mm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index c1011b56fe24..49c961886678 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -41,6 +41,7 @@ #include #include #include +#include #include @@ -151,6 +152,13 @@ struct sysinfo { uint32_t mem_unit; /* Memory unit size in bytes */ }; +static inline struct page * +virt_to_head_page(const void *p) +{ + + return (virt_to_page(p)); +} + /* * Compute log2 of the power of two rounded up count of pages * needed for size bytes. From nobody Fri Feb 17 23:44:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1r1twnz3rxSG; Fri, 17 Feb 2023 23:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1q58jxz3Gfl; Fri, 17 Feb 2023 23:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HxUPX2bijDIA/9ni6kkqvqHyb4ffwpgV9O/s4Rn2atw=; b=bTpbKZ/oS5bUTTRjB1wI86vtrZoW4gFUPtoVJlP2/fKID8bZWuGwOO/mgROojmK0R69u/p aVTjqaxoKVNwgE9auUzQWnB9SMkBeMpXcMZTXkmFavJJBMeizAo9SoxgmqXwNgn2qs3qII bAwX3hPkgHdkOw34vLNqJmwrhKxzcPv5krgI/Ge3UTMyCB9XOxGwPKIrcrXgzzRzmXfcAS bh/bbyugDmK5cdUV83GhEYCmYRmiK+mnr4al9jQXBt4mywHuRqu+vVdXKKdcmAkglsTyVd ocqQD1SD/Jxt5GKGPxttD8TuzAN97DI2iavjRlRlwvgfoh+pF+4HWQ1AeL85MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HxUPX2bijDIA/9ni6kkqvqHyb4ffwpgV9O/s4Rn2atw=; b=FB+xNtYSvKcW9o1N0/R3+UPVNzb6AKT02VLXOKZmdbcHZyKDd9M6L2UwEJUFEkt0230arM xgyu/GWwOSc0EV6KB7eCnFth3hSX3sQvMIKrMG5lOixBaOJTeKInYnzMzhNuwBCIIAe/Uh W6lDhHcfOBdmfxSH8lCpiKnvUIW0dgXRtwTal+0ZAihgtiiPqo/0zjxdQwHt981YjFruv1 g9w28/5LV+MuqjYqi272yNnZz/bzIsNh8Tm1wd0qsGu/rrFa5DasyPiSkCC3AFx+iG6ZS4 TZj0lxviKrzYjYVCrbDEAAyCeKQ6Qda33HYFNrerMtd+SGZROQWfdjo/POuwBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677487; a=rsa-sha256; cv=none; b=MpjEINmVeflZj5+ucJBeUJaJTKpBPDpIaPhAK3hAXCY3GfiUITdX/P1H3sunydngDEaqwi vIu85nMrRqPelACGyE7Zno+3xtZQ2dMryP9641VSsSo3kdNZ6DtaCSkoZPBaWtdImejIeG +0c/PJeSd2U79s97yNEjxHJPgzBsECyQhBJESro+0uV+ilhwRWS0wNfPhd3XuP/GmEwRPJ MABQ4q6k4jvBHAUYdu53Zv9b0IKOs/XSejTUYXsO8O2hWoVHvBbKxRm3kLf9cxcelZo3aF 28fBrnU0SXlZnozJDWHnkYwnTFiy00x0Qgk+pTnIubAI6Z33WZMFXVNHUbtHaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1q4Glfz1255; Fri, 17 Feb 2023 23:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNilqI025058; Fri, 17 Feb 2023 23:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNilLe025057; Fri, 17 Feb 2023 23:44:47 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:47 GMT Message-Id: <202302172344.31HNilLe025057@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: 4724e1867e81 - stable/13 - LinuxKPI: const argument to irq_set_affinity_hint() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 4724e1867e81ab5de2c6b5a6819998b660f3e96d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4724e1867e81ab5de2c6b5a6819998b660f3e96d commit 4724e1867e81ab5de2c6b5a6819998b660f3e96d Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 16:15:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:14 +0000 LinuxKPI: const argument to irq_set_affinity_hint() irq_set_affinity_hint() takes a const mask argument and some drivers pass it in as such where earlier implementations were more lenient. Deal with it and __DECONST() the argument when passed to intr_setaffinity(). Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38242 (cherry picked from commit 4c72d075a57e9a3215639aede16df4df29e1c1da) --- sys/compat/linuxkpi/common/include/linux/interrupt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h index b51f8f7a9cbc..9948f8be0da0 100644 --- a/sys/compat/linuxkpi/common/include/linux/interrupt.h +++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h @@ -135,12 +135,12 @@ devm_free_irq(struct device *xdev, unsigned int irq, void *p) } static inline int -irq_set_affinity_hint(int vector, cpumask_t *mask) +irq_set_affinity_hint(int vector, const cpumask_t *mask) { int error; if (mask != NULL) - error = intr_setaffinity(vector, CPU_WHICH_IRQ, mask); + error = intr_setaffinity(vector, CPU_WHICH_IRQ, __DECONST(cpumask_t *, mask)); else error = intr_setaffinity(vector, CPU_WHICH_IRQ, cpuset_root); From nobody Fri Feb 17 23:44:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1r6pHnz3rxPZ; Fri, 17 Feb 2023 23:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1r69r1z3G6D; Fri, 17 Feb 2023 23:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+sEleukTvtmROOFpTtHge+PO1I8dzurA9jrzOM4WwlY=; b=eTzziYNPC6MsAUxEK1TeAbwq+95DRm4M1p9iuHdM524Wgzr6LOc6Fs8BQKunfMhB3nSnrI la+vGPYu2vW/39kly3/1wAY47MJfmzgkn6zR9CRGUXFxxZdZiXlVLCEt2CxCnc2wvi8w/P zOdjFa6fOqCSxiur6iQwXGCZ28lr2o36lUeDlZqOnzPdLAfsClBnw8I5jKPlkVjNkYggY3 UcxVOmsL4q34n5jSgt3NVsJeyNnoDSqGypfETxfFVjs/PaesA9q6BO/OsD8LCHdLNpaVW+ kS+pZNstGA+AIXcQpU3x4pk1ulwnNSx5TetJhXHadQxLj0hJ5OGMmIB4zU3O3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+sEleukTvtmROOFpTtHge+PO1I8dzurA9jrzOM4WwlY=; b=yg0o+nswYfeE3Zfe5PvnAYJ4bZPEUkenWA0bvyx5XCE33aV39sKV0w4MKmnF2bUAYgupEg ZQz6ykL4rbVQkgt0DFyAXJcepr5cB36vJimbvZwlc/678To7C0RupT6GNnCI7Si75Pk9AB FHeIaF0dA0pKrs8HV2O+lPUbEx/4lLjgCiLcXsyNKBJCOMDw5mtv5EIvmrRLKIYgpCSkes 1GroBizvtpbxi8tYMWMHceKmM/rH+Ac/1FBs39o+hy7KueodG79m61cSqEy6nAGs/9ZUZC Jt7R61KsTRUsx4kh7pI5unEVGHSPOAMXrhPXgQnCqRCDSzl9IdzOW4GPBBSFWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677488; a=rsa-sha256; cv=none; b=cO6W+PmNU6gn96E3QgotMpLc/Qq1Sap9hDHvPGAubO/csJ7Ou2IslBJcR+niEmUmg/yHKY J64YcvDMzLlw3mjmNNuH6p5El036c0CkiFTY1R++SE4RjXLbudgDiaay4QBlKZlntZGZGp Cz2frVS1X5rWMCWYIGpg2bI4DDeD1T541R5DCJ/0VweR0tAeSifpMzbXbbCgYheBxP2pxR VVMbPWrBalKx+M3GiA3CwvkQmOkFLGzcbluhosXxvVAt3Ob39nnCcthPvP1Y/7TiOYE9Zw JrBZJPQIxJ/3OoH2/dS+Y3L2eHCyqcZjte0igA40c34yPCkpAthAONe+K4uaEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1r5DKGz11rC; Fri, 17 Feb 2023 23:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNim9H025078; Fri, 17 Feb 2023 23:44:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNim1e025077; Fri, 17 Feb 2023 23:44:48 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:48 GMT Message-Id: <202302172344.31HNim1e025077@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: b45e9a172d38 - stable/13 - LinuxKPI: device: add device_set_wakeup_enable() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: b45e9a172d3830bed00018325eaa73c04a0b3a13 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b45e9a172d3830bed00018325eaa73c04a0b3a13 commit b45e9a172d3830bed00018325eaa73c04a0b3a13 Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 15:18:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:15 +0000 LinuxKPI: device: add device_set_wakeup_enable() Add a dummy device_set_wakeup_enable() which is used for WoWLAN which we do not (yet) support and device_wakeup_enable() which is a wrapper to the former with the enable argument being true. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38238 (cherry picked from commit ffdf10fb9cf13464801f2d78d3e1470201394812) --- sys/compat/linuxkpi/common/include/linux/device.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index d91c14bd87b7..1fcbf7164916 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -543,6 +543,24 @@ device_reprobe(struct device *dev) return (-error); } +static inline void +device_set_wakeup_enable(struct device *dev __unused, bool enable __unused) +{ + + /* + * XXX-BZ TODO This is used by wireless drivers supporting WoWLAN which + * we currently do not support. + */ +} + +static inline int +device_wakeup_enable(struct device *dev) +{ + + device_set_wakeup_enable(dev, true); + return (0); +} + #define dev_pm_set_driver_flags(dev, flags) do { \ } while (0) From nobody Fri Feb 17 23:44:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1t0V7gz3rxbh; Fri, 17 Feb 2023 23:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1t02Pjz3GbM; Fri, 17 Feb 2023 23:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88sViov0XfLwxk0hEPTyWaa/9eM9YnJZt1xgOrrViQY=; b=VZbvPxGgnEg7WmLwqU0qgng3pFaiBLon6+/NP8FAd0PLYSzmhfd48VJinssJYQc+htQqP3 l9VbIkjd0MoW7uPHq+9zhTb9qqvFEllfe6XPcKfMgtWebnGY8KLgxmNyKAqfg9kcsVbcnG Z4aGcn+O1ZAOPv+ynzqsPdpFONftUUGyESfIYbU5BFQ9z56uxcNItBhPDJS91+QRViEXMy NeRWAXw4coPYa8LSwwiZUc3S/rqoPOFDk/RbL0pzVwUY8Gqfe0HELSnhuJukOMs1S9QH+A J7hUkbxFrU43Jox31BQSp6rfaOFYNSc7fLqELnUMMByT90IhrV27BfGMZPQLzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88sViov0XfLwxk0hEPTyWaa/9eM9YnJZt1xgOrrViQY=; b=NIY0gRZj/3TeW10r6U4BA7jcyeAj92NlWQKil1v2ALdWpwsoaHPPN83rUmI06YOjfTO3Rs MjFxTkpdQY+7nBeNQaJdQhOKBF6abp7ke0hYyVPRPpVTb+ZqOOiSBntUBaG8wbsKCspsog 2l/8LmDKgc81EApFgELAu1T6YCxSOqOMLex3OjvrTPihQyNOkqDJLBfcU97jq98Ws9mrWe /ZipLTxV3HQY+5JWvc5BLjUamzSKhtB3qYERQYacsHlb5lG26LppN8ySH9fHPGcuBxHnIp Y5bcecBfZPjVn8GCD7dlWyNXmHqNciI4aK01pYE875JpukGNEZi0S0tGIi6AxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677490; a=rsa-sha256; cv=none; b=nNIV2gzw87zdgkjygnbaCBQ01fIyPi1ifQFDwF6149g9MQo8MN6dusxN5rLlZdmamEh3mm uG7bp8T3TInRwYlNvS6jsoNqcHCCwdIeIqgwz0C/Xvy1F2z/5A4F9zaYnw5OCAV7EIbhJx 64kOYw0Ztclgn1rGgCGKRRljg/NGRHb6coD/12Si72m0Ug4OE1N9sm5QVPbe0vxtydUYxy Tbh54MSaVAjvYi/c92xFxXvu05NgSKkO2m3dGPwV18MwCeBeJN+HPWtEMojg4xCnkcu08N 4vbs4UwrBCA02pGfoqL5AjVKivK9viVDeGs8bJu8+g3d89mdL2aL1ujY98VlHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1s67xxz11jL; Fri, 17 Feb 2023 23:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNin0c025100; Fri, 17 Feb 2023 23:44:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNinRe025099; Fri, 17 Feb 2023 23:44:49 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:49 GMT Message-Id: <202302172344.31HNinRe025099@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: fbc5dea2a3af - stable/13 - LinuxKPI: pm.h: add dummy pm_wakeup_event() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: fbc5dea2a3af8edf1f22603605f78fe9f9b71494 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fbc5dea2a3af8edf1f22603605f78fe9f9b71494 commit fbc5dea2a3af8edf1f22603605f78fe9f9b71494 Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 15:53:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:15 +0000 LinuxKPI: pm.h: add dummy pm_wakeup_event() Add a dummy implementation of pm_wakeup_event() which is used to notify the power management system about a wakeup (which we currently do not implement yet). Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38239 (cherry picked from commit 934cb7a3316609380fdea8da73233759f6dfff43) --- sys/compat/linuxkpi/common/include/linux/pm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index eb3316088787..74f0d330f505 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -33,10 +33,15 @@ #ifndef _LINUXKPI_LINUX_PM_H #define _LINUXKPI_LINUX_PM_H +#include /* pr_debug */ +#include + /* Needed but breaks linux_usb.c */ /* #include */ /* #include */ +struct device; + typedef struct pm_message { int event; } pm_message_t; @@ -79,4 +84,11 @@ const struct dev_pm_ops _name = { \ } #endif +static inline void +pm_wakeup_event(struct device *dev __unused, unsigned int x __unused) +{ + + pr_debug("%s: TODO\n", __func__); +} + #endif /* _LINUXKPI_LINUX_PM_H */ From nobody Fri Feb 17 23:44:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1v1fcGz3rxMq; Fri, 17 Feb 2023 23:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1v0q63z3H0n; Fri, 17 Feb 2023 23:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iAwgcp1D5YGFiZM8b8sbI3JREVECMir7C9vWQPDbOWk=; b=yj9fgZLNxgVH9EWYO1kFy3x8g0Gv3CxCD3REKxqdhnpe7imzPqVo4ISnxap24IA6Yd/Rnf R8+LbovhJrzYn8UhVB4WxZ7LQILJcnQ1cWxZzWYwP2pZDBRWrGim8rnsUTgVuWAgTR4bKv 1G+0vBN0qnAw/QHLSfCdhch4EJys0nVVmJsoJPOedMqkD5+8Ndsw2Ffg205tJUZSUdIddA XdZ13ayKoWVXMsHmgf6XE7fxEcQI99avd2uq1SZMDkoInenuuFjx4tmApJ/jUewiiqLZTB TOSQ0flDi2Hey4HHsvTrVbRic3UOld8LXaMp67rWL+RGjuqqEU3fLmCmnIb3ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iAwgcp1D5YGFiZM8b8sbI3JREVECMir7C9vWQPDbOWk=; b=Ktxcw0GXEnO+egS67/jrkKFDKsmBIvLjZ/tadCiut7lmoba25bH3i4qTYAptbrQUJMW+G+ yLP1I8miFrAftjgOCInOLq5GiKKqQt4VetEtYhcTTunA0VTPSSc5koZixkmq3Jeauduj+Q NdnxmyWbmBYthCDmFOygR7ifGoTNOtd7AYP82KKqWt5zWLFWWRxGltsXMPQzPeXLHCjEji H/ovpbxt3FteWCPeZe0sIVwGdORtI0IKR0soDAeLMNNm6vpng2Mwwk9wz48ceeJJfplVWP IKGFr1FiN8a8PDtWAxBrWXE9LD5xGE6VwwBACW6rkJ4qeHz0oFYDaV741BXDrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677491; a=rsa-sha256; cv=none; b=HOW7gTKfFVZ5NbBQG33JPGWUdcnIBmq/nq0iecv/PYcUKgQrCIgIwIwIPI5WqfFzjZEkcq xZvxY1gOz3me2SvambZDdkHVI6Tp5LMTls0O/GnC1Rlf9KyFunkobyH/7tFSnrSw7uGbPL PK0PkkEX4qxflJyVvSlt71tgbhZKTaztAygQ9faLpiZWY8w7wU9ZfecjKa7wCtNBB4kucu L5k4cFjm11DEDg56rdZVT+t85pgNc+rH8pgzj56DR+1U7WgqMP3J3g1lhB9sHMb7k/inTC PZeTDzEMcDFzdPuR+/8yAT+QVTeeteNjR9BHGfSju4dv2tbE+fuBJ3EXkewy3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1t6tlYz123B; Fri, 17 Feb 2023 23:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNio9D025121; Fri, 17 Feb 2023 23:44:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNioPh025120; Fri, 17 Feb 2023 23:44:50 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:50 GMT Message-Id: <202302172344.31HNioPh025120@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: 8a091335fc63 - stable/13 - LinuxKPI: add more dummy header files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 8a091335fc63c86b80704abf58055f53c0621740 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8a091335fc63c86b80704abf58055f53c0621740 commit 8a091335fc63c86b80704abf58055f53c0621740 Author: Bjoern A. Zeeb AuthorDate: 2023-01-29 18:16:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:15 +0000 LinuxKPI: add more dummy header files Add more empty header files wireless drivers try to include but we do not (yet) need for any implementation. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38271 (cherry picked from commit 52c28b99034bd32c86e6c058f68cfbf11c8f76c3) --- sys/compat/linuxkpi/dummy/include/linux/const.h | 0 sys/compat/linuxkpi/dummy/include/linux/elf.h | 0 sys/compat/linuxkpi/dummy/include/linux/if.h | 0 sys/compat/linuxkpi/dummy/include/linux/mmc/card.h | 0 sys/compat/linuxkpi/dummy/include/linux/mmc/core.h | 0 sys/compat/linuxkpi/dummy/include/linux/mmc/host.h | 0 sys/compat/linuxkpi/dummy/include/linux/mmc/mmc.h | 0 sys/compat/linuxkpi/dummy/include/linux/mmc/sd.h | 0 sys/compat/linuxkpi/dummy/include/linux/mmc/sdio.h | 0 sys/compat/linuxkpi/dummy/include/linux/mmc/sdio_func.h | 0 sys/compat/linuxkpi/dummy/include/linux/mmc/sdio_ids.h | 0 sys/compat/linuxkpi/dummy/include/linux/msi.h | 0 sys/compat/linuxkpi/dummy/include/linux/nvmem-consumer.h | 0 sys/compat/linuxkpi/dummy/include/linux/of_address.h | 0 sys/compat/linuxkpi/dummy/include/linux/property.h | 0 sys/compat/linuxkpi/dummy/include/linux/remoteproc.h | 0 sys/compat/linuxkpi/dummy/include/linux/rtnetlink.h | 0 sys/compat/linuxkpi/dummy/include/net/rtnetlink.h | 0 sys/compat/linuxkpi/dummy/include/uapi/linux/if_arp.h | 0 19 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/const.h b/sys/compat/linuxkpi/dummy/include/linux/const.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/elf.h b/sys/compat/linuxkpi/dummy/include/linux/elf.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/if.h b/sys/compat/linuxkpi/dummy/include/linux/if.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mmc/card.h b/sys/compat/linuxkpi/dummy/include/linux/mmc/card.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mmc/core.h b/sys/compat/linuxkpi/dummy/include/linux/mmc/core.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mmc/host.h b/sys/compat/linuxkpi/dummy/include/linux/mmc/host.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mmc/mmc.h b/sys/compat/linuxkpi/dummy/include/linux/mmc/mmc.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mmc/sd.h b/sys/compat/linuxkpi/dummy/include/linux/mmc/sd.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mmc/sdio.h b/sys/compat/linuxkpi/dummy/include/linux/mmc/sdio.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mmc/sdio_func.h b/sys/compat/linuxkpi/dummy/include/linux/mmc/sdio_func.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mmc/sdio_ids.h b/sys/compat/linuxkpi/dummy/include/linux/mmc/sdio_ids.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/msi.h b/sys/compat/linuxkpi/dummy/include/linux/msi.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/nvmem-consumer.h b/sys/compat/linuxkpi/dummy/include/linux/nvmem-consumer.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/of_address.h b/sys/compat/linuxkpi/dummy/include/linux/of_address.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/property.h b/sys/compat/linuxkpi/dummy/include/linux/property.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/remoteproc.h b/sys/compat/linuxkpi/dummy/include/linux/remoteproc.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/rtnetlink.h b/sys/compat/linuxkpi/dummy/include/linux/rtnetlink.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/net/rtnetlink.h b/sys/compat/linuxkpi/dummy/include/net/rtnetlink.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/uapi/linux/if_arp.h b/sys/compat/linuxkpi/dummy/include/uapi/linux/if_arp.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Fri Feb 17 23:44:52 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1w3Nhkz3rxbn; Fri, 17 Feb 2023 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1w1s55z3Grx; Fri, 17 Feb 2023 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5u0nPVVafyTV6Z/Qqoo/SvonKfrtZHSs2UUyWohr9qc=; b=Y3FYnXwpNlShyMuIQTJWTodHZx66YY9Pz0jZPezhkvacjfJygZWr/fp8SkF4ZFLjYTviXj F/dIE0N4jYB0XJvj/ga/KKSAV5EEnxtTrZMdSGZX/eby6Y4MsEXj2Pyw3ziSz66XlnhRD4 Pu3u0Jdxh8Q8zHdvi7pHGZAnFtFONPF6Pixz4k3aCHOCDj5Ux/dhY7S82/w66g9o3NcOV2 xR0bZZPV2lXORCOzA5rUFPIwlH1qzSkpJ3dTjN2Kqy4wEL5BCqc3+bbxlsatf/LF2KGeuG qBhGiVojJZxT/Q/BNU6tIwmiEACq8U59N1kNBAoCwZ0CmYyK5oLRSezRGjjcAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5u0nPVVafyTV6Z/Qqoo/SvonKfrtZHSs2UUyWohr9qc=; b=XmDSPRSq06sGO/ZbD2EOBLbPGR5k5YfKaHY/Bm4NjKQPqRuD6EFDakXqs1iICtI1pMxIE+ 9ZhUnXWw2bHPP3DmFmN3+i0J5XKiyL3dYocKIJfuOptEGiJRFTvbrfFBGor9TGd+gY8qf4 BMAg+CdhJYuOW4ZkdQ+wkdHPGlKkf13Herh6LsuLb/Ut8iEfdPrJQGqu1QUOiA9EVVLrLa aX2m9DaixkfrZYs1UUGNdRfi5GwAG3zqN1H9vpbu/U8bRSISKOIx8tLQiejh6M1xz5isYx dM8CYl+k3kEJNIESy77HuUxa6SVy5VrLMTDYl1P4lFLT1d5K/jXVauY9OO8zdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677492; a=rsa-sha256; cv=none; b=ppOVqTsmOerZLdNMJMtWreBEQsD2NPUOAbBFTIOiHirtN3494AVItgJQifdDPRfow8PaL8 VHJe5iZedkFckQ3rONH/cGJCzCRQkIHS6VXzYEq34vzc9cQchZfPuANlVZfhe/E0NFrGiX e0fOOkpwqTVeZtz6WpsD1vfMB81WxtPBAYD+cfAeFdYv1xsx+Fu7B+8CPjV7W2/QqRVvxQ k3rIHgGC8C31Ins3cPp6SJQGCJork0WKxIloI56tRntiZ48ZV2utsBSeAO+3LwtSxpQJuz dlTy3HkgDrHZDOt3zL4r6iitq8ggMzCOplDgXn0aCQkHlkoCZNvk+HYM6jetCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1w0z5qz11Wt; Fri, 17 Feb 2023 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNiq85025146; Fri, 17 Feb 2023 23:44:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNiqJN025145; Fri, 17 Feb 2023 23:44:52 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:52 GMT Message-Id: <202302172344.31HNiqJN025145@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: 8a6a4122e6dd - stable/13 - LinuxKPI: skbuff: implement skb_free_frag() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 8a6a4122e6dd91489e48de50a3080f82d00e8715 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8a6a4122e6dd91489e48de50a3080f82d00e8715 commit 8a6a4122e6dd91489e48de50a3080f82d00e8715 Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 15:33:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:15 +0000 LinuxKPI: skbuff: implement skb_free_frag() Using the work from 55038a6306a570c9f2df89f5ad076de0f7d98152 implement skb_free_frag() calling page_frag_free(). Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit dbbf46ebba78770c2c3a1d7983e92e79ca67abc0) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 35d5a1fd9b80..12a6be42e743 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -791,7 +791,7 @@ static inline void skb_free_frag(void *frag) { - SKB_TODO(); + page_frag_free(frag); } static inline struct sk_buff * From nobody Fri Feb 17 23:44:53 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1x2wjZz3rxgj; Fri, 17 Feb 2023 23:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1x2ML0z3H1s; Fri, 17 Feb 2023 23:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lzpzsjGFebMWZrndJdbW1D9/4X2s0aAU82HM0cVe70g=; b=Kq6AURRy3wfZyvViKsy1RS39mvtaGIBuZlTGr7pH7DkFcdNPjFTHANeGTlfgL8irGxSKLZ bH5WRE8+cWuYoqAC1e3sG+TWzLcXZwwDGjC8EffKZ+UFSwABGKUOSY9whEmav0b/Un+x+a 84Cao44tOzQDSMbDCj1uWBTWQJ/emNk1KMjdSVbhod9EP1lbtk5KObOR7c7n2crcGJYjFY k5/GVS6beQ+1ZDBCYDG3x+PBtddiUGsVrNUMSaFqUEDA+ZUODFiaQwwWSRYjwZFF3CXMO3 Snl5a5Cc0GmJ3P/92k8ZJUZATje6oLWD5M58te7XWRblP94cAn0AVuVj1+bodQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lzpzsjGFebMWZrndJdbW1D9/4X2s0aAU82HM0cVe70g=; b=twzuwBLoIlR561mhfZ4plnQSiThaIxe3NgW7cnm9QXRIbT3YU/G7gpE1LE12UF4DVayUT7 saeAJQLWBIV05sIDutwB4/chtUJEItCUSh43WjxMVHuspM6VV4/STAJIrZwf8CRCugXaCi yulCu8qglGZqi12ysUkAy89IL4t74C2lsPJc8ZgQ9nTLk+7GTQxJ0CIaqs8iTVsxl/Film W+YYLk+mKIwjrz6rrsrp0YigpEgdbvr3XeBwRd5OigpzlcrnN0CTDes7EgTgIKHiSHYKrL /9vpRVc/GeZvOGccHRK8fde1lSmkj4EtMm3T3RBlx+Q3AxbuiZlXNxBPg9to6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677493; a=rsa-sha256; cv=none; b=Q2cwNEHIcvMUZos2stRJMroM56MoQdkRqYiXDpdj4vMuA1GzHtU8WAl0CR+G3kfkTv7mTd aJe992uGvXTOmhVN1Ae1SakxtbRvuXdSlw+q/xjJXD66YODpxGzkOPtrrwEu1veeMbwi7N IIbBf/qSK/zr3A58MLaqh6e+tpTFMWY/CE53fy9OM0ewE7MPXoHs7YeaWDKFiFAefywfHL ex2zNl/w+QP1umXGq2R9lL3heVjzk6iSWyXn/lQ8yoFg2qz34BoiqDz/D3jdOoFMts9gZu xrrOYAWoSXiS7a8N9SBUMBLKrqIH2YLMUIpHQT9KZHyuIEWgxV2DUqOxmjY8Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1x1T2rz11fR; Fri, 17 Feb 2023 23:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNirHU025165; Fri, 17 Feb 2023 23:44:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNirpF025164; Fri, 17 Feb 2023 23:44:53 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:53 GMT Message-Id: <202302172344.31HNirpF025164@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: d282e777d7c9 - stable/13 - LinuxKPI: 802.11: fix types and whitespace List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: d282e777d7c9721614f110a1de66c7d88d0a6ea8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d282e777d7c9721614f110a1de66c7d88d0a6ea8 commit d282e777d7c9721614f110a1de66c7d88d0a6ea8 Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 13:39:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:15 +0000 LinuxKPI: 802.11: fix types and whitespace Correct struct member types, fix whitespace, and remove superfluous return statements in void functions. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit a3baca22d0b7789a040a60f389e3c132b6e1755b) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 11 ++++++----- sys/compat/linuxkpi/common/include/net/mac80211.h | 6 ------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 55a74227a338..8b73dc1abe3f 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2021 The FreeBSD Foundation + * Copyright (c) 2020-2023 The FreeBSD Foundation * Copyright (c) 2021-2022 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from @@ -265,9 +265,8 @@ struct cfg80211_roam_info { }; struct cfg80211_bss_ies { - /* XXX TODO, type is best guess. Fix if more info. */ uint8_t *data; - int len; + size_t len; }; struct cfg80211_bss { @@ -937,6 +936,7 @@ struct iface_combination_params { struct regulatory_request { /* XXX TODO */ uint8_t alpha2[2]; + enum environment_cap country_ie_env; int initiator, dfs_region; int user_reg_hint_type; }; @@ -1029,8 +1029,9 @@ struct wiphy { uint32_t rts_threshold; uint32_t frag_threshold; struct tid_config_support tid_config_support; + uint8_t available_antennas_rx; + uint8_t available_antennas_tx; - int available_antennas_rx, available_antennas_tx; int features, hw_version; int interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ssids, max_sched_scan_ie_len, max_sched_scan_plan_interval, max_sched_scan_plan_iterations, max_sched_scan_plans, max_sched_scan_reqs, max_sched_scan_ssids; int num_iftype_ext_capab; @@ -1200,7 +1201,7 @@ cfg80211_get_bss(struct wiphy *wiphy, struct linuxkpi_ieee80211_channel *chan, { return (linuxkpi_cfg80211_get_bss(wiphy, chan, bssid, ssid, ssid_len, - bss_type, privacy)); + bss_type, privacy)); } static inline void diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index d548b9bb956f..caf9be89281e 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -2394,7 +2394,6 @@ static __inline void ieee80211_resume_disconnect(struct ieee80211_vif *vif) { TODO(); - return; } static __inline int @@ -2410,7 +2409,6 @@ ieee80211_get_tkip_p1k_iv(struct ieee80211_key_conf *key, uint32_t iv32, uint16_t *p1k) { TODO(); - return; } static __inline struct ieee80211_key_conf * @@ -2426,14 +2424,12 @@ ieee80211_gtk_rekey_notify(struct ieee80211_vif *vif, const uint8_t *bssid, const uint8_t *replay_ctr, gfp_t gfp) { TODO(); - return; } static __inline void ieee80211_remove_key(struct ieee80211_key_conf *key) { TODO(); - return; } static __inline void @@ -2441,7 +2437,6 @@ ieee80211_set_key_rx_seq(struct ieee80211_key_conf *key, int tid, struct ieee80211_key_seq *seq) { TODO(); - return; } static __inline void @@ -2449,7 +2444,6 @@ ieee80211_report_wowlan_wakeup(struct ieee80211_vif *vif, struct cfg80211_wowlan_wakeup *wakeup, gfp_t gfp) { TODO(); - return; } static __inline void From nobody Fri Feb 17 23:44:54 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1y4nXRz3rxVp; Fri, 17 Feb 2023 23:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1y3pN6z3GwR; Fri, 17 Feb 2023 23:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tnHMShGTTra9VtpZUECL1HGORJBBT7N6W+i9aQBCEe8=; b=M15WDmVQAHICDQHppOYMk7zxbYR9FSedvVDl6774w2rZoLqT2GdU+8cyPrKe8DrAu0/BV6 OzVLvNWFJcrPH6i1h3h36bNU1RZ2DGE+pFEmt3Q5DIRU+kanz0L/xztAWX2HEPL7HRscRv DOxwJzQWdQelzrujR3IErcmK50TjQ2vfmlPg8+arrr76XTPsU/hfI1DWd9lkSdpqyRtwY2 VqJ/jcpZnuMm9QXnz2ZRu+iS6/+H335SZu3WpvZmOV/DKAln1RKFI2pWkh6oJYZVARnsKt 0P9gKSPWzRqA/4jgJK2T39DZ3YZYpKtvOCwjkR8zGr4eWXQbxjnrfhZI1JdzxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tnHMShGTTra9VtpZUECL1HGORJBBT7N6W+i9aQBCEe8=; b=KqjV+ljqNAJKuiqmlOLsdqbRAr6fUdudPa8MEIOaw0GAwWjCj08rb6hNNSo9kiy15grhcE GwpM8WRoGZhh1r6lpfN+wcFruK0+JgkJtXZnxTTCjJeO7ZuVYNsLbu6FtSJoIKYzxp3zsf J3zcnedhOx7Zl6MqaLTP4JDk73gb9KWARHdBrMkMXsHdTnTHHSROecEWKulavFUFeMr7qE KTNskp79eEUisCYB/dq3BXZ8+v2Lt8ST8G4pvd7XkkGkHxeEeV21yIadlBzpoSseqTh2Vh LX7JUaZ1/L8a86He9FmaKogfcyPJlQrz+108zS832UCA1TGlUCRFjwAapiEOXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677494; a=rsa-sha256; cv=none; b=eWKCg3RusyugWxULhW83ldu3hlemjtfIG5VJWDNqLqbvL2ZXIf4Z3U5XbXQbwheLygWzGv cmx03MCN/pqf0GxcC50lXQgQ4R2C7jnFT36XZdEF/0NJdkqxnUJzLa+w0KdUlWlwqlRQ+1 p80nN7Ie7OTUI0lnnhdnJN5S4T/BaEAKSoOFWFNunU+m4tMkMXwNW08JGwnlsl8awco8bg 2iqHsw1eVdlomTsJiyvvkMQCzPfjLmkVexqqzhENVV+ZusOOc3s17dBZbTQcAz/QZ99Di8 ek6ze32uw35Wnu3TtRu06KU853MFRidS0Ka7RijhNY7rURgEHaq15w0CjDhD9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1y2lq8z11qR; Fri, 17 Feb 2023 23:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNiskN025184; Fri, 17 Feb 2023 23:44:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNisAc025183; Fri, 17 Feb 2023 23:44:54 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:54 GMT Message-Id: <202302172344.31HNisAc025183@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: e420c65378a0 - stable/13 - LinuxKPI: 802.11: extend linuxkpi_ieee80211_rx() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: e420c65378a04c5b9cde34013cab78188bc5a4c2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e420c65378a04c5b9cde34013cab78188bc5a4c2 commit e420c65378a04c5b9cde34013cab78188bc5a4c2 Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 15:05:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:15 +0000 LinuxKPI: 802.11: extend linuxkpi_ieee80211_rx() Extend linuxkpi_ieee80211_rx() by another argument for the ieee80211_rx_list() implementation (even though the argument is currently ignored). Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit e30e05d3ab3979a148068235298e1a6f73b675f0) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 25 ++++++++++++----------- sys/compat/linuxkpi/common/src/linux_80211.c | 15 +++++++++++++- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index caf9be89281e..fee8b88d8feb 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1001,7 +1001,7 @@ void linuxkpi_ieee80211_iterate_stations_atomic(struct ieee80211_hw *, void linuxkpi_ieee80211_scan_completed(struct ieee80211_hw *, struct cfg80211_scan_info *); void linuxkpi_ieee80211_rx(struct ieee80211_hw *, struct sk_buff *, - struct ieee80211_sta *, struct napi_struct *); + struct ieee80211_sta *, struct napi_struct *, struct list_head *); uint8_t linuxkpi_ieee80211_get_tid(struct ieee80211_hdr *, bool); struct ieee80211_sta *linuxkpi_ieee80211_find_sta(struct ieee80211_vif *, const u8 *); @@ -1468,28 +1468,36 @@ ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *sta, struct sk_buff *skb, struct napi_struct *napi) { - linuxkpi_ieee80211_rx(hw, skb, sta, napi); + linuxkpi_ieee80211_rx(hw, skb, sta, napi, NULL); +} + +static __inline void +ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta, + struct sk_buff *skb, struct list_head *list) +{ + + linuxkpi_ieee80211_rx(hw, skb, sta, NULL, list); } static __inline void ieee80211_rx_ni(struct ieee80211_hw *hw, struct sk_buff *skb) { - linuxkpi_ieee80211_rx(hw, skb, NULL, NULL); + linuxkpi_ieee80211_rx(hw, skb, NULL, NULL, NULL); } static __inline void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb) { - linuxkpi_ieee80211_rx(hw, skb, NULL, NULL); + linuxkpi_ieee80211_rx(hw, skb, NULL, NULL, NULL); } static __inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) { - linuxkpi_ieee80211_rx(hw, skb, NULL, NULL); + linuxkpi_ieee80211_rx(hw, skb, NULL, NULL, NULL); } /* -------------------------------------------------------------------------- */ @@ -2347,13 +2355,6 @@ ieee80211_get_tx_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta, TODO(); } -static __inline void -ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta, - struct sk_buff *skb, struct list_head *list) -{ - TODO(); -} - static __inline void ieee80211_tx_status_ext(struct ieee80211_hw *hw, struct ieee80211_tx_status *txstat) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ee4b58e60f4d..e0457e0e5fa0 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3840,9 +3840,11 @@ linuxkpi_ieee80211_scan_completed(struct ieee80211_hw *hw, return; } +/* For %list see comment towards the end of the function. */ void linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, - struct ieee80211_sta *sta, struct napi_struct *napi __unused) + struct ieee80211_sta *sta, struct napi_struct *napi __unused, + struct list_head *list __unused) { struct epoch_tracker et; struct lkpi_hw *lhw; @@ -4050,6 +4052,17 @@ skip_device_ts: if (ieee80211_hw_check(hw, RX_INCLUDES_FCS)) m_adj(m, -IEEE80211_CRC_LEN); +#if 0 + if (list != NULL) { + /* + * Normally this would be queued up and delivered by + * netif_receive_skb_list(), napi_gro_receive(), or the like. + * See mt76::mac80211.c as only current possible consumer. + */ + IMPROVE("we simply pass the packet to net80211 to deal with."); + } +#endif + NET_EPOCH_ENTER(et); if (ni != NULL) { ok = ieee80211_input_mimo(ni, m); From nobody Fri Feb 17 23:44:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT1z6Pf2z3rxdY; Fri, 17 Feb 2023 23:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT1z4MF1z3Gws; Fri, 17 Feb 2023 23:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CiPys7ijLjdE65eNAgw4Tgg18iKsWQmuJnrY04/ZIfA=; b=isHrlNGJtO1voVQeMTM2Fkm1VZGFfPtXwqVGLyIXDijReGGNUQ3fHKenuflX7GjO8SJ2Om 4/BXDK6zgPBf7hS/6A5mqwtl/Xzt71ywKmv34llK/Ah6quW6DjwYh929vOSpMx0KTDQbS/ 7v8/wnIQ0AJEWsBiiq0Xrxgq66ngIbDEAwd6d0DaeDtoCYyNfsVN8S5vtRqRrWojfN/HCL 83QqeiyjyqYlCy3BTpsmzqkzirM1nFamNikpA5t4lqSdrhKIw1UcAMrc3BLXN/qxeBFhi/ hdNdhyxUfDAcmlBiBdAd5PNB4FjT7vko61fNXLHbFcZk219G1Vdq8ogbU9KjZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CiPys7ijLjdE65eNAgw4Tgg18iKsWQmuJnrY04/ZIfA=; b=Y3RkevXJW0H5CF1N+e8wG18ez0zBPHwYS81DCdiXvQ1Cvpg5COpOakfAeMtu6ZZ5aOm6ht 1m3uW2gZRtOJvgPueO2SHPLIUR4zx0EERJqvMOODkNumkIK/CluD6GHYIPiVKOXmSht2PO 0GPUoF95QIJ2SvhaN7q5DLFQXHMMyN2jxj07EIQq4PEAMuLu1qeBwZ4bJ2pm3KqGEIysMF KTolgjygZevXzpx2qctb0xX+f9gYmWV7VU66BP1rVDqJUW4p0hMNbL6KpOj/weTHKtqEUT /Td1Q+vWEcJAlZ0/TYZglV9Rn1HNpVJuY6dli6sUX6gjKVWhbpwYAlxDtIwIDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677495; a=rsa-sha256; cv=none; b=G0HkLyyEJWvxNKoIG03GIfh8FCtZkxSX6lfNjjbrpcK24uQsEIJTcUXlBAPqADQYhxIeme jSGOeH1ZzR4BHKsIEtZklKtyhiJLmcr3opeWlntqsMd6gbq1KIeQDr0HEP+6SCRtTL2/p2 jm1xQGozgRQPcgbnkxZZuPBvGZTVnJRHnBqBRCyZsDK4x1NvJmoNddCJuU6uERMH90Xs7C AYGTsn0SreNzQRfLW0ALPVzIhI3MfzQFSuaSV3yLoxyJtbKvEsWHtZcw1xpFY5vz/vDMJX /ejqJZAwmWUYI/c0FMIpQMz7CHb0DQGuO5ONZhnDsdg9IwDqzwVnY2iAY23rcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT1z3TNzz11rD; Fri, 17 Feb 2023 23:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNitp8025203; Fri, 17 Feb 2023 23:44:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNitTS025202; Fri, 17 Feb 2023 23:44:55 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:55 GMT Message-Id: <202302172344.31HNitTS025202@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: df109ed24233 - stable/13 - LinuxKPI: 802.11: implement ieee80211_tx_status_ext() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: df109ed24233e367ef7060a25ab1b55e2afcddc8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=df109ed24233e367ef7060a25ab1b55e2afcddc8 commit df109ed24233e367ef7060a25ab1b55e2afcddc8 Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 15:35:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:15 +0000 LinuxKPI: 802.11: implement ieee80211_tx_status_ext() Add an implementation of ieee80211_tx_status_ext() extending the internal linuxkpi_ieee80211_tx_status() implementation. Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit a839757109891573123d8777b539fafa2d2198bb) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 31 +++++++++-------- sys/compat/linuxkpi/common/src/linux_80211.c | 41 +++++++++++++++++++---- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fee8b88d8feb..2b3f6b8e3ab1 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1028,6 +1028,8 @@ void linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *); struct sk_buff *linuxkpi_ieee80211_probereq_get(struct ieee80211_hw *, uint8_t *, uint8_t *, size_t, size_t); void linuxkpi_ieee80211_tx_status(struct ieee80211_hw *, struct sk_buff *); +void linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *, + struct ieee80211_tx_status *); /* -------------------------------------------------------------------------- */ @@ -1988,13 +1990,6 @@ ieee80211_sta_set_buffered(struct ieee80211_sta *sta, uint8_t tid, bool t) TODO(); } -static __inline void -ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) -{ - - linuxkpi_ieee80211_tx_status(hw, skb); -} - static __inline void ieee80211_get_key_rx_seq(struct ieee80211_key_conf *keyconf, uint8_t tid, struct ieee80211_key_seq *seq) @@ -2130,6 +2125,13 @@ ieee80211_wake_queue(struct ieee80211_hw *hw, uint16_t q) TODO(); } +static __inline void +ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) +{ + + linuxkpi_ieee80211_tx_status(hw, skb); +} + static __inline void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb) { @@ -2144,6 +2146,14 @@ ieee80211_tx_status_ni(struct ieee80211_hw *hw, struct sk_buff *skb) ieee80211_tx_status(hw, skb); } +static __inline void +ieee80211_tx_status_ext(struct ieee80211_hw *hw, + struct ieee80211_tx_status *txstat) +{ + + linuxkpi_ieee80211_tx_status_ext(hw, txstat); +} + static __inline void ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) { @@ -2355,13 +2365,6 @@ ieee80211_get_tx_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta, TODO(); } -static __inline void -ieee80211_tx_status_ext(struct ieee80211_hw *hw, - struct ieee80211_tx_status *txstat) -{ - TODO(); -} - static __inline void ieee80211_color_change_finish(struct ieee80211_vif *vif) { diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e0457e0e5fa0..57dd174b62a1 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4280,8 +4280,8 @@ linuxkpi_ieee80211_txq_get_depth(struct ieee80211_txq *txq, * passed back from the driver. rawx_mit() saves the ni on the m and the * m on the skb for us to be able to give feedback to net80211. */ -void -linuxkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, +static void +_lkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, int status) { struct ieee80211_node *ni; @@ -4296,20 +4296,28 @@ linuxkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, ieee80211_tx_complete(ni, m, status); /* ni & mbuf were consumed. */ } +} +void +linuxkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, + int status) +{ + + _lkpi_ieee80211_free_txskb(hw, skb, status); kfree_skb(skb); } void -linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) +linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *hw, + struct ieee80211_tx_status *txstat) { + struct sk_buff *skb; struct ieee80211_tx_info *info; struct ieee80211_ratectl_tx_status txs; struct ieee80211_node *ni; int status; - info = IEEE80211_SKB_CB(skb); - + skb = txstat->skb; if (skb->m != NULL) { struct mbuf *m; @@ -4320,6 +4328,7 @@ linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) ni = NULL; } + info = txstat->info; if (info->flags & IEEE80211_TX_STAT_ACK) { status = 0; /* No error. */ txs.status = IEEE80211_RATECTL_TX_SUCCESS; @@ -4342,7 +4351,7 @@ linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) txs.flags |= IEEE80211_RATECTL_STATUS_LONG_RETRY; } #if 0 /* Unused in net80211 currently. */ - /* XXX-BZ conver;t check .flags for MCS/VHT/.. */ + /* XXX-BZ convert check .flags for MCS/VHT/.. */ txs.final_rate = info->status.rates[0].idx; txs.flags |= IEEE80211_RATECTL_STATUS_FINAL_RATE; #endif @@ -4390,7 +4399,25 @@ linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) info->status.status_driver_data[1]); #endif - linuxkpi_ieee80211_free_txskb(hw, skb, status); + if (txstat->free_list) { + _lkpi_ieee80211_free_txskb(hw, skb, status); + list_add_tail(&skb->list, txstat->free_list); + } else { + linuxkpi_ieee80211_free_txskb(hw, skb, status); + } +} + +void +linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) +{ + struct ieee80211_tx_status status; + + memset(&status, 0, sizeof(status)); + status.info = IEEE80211_SKB_CB(skb); + status.skb = skb; + /* sta, n_rates, rates, free_list? */ + + ieee80211_tx_status_ext(hw, &status); } /* From nobody Fri Feb 17 23:44:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT206FP4z3rxSQ; Fri, 17 Feb 2023 23:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT2057BQz3HNb; Fri, 17 Feb 2023 23:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhTdKic09oXQR+rppv8moeiQ6HqLSo7lLbnGo8ncoSc=; b=g2KWXZohgLAXucZcku+8oV0yXOL/8G3ATbq60mmGN2kydbaTbZ14aQ46CkV16e5PtcpkEA 6teTvshO9UsbtzkxcuSBvoNwIoqNQbYWBBhBG+uOWZO/bUleHURCg6RKeEyCoEjuH6TLTT CkhLB6r/4+VNqyYZUFubBzemEJHHhieYeLW8QJXGHCtv2IDH867MTzFRx9w6yRjv8Pw4pP RbBTJ8uOOxQHhWsCVWwJ+vEuizaMmSDzgMhoJKSF8ji/9z9IgbPCzReBbynUJLH41BtdW8 AhHGd3WPcFjxNJAmTRR/kQ0xVVojqSeixY9p+q5B6KskNsPzErw0cnSqAagnFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhTdKic09oXQR+rppv8moeiQ6HqLSo7lLbnGo8ncoSc=; b=YHHztagwC0zW81HB4eQW/DD8H3Slw9MoA0ZK9RHOGhHwbOfD/jOMlOAn8wjhrFTaRpl67b 66nEM81SKbEiKI9KVQR1HHWt/BW3h6+2rxR5PF9KthFiARDFqDWcp9h5sYfYmDEx2Cd2vE fZvblBds3QYgFC3MJSP+hzxboN7dMgLZxYBf7sBsj+HFYZwJ466ueIQG+2L8nVFgxoFcEl L/l+hC3+SrVz9P4dL1xrhfACRKeKkais1wyu61XWY5bhqs8p1pqAGvF07wUcqbwlM6Gtuh x8WAr8bvBBNJCTR66kSLsg3gS8I/LjrG4gjb/lh2ZCc3FCG66evb8vSQH4B77w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677496; a=rsa-sha256; cv=none; b=nJV9YkCghFF/qtOEoLJPZ/OfmfVtEpKMerDP55FzAOfJJh+E+eZu/KPLqdTCKh1pCoRA99 Gxkn/irejLZEeyEEHTtX4Jhac/D7l63FpATyWVCQ3O7oqykhHBr6WzFJfbP3IFSdat/67K GIAepwZSjtHeAiZP5G6cEvWZYVVSSo3KUTvyZmrfBlYjvzBFUvUnazWKgbrljOspRVnOmZ U/VMceu7uUvUqvzlY6Ve70cczUvgxM+zRHj4qsArCsTJGTrGtPKXllXVLs07AGz7821qUB 0MvI04ojfvSvrXyI0cSoVKMY7IA+IetsT6aF1WB78a9NGCkUP/f2OnQVT7L0ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT204DBnz11qS; Fri, 17 Feb 2023 23:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNiuME025222; Fri, 17 Feb 2023 23:44:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNiun4025221; Fri, 17 Feb 2023 23:44:56 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:56 GMT Message-Id: <202302172344.31HNiun4025221@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: 16dc23caf17f - stable/13 - LinuxKPI: 802.11: implement ieee80211_is_pspoll() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 16dc23caf17f8ffa21e365a1f2fe1a72d7fecbe8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=16dc23caf17f8ffa21e365a1f2fe1a72d7fecbe8 commit 16dc23caf17f8ffa21e365a1f2fe1a72d7fecbe8 Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 16:36:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:15 +0000 LinuxKPI: 802.11: implement ieee80211_is_pspoll() Implement ieee80211_is_pspoll() and move it up to the set of implemented ieee80211_is_*() functions. There are no further changes (git diff just looks weird). Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit ff76cbc81d57ffc4bbc9bc20fd22325b2a8c2028) (cherry picked from commit 2336248a8ba9763ad38074db40f32e117edd86f5) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 2b3f6b8e3ab1..b7c6c2d37b90 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1342,29 +1342,33 @@ ieee80211_is_any_nullfunc(__le16 fc) return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)); } -static __inline bool -ieee80211_vif_is_mesh(struct ieee80211_vif *vif) +static inline bool +ieee80211_is_pspoll(__le16 fc) { - TODO(); - return (false); + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_PS_POLL | IEEE80211_FC0_TYPE_CTL); + + return (fc == v); } static __inline bool -ieee80211_is_frag(struct ieee80211_hdr *hdr) +ieee80211_vif_is_mesh(struct ieee80211_vif *vif) { TODO(); return (false); } static __inline bool -ieee80211_is_first_frag(__le16 fc) +ieee80211_is_frag(struct ieee80211_hdr *hdr) { TODO(); return (false); } static __inline bool -ieee80211_is_pspoll(__le16 fc) +ieee80211_is_first_frag(__le16 fc) { TODO(); return (false); From nobody Fri Feb 17 23:44:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT220NGgz3rxbw; Fri, 17 Feb 2023 23:44:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT2169XBz3HCx; Fri, 17 Feb 2023 23:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gidOHjAj9pLJIy+i9PGUNPE0DqVmphGbcmiyQhG0P0E=; b=nZh5KZ6eMkYQHDjJdzJ/wjqh2naWCwdyw9AussOpQOUT/q6b0WIVyluZ+eFpGdSS6CQLps nk6psr7evYUSunopGGslTbTd0OpD+4uP1a1XMb1GNVDKnsk8KcojOAK90wGthu1MrFMfa+ 3yFjIAvA52IWyhy6OpdS3WvZtnaDMlDw3aEsI3+Uzr1bYcO+AcpseqD14SZ7hcMnQgBhPl yJMLBLlZikr5ZBJ/CbUbq6CXT5Ahe/x1YgLH2goPThOWBkhDOzGj6wghROFDHnDzjalaT4 9MhrYBggbO/BBEmyfuXeYUrCPu5PN9LgVZjWfIn380WWZV57YQgwRm9wEMaILQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gidOHjAj9pLJIy+i9PGUNPE0DqVmphGbcmiyQhG0P0E=; b=e6SaxLn5IvYWIImv1iuUptMmFe0V5HDEO6jAQ3GSPl4XPmT9h4atY6+UaEZZMOT1Z0LBeB kh+ktnRVJ1oHSskFk+LiaKhW/29Jh4XRj7/UQ/ALn+pArgUhSvjJTkFDKzs/cSpzDrhMwv PcY9JObootWJbPMTkVO3SAoG6V22RlrlUqD+Cuux+nNWfahHh1utCNkGJsETkf0hwHHMBk kwM5kTmIfbm5RpqMfi9+jkmjAD1RB8g7PkZW3lZk0pL6ehlsfufe5JY2d447YEZZ7I0nvI bXbg2EkJm+Oer1lSknYsaPbZfEI7DRMPsCxZQlWwQ5bD7ycGKNgsnTlBTKnwvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677497; a=rsa-sha256; cv=none; b=IrXjJ/QBug0Lc334MN/+noY+WcBxRFZT6kBGFQRRyuEdqqW0ILuUfJbs4dR79FrWx/hsFx DI+9QfDQoSEkkANltl2eFVlPM8Gs7jv6Qu8R15ImjloMH2ALfVEKE17/pMuSdx5yNynO20 aaLQDUGlcPJYVsqf8XDjsrRpkWYZT4Q4lk2a99PMoCzQfbwPkR2D/Hl4NWJd88fteEmDW8 VebVygKayDoAKykj7IepuTzLUBHpbq8QKZYBL5m0tfnGKl9NFrsPvdfSJGUa58aFhG5c+C d4P791rDyIN00u2fQv4hz+zZgy9SNtmY5OkzJte+O4O2bg4UZc3pMrdcqiSYcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT215GHNz11Wv; Fri, 17 Feb 2023 23:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNiviK025247; Fri, 17 Feb 2023 23:44:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNiv5i025246; Fri, 17 Feb 2023 23:44:57 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:57 GMT Message-Id: <202302172344.31HNiv5i025246@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: 28fbc0caa49b - stable/13 - LinuxKPI: 802.11: enhance lkpi_scan_ies_add() for HT and VHT List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 28fbc0caa49b0fb119cc34a704d5437d63f479a3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=28fbc0caa49b0fb119cc34a704d5437d63f479a3 commit 28fbc0caa49b0fb119cc34a704d5437d63f479a3 Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 23:00:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:16 +0000 LinuxKPI: 802.11: enhance lkpi_scan_ies_add() for HT and VHT Add code (currently disabled by #ifdef) for HT and VHT to lkpi_scan_ies_add(). Switch to a local variable for ic given the new code also needs the value. Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit 3dd980267f4e53df259eb6d322e7332a8bc5bb0a) --- sys/compat/linuxkpi/common/src/linux_80211.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 57dd174b62a1..b2969aeb5db2 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2478,11 +2478,13 @@ lkpi_scan_ies_add(uint8_t *p, struct ieee80211_scan_ies *scan_ies, { struct ieee80211_supported_band *supband; struct linuxkpi_ieee80211_channel *channels; + struct ieee80211com *ic; const struct ieee80211_channel *chan; const struct ieee80211_rateset *rs; uint8_t *pb; int band, i; + ic = vap->iv_ic; for (band = 0; band < NUM_NL80211_BANDS; band++) { if ((band_mask & (1 << band)) == 0) continue; @@ -2503,7 +2505,7 @@ lkpi_scan_ies_add(uint8_t *p, struct ieee80211_scan_ies *scan_ies, if (channels[i].flags & IEEE80211_CHAN_DISABLED) continue; - chan = ieee80211_find_channel(vap->iv_ic, + chan = ieee80211_find_channel(ic, channels[i].center_freq, 0); if (chan != NULL) break; @@ -2514,10 +2516,31 @@ lkpi_scan_ies_add(uint8_t *p, struct ieee80211_scan_ies *scan_ies, continue; pb = p; - rs = ieee80211_get_suprates(vap->iv_ic, chan); /* calls chan2mode */ + rs = ieee80211_get_suprates(ic, chan); /* calls chan2mode */ p = ieee80211_add_rates(p, rs); p = ieee80211_add_xrates(p, rs); +#if defined(LKPI_80211_HT) + if ((vap->iv_flags_ht & IEEE80211_FHT_HT) != 0) { + struct ieee80211_channel *c; + + c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan, + vap->iv_flags_ht); + p = ieee80211_add_htcap_ch(p, vap, c); + } +#endif +#if defined(LKPI_80211_VHT) + if ((vap->iv_vht_flags & IEEE80211_FVHT_VHT) != 0) { + struct ieee80211_channel *c; + + c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan, + vap->iv_flags_ht); + c = ieee80211_vht_adjust_channel(ic, c, + vap->iv_vht_flags); + p = ieee80211_add_vhtcap_ch(p, vap, c); + } +#endif + scan_ies->ies[band] = pb; scan_ies->len[band] = p - pb; } From nobody Fri Feb 17 23:44:58 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT233qDJz3rxby; Fri, 17 Feb 2023 23:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT2300xGz3HGr; Fri, 17 Feb 2023 23:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ig2QhrTyI9bSEQMAxuH1mTisghTonjVFRC+7QfsTQFs=; b=MK7uhr0+7eWQlFZhq5zyHZP5v9XM05jJPyMUV1HE5fJhefLetoAzAUhthUZlKwGOgZjxPL hwGetF7uIC6lBqL4HEHI0Mn54zVXnIZ14LuYn6JjX9xlf0Hh7GQ1vYqgR6NkA9QvXDIkLa a4K6oaWZ0OcEkXpBrRj7OigUl5EIyXbEzeIFH9JnNeKlXGHEbucJNBhfeyOndkaHWVITw0 ZD6suTY3v/jQrRBF6qOycpj/AJVaaPKvrWJRZJKqU0m5P04uSyaRAoJqu1gISFXxnPNb6a jqMoT5HA2oEs61ssZ4dZJUcxxdEsH00IO2XSR+Ww517E857/CZQm/bVBwZXBig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ig2QhrTyI9bSEQMAxuH1mTisghTonjVFRC+7QfsTQFs=; b=c+McSQvQG9j1PHr4xOBpsSWvPOORt9yeDUN3Kr1DbHlIjWaMx6Oxa1meN2X3vQeXa1gpKB Goi6PDtj5Ft+P/r7Ts+ayYBM+rlAkR+GmQlgOWo7WgPH69rQPshV8XeqAKhfe4QmliiAHL T1dmC0ULgNTfbP5PglCKKkIVlQ+9B3ceomu47kZYS5LTxPk6RcgztSqfk4kLd4Psv1XnJF ATQL2AC4m3eW1uDFQ9jB5wjinuLzHRuBJo/MjMUmzNjIdq8RGdw6w4682f2oJffvVG0XuZ 2q/PXdqP2N/sWnb1Ccm0dKzMhMiR3E8OulJu3JbG0AvmN1FPdnO9GbwHE/bJBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677499; a=rsa-sha256; cv=none; b=FNpzQxjZ+HK5n/YJE3VcCdJQrphMzFuRHraRUPEyx7UkFDGC8O+NrJTtp1UyO3I2IMORdr HnfKigExIzTAucfEqjISGCTRLz4upTo7GrO8PYhG8sGkqOW8uRsqLLMu2kkTOdRIcVinv6 h4+edN0M0Ce7uMq39dMEH1oad8OVITIBtnb9r5KVjqvK9SfRwsr1zgFyVEzCq1fNYaUaYV MpC/rqHVt05w8BHVfWqTS+pyME59b7eFXtwpF4uF7vRqaNwd4S8zjCGjVCzSY9FA6Kf9ji EnWaVJb8UPzQTU38E040IOKgWtbmee339yTnbb0EVK2xI61yxuusE2PUMcBm1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT226Bttz11tY; Fri, 17 Feb 2023 23:44:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNiwiT025267; Fri, 17 Feb 2023 23:44:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNiwuI025266; Fri, 17 Feb 2023 23:44:58 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:58 GMT Message-Id: <202302172344.31HNiwuI025266@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: 9e782bfab904 - stable/13 - LinuxKPI: 802.11: fix indent in lkpi_wake_tx_queues() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 9e782bfab9042aed12c36746534b1e4e4ec6d597 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9e782bfab9042aed12c36746534b1e4e4ec6d597 commit 9e782bfab9042aed12c36746534b1e4e4ec6d597 Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 23:12:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:16 +0000 LinuxKPI: 802.11: fix indent in lkpi_wake_tx_queues() Fix indentation in lkpi_wake_tx_queues(). No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days (cherry picked from commit b0ddb44fd427d44b8153781ce9c461e393771aff) --- sys/compat/linuxkpi/common/src/linux_80211.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b2969aeb5db2..bcd8ea9d4c6e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -861,24 +861,24 @@ lkpi_wake_tx_queues(struct ieee80211_hw *hw, struct ieee80211_sta *sta, /* Wake up all queues to know they are allocated in the driver. */ for (tid = 0; tid < nitems(sta->txq); tid++) { - if (tid == IEEE80211_NUM_TIDS) { - IMPROVE("station specific?"); - if (!ieee80211_hw_check(hw, STA_MMPDU_TXQ)) - continue; - } else if (tid >= hw->queues) + if (tid == IEEE80211_NUM_TIDS) { + IMPROVE("station specific?"); + if (!ieee80211_hw_check(hw, STA_MMPDU_TXQ)) continue; + } else if (tid >= hw->queues) + continue; - if (sta->txq[tid] == NULL) - continue; + if (sta->txq[tid] == NULL) + continue; - ltxq = TXQ_TO_LTXQ(sta->txq[tid]); - if (dequeue_seen && !ltxq->seen_dequeue) - continue; + ltxq = TXQ_TO_LTXQ(sta->txq[tid]); + if (dequeue_seen && !ltxq->seen_dequeue) + continue; - if (no_emptyq && skb_queue_empty(<xq->skbq)) - continue; + if (no_emptyq && skb_queue_empty(<xq->skbq)) + continue; - lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid]); + lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid]); } } From nobody Fri Feb 17 23:44:59 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT242Kc2z3rxNB; Fri, 17 Feb 2023 23:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT241TRYz3HTx; Fri, 17 Feb 2023 23:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQR70hDHf4FZk2Bol6mbnuM6m69FKihjqyQpULbXFCU=; b=LejCvv0gHBAtd4F/O1hnq/+C9vZncqwR4E/hIMByJmpz8bm7XPGTpoDssWTUKSVSZbVsxW yRPBTZ4iMIjS1YJXLrzrfV1Z2ZGOIclW7Wy5yHbD3Gwoy9+YAqcuhJ2jMe2gx7tN20Vaud kRvHp1ZrrpBuGv18591VY92hN6ebIFGoI20p+gdpusSZUuU29NBku6OdNCa03IgjZi/PlC Hazp5PsL7Q3CRrBBAMnv4sLMQ+k1ONig4X/2sPTjnvXaWRHu6hAHUgjNu5HIQxtHZObP5U xBhlHT3JOxJ8cYEf+7u/kRGsZegNO81LX4TUbHKy1Fx1Q03ZCVp66RAhaVZjLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQR70hDHf4FZk2Bol6mbnuM6m69FKihjqyQpULbXFCU=; b=vI8KO4rb9Gj2hHAAJx1KGvQEqWBp7oAI2kAkCN/hF96CE3nEjUWCePJrsDSqyzaTfVHYve 4YGNU+aLz0KzQRJjIMrm/8LlJh9jAkQFZKXIb+l6/y6qKbxmNwZjvfuSW/3CS1RcCxtNRb 6QNjXt0htGflqMEmbBjr3jYXD0QANXjZZURmIZTh822hTXrXztRSTRjPEkPz+KO5ZO1OHr B16Zu8xubyIDP4t04Y71qiABXUG3D2FFs82t+5blYANQYp0AHJQ+K+uj3ZCU3BCF2jPpqo RyEw++Q4CVYnMER/LZgvn9rFVleal271P52Ltgj88DAPRYchNxxFjmEdbuvN7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677500; a=rsa-sha256; cv=none; b=KskDDJCRp5Yiw0JhDE/TjPRdBmQ28TYxFa8WKrgyNXOYVhADuoBxQpl9nhOBuP+/8ne4x5 /CC5luRiQFXulVWikj8YM5vKMmH+esq+QMbkcbVogpI558bK1pIuOpxMXlOi+Zd7ar/cxZ 57dHhmHNy8qybZpkhbklcUVA6Flb4m+uLfzi46NNEnSaH/nN3NVa1gFhjjkcMnKn5/9EUw 34gAHRxmRwxY4vgYRjO5joMAAZd8rXmRYsllUYw9heZerGNveNQGGFkC9dnHBhGFzBXcC4 aXces2Ou7cuVT//a+s+E44fcNtqppBlQMQpCQnCJ3Q8DXyHoDvloQKfyfpW5Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT240RWlz11qT; Fri, 17 Feb 2023 23:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNix7P025288; Fri, 17 Feb 2023 23:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNixmB025287; Fri, 17 Feb 2023 23:44:59 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:59 GMT Message-Id: <202302172344.31HNixmB025287@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: 9f9d04740577 - stable/13 - LinuxKPI: 802.11: basic implementation of *queue(s)/*txq* LinuxKPI: 802.11: deal with stopped queues List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 9f9d047405778b2d2aca829a2037532b8ae8ed5d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9f9d047405778b2d2aca829a2037532b8ae8ed5d commit 9f9d047405778b2d2aca829a2037532b8ae8ed5d Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 16:17:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:16 +0000 LinuxKPI: 802.11: basic implementation of *queue(s)/*txq* LinuxKPI: 802.11: deal with stopped queues Very basic implementations of ieee80211_{wake,stop}_queue[s], as well as ieee80211_txq_schedule_start(), ieee80211_next_txq(), and ieee80211_schedule_txq(). Various combinations of these are used by different wireless drivers, incl. iwlwifi. Following 5a9a0d7803382321b5f9fff1deae5fb08463cf1a initialize the queue values explicitly and deal with a stopped queue in ieee80211_tx_dequeue(). Sponsored by: The FreeBSD Foundation (parts of this work) MFC after: 3 days (cherry picked from commit 5a9a0d7803382321b5f9fff1deae5fb08463cf1a) (cherry picked from commit 0cbcfa1964de89cd346ee6f79437c6ab83a3b716) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 124 +++++------ sys/compat/linuxkpi/common/src/linux_80211.c | 237 ++++++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_80211.h | 14 ++ 3 files changed, 316 insertions(+), 59 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index b7c6c2d37b90..36e6600f237b 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1030,6 +1030,14 @@ struct sk_buff *linuxkpi_ieee80211_probereq_get(struct ieee80211_hw *, void linuxkpi_ieee80211_tx_status(struct ieee80211_hw *, struct sk_buff *); void linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *, struct ieee80211_tx_status *); +void linuxkpi_ieee80211_stop_queues(struct ieee80211_hw *); +void linuxkpi_ieee80211_wake_queues(struct ieee80211_hw *); +void linuxkpi_ieee80211_stop_queue(struct ieee80211_hw *, int); +void linuxkpi_ieee80211_wake_queue(struct ieee80211_hw *, int); +void linuxkpi_ieee80211_txq_schedule_start(struct ieee80211_hw *, uint8_t); +struct ieee80211_txq *linuxkpi_ieee80211_next_txq(struct ieee80211_hw *, uint8_t); +void linuxkpi_ieee80211_schedule_txq(struct ieee80211_hw *, + struct ieee80211_txq *, bool); /* -------------------------------------------------------------------------- */ @@ -1508,6 +1516,63 @@ ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) /* -------------------------------------------------------------------------- */ +static inline void +ieee80211_stop_queues(struct ieee80211_hw *hw) +{ + linuxkpi_ieee80211_stop_queues(hw); +} + +static inline void +ieee80211_wake_queues(struct ieee80211_hw *hw) +{ + linuxkpi_ieee80211_wake_queues(hw); +} + +static inline void +ieee80211_stop_queue(struct ieee80211_hw *hw, int qnum) +{ + linuxkpi_ieee80211_stop_queue(hw, qnum); +} + +static inline void +ieee80211_wake_queue(struct ieee80211_hw *hw, int qnum) +{ + linuxkpi_ieee80211_wake_queue(hw, qnum); +} + +static inline void +ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq) +{ + linuxkpi_ieee80211_schedule_txq(hw, txq, true); +} + +static inline void +ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq, + bool withoutpkts) +{ + linuxkpi_ieee80211_schedule_txq(hw, txq, true); +} + +static inline void +ieee80211_txq_schedule_start(struct ieee80211_hw *hw, uint8_t ac) +{ + linuxkpi_ieee80211_txq_schedule_start(hw, ac); +} + +static inline void +ieee80211_txq_schedule_end(struct ieee80211_hw *hw, uint8_t ac) +{ + /* DO_NADA; */ +} + +static inline struct ieee80211_txq * +ieee80211_next_txq(struct ieee80211_hw *hw, uint8_t ac) +{ + return (linuxkpi_ieee80211_next_txq(hw, ac)); +} + +/* -------------------------------------------------------------------------- */ + static __inline uint8_t ieee80211_get_tid(struct ieee80211_hdr *hdr) { @@ -1819,18 +1884,6 @@ ieee80211_tdls_oper_request(struct ieee80211_vif *vif, uint8_t *addr, TODO(); } -static __inline void -ieee80211_stop_queues(struct ieee80211_hw *hw) -{ - TODO(); -} - -static __inline void -ieee80211_wake_queues(struct ieee80211_hw *hw) -{ - TODO(); -} - static __inline void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool state) { @@ -2117,18 +2170,6 @@ ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *w) linuxkpi_ieee80211_queue_work(hw, w); } -static __inline void -ieee80211_stop_queue(struct ieee80211_hw *hw, uint16_t q) -{ - TODO(); -} - -static __inline void -ieee80211_wake_queue(struct ieee80211_hw *hw, uint16_t q) -{ - TODO(); -} - static __inline void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) { @@ -2259,41 +2300,6 @@ ieee80211_sta_register_airtime(struct ieee80211_sta *sta, TODO(); } - -static __inline void -ieee80211_txq_schedule_start(struct ieee80211_hw *hw, uint8_t ac) -{ - TODO(); -} - -static __inline void -ieee80211_txq_schedule_end(struct ieee80211_hw *hw, uint8_t ac) -{ - /* DO_NADA; */ -} - -static __inline struct ieee80211_txq * -ieee80211_next_txq(struct ieee80211_hw *hw, uint8_t ac) -{ - - TODO(); - return (NULL); -} - -static __inline void -ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq) -{ - TODO(); -} - -static __inline void -ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq, - bool withoutpkts) -{ - TODO(); -} - - static __inline void ieee80211_beacon_set_cntdwn(struct ieee80211_vif *vif, u8 counter) { diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index bcd8ea9d4c6e..d0a3b4b8586a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -76,6 +76,12 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_LKPI80211, "lkpi80211", "LinuxKPI 80211 compat"); +/* XXX-BZ really want this and others in queue.h */ +#define TAILQ_ELEM_INIT(elm, field) do { \ + (elm)->field.tqe_next = NULL; \ + (elm)->field.tqe_prev = NULL; \ +} while (0) + /* -------------------------------------------------------------------------- */ /* Keep public for as long as header files are using it too. */ @@ -238,9 +244,11 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], ltxq->txq.ac = tid_to_mac80211_ac[tid & 7]; } ltxq->seen_dequeue = false; + ltxq->stopped = false; ltxq->txq.vif = vif; ltxq->txq.tid = tid; ltxq->txq.sta = sta; + TAILQ_ELEM_INIT(ltxq, txq_entry); skb_queue_head_init(<xq->skbq); sta->txq[tid] = <xq->txq; } @@ -2270,6 +2278,9 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], vif->hw_queue[i] = i; else vif->hw_queue[i] = 0; + + /* Initialize the queue to running. Stopped? */ + lvif->hw_queue_stopped[i] = false; } vif->cab_queue = IEEE80211_INVAL_HW_QUEUE; @@ -4262,13 +4273,25 @@ linuxkpi_ieee80211_tx_dequeue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) { struct lkpi_txq *ltxq; + struct lkpi_vif *lvif; struct sk_buff *skb; + skb = NULL; ltxq = TXQ_TO_LTXQ(txq); ltxq->seen_dequeue = true; + if (ltxq->stopped) + goto stopped; + + lvif = VIF_TO_LVIF(ltxq->txq.vif); + if (lvif->hw_queue_stopped[ltxq->txq.ac]) { + ltxq->stopped = true; + goto stopped; + } + skb = skb_dequeue(<xq->skbq); +stopped: return (skb); } @@ -4643,6 +4666,220 @@ linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *vif) /* -------------------------------------------------------------------------- */ +void +linuxkpi_ieee80211_stop_queue(struct ieee80211_hw *hw, int qnum) +{ + struct lkpi_hw *lhw; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + int ac_count, ac; + + KASSERT(qnum < hw->queues, ("%s: qnum %d >= hw->queues %d, hw %p\n", + __func__, qnum, hw->queues, hw)); + + lhw = wiphy_priv(hw->wiphy); + + /* See lkpi_ic_vap_create(). */ + if (hw->queues >= IEEE80211_NUM_ACS) + ac_count = IEEE80211_NUM_ACS; + else + ac_count = 1; + + LKPI_80211_LHW_LVIF_LOCK(lhw); + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + + vif = LVIF_TO_VIF(lvif); + for (ac = 0; ac < ac_count; ac++) { + IMPROVE_TXQ("LOCKING"); + if (qnum == vif->hw_queue[ac]) { + /* + * For now log this to better understand + * how this is supposed to work. + */ + if (lvif->hw_queue_stopped[ac]) + ic_printf(lhw->ic, "%s:%d: lhw %p hw %p " + "lvif %p vif %p ac %d qnum %d already " + "stopped\n", __func__, __LINE__, + lhw, hw, lvif, vif, ac, qnum); + lvif->hw_queue_stopped[ac] = true; + } + } + } + LKPI_80211_LHW_LVIF_UNLOCK(lhw); +} + +void +linuxkpi_ieee80211_stop_queues(struct ieee80211_hw *hw) +{ + int i; + + IMPROVE_TXQ("Locking; do we need further info?"); + for (i = 0; i < hw->queues; i++) + linuxkpi_ieee80211_stop_queue(hw, i); +} + + +static void +lkpi_ieee80211_wake_queues(struct ieee80211_hw *hw, int hwq) +{ + struct lkpi_hw *lhw; + struct lkpi_vif *lvif; + struct lkpi_sta *lsta; + int ac_count, ac, tid; + + /* See lkpi_ic_vap_create(). */ + if (hw->queues >= IEEE80211_NUM_ACS) + ac_count = IEEE80211_NUM_ACS; + else + ac_count = 1; + + lhw = wiphy_priv(hw->wiphy); + + IMPROVE_TXQ("Locking"); + LKPI_80211_LHW_LVIF_LOCK(lhw); + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + struct ieee80211_vif *vif; + + vif = LVIF_TO_VIF(lvif); + for (ac = 0; ac < ac_count; ac++) { + + if (hwq == vif->hw_queue[ac]) { + + /* XXX-BZ what about software scan? */ + + /* + * For now log this to better understand + * how this is supposed to work. + */ + if (!lvif->hw_queue_stopped[ac]) + ic_printf(lhw->ic, "%s:%d: lhw %p hw %p " + "lvif %p vif %p ac %d hw_q not stopped\n", + __func__, __LINE__, + lhw, hw, lvif, vif, ac); + lvif->hw_queue_stopped[ac] = false; + + LKPI_80211_LVIF_LOCK(lvif); + TAILQ_FOREACH(lsta, &lvif->lsta_head, lsta_entry) { + struct ieee80211_sta *sta; + + sta = LSTA_TO_STA(lsta); + for (tid = 0; tid < nitems(sta->txq); tid++) { + struct lkpi_txq *ltxq; + + if (sta->txq[tid] == NULL) + continue; + + if (sta->txq[tid]->ac != ac) + continue; + + ltxq = TXQ_TO_LTXQ(sta->txq[tid]); + if (!ltxq->stopped) + continue; + + ltxq->stopped = false; + + /* XXX-BZ see when this explodes with all the locking. taskq? */ + lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid]); + } + } + LKPI_80211_LVIF_UNLOCK(lvif); + } + } + } + LKPI_80211_LHW_LVIF_UNLOCK(lhw); +} + +void +linuxkpi_ieee80211_wake_queues(struct ieee80211_hw *hw) +{ + int i; + + IMPROVE_TXQ("Is this all/enough here?"); + for (i = 0; i < hw->queues; i++) + lkpi_ieee80211_wake_queues(hw, i); +} + +void +linuxkpi_ieee80211_wake_queue(struct ieee80211_hw *hw, int qnum) +{ + + KASSERT(qnum < hw->queues, ("%s: qnum %d >= hw->queues %d, hw %p\n", + __func__, qnum, hw->queues, hw)); + + lkpi_ieee80211_wake_queues(hw, qnum); +} + +/* This is just hardware queues. */ +void +linuxkpi_ieee80211_txq_schedule_start(struct ieee80211_hw *hw, uint8_t ac) +{ + struct lkpi_hw *lhw; + + lhw = HW_TO_LHW(hw); + + IMPROVE_TXQ("Are there reasons why we wouldn't schedule?"); + IMPROVE_TXQ("LOCKING"); + if (++lhw->txq_generation[ac] == 0) + lhw->txq_generation[ac]++; +} + +struct ieee80211_txq * +linuxkpi_ieee80211_next_txq(struct ieee80211_hw *hw, uint8_t ac) +{ + struct lkpi_hw *lhw; + struct ieee80211_txq *txq; + struct lkpi_txq *ltxq; + + lhw = HW_TO_LHW(hw); + txq = NULL; + + IMPROVE_TXQ("LOCKING"); + + /* Check that we are scheduled. */ + if (lhw->txq_generation[ac] == 0) + goto out; + + ltxq = TAILQ_FIRST(&lhw->scheduled_txqs[ac]); + if (ltxq == NULL) + goto out; + if (ltxq->txq_generation == lhw->txq_generation[ac]) + goto out; + + ltxq->txq_generation = lhw->txq_generation[ac]; + TAILQ_REMOVE(&lhw->scheduled_txqs[ac], ltxq, txq_entry); + txq = <xq->txq; + TAILQ_ELEM_INIT(ltxq, txq_entry); + +out: + return (txq); +} + +void linuxkpi_ieee80211_schedule_txq(struct ieee80211_hw *hw, + struct ieee80211_txq *txq, bool withoutpkts) +{ + struct lkpi_hw *lhw; + struct lkpi_txq *ltxq; + + ltxq = TXQ_TO_LTXQ(txq); + + IMPROVE_TXQ("LOCKING"); + + /* Only schedule if work to do or asked to anyway. */ + if (!withoutpkts && skb_queue_empty(<xq->skbq)) + goto out; + + /* Make sure we do not double-schedule. */ + if (ltxq->txq_entry.tqe_next != NULL) + goto out; + + lhw = HW_TO_LHW(hw); + TAILQ_INSERT_TAIL(&lhw->scheduled_txqs[txq->ac], ltxq, txq_entry); +out: + return; +} + +/* -------------------------------------------------------------------------- */ + struct lkpi_cfg80211_bss { u_int refcnt; struct cfg80211_bss bss; diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index d9f2ce68f4f1..4d44ca07948e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -50,6 +50,7 @@ #ifndef D80211_IMPROVE #define D80211_IMPROVE 0x2 #endif +#define D80211_IMPROVE_TXQ 0x4 #define D80211_TRACE 0x10 #define D80211_TRACEOK 0x20 #define D80211_TRACE_TX 0x100 @@ -62,6 +63,10 @@ #define D80211_TRACE_STA 0x10000 #define D80211_TRACE_MO 0x100000 +#define IMPROVE_TXQ(...) \ + if (linuxkpi_debug_80211 & D80211_IMPROVE_TXQ) \ + printf("%s:%d: XXX LKPI80211 IMPROVE_TXQ\n", __func__, __LINE__) + struct lkpi_radiotap_tx_hdr { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; @@ -93,7 +98,11 @@ struct lkpi_radiotap_rx_hdr { (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE)) struct lkpi_txq { + TAILQ_ENTRY(lkpi_txq) txq_entry; + bool seen_dequeue; + bool stopped; + uint32_t txq_generation; struct sk_buff_head skbq; /* Must be last! */ @@ -139,6 +148,8 @@ struct lkpi_vif { TAILQ_HEAD(, lkpi_sta) lsta_head; bool added_to_drv; /* Driver knows; i.e. we called add_interface(). */ + bool hw_queue_stopped[IEEE80211_NUM_ACS]; + /* Must be last! */ struct ieee80211_vif vif __aligned(CACHE_LINE_SIZE); }; @@ -164,6 +175,9 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct mtx mtx; + uint32_t txq_generation[IEEE80211_NUM_ACS]; + TAILQ_HEAD(, lkpi_txq) scheduled_txqs[IEEE80211_NUM_ACS]; + /* Scan functions we overload to handle depending on scan mode. */ void (*ic_scan_curchan)(struct ieee80211_scan_state *, unsigned long); From nobody Fri Feb 17 23:45:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT252vyzz3rxSb; Fri, 17 Feb 2023 23:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT2524vkz3HQY; Fri, 17 Feb 2023 23:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOsOgu3CQRKq3FEn6NqOS+VXIt+H3i5lqlPzd7OLOCU=; b=PTxn6T0ukzCEJ/Ie/vJPm2lA80Pxx2+SfHMm6PBanZmqEIepN5rUPegK3dMn+sgnKLSMTv TDiqn07CJNBq2Di55XiCbiUEeSw0qMLuZyiS5rR6htqH/PN3eBrOQ/CGzaCexASNRtBNr0 qWzB/ZF5vJO5FExctXQGlu9nK8Or2EhOlz1/r3OrO33/6g3J72DWW8CkuZ0PjDPlH8eQLe +PRi9fdH4eBpqqlvlnymkVBws6q0Gp8M9rwFaVus6jRoFt8HnjA2yAllP2rQzcopEUYkku ZxwVM+4/LmvjWuE8uz6mOBRMVnPC+ApC1mAjRjW5Tf6/CsxIU6DD7inD+R6U0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOsOgu3CQRKq3FEn6NqOS+VXIt+H3i5lqlPzd7OLOCU=; b=t64ixnJCI1QMsrvMauDReIHxeNXAAAeC0HbLM+J+tNrRxlwMyhbkQUkTXAezr5h2g03Jff IM39oRXN4uTsM2fF+gZ6L3Z77Zs+bed6FgC6WYU4z/KJlbQzz/9j2JNFnfZdgXCiVUI2YA A5QlJkXXK7hJDyKnqImiWef/9ftNJfzUJXU7Rlpvy0D9/8nuIA0ax9DA+bKoJKqsIau/IG ruvSAMbjO7ep7XF4z04+GQss8MFQ8He5svEikm8vHprmwM+Wtw9DSS8D0Dj6AO9dC+e+0O 2hZUflADnqubKhpPKWER89sZRn8XdnPWq+d1/BrIHxdWFNZjkb2hQb3GQHtW9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677501; a=rsa-sha256; cv=none; b=kpcHGR9cn9TbBadTW9qfccNVgKf6uVwTwXuMexBKN60yzfD3kTyRa8D8fBdR1QdqhB2WWe eR5U4/rBmZ6PGTflNKyvCf8zDJ7RWJ37JzrjnkGU7Y/zjwyupIKXsqCSXo1SPuEW4+tFIV wrt2ruu/B8w00g3FlcpZq5oM2JT59OyWPlXpKQiq557ZSStfQhpkxtQrVRkxxWJgmSujIc bLF59NmlnhYma/zO8BnwTncwHJg/8RZrfXRWv9m/zp8wnV79qKs4YtSNn571YpBjW1FJHb 8O6RrosGd+ABHl3kFIZyGgywOfpboFM02TU7oCazQ3KOhQb2gUpN+p6wPz1rWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT2519TMz11rF; Fri, 17 Feb 2023 23:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNj1MZ025318; Fri, 17 Feb 2023 23:45:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNj1Sc025317; Fri, 17 Feb 2023 23:45:01 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:45:01 GMT Message-Id: <202302172345.31HNj1Sc025317@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: 7d23664b35a2 - stable/13 - LinuxKPI: implement irq_get_msi_desc() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 7d23664b35a2611dc4fea56f7cfd2b99f91626a0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7d23664b35a2611dc4fea56f7cfd2b99f91626a0 commit 7d23664b35a2611dc4fea56f7cfd2b99f91626a0 Author: Bjoern A. Zeeb AuthorDate: 2022-11-28 18:27:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:16 +0000 LinuxKPI: implement irq_get_msi_desc() Add irq_get_msi_desc() as a wrapper around a PCI function which will allocate a single cached value (see comment on struct) for the msi_desc requested if it doesn't exist yet and handle freeing it when the PCI device goes away. We take the values from the ivars of the native (FreeBSD) device. While changing struct pci_dev also add the msi_cap field requested by a wireless driver. MFC after: 3 days Reviewed by: hselasky (earlier version) Differential Revision: https://reviews.freebsd.org/D37523 (cherry picked from commit 4b56afaf7bf4fa37bae5b26fd93ee1ff5969c1bb) --- sys/compat/linuxkpi/common/include/linux/pci.h | 14 ++++++++++++ sys/compat/linuxkpi/common/src/linux_pci.c | 31 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index ba4ee8a9b70a..6a7dd1eaaa83 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -306,6 +306,17 @@ _pci_exit(void) \ module_init(_pci_init); \ module_exit(_pci_exit) +struct msi_msg { + uint32_t data; +}; + +struct msi_desc { + struct msi_msg msg; + struct { + bool is_64; + } msi_attrib; +}; + /* * If we find drivers accessing this from multiple KPIs we may have to * refcount objects of this structure. @@ -342,6 +353,8 @@ struct pci_dev { bool managed; /* devres "pcim_*(). */ bool want_iomap_res; bool msix_enabled; + uint8_t msi_cap; + struct msi_desc *msi_desc; }; /* XXX add kassert here on the mmio offset */ @@ -371,6 +384,7 @@ struct resource *_lkpi_pci_iomap(struct pci_dev *pdev, int bar, int mmio_size); struct pcim_iomap_devres *lkpi_pcim_iomap_devres_find(struct pci_dev *pdev); void lkpi_pcim_iomap_table_release(struct device *, void *); struct pci_dev *lkpi_pci_get_device(uint16_t, uint16_t, struct pci_dev *); +struct msi_desc *lkpi_pci_msi_desc_alloc(int); static inline bool dev_is_pci(struct device *dev) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 2db542284332..ba40ded9cddf 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -341,6 +341,8 @@ lkpinew_pci_dev_release(struct device *dev) if (pdev->bus->self != pdev) pci_dev_put(pdev->bus->self); free(pdev->bus, M_DEVBUF); + if (pdev->msi_desc != NULL) + free(pdev->msi_desc, M_DEVBUF); free(pdev, M_DEVBUF); } @@ -972,6 +974,35 @@ pci_device_is_present(struct pci_dev *pdev) return (bus_child_present(dev)); } +struct msi_desc * +lkpi_pci_msi_desc_alloc(int irq) +{ + struct device *dev; + struct pci_dev *pdev; + struct msi_desc *desc; + struct pci_devinfo *dinfo; + struct pcicfg_msi *msi; + + dev = linux_pci_find_irq_dev(irq); + if (dev == NULL) + return (NULL); + + pdev = to_pci_dev(dev); + if (pdev->msi_desc != NULL) + return (pdev->msi_desc); + + dinfo = device_get_ivars(dev->bsddev); + msi = &dinfo->cfg.msi; + + desc = malloc(sizeof(*desc), M_DEVBUF, M_WAITOK | M_ZERO); + + desc->msi_attrib.is_64 = + (msi->msi_ctrl & PCIM_MSICTRL_64BIT) ? true : false; + desc->msg.data = msi->msi_data; + + return (desc); +} + CTASSERT(sizeof(dma_addr_t) <= sizeof(uint64_t)); struct linux_dma_obj { From nobody Fri Feb 17 23:45:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT263tWWz3rxYF; Fri, 17 Feb 2023 23:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT262zdXz3HSy; Fri, 17 Feb 2023 23:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mwkoI0gm4oSshYt8nrNF3wdiTT/W0Ha8cqQiu3D4AIY=; b=PLyXzWoFzWuKdP+6Mi1gg7ESZQ7kYs25Cwn/e4/+hpw5S+fpZAH8VtciRpChexSH9yIKd9 GouA9N0GjktWBqBqB11y/okZqh5zVlgqfoFhgM+16LfgeRdz3MDrCssjmYz9GVm6LaC9Nw RsSGk77uqGjDchWCCJSAiN0jjYWBeuUCv4DJOhUR9RdhbBWrZ3GKLkpIw+LlznppBp3QKB brS6KqiPbNCX4r8H2+zd32eW1FkOuLY8N6A2pCtMbd+g0pSaYnyMNExs8GbC7KrRkvRI2g oWh8V5/2AEDTIH9LRE3Jldgjngvflqzd1mJMwlLuU1Dx81mQ+maa3VQGikK29g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mwkoI0gm4oSshYt8nrNF3wdiTT/W0Ha8cqQiu3D4AIY=; b=NnqWhmWnuPfBi7SluMqFwn2vWWOG5SYM+A+r/+O5ASphcstLMidkbtzhOP8zCpFHJbfox7 +yQwfrwpeJwhGOQEWhtmSF2X3z7sbYJ88nr9h9yjP1ABYdi3hRMiXJAFSlJgYPC2LFLWAs E6sGVarucAhrXEeB8IPfPppO0Evc7uoqmxUbTdZevBpWcFyIGyxANMVdnrUeZ1VQb4Ecbd UTfqKTraGqrZ1b3IGTgrFQ4rkFI9HMa+y8/mWLU5SMLcnDh4WTj2IJIg+B0Hellg06EK8x SYRROjXbn5SSL+0C81W6XsWK8slQJgx44yntpPItY1Ydx/ljRKaPpTVbZOsYrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677502; a=rsa-sha256; cv=none; b=Js7wSVkMnUdMRnURxaBBEdUV5WqIn3R3Hd195u2zaAWN+FrUZ2mfA1nD9sKwNcIRk3PZtO w3j+sYe/yLfZukFixAVJ0ic3zeEGVvgy+2SKtroYL5imTsdKKX9CCSld8k3/SYd3yU+Gzg b2Jb1OP+cHvN2R3+ts89soT/cCWaNcJ7nXf+amH0/jIg0m2mEy9DmwZTw5FFzUy5c6uyDX 5jYd8GSdINM1D0YW39u6mrldjZwPlPyDObMKqWcZKDnFxS3bk0xIZeVJ161c2aGLQixw0V gzm2lkEy9RbRNTFAiJeWTs0OLeBdDFVGCYrA5J4EMXKobGdRLOGIvXH2o9euRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT2624XJz11jM; Fri, 17 Feb 2023 23:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNj2ma025337; Fri, 17 Feb 2023 23:45:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNj2bv025336; Fri, 17 Feb 2023 23:45:02 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:45:02 GMT Message-Id: <202302172345.31HNj2bv025336@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: 03a85378b81f - stable/13 - LinuxKPI: PCI: implement support for more than 1 MSI vector List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 03a85378b81fcaffae5f8efdd75e2b8e10094e6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=03a85378b81fcaffae5f8efdd75e2b8e10094e6a commit 03a85378b81fcaffae5f8efdd75e2b8e10094e6a Author: Bjoern A. Zeeb AuthorDate: 2023-01-27 15:34:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:16 +0000 LinuxKPI: PCI: implement support for more than 1 MSI vector Following e9715b1c4474333ff119aba3a9a74bff91f72372 and 4b56afaf7bf4fa37bae5b26fd93ee1ff5969c1bb, implement support for up-to 32 MSI vectors. This is used by wireless drivers. This also switches msi_desc to an array in order to store per-vector information. Sponsored by: The FreeBSD Foundation Discussed with: grehan (in Dec) MFC after: 3 days Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D38222 (cherry picked from commit b15491b4773af99ce2470144ef6bcd9146cc9a98) --- sys/compat/linuxkpi/common/include/linux/pci.h | 36 +++++++++++++++++++------- sys/compat/linuxkpi/common/src/linux_pci.c | 32 ++++++++++++++++++----- 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 6a7dd1eaaa83..5fdfc3a46d8b 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -354,7 +354,7 @@ struct pci_dev { bool want_iomap_res; bool msix_enabled; uint8_t msi_cap; - struct msi_desc *msi_desc; + struct msi_desc **msi_desc; }; /* XXX add kassert here on the mmio offset */ @@ -906,28 +906,44 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, linux_pci_enable_msi(pdev) static inline int -pci_enable_msi(struct pci_dev *pdev) +_lkpi_pci_enable_msi_range(struct pci_dev *pdev, int minvec, int maxvec) { struct resource_list_entry *rle; int error; - int avail; + int nvec; - avail = pci_msi_count(pdev->dev.bsddev); - if (avail < 1) - return -EINVAL; + if (maxvec < minvec) + return (-EINVAL); + + nvec = pci_msi_count(pdev->dev.bsddev); + if (nvec < 1 || nvec < minvec) + return (-ENOSPC); - avail = 1; /* this function only enable one MSI IRQ */ - if ((error = -pci_alloc_msi(pdev->dev.bsddev, &avail)) != 0) + nvec = min(nvec, maxvec); + if ((error = -pci_alloc_msi(pdev->dev.bsddev, &nvec)) != 0) return error; + /* Native PCI might only ever ask for 32 vectors. */ + if (nvec < minvec) { + pci_release_msi(pdev->dev.bsddev); + return (-ENOSPC); + } + rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1, false); pdev->dev.irq_start = rle->start; - pdev->dev.irq_end = rle->start + avail; + pdev->dev.irq_end = rle->start + nvec; pdev->irq = rle->start; pdev->msi_enabled = true; return (0); } +static inline int +pci_enable_msi(struct pci_dev *pdev) +{ + + return (_lkpi_pci_enable_msi_range(pdev, 1, 1)); +} + static inline int pci_channel_offline(struct pci_dev *pdev) { @@ -1628,7 +1644,7 @@ err: /* * We cannot simply re-define pci_get_device() as we would normally do * and then hide it in linux_pci.c as too many semi-native drivers still - * inlucde linux/pci.h and run into the conflict with native PCI. Linux drivers + * include linux/pci.h and run into the conflict with native PCI. Linux drivers * using pci_get_device() need to be changed to call linuxkpi_pci_get_device(). */ static inline struct pci_dev * diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index ba40ded9cddf..5f3a24210c03 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -322,6 +322,11 @@ lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) pdev->dev.parent = &linux_root_device; pdev->dev.release = lkpi_pci_dev_release; INIT_LIST_HEAD(&pdev->dev.irqents); + + if (pci_msi_count(dev) > 0) + pdev->msi_desc = malloc(pci_msi_count(dev) * + sizeof(*pdev->msi_desc), M_DEVBUF, M_WAITOK | M_ZERO); + kobject_init(&pdev->dev.kobj, &linux_dev_ktype); kobject_set_name(&pdev->dev.kobj, device_get_nameunit(dev)); kobject_add(&pdev->dev.kobj, &linux_root_device.kobj, @@ -334,6 +339,7 @@ static void lkpinew_pci_dev_release(struct device *dev) { struct pci_dev *pdev; + int i; pdev = to_pci_dev(dev); if (pdev->root != NULL) @@ -341,8 +347,11 @@ lkpinew_pci_dev_release(struct device *dev) if (pdev->bus->self != pdev) pci_dev_put(pdev->bus->self); free(pdev->bus, M_DEVBUF); - if (pdev->msi_desc != NULL) + if (pdev->msi_desc != NULL) { + for (i = pci_msi_count(pdev->dev.bsddev) - 1; i >= 0; i--) + free(pdev->msi_desc[i], M_DEVBUF); free(pdev->msi_desc, M_DEVBUF); + } free(pdev, M_DEVBUF); } @@ -949,10 +958,7 @@ out: if (flags & PCI_IRQ_MSI) { if (pci_msi_count(pdev->dev.bsddev) < minv) return (-ENOSPC); - /* We only support 1 vector in pci_enable_msi() */ - if (minv != 1) - return (-ENOSPC); - error = pci_enable_msi(pdev); + error = _lkpi_pci_enable_msi_range(pdev, minv, maxv); if (error == 0 && pdev->msi_enabled) return (pdev->dev.irq_end - pdev->dev.irq_start); } @@ -982,14 +988,24 @@ lkpi_pci_msi_desc_alloc(int irq) struct msi_desc *desc; struct pci_devinfo *dinfo; struct pcicfg_msi *msi; + int vec; dev = linux_pci_find_irq_dev(irq); if (dev == NULL) return (NULL); pdev = to_pci_dev(dev); - if (pdev->msi_desc != NULL) - return (pdev->msi_desc); + + if (pdev->msi_desc == NULL) + return (NULL); + + if (irq < pdev->dev.irq_start || irq >= pdev->dev.irq_end) + return (NULL); + + vec = pdev->dev.irq_start - irq; + + if (pdev->msi_desc[vec] != NULL) + return (pdev->msi_desc[vec]); dinfo = device_get_ivars(dev->bsddev); msi = &dinfo->cfg.msi; @@ -1000,6 +1016,8 @@ lkpi_pci_msi_desc_alloc(int irq) (msi->msi_ctrl & PCIM_MSICTRL_64BIT) ? true : false; desc->msg.data = msi->msi_data; + pdev->msi_desc[vec] = desc; + return (desc); } From nobody Fri Feb 17 23:45:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT275FYYz3rxdj; Fri, 17 Feb 2023 23:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT273kf6z3HfF; Fri, 17 Feb 2023 23:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jfWgQj1L3XeqpV6SKvUAFTDHftm855Ev0twZhH/jICM=; b=K6W7M4GTI9wtQTdMI/uFz0qR9Kx+v0sr6pbfVwvhkEMeNoKJIhrXUx6OGwWutCaVJXY/Hf wOF2XEMTP9tmUNWjjpbNc1y5JCmWFJX9JSbA1VPyd7q6CetIom05Ld++E4uwHERo+aTuWZ GPuDbQXLad4+9cbS9Wq4GqAfSlbeCrEJMrPM7o52dnnl/qq8RenVo2cptFrXj3faWVaiZo lPhf2QiSnbibpz9D7mU5ZQXh/TbEzyujdaDnQzlprrBAeYIESrbdnrC3bxOlrxCxvenGkW 3oi/X7pffeClB1DSrTKsBrOaLdUhsrvYTB0YcdXpXufNeyBaAiujak7OEYlPHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jfWgQj1L3XeqpV6SKvUAFTDHftm855Ev0twZhH/jICM=; b=ulrhfpwrDy6vDVkcyDLBFzNR/R3fphepvbhex63dTs6kb+qQDFhM7lpTfgEMbEqB6fad3H bcosLVVDfn2rAnJA1iFs74gWXcX6tazTuXNJDBpZa3S7RHzhyw9neh8PTc9FCs2ZLcGDV+ F4QMdEBzq4+Y7eHD3o4nQ4iMG9FVBoAKPMahVGnxayCFtUcGZ38PtJy2cuS3knH+vXqZG6 wV2Hq7llVgCjVbgRaxcvC22Simf2Qnnuw2KTI13HSOF62xapQU5IhpL6pFJ6nX/Gel2LGx 97OKOs9LCYKdwxehND/XKRWhvxbXr3EeqK7mvLrr9JhpQUJYhTGpJbgilI1Z5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677503; a=rsa-sha256; cv=none; b=evesJmcR9WOxrA64UjmUXgZwWGFHBLu4U1ukGJlB8tHbAYqNVPoRG4XZWBseBREnY0L9hC 5qhSCmLzMcHtA/ia1STyeX6eZAqPMOf+0rI34uLcgMibSM8oZbfPb0H+vhiBpvpi2ds7yN /WYx6k5LSm68ed8BJC5ERno/a0mgxNV6HpjQ2U9FkGQ6K+PYPYWIexnKiGx7KvrbeoMF76 ZtYcCpi81Pvs4MD3LiZxd69O3JCDTx3dinWE6lFd6WL4PgaGk8xahkw+9vG/kw4/aTOaCx 2egDGAHdUI0QGyUgT8nodGWx7nxrhLOsN/xydU3nyKNFaPo4xtMRdkPlX6jgTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT272pzfz11fS; Fri, 17 Feb 2023 23:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNj3gl025372; Fri, 17 Feb 2023 23:45:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNj3Rp025371; Fri, 17 Feb 2023 23:45:03 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:45:03 GMT Message-Id: <202302172345.31HNj3Rp025371@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: 7b65e6f377ca - stable/13 - LinuxKPI: pci: add more functions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 7b65e6f377ca0005a986c59f1e31a0421d92660f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7b65e6f377ca0005a986c59f1e31a0421d92660f commit 7b65e6f377ca0005a986c59f1e31a0421d92660f Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 15:02:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:16 +0000 LinuxKPI: pci: add more functions Add a dummy pci_assign_resource() and an implementation of pci_irq_vector() returning the irq for MSI-X, MSI, and legacy interrupt. Both are needed by wirless drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D38237 (cherry picked from commit fd1a2f3dfc0e8fb20d0d397d586000bb918aab47) --- sys/compat/linuxkpi/common/include/linux/pci.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 5fdfc3a46d8b..48bdabda9f21 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1706,4 +1706,30 @@ pci_wait_for_pending_transaction(struct pci_dev *pdev) return (0); } +static inline int +pci_assign_resource(struct pci_dev *pdev, int bar) +{ + + return (0); +} + +static inline int +pci_irq_vector(struct pci_dev *pdev, unsigned int vector) +{ + + if (!pdev->msix_enabled && !pdev->msi_enabled) { + if (vector != 0) + return (-EINVAL); + return (pdev->irq); + } + + if (pdev->msix_enabled || pdev->msi_enabled) { + if ((pdev->dev.irq_start + vector) >= pdev->dev.irq_end) + return (-EINVAL); + return (pdev->dev.irq_start + vector); + } + + return (-ENXIO); +} + #endif /* _LINUXKPI_LINUX_PCI_H_ */ From nobody Fri Feb 17 23:45:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT2861vxz3rxNJ; Fri, 17 Feb 2023 23:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT284yQNz3Hkw; Fri, 17 Feb 2023 23:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2YRTxIkcWMNrVqzvoQ68NrgcflrcKAthi72U5NPWtWE=; b=cbsYwIcT9Bx3BGaHhjmoIukWFJrwlgQS94zWE552uUBPWR92lm3JP9/MU/aEpmscZ9tmAG vqryMm0RPm5tranJFQ5IEJXU0iClY/wwWfo34VpHzin3bdghID2samwbs65cv780BE6JkP DejbkcZV0CG0R8MdNbzj1qh/SULQBhaxFAQGSlThqaf1M/HPclrDIOP62KXVu9eIdtGe87 pM8doJFxFgg+Yj8NPdEnno7r7G8HsX4/48RxCKm12IQ3Tb6O4yujc/IfOn31XYF05XTQog HNVEKulZB4dp1gFX7VClvMbhPteAMF5RtuaVjkANX6yojb+nWLb7CUZ+SUzzvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2YRTxIkcWMNrVqzvoQ68NrgcflrcKAthi72U5NPWtWE=; b=cD3p6insGeBsp5cxbhm5UISdxou4T+VmHtWwXGDkBwd9MUY8nqvH8XRHh/GW8xkqLfi3jt KZ3zq2K+TY/76VWm/KcG9HgsDIF4YX2t16d+XcOPkxAxjATHd+nhQw908qDK3Ro4RMTI42 hHdTdQBxrdELtyVQKkIP15sSwNcPnP9IUmIhVvsN/IWslJJoi5LoDU0Adq0j6VTXb3AdQ7 MgdYQzwnoKP+5eeg/Q1syA1O21R2N1i9szWHszpeDAZIOI+MFKNaE37XNVujl26hQdf+FC waaxreYtpS10DEV566UmsAzJixEBZpE9diSADeZ9xUvnhIgOrGE3VzRtDm11lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677504; a=rsa-sha256; cv=none; b=qt1CG9ubVscmIQRFTpvyOR9zihLABUiU5Mt+SuniFZHu4rhXfgYD/YXa/70sycAto891YC wdUznPDFkXSOLAsTfQdGvVEwXXkY6+MrtRDBIq5r6VotYiAhbc1dkq3JP69fMrZcvXnXmG aeya7BkllEWbbbDDsdkGFhV+jeLOFk0YoiqSX4iIpbNV47xpvWaor+7HKAJTYD0tg37xCI K2r5NmG6S6OwO5Fi/dyPVzRZov+KkfgTSXBPwlLYCSotaVe/NbqBy3kNJeeILk5k7IG0zZ pXafseqrnmpSSVluuQtzarMr6n/mEjbFB57bxuWAklslnjzzMZgLMLT3IkMXAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT283nYnz123C; Fri, 17 Feb 2023 23:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNj4gn025391; Fri, 17 Feb 2023 23:45:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNj4e2025390; Fri, 17 Feb 2023 23:45:04 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:45:04 GMT Message-Id: <202302172345.31HNj4e2025390@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: 30960c51e646 - stable/13 - LinuxKPI: return an address string in pci_name() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 30960c51e646c51134fcb72e0adc881f36a41c38 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=30960c51e646c51134fcb72e0adc881f36a41c38 commit 30960c51e646c51134fcb72e0adc881f36a41c38 Author: Val Packett AuthorDate: 2023-02-06 21:50:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:16 +0000 LinuxKPI: return an address string in pci_name() amdgpu's virtual display feature uses pci_name() to match a module parameter string, and the documentation shows an example of `0000:26:00.0` for the name. In our case the name was just `drmn`, which is not actually unique across devices. The other consumers are wireless drivers, which will benefit from this change. Generate the expected string for pci_name() to return. Related to: https://github.com/freebsd/drm-kmod/issues/134 Sponsored by: https://www.patreon.com/valpackett Reviewed by: bz, hselasky, manu (earlier) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D34248 (cherry picked from commit 393b0ba25f1a54dcc3f94244933c665f1c471d1a) --- sys/compat/linuxkpi/common/include/linux/pci.h | 4 ++-- sys/compat/linuxkpi/common/src/linux_pci.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 48bdabda9f21..f8071524c9e0 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -355,6 +355,7 @@ struct pci_dev { bool msix_enabled; uint8_t msi_cap; struct msi_desc **msi_desc; + char *path_name; }; /* XXX add kassert here on the mmio offset */ @@ -475,8 +476,7 @@ pci_resource_flags(struct pci_dev *pdev, int bar) static inline const char * pci_name(struct pci_dev *d) { - - return device_get_desc(d->dev.bsddev); + return d->path_name; } static inline void * diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 5f3a24210c03..88a6b749a043 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -309,6 +309,9 @@ lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) pdev->subsystem_device = pci_get_subdevice(dev); pdev->class = pci_get_class(dev); pdev->revision = pci_get_revid(dev); + pdev->path_name = kasprintf(GFP_KERNEL, "%04d:%02d:%02d.%d", + pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), + pci_get_function(dev)); pdev->bus = malloc(sizeof(*pdev->bus), M_DEVBUF, M_WAITOK | M_ZERO); /* * This should be the upstream bridge; pci_upstream_bridge() @@ -352,6 +355,7 @@ lkpinew_pci_dev_release(struct device *dev) free(pdev->msi_desc[i], M_DEVBUF); free(pdev->msi_desc, M_DEVBUF); } + kfree(pdev->path_name); free(pdev, M_DEVBUF); } From nobody Fri Feb 17 23:45:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT2969Lkz3rxW4; Fri, 17 Feb 2023 23:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT295W8gz3Hjq; Fri, 17 Feb 2023 23:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fkVtJMiGcm+thljyPKYNFwFshPsukdXkkb/z0aCvrXw=; b=iMfqDW7/YNMAKJWsh2mQfhbihzQsB2mxW9JXWTiWLKqh1XN+K1lifGgoJiJAwEO47rgZa9 HUtv+sBD+LFLbLxrRazotmCvmfUgzpFZRbz62kuBVL/5Mu86kNTKHtEusgZRoFPJdGPXzV I8ZGmDem3Ts/CtABElRpBNTF/oMJlW9Xy8HTI6sUDHFFU0cILEv12lbOsiBAj6MNiFrqZq ezIVkaRfO74WrrZpkcu68eZDH7Wz1zVTU2xXbI3d1wveSnrFnJnJHMUQgnjhBRXOE8L9Pq QgnHBncBJkcuNcG/CuuXWENfhzm94wcC89GLTFNGqjcmA3tgyCUrbdkBonoN8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fkVtJMiGcm+thljyPKYNFwFshPsukdXkkb/z0aCvrXw=; b=Q02mvhVCTBRU2e3Rf0n1GGYMZgdlL2qsIE36Pp0E7W4g9JpDb87SiczbxjQKRozLuJLaNH MgtYx0ThsSN7gaRNOuIjX//jQGDCe5yqLe7gRsth/yKZafX/WPGorcf8BrlLDGCW5u8oeo 4g578SWxvv1vPTqFe1R211y48rwjZqU3xktqOlewKLEsiIMIvJEkCuCbX/FY74HOpaFZA5 hUYY0179Dd3LlBQZUs+HpBK2CcURnuI0bU6DkdP6TVjf+taXgqSqj/kSLkLf1dsAvJ0HDP REtijviRy5a7/9uGAqW6BI/O9eMmJ6eRvMEwTKeTNC3h/uB/k7TJPkPYWA/TyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677505; a=rsa-sha256; cv=none; b=CC+c8onMVrNfwMleYJnGFFJcrJxQw0+1DscWOQI18VB8g2Cxjt5gFGh26HiO5e36edoNnO WNj9Xj8agDN1NI3V+9RYCJNXt4c3QhkRROhwa6fa80i2TE6x/ugaQs3sGh9pgEJZG8xlE4 bo+Pmcp2yNKzkaYe54y5zfa9q+8tzUTk9vOYLwNdLEKWaB2kxBO9CKnK8CkiSB8gGr1ToN 3WBSoYpJvfdiwNMnPb+RjmoNBpClGsGfii0UUk2Mw1uKajU4D0IsQVAAmhLYVbldITTe1i jvMsfncSytfpMGcLOnh71PpSfQSjVwqqDyA/jojhhDjoY8mJ0pHUIqa/PWE5aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT294YC5z11tZ; Fri, 17 Feb 2023 23:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNj5b2025410; Fri, 17 Feb 2023 23:45:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNj50c025409; Fri, 17 Feb 2023 23:45:05 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:45:05 GMT Message-Id: <202302172345.31HNj50c025409@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: c27730a23824 - stable/13 - LinuxKPI: dummy: remove files which have implementation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: c27730a2382488c66edcba84d9639b49d0cd9f2f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c27730a2382488c66edcba84d9639b49d0cd9f2f commit c27730a2382488c66edcba84d9639b49d0cd9f2f Author: Bjoern A. Zeeb AuthorDate: 2023-01-29 17:52:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:17 +0000 LinuxKPI: dummy: remove files which have implementation Remove former dummy/ files which now have an actual implementation in common/ . Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38269 (cherry picked from commit 78cab57ac6aad5c4c9334ca99ed89cbc3579ffff) --- sys/compat/linuxkpi/dummy/include/asm/unaligned.h | 0 sys/compat/linuxkpi/dummy/include/linux/mman.h | 0 sys/compat/linuxkpi/dummy/include/linux/nospec.h | 0 sys/compat/linuxkpi/dummy/include/linux/platform_device.h | 0 sys/compat/linuxkpi/dummy/include/linux/suspend.h | 0 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/asm/unaligned.h b/sys/compat/linuxkpi/dummy/include/asm/unaligned.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mman.h b/sys/compat/linuxkpi/dummy/include/linux/mman.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sys/compat/linuxkpi/dummy/include/linux/nospec.h b/sys/compat/linuxkpi/dummy/include/linux/nospec.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sys/compat/linuxkpi/dummy/include/linux/platform_device.h b/sys/compat/linuxkpi/dummy/include/linux/platform_device.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sys/compat/linuxkpi/dummy/include/linux/suspend.h b/sys/compat/linuxkpi/dummy/include/linux/suspend.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Fri Feb 17 23:45:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJT2C0BZhz3rxjx; Fri, 17 Feb 2023 23:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJT2B6TQVz3Ht4; Fri, 17 Feb 2023 23:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ScYsCTNtNc8A8JyLzkzgCdz11E6s4KwsirJizoZRIng=; b=DbUcadTmwl9d5gYxqKZTwmzvm81r/Vel3HlcuEWMkO2FpxML2m+YBdWA+9ZaU+ZzdEM3wb dqNWozemk24jurOyNT+G3JnA5qw/KEidkjZ5JCLKkQ90tn8OYmOJDZdyZQvGL+wVtjqXVv GQ/7qz9rNUBCXj9wO4Hxr/mXqcxCHvF1aupPSzozgoD/ZkWK7oOALA/pfm8/sM18UsY5gK bD42SnK3ke6p58wPf1eeCuUrg2+SV7d1yrj/AljKW0HIkMJEbCJ/Z91M9M+4KPRBF8iZ8K j2kSqwU2Ebx/n8WYQHYWCobizHJ/bM3ApqC3Jt9UKZv7CcM1XF6PP92yGTRPxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ScYsCTNtNc8A8JyLzkzgCdz11E6s4KwsirJizoZRIng=; b=Q3ijF0+FuuKE0pj/edCOZmTJwFUxwKYyA5AAhZZpZBYHkGogS6ev40UUXaMGgN0z//YX3d xWNd7Gi7hTyojEC6YQlyTLm6hyHTs8LpkXOvNldpDMTPLEdfzTZ1BlQsNcS1GZ9Il8KuIc oUlX3BX5WjR6g9m/Z/fAAVenofBDERALu1FcRtrLz2OssW0AE24JzplM4SUL3tDF/icQe8 A1L2B+AUk+ZYbIJimMHCnmXZH0lXgFpps8xRA7U4Y5w9l5+poUfXViB+pCXHNQAa3rokph 4nlhUpaEdwkHWZc2HApGJeUUsWEnGLihJezhSWHxTIMDdsNugdJNn5aqArZL6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677506; a=rsa-sha256; cv=none; b=IoNtB0IC12FGXuKPUROTws4X4NAoZjQB1BJQA73iP/93i847ewwRu9G4dU8/hcvzILmNrj z2+lxJgptsQd9VnF7xqT4QfaQNTZF3P9erdfl5Yht3qh6RHE5JEbs6cMpo5AN7QXPbHWCM AOne0nAZBPRQT38mVZvy/p3JTNB6AXxrnVhfv+clpMpuHVFtd9Eq92o1UDo64wxZNmH+BO 3/GZBHIrIUNqpG/jTON1IvofsuwG1sahe9wbd7rSSKr2Qtue9jsKXrA56GYr3TDHs8ljSL J0FMe/1gj+kunPX5cMVtaSKz+Kul3H6Dl/qOOd7j9veCqFUgkKLXVJzMPgOz9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJT2B5L6wz11rG; Fri, 17 Feb 2023 23:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31HNj64t025429; Fri, 17 Feb 2023 23:45:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNj6NC025428; Fri, 17 Feb 2023 23:45:06 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:45:06 GMT Message-Id: <202302172345.31HNj6NC025428@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: 5ca371f4f536 - stable/13 - Bump __FreeBSD_version to 1302502 after LinuxKPI changes. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 5ca371f4f536f9ee9d6c9fb178bf1f7f6de33216 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5ca371f4f536f9ee9d6c9fb178bf1f7f6de33216 commit 5ca371f4f536f9ee9d6c9fb178bf1f7f6de33216 Author: Bjoern A. Zeeb AuthorDate: 2023-02-17 23:40:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:17 +0000 Bump __FreeBSD_version to 1302502 after LinuxKPI changes. Help out-of-tree consumers detect changes to LinuxKPI pci and 802.11. --- UPDATING | 4 ++++ sys/sys/param.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index a96d4b38e240..60f583ac26cf 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,10 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20230217: + Bump __FreeBSD_verion after various changes to LinuxKPI pci and 802.11 + in order to help out-of-tree consumers to deal accordingly. + 20220701: LinuxKPI pm.h changes require an update to the latest drm-kmod version before re-compiling to avoid errors. diff --git a/sys/sys/param.h b/sys/sys/param.h index 9b33cfb5a062..5d97c0b2dffb 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1302501 /* Master, propagated to newvers */ +#define __FreeBSD_version 1302502 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Sat Feb 18 06:09:54 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJdZB5nsWz3rR9P; Sat, 18 Feb 2023 06:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJdZB3kXhz44jr; Sat, 18 Feb 2023 06:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676700594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x2V9f0BVWfoDEqXw9O9fsKT3hsaEck0cWfD6IyQs51Y=; b=yNMg03vlSCuGmW3nIwPfIl8vBzJtl4MQXIhA3kGuFC1yeojVYjj5BQwl02fKVtTJMsAPYU N5RIaBVgb6n1D3QfuUNEtEHfkrWV1fte+eT+7lc8f/1n8zB+xWS8qGibN+WEvkTovw637p UmpbyCZNw8dS95pfbE/XTZgDpJzkRC0cepK+C/Db18C7XcQtPsWxwGT5TnNKWXC32MlOpO 52vdYl0Nr8s0ULOPT+H9IcVxKZpslbuV0optETcylEvNHKL7TpodvS4rpgTCdLK3SLeWff bxE7PFhSXgvzZ1spEJZHRFtRHNP/7CsMB3awP6kcMlNwgYqHnJ4nmhizByqoYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676700594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x2V9f0BVWfoDEqXw9O9fsKT3hsaEck0cWfD6IyQs51Y=; b=xx2fMLRD7+GLA6U9VTAeBGKxyc4ayICdcCrUPve1f5FBcyiwY//jUX2R4HdiKmJi8/3f2H mmB5JxaVc7sd9aW1Q1ibXGLkYrOAnakSNUC19XHPtIxBMZ0mwM3KQOKWDmfxez/5ZohaD6 GHjxraSCQm3gupwCfbdvZpqlsMDv3CaqPcS3OF+4g56ZJhPDIVENjkTL1pBke5gBOrUoH9 LPmChwIrGU+F7FMacJwtcwBeuCjiyTtROKcWirr1qZYDCbpoKOnOBdVP/6l/l8NB64IFnj aGwZqlatOnjUygu1y57v7K7jVoSs/NtV7QakWpm+OtyL0Iw++cja6ESpFWRFxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676700594; a=rsa-sha256; cv=none; b=x+0lSpjCzxREXF9UrXOP3FhnFRvm8qKYPHWPKjas1TcimsTRpxs4biQcZT+s7pLgTDFlfd Sd6v4q8uzrmLMn5OjgKq8ufsQXiuspKESgbm2kVGxo/KCBdxFMMrty7l/8i72NKMH3AUgD SFY0+GAtH9Ru+kFH/u6eATftoOoQ3yaYzZtQt4FHxTm8pS/Zb1MA+EbXQ8i3DV4okEH/2/ qy2Bp0Zytbz/chHtrsUD/RpGyFVjsoS6oyRYAdODRiFLQeqsWkdgNyvLioAPgu8grSxi1Q bGBr2pTrCQH9kWwJISv2WdWFuboBgfI3XUhNFyEEDpONtCfKMTqWrcqElip1NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJdZB2k6Zz1B2V; Sat, 18 Feb 2023 06:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31I69sVY067811; Sat, 18 Feb 2023 06:09:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31I69sCi067810; Sat, 18 Feb 2023 06:09:54 GMT (envelope-from git) Date: Sat, 18 Feb 2023 06:09:54 GMT Message-Id: <202302180609.31I69sCi067810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 1ab869503314 - stable/13 - usb: Remove unused member in struct mos_softc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1ab8695033149213e49af0897e2e305649c52817 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1ab8695033149213e49af0897e2e305649c52817 commit 1ab8695033149213e49af0897e2e305649c52817 Author: Zhenlei Huang AuthorDate: 2023-02-15 05:07:19 +0000 Commit: Zhenlei Huang CommitDate: 2023-02-18 06:05:52 +0000 usb: Remove unused member in struct mos_softc Spotted by jhibbits in D37812. Reviewed by: #network, glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38581 (cherry picked from commit 3bafe73affe37de3e94d91d4c1310f1272375970) --- sys/dev/usb/net/if_mosreg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/usb/net/if_mosreg.h b/sys/dev/usb/net/if_mosreg.h index b8034feb8e44..993526b8d502 100644 --- a/sys/dev/usb/net/if_mosreg.h +++ b/sys/dev/usb/net/if_mosreg.h @@ -160,7 +160,6 @@ struct mos_softc { struct usb_ether sc_ue; - struct ifnet ifp; struct mtx sc_mtx; struct usb_xfer *sc_xfer[MOS_ENDPT_MAX]; From nobody Sat Feb 18 06:11:51 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJdcR4mbwz3rRbX; Sat, 18 Feb 2023 06:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJdcR4L5zz45Zk; Sat, 18 Feb 2023 06:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676700711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KK6bhzXukceciFkN5rYsiMblvsTPsLKdc/RR8Aq5Xoo=; b=I2iZCuQHXLJ+pc+JR3Wsf0aslV5ebwtYOHA0HzblX1CkpOderg2N61xudVwD/E/vkg+01+ vZJa1mmGeTXKUHjISBFgKKL4Vrd0cjWLe9Sh2+blVx4ucpyfSuzqmHLd///FAmjUYtmDtw 1ieCNPqM71OqOuEGQr57PHtuRCAtxdNglW5YMgJo5tCXGe8t2oh/jzzFDKKVEabqO+vMo6 +mSEyFjlfpzREg/oaJpJNJkBn2nVbZIv16vuUrJlDzIHCUjnizcMRxR7WaStpBwgCPNODj p9blZ+FmqGIfD1veGF4yUuQUcsnG9XvUbCl63tshWyDA/Xli34MNKadSPH+QNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676700711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KK6bhzXukceciFkN5rYsiMblvsTPsLKdc/RR8Aq5Xoo=; b=vHvKjPJ5Vwyx+0siFAkRkeFjLtfXplCQ7nO7uDQmRCMNYPrvE2nB8E2UOwUlUCgC+t0Uea Fbxk05SHIPdxYEGsOHgljH0j+sIEZODjesHKi5r029RMVQuErcn+kA+u6rUT2OwIgUmejo p6xX7wqu3mIqMGwbWqNzGMfgaye3C+CxcbzibSnJ8wPVnW45JD5OI0NqzwmULP/X2f/pJu kk2dzoiw0njvXQOcHaNELgHiSVOl0Xp1XAemF/qZlzrTq50NlS1aRk+nOkACEFF9xk2FfZ uivXIRnq0yvuoihu+LRZCax6fDGAsBkR3NXXY+gTuTEiSUSFpHNV1iC0tJJXYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676700711; a=rsa-sha256; cv=none; b=oNw8aZ0ClCI6a6YT5KyE7QYICYbA/FEM1E7FSH9ZgixTgz3qSIx+Q3/GQ6m8pxxluwZYnY 9LrogEHBQhymae6ZZu3blPT+ZroUokXsjxIIrrC44zXTt+30E0ORJdKwrSVy1oz0XEwVY2 LAnKsfI9bZE6c3AsTxnyqMTXAAs8C4vWirvmPBy5PrCp4Z164RzeIqKGsBn8u3e0TpAzu0 wEgGf5sw0sRz8QjDYTleSuaNC3XdIy8nEuEZt4+o4bSq/yF1wZrqSXxQ0nLTBMvI92GIXu petpcKNUXcl2XBhPnt9CxxoKYQ/FPqUowAoIbKg0ObE+M2LmfVwQKoVtVvDwxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJdcR3Nsdz1BNH; Sat, 18 Feb 2023 06:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31I6BpSX077463; Sat, 18 Feb 2023 06:11:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31I6Bplr077462; Sat, 18 Feb 2023 06:11:51 GMT (envelope-from git) Date: Sat, 18 Feb 2023 06:11:51 GMT Message-Id: <202302180611.31I6Bplr077462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7d1f66652f5c - stable/12 - usb: Remove unused member in struct mos_softc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7d1f66652f5c4bb3809547a6e568b78a4354e7fe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7d1f66652f5c4bb3809547a6e568b78a4354e7fe commit 7d1f66652f5c4bb3809547a6e568b78a4354e7fe Author: Zhenlei Huang AuthorDate: 2023-02-15 05:07:19 +0000 Commit: Zhenlei Huang CommitDate: 2023-02-18 06:07:48 +0000 usb: Remove unused member in struct mos_softc Spotted by jhibbits in D37812. Reviewed by: #network, glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38581 (cherry picked from commit 3bafe73affe37de3e94d91d4c1310f1272375970) (cherry picked from commit 1ab8695033149213e49af0897e2e305649c52817) --- sys/dev/usb/net/if_mosreg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/usb/net/if_mosreg.h b/sys/dev/usb/net/if_mosreg.h index b8034feb8e44..993526b8d502 100644 --- a/sys/dev/usb/net/if_mosreg.h +++ b/sys/dev/usb/net/if_mosreg.h @@ -160,7 +160,6 @@ struct mos_softc { struct usb_ether sc_ue; - struct ifnet ifp; struct mtx sc_mtx; struct usb_xfer *sc_xfer[MOS_ENDPT_MAX]; From nobody Sat Feb 18 07:25:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJgFn51MLz3rX2F; Sat, 18 Feb 2023 07:25:49 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (hmo.in-vpn.de [IPv6:2001:67c:1407:60::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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "nuc.oldach.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJgFm2RrNz49CN; Sat, 18 Feb 2023 07:25:48 +0000 (UTC) (envelope-from freebsd@oldach.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@oldach.net designates 2001:67c:1407:60::1 as permitted sender) smtp.mailfrom=freebsd@oldach.net; dmarc=none Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.1/8.17.1/hmo04jun22) with ESMTPS id 31I7Pc5F097958 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 18 Feb 2023 08:25:38 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.1/8.17.1/hmo01feb23/Submit) id 31I7Pchk097957; Sat, 18 Feb 2023 08:25:38 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202302180725.31I7Pchk097957@nuc.oldach.net> Subject: Re: git: ebc914f942f6 - stable/13 - ice(4): Update to 1.37.7-k In-Reply-To: <202302172311.31HNBXA5080016@gitrepo.freebsd.org> from Eric Joyner at "17 Feb 2023 23:11:33" To: erj@FreeBSD.org (Eric Joyner) Date: Sat, 18 Feb 2023 08:25:38 +0100 (CET) Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: freebsd@oldach.net (Helge Oldach) X-No-Archive: Yes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: inspected by milter-greylist-4.6.4 (nuc.oldach.net [0.0.0.0]); Sat, 18 Feb 2023 08:25:38 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Spamd-Result: default: False [-3.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; NEURAL_HAM_SHORT(-0.90)[-0.903]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; FROM_NO_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-branches@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; RCPT_COUNT_THREE(0.00)[4]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[oldach.net]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4PJgFm2RrNz49CN X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Eric Joyner wrote on Sat, 18 Feb 2023 00:11:33 +0100 (CET): > ice(4): Update to 1.37.7-k # man ice No manual entry for ice # whatis ice | head whatis: nothing appropriate # It seems the manpage also isn't in HEAD. Kind regards Helge From nobody Sat Feb 18 07:30:26 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJgM91s9qz3rX3D for ; Sat, 18 Feb 2023 07:30:29 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJgM86t8Wz4BrT for ; Sat, 18 Feb 2023 07:30:28 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f42.google.com with SMTP id bg7-20020a05600c3c8700b003dc57ea0dfeso178619wmb.0 for ; Fri, 17 Feb 2023 23:30:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=6smCZ/iSWKHTg03rzEDde632TvTCQkvtTq2RsAoZI5w=; b=vt+B776pCWg4k9+7yNHohSv3kCxT+3VW9yXVwLnGpoI7ds12qWAMArmcnonnogyxdA 8RugmhCJzo5JC997jnwR1SzLK7LO4l028ei1uf+49t8du5Blx9MVeer+jF8HLsWHLaVS WB7nYunhDg1qsoDJcRCA+rD0rhnsBhOBbNrrdYhJQomBgiS4kjECBOR8WKHX7ifzNyV5 Uge7/MW+YXFWyjUZb9UeICNbRDqR181Txwaa3/KDTCZ9q5RkD9NCNAiH0tL9MnTv3ZIj F5LBvgqz9ic7067JXmTbs5ZF3qOZJh5zU81txFbeGEKPEp9KqjWLExTfR667vTDk/QMn o8MA== X-Gm-Message-State: AO0yUKUq9QUlbqxPKIYv0EMkBGdkYB2y71aGTmPLI2oO2kOKWhBP9G6b vCiLK/agRiA81mc2FRhjjmZxkQ== X-Google-Smtp-Source: AK7set8WafONEHq+Puc98jbhIwsZ7123JTTirTBLpau7cM1PWs/Mruc35tiAnePu6czWZs5Ld4WDgQ== X-Received: by 2002:a05:600c:501e:b0:3df:9858:c03a with SMTP id n30-20020a05600c501e00b003df9858c03amr6652729wmr.15.1676705427494; Fri, 17 Feb 2023 23:30:27 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id p15-20020a7bcdef000000b003e21356bddcsm7620961wmj.33.2023.02.17.23.30.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Feb 2023 23:30:26 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: ebc914f942f6 - stable/13 - ice(4): Update to 1.37.7-k From: Jessica Clarke In-Reply-To: <202302180725.31I7Pchk097957@nuc.oldach.net> Date: Sat, 18 Feb 2023 07:30:26 +0000 Cc: Eric Joyner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-branches@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202302180725.31I7Pchk097957@nuc.oldach.net> To: Helge Oldach X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4PJgM86t8Wz4BrT X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 18 Feb 2023, at 07:25, Helge Oldach wrote: >=20 > Eric Joyner wrote on Sat, 18 Feb 2023 00:11:33 +0100 (CET): >> ice(4): Update to 1.37.7-k >=20 > # man ice > No manual entry for ice > # whatis ice | head > whatis: nothing appropriate > # >=20 > It seems the manpage also isn't in HEAD. Because there isn=E2=80=99t one?.. Jess From nobody Sat Feb 18 07:43:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJgfc4GTKz3rYCB; Sat, 18 Feb 2023 07:43:52 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (hmo.in-vpn.de [IPv6:2001:67c:1407:60::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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "nuc.oldach.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJgfb4dyzz4CvX; Sat, 18 Feb 2023 07:43:51 +0000 (UTC) (envelope-from freebsd@oldach.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@oldach.net designates 2001:67c:1407:60::1 as permitted sender) smtp.mailfrom=freebsd@oldach.net; dmarc=none Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.1/8.17.1/hmo04jun22) with ESMTPS id 31I7hn7v004677 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 18 Feb 2023 08:43:49 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.1/8.17.1/hmo01feb23/Submit) id 31I7hnb4004676; Sat, 18 Feb 2023 08:43:49 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202302180743.31I7hnb4004676@nuc.oldach.net> Subject: Re: git: ebc914f942f6 - stable/13 - ice(4): Update to 1.37.7-k In-Reply-To: from Jessica Clarke at "18 Feb 2023 07:30:26" To: jrtc27@freebsd.org (Jessica Clarke) Date: Sat, 18 Feb 2023 08:43:49 +0100 (CET) Cc: erj@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: freebsd@oldach.net (Helge Oldach) X-No-Archive: Yes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: inspected by milter-greylist-4.6.4 (nuc.oldach.net [0.0.0.0]); Sat, 18 Feb 2023 08:43:49 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Spamd-Result: default: False [-3.18 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.99)[-0.988]; NEURAL_HAM_SHORT(-0.89)[-0.892]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-branches@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_NO_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; DMARC_NA(0.00)[oldach.net]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4PJgfb4dyzz4CvX X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Jessica Clarke wrote on Sat, 18 Feb 2023 08:30:26 +0100 (CET): > On 18 Feb 2023, at 07:25, Helge Oldach wrote: > > > > Eric Joyner wrote on Sat, 18 Feb 2023 00:11:33 +0100 (CET): > >> ice(4): Update to 1.37.7-k > > > > # man ice > > No manual entry for ice > > # whatis ice | head > > whatis: nothing appropriate > > # > > > > It seems the manpage also isn't in HEAD. > > Because there isnt one?.. Yeah, I was misled by the mention of "ice(4)" then? Kind regards Helge From nobody Sat Feb 18 11:55:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJnFJ1yC0z3s7Kn; Sat, 18 Feb 2023 11:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJnFJ1XHYz3CM3; Sat, 18 Feb 2023 11:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vZEGYSYnBNPGfW7BuqfJJ1KKRQkA5ol0H/bKiDoA8vE=; b=llac1s+ozrVPOvV7HGWlhL8NhYZft6U3Mmw5EjzdkuztOx6XIKtGlXucLPbmLb6k7iVq+E WXFqrmudd22LjwiDADZfbZvfCTLloap9Sl8MGq9DOiBXoDdZHCdwzxggZi8/VjiHxcxXgc 81RIZ1F/D2ojNy7QNVlQZ5Go997qodrTClpZBuAQxYCw19ma4x8nTqsPsLLVTrcX9Ctvl+ raoEJpADZtgxSCYyw+DZTwc4bieGjHkp+jJ02x1LzgfP65m/YevK4pabNSor07xunOSHA0 q9Y4ukoY32DHkSqLLASpdzw1eu2bmz9TYMrfyzMLT8NghK/wDfy9PUJp5ekatw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vZEGYSYnBNPGfW7BuqfJJ1KKRQkA5ol0H/bKiDoA8vE=; b=QfEExzfwd/7U51CVb92gpUGJJJJtvOaofsLq6B0s1bUr3IK2Bc/qWAM7C1boDUi3nmbPh1 93TS/YySoqUXCBJewJXfMEslv+7fi+206Fj/qms8jAzlfzavwLnWNhyaNvnOriN5VPHQDM Bk8Md9aqKzJSnn+LnLhKfDhQIh1MUIndfAoyD9l2Ownin6J2mGZTnc93qFo+EbcuzP7BOk Udxbtj1aPQHDhmtwpKnnfNiRNN83tKrRboZ7C9wF1E42FP//7ncDKDLFroR9sNPG0KFZy5 OkBKudpnfoHrRI3DMZP5ss7HLDrJxOjKvMQGYDWBYm+bxUVKvEOJ0Ub5LkWLuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676721348; a=rsa-sha256; cv=none; b=QZMJTgtHbm2LYVrHH/PoJI1h4CqJHK/UChLfnpsew5jEiRuttPVSPdz8LhDI4xTgxmPjhL XjqwAY3IoTH7q/kvn6EzScY6meSPqllffgWhB7RrNTrEqIJtqJOl8RHf9ET3O5FO7VWE4t rKFaVgJx5rVE80Dyit8Bzk+BtEmhjkHzsF2GfnVSWaR/UTyctOknI6yY/Yh3aWdMfF9qQT +G3eLvN5EOxhsgyolNycJ84CJKPJjlT8SB2s7kG1x/u4HFT/hPvjqmFAH+p0Yq6hzPXfc0 QwqxaHEDz9qRFn7cqQ2VhIRizJvgYYxqeDGwhmrtJ9/xj2WczhkbN1Ovq78r6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJnFJ0cxbzMP6; Sat, 18 Feb 2023 11:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31IBtmNK069528; Sat, 18 Feb 2023 11:55:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IBtmeQ069527; Sat, 18 Feb 2023 11:55:48 GMT (envelope-from git) Date: Sat, 18 Feb 2023 11:55:48 GMT Message-Id: <202302181155.31IBtmeQ069527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 13e997289240 - stable/13 - netlink: Zero-initialize mbuf messages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 13e997289240c4697536f904167720a29abf7a58 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=13e997289240c4697536f904167720a29abf7a58 commit 13e997289240c4697536f904167720a29abf7a58 Author: Mark Johnston AuthorDate: 2023-01-17 14:36:54 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:53:54 +0000 netlink: Zero-initialize mbuf messages Some users of nlmsg_reserve_object() and nlmsg_reserve_data() are not careful to fully initialize pad and reserved fields, allowing uninitialized bytes to leak to userspace. For example, dump_nhgrp() doesn't set nhm->resvd = 0. Meanwhile, nlmsg_get_ns_buf() and nlmsg_get_ns_lbuf() zero-initialize the buffer, so nlmsg_get_ns_mbuf() is inconsistent. Let's just make them all behave the same here. Reported by: KMSAN Reviewed by: melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38098 (cherry picked from commit d91be0f1211b0196a0087cdfa237a6a0d2a43b65) --- sys/netlink/netlink_message_writer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 37414703c6f6..6573394eb881 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -215,6 +215,7 @@ nlmsg_get_ns_mbuf(struct nl_writer *nw, int size, bool waitok) nw->malloc_flag = mflag; nw->num_messages = 0; nw->enomem = false; + memset(nw->data, 0, size); NL_LOG(LOG_DEBUG2, "alloc mbuf %p req_len %d alloc_len %d data_ptr %p", m, size, nw->alloc_len, nw->data); return (true); From nobody Sat Feb 18 11:55:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJnFK364Vz3s7V6; Sat, 18 Feb 2023 11:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJnFK2HGyz3CMc; Sat, 18 Feb 2023 11:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=untMvK1kQj28LK/GIPu4D3FNJgkF3pl3xJ4QIdlP0Es=; b=TfQOoFdDSGRZFClUvGIG1IUmnVjcktArjBb4xL8LyBLj1S3SkHnBFbK7+ts6sKWhO2lB7R uoMF3CHHPHpUBkNpTgEcef4BwpLalNPKmU95sUYhd9f+UiPqhnhRFObwJ3A/dBSCFXPvHV zHt0GFplS4rANYTrS3BjCjt2h2Gtzx+Sn42IIoFG8MQWLs28+8xdhEBhJK4R3omktoS+t9 103rMXhHMNPuc0mOIAri7YIIc6WpHVkgejkzsMbX5JlWf4H11Y0mCoXjpipUZjwJ8yHkdd ZR3iP6kXBYJUpjkcExDkOSOloD79inFMho95zy9kPy42W+/yN+B2nooOi0R6Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=untMvK1kQj28LK/GIPu4D3FNJgkF3pl3xJ4QIdlP0Es=; b=iMS9ISA57YAOXJXNC7EL93zBmtgLmwWAtDZWX2noo2iNVLnCqX9heORgNtgT+0NGJEwJYh ibbVw3mquEmsdJuzHGai8leb2eD3lIfF8sW/Cj/OO/g1WvXB/dUWB1S7a3aWuxLjZYa6nt yPvv/0IRhYvyei64Ju6k04K6mg6jpCVwLgwXVn42CoQvXRenfTG2xTqpgQAIyve90wliCu 8+ja2WQQ6E1sLqF0xlnPrvpMrMIC3GMPT0sJjaFe91ZiPbdLC2VbDUgYEaJpItGMdIz/y+ Daq+dJkVweBOZb1Gr0JNf2sEOkIvK7N1F3Dsu9pq0lpnV+ibA7lsbwLlRja4LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676721349; a=rsa-sha256; cv=none; b=dTcuLYgh0KcyI4ORbW4py7cQbE3ME7tY4mwoFDywhcklIApRd7NUrNyo6QeNkXJLTR5sZA 8Eh6cljEstXWhH0rwncvSdjIs9nYAfWIiWXKZeDg7p25i5WRpPzvC/ml0FTMI6KnGiSVMz vkPaLelL99rj7fAE1WzhO1kJ5ou5qNk4g5wPUYqYbg+KRQF7WXucBR1D/ksPFD19+gNzRR 1c67pB8icAaVqZH8Pu6AB+APXNOQQXLB0w+bOgfK4vREniPraP4FUByQPbzKtywxypJ/Yd RfG6zug5D+bASc6plb+ssK9vM26XhqR7uq+XYlzCCUplvZKugeskM/MrP2lJJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJnFK1HfTzMgS; Sat, 18 Feb 2023 11:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31IBtnLk069549; Sat, 18 Feb 2023 11:55:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IBtnXl069548; Sat, 18 Feb 2023 11:55:49 GMT (envelope-from git) Date: Sat, 18 Feb 2023 11:55:49 GMT Message-Id: <202302181155.31IBtnXl069548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: a672b35811a6 - stable/13 - netlink: Make the writers function table static and const List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a672b35811a67b57cf0fc1bee8d7c5b1785f1bee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=a672b35811a67b57cf0fc1bee8d7c5b1785f1bee commit a672b35811a67b57cf0fc1bee8d7c5b1785f1bee Author: Mark Johnston AuthorDate: 2023-01-17 14:37:21 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:53:54 +0000 netlink: Make the writers function table static and const No functional change intended. Reviewed by: melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38099 (cherry picked from commit e262610007f01398630dc8ce7bf404dbcfd6350c) --- sys/netlink/netlink_message_writer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 6573394eb881..0d27d5d0d47c 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -368,7 +368,7 @@ nlmsg_write_group_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) return (true); } -struct nlwriter_ops nlmsg_writers[] = { +static const struct nlwriter_ops nlmsg_writers[] = { /* NS_WRITER_TYPE_MBUF */ { .init = nlmsg_get_ns_mbuf, @@ -394,7 +394,7 @@ struct nlwriter_ops nlmsg_writers[] = { static void nlmsg_set_callback(struct nl_writer *nw) { - struct nlwriter_ops *pops = &nlmsg_writers[nw->writer_type]; + const struct nlwriter_ops *pops = &nlmsg_writers[nw->writer_type]; switch (nw->writer_target) { case NS_WRITER_TARGET_SOCKET: From nobody Sat Feb 18 11:55:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJnFL41s4z3s74X; Sat, 18 Feb 2023 11:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJnFL3QPdz4lGd; Sat, 18 Feb 2023 11:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CWOwbC/8Q+E2s85kRqePBG8FEBCQLG4hzGaPclM6dLI=; b=dUCSALySLmFT16Fqoz43WjGQlhXsORIUmv8iQQcTCTLxUMqxT1TCK5AcFvDobRlUIteMkd Di/OSU9LS22Kh/oS8topZA3gdkl12Tg/WnFekyE8UjnqRXCaLc17uygbd5miEU4NNov8My AWrcqOmTBKwihlevmdNMFBKK8FhPAf1UW1QwpFOUUCQprae5UQMxZSyrwaxyuChLHq4WS4 w88k8L3AK580T21zFWm+QtXsMPtuEWF7FKPN6CQmZK4aKx6uBF+pw0dXL2DDHwtkZmPsvy 95NxN3bkLgujJRVRehbw08az+AKkVCLAp/zvOR6oCyAq0ehMeycp6zWKxcQQ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CWOwbC/8Q+E2s85kRqePBG8FEBCQLG4hzGaPclM6dLI=; b=Zfh4cxRO2qFQnyIOB2FtnK44ewofDAuH+yYWDTOHjOltEJG4wgugUsyPQleu0dohFmCx84 AoFFVzQzoCNT+9308m7a78kJAZSpKwtB8O+XzzZzvoYfowQZkB38DmidtGbksPBEiNX615 9M2f8AMfZ1u8F45syGVPA6CIpQkaPn0Mpb+FN4apLuEaIj0Q/lmS9NciV10V6Y6NmofeHw MnNCk2ZU/EN5i0GZlziAZrvvf1kIgfO2RfZNl+tGN+3RwOe1byfK0udG+l5J3APycTfYC6 i6l7bOsRsYLu+xq7SwHAxMj6H72NE1s0rPQaeBbHbiPdVFIAyS1HRU8nsjbojQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676721350; a=rsa-sha256; cv=none; b=FKJAduA2HhL0ulyHN0rh+C4RHZY0AV53DbqX83n61KLSoKOI6tyyTZ3tmGA0cGPuzGxT0z j8OyhA2PAMlQ3S6A8O1DfsujoLQLL2n2aOPwu26Dv1aPkAAK3IESv1o2FZocDTh+SQW4dc Spk8p5y6OLz0GcPJRX1ZH6iXgR7taTI0XKXfpxFVxv1IiSET3bZ6oLCk2VYI+53g/Oxstm tLyWIaHnyQVHk1EKHJ8KKiIp6qirYK4Tok7R/DSt51wt/9eibh+t+BVRGTJT33IdLvQcWJ CbdzHhBMLqZ1klvDwpJ3CgvP0DRvNU/OAc8hw2xFOqOYUC3rv236n1WSBhIhRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJnFL2RkCzMZl; Sat, 18 Feb 2023 11:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31IBtouh069573; Sat, 18 Feb 2023 11:55:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IBtovv069572; Sat, 18 Feb 2023 11:55:50 GMT (envelope-from git) Date: Sat, 18 Feb 2023 11:55:50 GMT Message-Id: <202302181155.31IBtovv069572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: c548078f291b - stable/13 - netlink: Fix indentation in netlink_message_writer.c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c548078f291b6f1b82804604b6be68dfc1e070c2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=c548078f291b6f1b82804604b6be68dfc1e070c2 commit c548078f291b6f1b82804604b6be68dfc1e070c2 Author: Mark Johnston AuthorDate: 2023-01-17 14:37:33 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:53:54 +0000 netlink: Fix indentation in netlink_message_writer.c This file is indented with a mixture of tabs and spaces. No functional change intended. Reviewed by: melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38100 (cherry picked from commit 35472cb60ab95b4d99981492a87443022181eac2) --- sys/netlink/netlink_message_writer.c | 135 +++++++++++++++++------------------ 1 file changed, 67 insertions(+), 68 deletions(-) diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 0d27d5d0d47c..2187c40f2786 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -130,7 +130,7 @@ nlmsg_write_socket_buf(struct nl_writer *nw, void *buf, int datalen, int cnt) free(buf, M_NETLINK); int io_flags = (nw->ignore_limit) ? NL_IOF_IGNORE_LIMIT : 0; - return (nl_send_one(m, (struct nlpcb *)(nw->arg_ptr), cnt, io_flags)); + return (nl_send_one(m, (struct nlpcb *)(nw->arg_ptr), cnt, io_flags)); } static bool @@ -153,7 +153,7 @@ nlmsg_write_group_buf(struct nl_writer *nw, void *buf, int datalen, int cnt) if (!success) return (false); - nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); + nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); return (true); } @@ -182,7 +182,7 @@ nlmsg_write_chain_buf(struct nl_writer *nw, void *buf, int datalen, int cnt) free(buf, M_NETLINK); return (false); } - return (true); + return (true); } @@ -203,12 +203,12 @@ nlmsg_get_ns_mbuf(struct nl_writer *nw, int size, bool waitok) struct mbuf *m; int mflag = waitok ? M_WAITOK : M_NOWAIT; - m = m_get2(size, mflag, MT_DATA, M_PKTHDR); - if (__predict_false(m == NULL)) - return (false); - nw->alloc_len = M_TRAILINGSPACE(m); - nw->offset = 0; - nw->hdr = NULL; + m = m_get2(size, mflag, MT_DATA, M_PKTHDR); + if (__predict_false(m == NULL)) + return (false); + nw->alloc_len = M_TRAILINGSPACE(m); + nw->offset = 0; + nw->hdr = NULL; nw->_storage = (void *)m; nw->data = mtod(m, void *); nw->writer_type = NS_WRITER_TYPE_MBUF; @@ -216,9 +216,9 @@ nlmsg_get_ns_mbuf(struct nl_writer *nw, int size, bool waitok) nw->num_messages = 0; nw->enomem = false; memset(nw->data, 0, size); - NL_LOG(LOG_DEBUG2, "alloc mbuf %p req_len %d alloc_len %d data_ptr %p", - m, size, nw->alloc_len, nw->data); - return (true); + NL_LOG(LOG_DEBUG2, "alloc mbuf %p req_len %d alloc_len %d data_ptr %p", + m, size, nw->alloc_len, nw->data); + return (true); } static bool @@ -235,7 +235,7 @@ nlmsg_write_socket_mbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) m->m_pkthdr.len = datalen; m->m_len = datalen; int io_flags = (nw->ignore_limit) ? NL_IOF_IGNORE_LIMIT : 0; - return (nl_send_one(m, (struct nlpcb *)(nw->arg_ptr), cnt, io_flags)); + return (nl_send_one(m, (struct nlpcb *)(nw->arg_ptr), cnt, io_flags)); } static bool @@ -251,7 +251,7 @@ nlmsg_write_group_mbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) m->m_pkthdr.len = datalen; m->m_len = datalen; - nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); + nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); return (true); } @@ -281,7 +281,7 @@ nlmsg_write_chain_mbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) (*m0)->m_pkthdr.len += datalen; } - return (true); + return (true); } /* @@ -317,7 +317,6 @@ nlmsg_get_ns_lbuf(struct nl_writer *nw, int size, bool waitok) return (true); } - static bool nlmsg_write_socket_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) { @@ -341,7 +340,7 @@ nlmsg_write_socket_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) } int io_flags = (nw->ignore_limit) ? NL_IOF_IGNORE_LIMIT : 0; - return (nl_send_one(m, nlp, cnt, io_flags)); + return (nl_send_one(m, nlp, cnt, io_flags)); } /* Shouldn't be called (maybe except Linux code originating message) */ @@ -364,7 +363,7 @@ nlmsg_write_group_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt) m_append(m, datalen, data); free(buf, M_NETLINK); - nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); + nl_send_group(m, cnt, nw->arg_uint >> 16, nw->arg_uint & 0xFFFF); return (true); } @@ -437,36 +436,36 @@ nlmsg_get_buf(struct nl_writer *nw, int size, bool waitok, bool is_linux) bool nlmsg_get_unicast_writer(struct nl_writer *nw, int size, struct nlpcb *nlp) { - if (!nlmsg_get_buf(nw, size, false, nlp->nl_linux)) - return (false); - nw->arg_ptr = (void *)nlp; + if (!nlmsg_get_buf(nw, size, false, nlp->nl_linux)) + return (false); + nw->arg_ptr = (void *)nlp; nw->writer_target = NS_WRITER_TARGET_SOCKET; nlmsg_set_callback(nw); - return (true); + return (true); } bool nlmsg_get_group_writer(struct nl_writer *nw, int size, int protocol, int group_id) { - if (!nlmsg_get_buf(nw, size, false, false)) - return (false); - nw->arg_uint = (uint64_t)protocol << 16 | (uint64_t)group_id; + if (!nlmsg_get_buf(nw, size, false, false)) + return (false); + nw->arg_uint = (uint64_t)protocol << 16 | (uint64_t)group_id; nw->writer_target = NS_WRITER_TARGET_GROUP; nlmsg_set_callback(nw); - return (true); + return (true); } bool nlmsg_get_chain_writer(struct nl_writer *nw, int size, struct mbuf **pm) { - if (!nlmsg_get_buf(nw, size, false, false)) - return (false); + if (!nlmsg_get_buf(nw, size, false, false)) + return (false); *pm = NULL; - nw->arg_ptr = (void *)pm; + nw->arg_ptr = (void *)pm; nw->writer_target = NS_WRITER_TARGET_CHAIN; nlmsg_set_callback(nw); NL_LOG(LOG_DEBUG3, "setup cb %p (need %p)", nw->cb, &nlmsg_write_chain_mbuf); - return (true); + return (true); } void @@ -479,23 +478,23 @@ bool nlmsg_flush(struct nl_writer *nw) { - if (__predict_false(nw->hdr != NULL)) { - /* Last message has not been completed, skip it. */ - int completed_len = (char *)nw->hdr - nw->data; + if (__predict_false(nw->hdr != NULL)) { + /* Last message has not been completed, skip it. */ + int completed_len = (char *)nw->hdr - nw->data; /* Send completed messages */ nw->offset -= nw->offset - completed_len; nw->hdr = NULL; - } + } NL_LOG(LOG_DEBUG2, "OUT"); - bool result = nw->cb(nw, nw->_storage, nw->offset, nw->num_messages); - nw->_storage = NULL; + bool result = nw->cb(nw, nw->_storage, nw->offset, nw->num_messages); + nw->_storage = NULL; - if (!result) { - NL_LOG(LOG_DEBUG, "nw %p offset %d: flush with %p() failed", nw, nw->offset, nw->cb); - } + if (!result) { + NL_LOG(LOG_DEBUG, "nw %p offset %d: flush with %p() failed", nw, nw->offset, nw->cb); + } - return (result); + return (result); } /* @@ -506,8 +505,8 @@ nlmsg_flush(struct nl_writer *nw) bool nlmsg_refill_buffer(struct nl_writer *nw, int required_len) { - struct nl_writer ns_new = {}; - int completed_len, new_len; + struct nl_writer ns_new = {}; + int completed_len, new_len; if (nw->enomem) return (false); @@ -515,7 +514,7 @@ nlmsg_refill_buffer(struct nl_writer *nw, int required_len) NL_LOG(LOG_DEBUG3, "no space at offset %d/%d (want %d), trying to reclaim", nw->offset, nw->alloc_len, required_len); - /* Calculated new buffer size and allocate it s*/ + /* Calculated new buffer size and allocate it s*/ completed_len = (nw->hdr != NULL) ? (char *)nw->hdr - nw->data : nw->offset; if (completed_len > 0 && required_len < MCLBYTES) { /* We already ran out of space, use the largest effective size */ @@ -530,10 +529,10 @@ nlmsg_refill_buffer(struct nl_writer *nw, int required_len) } bool waitok = (nw->malloc_flag == M_WAITOK); bool is_linux = (nw->writer_type == NS_WRITER_TYPE_LBUF); - if (!nlmsg_get_buf(&ns_new, new_len, waitok, is_linux)) { + if (!nlmsg_get_buf(&ns_new, new_len, waitok, is_linux)) { nw->enomem = true; NL_LOG(LOG_DEBUG, "getting new buf failed, setting ENOMEM"); - return (false); + return (false); } if (nw->ignore_limit) nlmsg_ignore_limit(&ns_new); @@ -543,22 +542,22 @@ nlmsg_refill_buffer(struct nl_writer *nw, int required_len) nlmsg_set_callback(&ns_new); ns_new.arg_uint = nw->arg_uint; - /* Copy last (unfinished) header to the new storage */ - int last_len = nw->offset - completed_len; + /* Copy last (unfinished) header to the new storage */ + int last_len = nw->offset - completed_len; if (last_len > 0) { memcpy(ns_new.data, nw->hdr, last_len); ns_new.hdr = (struct nlmsghdr *)ns_new.data; ns_new.offset = last_len; } - NL_LOG(LOG_DEBUG2, "completed: %d bytes, copied: %d bytes", completed_len, last_len); + NL_LOG(LOG_DEBUG2, "completed: %d bytes, copied: %d bytes", completed_len, last_len); - /* Flush completed headers & switch to the new nw */ + /* Flush completed headers & switch to the new nw */ nlmsg_flush(nw); memcpy(nw, &ns_new, sizeof(struct nl_writer)); - NL_LOG(LOG_DEBUG2, "switched buffer: used %d/%d bytes", nw->offset, nw->alloc_len); + NL_LOG(LOG_DEBUG2, "switched buffer: used %d/%d bytes", nw->offset, nw->alloc_len); - return (true); + return (true); } bool @@ -570,23 +569,23 @@ nlmsg_add(struct nl_writer *nw, uint32_t portid, uint32_t seq, uint16_t type, MPASS(nw->hdr == NULL); int required_len = NETLINK_ALIGN(len + sizeof(struct nlmsghdr)); - if (__predict_false(nw->offset + required_len > nw->alloc_len)) { + if (__predict_false(nw->offset + required_len > nw->alloc_len)) { if (!nlmsg_refill_buffer(nw, required_len)) return (false); - } + } - hdr = (struct nlmsghdr *)(&nw->data[nw->offset]); + hdr = (struct nlmsghdr *)(&nw->data[nw->offset]); - hdr->nlmsg_len = len; - hdr->nlmsg_type = type; - hdr->nlmsg_flags = flags; - hdr->nlmsg_seq = seq; - hdr->nlmsg_pid = portid; + hdr->nlmsg_len = len; + hdr->nlmsg_type = type; + hdr->nlmsg_flags = flags; + hdr->nlmsg_seq = seq; + hdr->nlmsg_pid = portid; - nw->hdr = hdr; - nw->offset += sizeof(struct nlmsghdr); + nw->hdr = hdr; + nw->offset += sizeof(struct nlmsghdr); - return (true); + return (true); } bool @@ -600,11 +599,11 @@ nlmsg_end(struct nl_writer *nw) return (false); } - nw->hdr->nlmsg_len = (uint32_t)(nw->data + nw->offset - (char *)nw->hdr); + nw->hdr->nlmsg_len = (uint32_t)(nw->data + nw->offset - (char *)nw->hdr); NL_LOG(LOG_DEBUG2, "wrote msg len: %u type: %d: flags: 0x%X seq: %u pid: %u", nw->hdr->nlmsg_len, nw->hdr->nlmsg_type, nw->hdr->nlmsg_flags, nw->hdr->nlmsg_seq, nw->hdr->nlmsg_pid); - nw->hdr = NULL; + nw->hdr = NULL; nw->num_messages++; return (true); } @@ -612,10 +611,10 @@ nlmsg_end(struct nl_writer *nw) void nlmsg_abort(struct nl_writer *nw) { - if (nw->hdr != NULL) { - nw->offset = (uint32_t)((char *)nw->hdr - nw->data); - nw->hdr = NULL; - } + if (nw->hdr != NULL) { + nw->offset = (uint32_t)((char *)nw->hdr - nw->data); + nw->hdr = NULL; + } } void From nobody Sat Feb 18 11:55:51 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJnFN0jSjz3s70W; Sat, 18 Feb 2023 11:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJnFM4cfzz3CNn; Sat, 18 Feb 2023 11:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9dUJtYuuiXWJvvXpoFOpb5nCsukCNWkv04Qb/UgDGnk=; b=Z+mJCjjXiU4Osu/0jGKLyJUSz4sRx9n3SppOhoQPEXMLOklR5Y0vafSfC6HaW1dDJYIGxz oMNMmmADWJ4SXG+Iaa/c52pl4QN7rIf5BUlLMDxWiEAVnWPsWNuxbkGI47cpQFdQ5S8pdC BwuHTv4f626P5O3YMW5dYFWm1okEtWxRc8+zW2Zmx5hxjx1+uwzX63tfRfgcEDJh04btJu Hq4x2EA/sFmfj+eLFx1WtJETAupOB45U2VgQDFYuzTgdjdwHCQ8Urqi6Qib3SuoWKQ4i7O L1ZXnuzJPaabtgDijuwBJbIEU8BbburNfIioJzAhhpTNXEuanEzqU3lKlhao1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9dUJtYuuiXWJvvXpoFOpb5nCsukCNWkv04Qb/UgDGnk=; b=EseixwMVpjpIH75pNwGKIzUQ42z0HReCIW1/NKfhdVxwoPmIR2ubVjd3VWRW0AIR+S3THQ 9Fowo/0Wo7R5oeErYgsal8AiG3aJDkS0H9ARwRcyrQ6/h8Jvq4BR5ir0WY9iQqdliUmdHJ RD1y6ZeFczbpClzyJalZ2uydWXJHQZ1/Zp7bIpnIFbxNmAWlzMHgmJ7gvYcG8/04dCwvRg J57kkTVOT/3/2gtbZQWtcemW980U+HByqchPkgG8Sry0THl6/2CudTW4vunaAyRY2J7NBG LMQK2njSX2EaSCyZdbXv461ef9iMIpJ1vpC+GUls3YL2DTbOiH88u/IL60Vmdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676721351; a=rsa-sha256; cv=none; b=eczpsFT10zAfKNgsq5dS6SB5Sli1YHpWetflbcsE9iClpvhAfHkbafIb+m4RAnHCOHJTLV jxZVXCpfBjnXm8QlNQxOZoUW9VZHs/FEvTgFma04Pe/RR9Q6gJmXv817UjEiB9ZPnRNTQO WNChUTAORujhUS0Vbx9vc6UL9KaEmSuAy4fWkq1VEQk4KVAynWQG96g2lWadXLR4KXY3h2 nPAFBqPJoQIok+TOvuVJI/MiSsW7vxQVbmuufwBM5YIgDBBAKLTnzW62zsj3a8If0aPjXw iB96B9pBhESSI9rmXVth8pSD17oNoBYyLErvV00rVoKA+3VGekVG7yf5Tglsrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJnFM3PyVzM7F; Sat, 18 Feb 2023 11:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31IBtpII069592; Sat, 18 Feb 2023 11:55:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IBtp4H069591; Sat, 18 Feb 2023 11:55:51 GMT (envelope-from git) Date: Sat, 18 Feb 2023 11:55:51 GMT Message-Id: <202302181155.31IBtp4H069591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 2de541757e0a - stable/13 - netlink: Zero-initialize writer structures allocated on the stack List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2de541757e0a2e25ce974b3c4c29bc8b753b8b6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=2de541757e0a2e25ce974b3c4c29bc8b753b8b6a commit 2de541757e0a2e25ce974b3c4c29bc8b753b8b6a Author: Mark Johnston AuthorDate: 2023-01-26 15:46:19 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:53:54 +0000 netlink: Zero-initialize writer structures allocated on the stack The prevailing pattern seems to be to simply initialize all fields to zero. Without this, it's possible to trigger a branch on uninitialized memory, specifically, when testing nw->ignore_limit in nlmsg_refill_buffer(). Initialize the writer structure in a couple of functions where this is necessary. Reported by: KMSAN Reviewed by: melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38213 (cherry picked from commit 7a78ae88659e0f6a901574d17672d1ccdc3e971b) --- sys/netlink/route/rt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index 48a6b0928cab..59b34c53ad4b 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -341,9 +341,9 @@ static void report_operation(uint32_t fibnum, struct rib_cmd_info *rc, struct nlpcb *nlp, struct nlmsghdr *hdr) { - struct nl_writer nw; - + struct nl_writer nw = {}; uint32_t group_id = family_to_group(rt_get_family(rc->rc_rt)); + if (nlmsg_get_group_writer(&nw, NLMSG_SMALL, NETLINK_ROUTE, group_id)) { struct route_nhop_data rnd = { .rnd_nhop = rc_get_nhop(rc), @@ -926,10 +926,9 @@ rtnl_handle_getroute(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate * void rtnl_handle_route_event(uint32_t fibnum, const struct rib_cmd_info *rc) { + struct nl_writer nw = {}; int family, nlm_flags = 0; - struct nl_writer nw; - family = rt_get_family(rc->rc_rt); /* XXX: check if there are active listeners first */ From nobody Sat Feb 18 11:55:52 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJnFP3szyz3s74b; Sat, 18 Feb 2023 11:55:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJnFN5BFKz3CL5; Sat, 18 Feb 2023 11:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUgtC1dWD3tDhyht47YKJ/JcZg648UfxfBysQpA1QQQ=; b=ODlIqIrAAPFu7cpMERWU8ZOZqvBs1FCGA6uPCllrfC93xTI8wHFebIL10WKzjvLslzWMMa 0dwziWHB41rugyshZHoDIfxdhgNgJh3hW/9PFwpkezFq3noLCVRQKxVv/+6BnFN7FmTzpw CM/UBDS2Mj+7ShmT63jwBt+b1uL0jiG8mkbIR2+/ySGs05sHGo2Fh6MU6mRIJI7FjV3y4s ZrV7WakaWmemM9smruXXjT7IRm3D0sCsa4FCl4VLoOLeDLiFFCtDK4kcKFFcnSAj7wUZ40 +o8wFZca710e1a+MF0h5+vcIUAT3X7sWz44egk7eMhXZES2+y1Wdww/eRLnCuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676721352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUgtC1dWD3tDhyht47YKJ/JcZg648UfxfBysQpA1QQQ=; b=BCx3jl0B7yb2LZzHbybrjuS0jnUk2vR2eD8W5Dvv/0+u5OMN141y9jFgsSNLsORy9vuCc4 k8xRdQajY0M1gXPa4AuTDdAfjU8vfnWGxRWjsu5LwpxfPwASGk7k69Mbw93LohPzAci2uR Subgq4JUD8YwiPGxlzGlo76nlF78Z8zEjsoubzXs1g0vSCMdUs6MVWwk3wCRPtVDUZhzRS iyQOMcScPJMayiS648DTQ+mFd+5vLxlHUZomj7ts5E1pRBK89d+JgbFrKZD37jc2IdZcyZ ErNL5Ce17aU/Hi7Fq7nZ+iMnIT4mwYWI5Zi6ogckVrVWEWxMUzv4xBTogt3RyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676721352; a=rsa-sha256; cv=none; b=YLXYn0j665m+pCn+Otb0slV/S/1kIATiPv08jYtL2NH7KzfZm16+iml+G0LTE9uGi8/gQn SSs7RWRa/pfanqlTwyxPeMvfi0haDIwVlJV78ZH3rhIVSm+KlyMM+YfVF3gvMsiicZ8aqW VLCqCQISqn3wvi/FWGMaitLR9LUHJCMdYBR9DQUDMkaviSasKHp7aAJwvoCYAvSZHKoq1l nfcMYkSW95K1Tw+ju76oNnCNrIAcFkL3m0mmlUQKpWb42iTMKuNGXOrXdN/p6/ybLoY3hD wzGIMQoqkMGSXNcfUrjzxD6La0qQoyvR3F5cKChVsgvoWa/sZ7Zh9FcOUKmTLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJnFN4J9ZzM7G; Sat, 18 Feb 2023 11:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31IBtqCr069613; Sat, 18 Feb 2023 11:55:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IBtq0g069612; Sat, 18 Feb 2023 11:55:52 GMT (envelope-from git) Date: Sat, 18 Feb 2023 11:55:52 GMT Message-Id: <202302181155.31IBtq0g069612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 4a081cc5a44e - stable/13 - netlink: add forgotten pru_rcvd handler. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4a081cc5a44e97794df5dae3df4a49c177b9ae4b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=4a081cc5a44e97794df5dae3df4a49c177b9ae4b commit 4a081cc5a44e97794df5dae3df4a49c177b9ae4b Author: Alexander V. Chernikov AuthorDate: 2023-02-18 11:48:40 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:53:54 +0000 netlink: add forgotten pru_rcvd handler. There were changes in -HEAD domain/protosw setup logic and .pru_rcvd netlink handler was missed when performing the merge. Lack of this handler resulted in userland being waiting forever when performing large dumps of data. This change restores the handler as direct commit to stable/13. Reported by: Marek Zarychta --- sys/netlink/netlink_domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index de96818d5e35..c451274b1e63 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -710,6 +710,7 @@ struct pr_usrreqs nl_usrreqs = { .pru_detach = nl_pru_detach, .pru_disconnect = nl_pru_disconnect, .pru_peeraddr = nl_pru_peeraddr, + .pru_rcvd = nl_pru_rcvd, .pru_send = nl_pru_send, //.pru_soreceive = soreceive_dgram, //.pru_sosend = sosend_dgram, From nobody Sat Feb 18 12:12:18 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJncL3Dw5z3s8WP; Sat, 18 Feb 2023 12:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJncL2WXwz3FgV; Sat, 18 Feb 2023 12:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676722338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iyk6KwFgIaLLRA/+L/pDsH9ZuKnx5TaI5CfpMMTgAyw=; b=gHCEorz9K+TamAqmHks+OVC5jikUyh23W2WW9Wlc3LoDxfztdZKeox6WLw5k2/3kcea4/A cXWyVp66NbfNpqcQuBgPG0lP5CAqE1aZB4YKOwmJ21nvI1upBN3kOtOnGq28+j3H53F0Ir LYB2HCNfRoCvm+siWBqea1l51DqfEJbKnFlJI0REnN/wSS5FcgXr3XxF6Um304d73vS6nU VgJkrBRECuqzXfd57mW0Ji6A9dE1Yg7VGrGreU7/QoHVvUNYUhLQ7GMszOsFiQrDQi18dl /MOjEUm0lnRMhHGMGIqpGMt/bFt3DBwvGbStPwSM5CEBRYMwzIaDdFKOPmLdEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676722338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iyk6KwFgIaLLRA/+L/pDsH9ZuKnx5TaI5CfpMMTgAyw=; b=UE/bkKELohn/6S27cZgzgWmB2m3PFHXiz6mn/kKmLIDrKAhiopIgSIKbpxvHlhXMB37sgE EGwXI32wFgsJd7oRP99E5EwiRgeYW0r6P8QOBBKTdL5miyar1tWxgP6M75L2XTUPM6RRkr 05wERMeBbVBCNcHlODtNFgSRpd3zC/sEc9lWv5SAT4Gs33dt6wi8BcboZrbuPTQq8WGuPT JRzv3bdYZ3G18JUwR6ENhfyTxXTgZNxJCSjLGi5AI1hGoJipBYcZj9xB0lvxasVWUUr59d ljn0AGq02lD4xa7TFGLFyHfK/g2KM7wrfx6E24aVkRjvyKG/NjPTCZgMB+yhWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676722338; a=rsa-sha256; cv=none; b=TjIw36KXIHg/q92wn5RNbRD8boqv0WSqOU4rVuAymjtm3AHTnZD+0fwzw06cA2UDCoFCRM WQWK1DK49SjSEUI/LILu3qzkAkTmmGLqCD+SpnqQkna5ydwUDnj2o8aH/jfKMYY4wWU15n +AkllOE+4ebYSii6P14TXXKAuVadrZ2WjzDhQvlvII6ILPMEMbuF6mwZLqBgTHw2GgQofl AQ2hOCx2MtyeSKU7GX8t6CgYVnzZMyyqw/LyfZ4WY2SRtjlKYhxPuQsYUHs8hPoliTFpP2 LIHJT28QZFEVzicDOgFu2Ile0OJh/POYdDnVwq86UCKESMyBYlU/FmAw8S6LVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJncL1bwfzMqv; Sat, 18 Feb 2023 12:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31ICCIcp097699; Sat, 18 Feb 2023 12:12:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ICCI4w097698; Sat, 18 Feb 2023 12:12:18 GMT (envelope-from git) Date: Sat, 18 Feb 2023 12:12:18 GMT Message-Id: <202302181212.31ICCI4w097698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 8c60d469d3fa - stable/13 - netlink: fix if_allocdescr() malloc options argument. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8c60d469d3faa98f6b0e49173f16a8603c4c4654 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=8c60d469d3faa98f6b0e49173f16a8603c4c4654 commit 8c60d469d3faa98f6b0e49173f16a8603c4c4654 Author: Alexander V. Chernikov AuthorDate: 2023-02-17 17:35:28 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:56:18 +0000 netlink: fix if_allocdescr() malloc options argument. The current value was based on the initial revision of D37566 and was not updated afterwards. MFC after: 1 day (cherry picked from commit 6694cb1f5784d6ceacd684d29b3e3012e1e4e4d5) --- sys/netlink/route/iface_drivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c index 7f098b808743..1b8c27bfca68 100644 --- a/sys/netlink/route/iface_drivers.c +++ b/sys/netlink/route/iface_drivers.c @@ -72,7 +72,7 @@ modify_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs, if (lattrs->ifla_ifalias != NULL) { if (nlp_has_priv(nlp, PRIV_NET_SETIFDESCR)) { int len = strlen(lattrs->ifla_ifalias) + 1; - char *buf = if_allocdescr(len, true); + char *buf = if_allocdescr(len, M_WAITOK); memcpy(buf, lattrs->ifla_ifalias, len); if_setdescr(ifp, buf); From nobody Sat Feb 18 12:12:19 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJncM4xgkz3s8WQ; Sat, 18 Feb 2023 12:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJncM42G6z3FY9; Sat, 18 Feb 2023 12:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676722339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=29GwKRtJYw6rErraDX2nalRcCGuae5liZYUG9e9agRc=; b=gqlZS7rTnXWqASLK/HJy/eldTej/us5DS82zP1x+Fu2l4+8KUH3llf/jw91r0ohMoOCz2J nioIXBER+s/xufeWt42Y4PQV4kUwOBzlq39T7NNL2Zh9ONy8ZfCG7y70//9P16rctMsscH vjZdoQH7eIyZ2luooR/dGjIJCYUfOEySJ6aA+0MgOYzCxbCslWTUOq5mhpeIQ/N5fI4cQK b0tAw3Y0L7G/4eVr2Q+zEpZY4y5qBZgtNrYqhNGFq1goZ3F65/PHzFyywvJtKlCOr67iun d2I43ZArgMgg3V9FEVoXJtevyp3B3LtMJ2VwKKPIOxH+EGv/HQEQceqXfew2dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676722339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=29GwKRtJYw6rErraDX2nalRcCGuae5liZYUG9e9agRc=; b=YCl4pYFtfTxyqZp2dlACImpc8hlK+B/rR0Aq808pQ9TEdxCvJnEvCcKGVWpYe6KQIVXdvE eRLTfOz8LXAh275hnfjFUEmf2xKFFMuF5Y7KuL2NilXn9K+bDwgQGE6Sgv+J4/vwZzow4F IYhxX1PKnCeHCjCSTGrm8D/pW/9BvT1FAivTJaGrzsTZ7nlrnKgKh07aYpJD9bYbVSudzM UHsS9Z4kioknqRwlXzJqSPaCjpgct2cD6OFot2A8S6FDlHAN58Z5jDQxU4raOUIvvOpgMN Nc4yOA8LdOCNCXuSFIfpf2d66dGoPfloQvQU7eH4toMfsnPtBsqhziIdWFyjmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676722339; a=rsa-sha256; cv=none; b=D5Qmo3ocTqC4C4EXsSR5rLqKoFmxiQO7EUMjSLLJX1rfaxdaSJsN+Xk+nCwSPTB5Xlh8ey BpICnLofIXIHe0GrFP7qpdd1bmGBrb0gBU3HndLE3vOdoZMCJkTYiw0MinTO7R40OBaGag z7LLKyEna/sXc7AyHh91XyOJFvQZxomvRfIUoxjBkVFT02o2YpVopHRcheP/o+PGzvJdPc q6ozBj6LoWjJ83+asH9Wbf7Fz7YwRW+Wee6uMuNACeqcI9jaV82wTvGDzLNrdiEYpXPeNr +Rc0ZI3ma4taC1rSmPFdLwE7oT9sYNea3DGCaQ620xD0yKrJ6qzMrJaoKXbKkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJncM2BbTzMYh; Sat, 18 Feb 2023 12:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31ICCJom097718; Sat, 18 Feb 2023 12:12:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ICCJdk097717; Sat, 18 Feb 2023 12:12:19 GMT (envelope-from git) Date: Sat, 18 Feb 2023 12:12:19 GMT Message-Id: <202302181212.31ICCJdk097717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: c169fb625ee0 - stable/13 - netlink: use ifmedia to provide vlan interface operstate. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c169fb625ee0800ad1e6046440d67eef598581c2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=c169fb625ee0800ad1e6046440d67eef598581c2 commit c169fb625ee0800ad1e6046440d67eef598581c2 Author: Alexander V. Chernikov AuthorDate: 2023-02-15 20:22:47 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:56:39 +0000 netlink: use ifmedia to provide vlan interface operstate. Netlink customers rely on admin and operational state when working with interfaces. The current implementation retuns "unknown" operstate for all interface types except IFT_ETHER and IFT_LOOP. This change updates the code to fetch vlan operstate in the same way as for the ether interfaces. For the rest of the interface types, operstate is now mapped to the admin state. Reported by: Marek Zarychta MFC after: 3 days (cherry picked from commit 5dd48f718433959c283a8a4d6e46512426f1e200) --- sys/netlink/route/iface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index f4936bb2c35b..9cd7e6e80f3c 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -174,9 +174,11 @@ get_operstate(struct ifnet *ifp, struct if_state *pstate) switch (ifp->if_type) { case IFT_ETHER: + case IFT_L2VLAN: get_operstate_ether(ifp, pstate); break; - case IFT_LOOP: + default: + /* Map admin state to the operstate */ if (ifp->if_flags & IFF_UP) { pstate->ifla_operstate = IF_OPER_UP; pstate->ifla_carrier = 1; From nobody Sat Feb 18 12:12:20 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJncN4XDkz3s8Nv; Sat, 18 Feb 2023 12:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJncN44Szz3FhL; Sat, 18 Feb 2023 12:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676722340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iXuLsnqhjojBhFF4XoOLUZSQq4CttSAthjNf9d35pIU=; b=iYe6mC40c3MFr9K7JXY0oEhdv5LCuN69Z/CQuhBDHYxYSXT/JkpPYEr13wCtKMn0UXEU8e JDzJYki4JTgU3sw/jmlQRsktbGKVcNGTW8VRfPF73BNHStTGHwjtVqOPBt/kgaMcLdSIdL l0Gs+ZQ/IiQMHRVeChtKR5FLuiMyGTR71poWB5fZmsetBDtPPc2V3ZcGPmk2ormyS6k1cK Uj8VkBNZbL18ShLPKFh1CHKV5jnbDnyp9+RB7+eJ0crlETcwM8NXeRsqHBfhwxB697f0iV 5Ntx92p9wSYZSftj/s8mwyX4An16e39RYNX4ggfdzyXNO9r+jEtkB2kCLVYcQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676722340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iXuLsnqhjojBhFF4XoOLUZSQq4CttSAthjNf9d35pIU=; b=upV1VasPsWcWem7hxKY0D9yltZtIOAd7ex0W3VJNRxJGROdFsy+9RFMeA4P4TcPQaArv22 6eu8XffgXYCgoS8FKhSmEEvAkrREvvTiNIntt43M2GHDTBeRLUSAYnTCQHWHsPgaUwfyG6 IRFDdngsqQ86xpkA3NKHOy1WPVZ+2EgRMAbGJ5Mu2+/8kR1rUKHGYEMAqbPYeC8G8uAcoL a2JTA7Y6yPAh1852WmGNEuivQJSvotCzszxojGXF16lkW04Bz25k/WCdO+7jqYDPMlAzaY iyQxH7cvJlegKIyM3a9ZHU6goi09WDF8Dzoouzns06uJIxhcLjio0SYMjWgX9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676722340; a=rsa-sha256; cv=none; b=wAXPPtnSb5rasq0oDjrNpnKP14y9yRZ1g2QS0nbub02GS8W+mEn6E9J6cHUROzRBF+3SKr n+lLMEZWsmsOxg5YdZBjc7cJITwX5KvHzmaNhwWkR2oN9TMq0mHnuO+q4c2JkDUsR5CK4/ H8fPfVcuqMizsa4XngUaeoRPxxAqtmRm4jh172kekkX6+q8z8V4DGem6Dmzum4mJNFTpGa prH/wsEkq7bcBiUcjBfRwhtbJ12H1MoEOuQAKhL2XtV9LpssSBNPbrQsfmMmCxe6+UgImf TS7gm1QH56HFvvSRStxl8Ehw/olWfr8tSH5M0QRMEJcs2d9YlvadiEo7VOBujg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJncN381nzNG8; Sat, 18 Feb 2023 12:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31ICCKif097737; Sat, 18 Feb 2023 12:12:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ICCKNA097736; Sat, 18 Feb 2023 12:12:20 GMT (envelope-from git) Date: Sat, 18 Feb 2023 12:12:20 GMT Message-Id: <202302181212.31ICCKNA097736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 45ced2987df2 - stable/13 - routing: always pass rtentry to add_route_flags(). List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 45ced2987df29a8587df2ad3c9ea0ddb1998aa16 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=45ced2987df29a8587df2ad3c9ea0ddb1998aa16 commit 45ced2987df29a8587df2ad3c9ea0ddb1998aa16 Author: Alexander V. Chernikov AuthorDate: 2023-02-17 17:20:38 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:56:54 +0000 routing: always pass rtentry to add_route_flags(). add_route_flags() uses `rt` prefix data to lookup the the current rtentry from the routing table. Update rib_add_route_px() to always pass rtentry regardless of the op_flags. Reported by: Stefan Grundmann MFC after: 1 day (cherry picked from commit a0aa160b6d261f67b29a25c7cc5e04668fb6faf7) --- sys/net/route/route_ctl.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index eaabe901b3cb..9bb02c99ddce 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -454,7 +454,7 @@ fill_pxmask_family(int family, int plen, struct sockaddr *_dst, * Attempts to add @dst/plen prefix with nexthop/nexhopgroup data @rnd * to the routing table. * - * @fibnum: rtable id to insert route to + * @fibnum: verified kernel rtable id to insert route to * @dst: verified kernel-originated sockaddr, can be masked if plen non-empty * @plen: prefix length (or -1 if host route or not applicable for AF) * @op_flags: combination of RTM_F_ flags @@ -489,6 +489,16 @@ rib_add_route_px(uint32_t fibnum, struct sockaddr *dst, int plen, FIB_RH_LOG(LOG_INFO, rnh, "rtentry allocation failed"); return (ENOMEM); } + } else { + struct route_nhop_data rnd_tmp; + RIB_RLOCK_TRACKER; + + RIB_RLOCK(rnh); + rt = lookup_prefix_bysa(rnh, dst, netmask, &rnd_tmp); + RIB_RUNLOCK(rnh); + + if (rt == NULL) + return (ESRCH); } return (add_route_flags(rnh, rt, rnd, op_flags, rc)); @@ -765,6 +775,8 @@ add_route_flags(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data struct rtentry *rt_orig; int error = 0; + MPASS(rt != NULL); + nh = rnd_add->rnd_nhop; RIB_WLOCK(rnh); From nobody Sat Feb 18 12:12:21 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJncP5lZzz3s871; Sat, 18 Feb 2023 12:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJncP4yd4z3Fwc; Sat, 18 Feb 2023 12:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676722341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j5ekcG1FDKzNH/+zIq3AFJwptMRYX34kSp9yTp1uqBQ=; b=CxAR5QcOEYWxMI5lyEUeKIocyINno/poyzL7RrFMpM71s4qmjqHMhfSyPKmwf4JrVQbN44 PiaMU5ZzvxBah5kF5HeVEDn+3B9Ym6iWwo1bHndf4T5OFS8f5XbOaBaBECUundKWVgAcuW m2CRecUdbzXwKn4c/83lGPMtyH5+33XFp1Cd32qkNrf+evpfBZeX/jcvdKwTOYogt9m/vU Cgh4mzKtTP+A1dKb3aAGCMEUbqPoVALToXgn7Vvo/GD50aaetR/3Nai4e4sqXeHE1avYjd 54YdqaSgWaCbC56fj7BQor9hpbSNjriGlu0TDzEKgZ660Yyx/q2Et2XvY8wbrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676722341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j5ekcG1FDKzNH/+zIq3AFJwptMRYX34kSp9yTp1uqBQ=; b=Z+IjvMavJFywst1E8Ej6JJAYdw6mmlW3Ja1naccvUQ2kmNd/Ung/b6AiGox6ExHqa12TUU Xyrk7ygbK0h/y/k6aUKBLRk3XAhVMi9NiW8t5CEWmEdpwG1NVla9snjZ8IBXdRI6GYHpa3 4spHNPu72g0mPZRv950Q7z8oCJ2GhXi3o8GZoke0uRdDZHBzjqulvGp/2UkeEYGlsBkcvQ +9VIBRv0Jv6iBTCN6UDvotJ95sekG8s0pWu2r8X58TEnjPjSQrCGPKzSlCY99HUzfGiZwH y9ZCT/sViqmUFq2edZN98g6p88rNDFKZQkZPDWjqhC+1pcQrSTQkTO/uap8exg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676722341; a=rsa-sha256; cv=none; b=XxFaAwXAYQ4aQfmpqX4TpUFaQBRai1+BJW+0Vym27KGFnHjVs3yM34BAoSV/tJjjFJKimH 1u0+Z/eMxZmBv0J3M50EZ5UW2IDzYgcSmIcyAw1AjBELMau+TdniPV8to9oEeuKJVxgh8d 7kUaL/IVTytff+FVAv9JsmUnkhP/eJYl7eNXvfjjXczyq/zIn6lMoqBBNSPlrLa+JKh0bt APU4uFEw953117NVXPknAGG5JR5erizc5gv6Rc9mSvtaEbTAxxeFQJ10s1NdeUImK6tUhl XcleKldqihW+L3DQtunPsk99RMdRWjW8PDB+4QQXL11tIM5wfR5VUpDlM2whJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJncP43KhzN2K; Sat, 18 Feb 2023 12:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31ICCLLw097762; Sat, 18 Feb 2023 12:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ICCLCu097761; Sat, 18 Feb 2023 12:12:21 GMT (envelope-from git) Date: Sat, 18 Feb 2023 12:12:21 GMT Message-Id: <202302181212.31ICCLCu097761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: e9296dc1bcd2 - stable/13 - netlink: validate rtable value in RTM_ROUTE. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e9296dc1bcd21cd9d719389cd04235ce4513e84d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=e9296dc1bcd21cd9d719389cd04235ce4513e84d commit e9296dc1bcd21cd9d719389cd04235ce4513e84d Author: Alexander V. Chernikov AuthorDate: 2023-02-17 17:31:40 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 11:57:11 +0000 netlink: validate rtable value in RTM_ROUTE. Reported by: Stefan Grundmann MFC after: 1 day (cherry picked from commit f2f7911c5513096e46422ad7756bc90c13c6e6d8) --- sys/netlink/route/rt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index 59b34c53ad4b..aca69e75fea8 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -840,6 +840,11 @@ rtnl_handle_newroute(struct nlmsghdr *hdr, struct nlpcb *nlp, return (EINVAL); } + if (attrs.rta_table >= V_rt_numfibs) { + NLMSG_REPORT_ERR_MSG(npt, "invalid fib"); + return (EINVAL); + } + if (attrs.rta_nh_id != 0) { /* Referenced uindex */ int pxflag = get_pxflag(&attrs); @@ -898,6 +903,11 @@ rtnl_handle_delroute(struct nlmsghdr *hdr, struct nlpcb *nlp, return (ESRCH); } + if (attrs.rta_table >= V_rt_numfibs) { + NLMSG_REPORT_ERR_MSG(npt, "invalid fib"); + return (EINVAL); + } + error = rib_del_route_px(attrs.rta_table, attrs.rta_dst, attrs.rtm_dst_len, path_match_func, &attrs, 0, &rc); if (error == 0) @@ -915,6 +925,11 @@ rtnl_handle_getroute(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate * if (error != 0) return (error); + if (attrs.rta_table >= V_rt_numfibs) { + NLMSG_REPORT_ERR_MSG(npt, "invalid fib"); + return (EINVAL); + } + if (hdr->nlmsg_flags & NLM_F_DUMP) error = handle_rtm_dump(nlp, attrs.rta_table, attrs.rtm_family, hdr, npt->nw); else