From nobody Sun Feb 12 02:28:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PDry02Sxcz3nqTv; Sun, 12 Feb 2023 02:28: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 4PDry01vThz46MJ; Sun, 12 Feb 2023 02:28:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676168936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thE1DPwYxhRmy+OeGVRQxp7t/NchYxhPYwl4LnOsztY=; b=ac7w9zKEpxglMTtV1/G8G3u2gIuU4b6+lIm/oyLxSNBwObUbmqkxTL2DGbHtveSuS35t9y eb4MlW68LALAoQpVgpkRfwTC/JLn5NJELbEp+8hERrurGeNSVKI3J0bL5RPXJvPmAWJCBf FeC4Tw4s5i8RscdUU3+A21UCamrlAr4yxDQtrcRqu5qL+QSlIEydd51AIzBeWg3ixojyqr v+VFlOvvrTYc8lWHHQvmhJuTeNZSUuu+Hrq1n2iXckJMNl3G5T7cvYg/7KMZAgmbsd/1Ua t8dLdSv93t3KhZSyIRKwntXXlQ7tDUTwk7p6JsifHNc1tE3aal2ooGnXjIm5Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676168936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thE1DPwYxhRmy+OeGVRQxp7t/NchYxhPYwl4LnOsztY=; b=MqfY5o0NHhuF8jMNrHntMVkxsSacuq0K63+oJmctw1WgOOSuSos6nXqtMv35FfxPtHGMHo q4nVu0mPWg0pabK3bKXTyoKER+QJJdEbsmoBBERj8Gey94YgR3ru8IDkw59IZSBCRzouiK G71D7b9Vf2WmwMaxF2mPGaFx0szfvCcCwJcvciL2WLoLz5HMmUokufsW/jAcAHTUvcv2nY RotcbPv40riTU4zxzEnLtc4qzAhzKSFtixdpaYu8mb9TD6ZSYbMfa3a+RA+ZbqZRuxSMtS Nu1JQQymzJeQKOZOoMSSovIMd1lnNr3+OzLFsPJcMMpPPuxqzWC/r7JilzVbbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676168936; a=rsa-sha256; cv=none; b=cBfk9RVYRM7YYxcStFcMg/Teuw7ZQC4B3EhDeKLRoEX6BeGDl8i2A/XMXBxavLorOjewV3 VEbUU7HhsOmar239ZCAT623Z9m4f0+Lqwt/5BzdGpfTrpEExJa8gmsrF3l7IlXL+FYN9E+ wmcLuj+V2/CrhIh1vldbtWpfSfXYiPwlZn2ZqSHDvJuqvwjBDqPo3vPH+SU1SFFs7al4su rRMOOmvRs+f9YdP50IoZVIItlSUTQbOAfI23+RyW4V01d0ANIYFrRDni4q3I0fIGKi9OTJ inl6Mwt3MY/g72MbZHZ3euLc1bdg010O4WJ9EroZivzo5lCFUsVX0OvE1xNYkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PDry00y3NzMKc; Sun, 12 Feb 2023 02:28: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 31C2Sus6099977; Sun, 12 Feb 2023 02:28:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31C2SuxF099976; Sun, 12 Feb 2023 02:28:56 GMT (envelope-from git) Date: Sun, 12 Feb 2023 02:28:56 GMT Message-Id: <202302120228.31C2SuxF099976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 4d68605f31fb - main - nfsd: Delete nfsrv_prison_cleanup() until vneting enabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d68605f31fb536722529dc90f16cc47d964882e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4d68605f31fb536722529dc90f16cc47d964882e commit 4d68605f31fb536722529dc90f16cc47d964882e Author: Rick Macklem AuthorDate: 2023-02-12 02:27:59 +0000 Commit: Rick Macklem CommitDate: 2023-02-12 02:27:59 +0000 nfsd: Delete nfsrv_prison_cleanup() until vneting enabled Oops, although the vneting macros do not do anything yet, commit 7344856e3a6d enabled the prison cleanup function, that would get called and crash the system when a jail was terminated. This patch gets rid of nfsrv_prison_cleanup() for now. It can go in when the vnet macros are enabled as front ends to the vnet macros. MFC after: 3 months --- sys/fs/nfsserver/nfs_nfsdport.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index af5327bd5a2d..834a6b069899 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -94,7 +94,6 @@ static char nfsd_master_comm[MAXCOMLEN + 1]; static struct timeval nfsd_master_start; static uint32_t nfsv4_sysid = 0; static fhandle_t zerofh; -static int nfsrv_osd_jail_slot; NFSD_VNET_DEFINE(struct proc *, nfsd_master_proc) = NULL; NFSD_VNET_DEFINE(struct nfsrvhashhead *, nfsrvudphashtbl); @@ -3687,18 +3686,6 @@ out: return (error); } -/* Osd entry for nfsrv_cleanup. */ -static int -nfsrv_prison_cleanup(void *obj, void *data __unused) -{ - struct prison *pr = obj; - - if ((pr->pr_flags & PR_VNET) == 0) - return (0); - nfsrv_cleanup(pr); - return (0); -} - /* * Nfs server pseudo system call for the nfsd's */ @@ -7123,7 +7110,7 @@ nfsrv_vnetinit(const void *unused __unused) nfsd_mntinit(); } -VNET_SYSINIT(nfsrv_vnetinit, SI_SUB_VNET_DONE, SI_ORDER_ANY, +SYSINIT(nfsrv_vnetinit, SI_SUB_VNET_DONE, SI_ORDER_ANY, nfsrv_vnetinit, NULL); /* @@ -7193,9 +7180,6 @@ static int nfsd_modevent(module_t mod, int type, void *data) { int error = 0, i; - osd_method_t methods[PR_MAXMETHOD] = { - [PR_METHOD_REMOVE] = nfsrv_prison_cleanup, - }; static int loaded = 0; switch (type) { @@ -7212,8 +7196,6 @@ nfsd_modevent(module_t mod, int type, void *data) vn_deleg_ops.vndeleg_disable = nfsd_disabledelegation; #endif nfsd_call_nfsd = nfssvc_nfsd; - /* XXX-BZ OSD to VNET? */ - nfsrv_osd_jail_slot = osd_jail_register(NULL, methods); loaded = 1; break; @@ -7228,7 +7210,6 @@ nfsd_modevent(module_t mod, int type, void *data) vn_deleg_ops.vndeleg_disable = NULL; #endif nfsd_call_nfsd = NULL; - osd_jail_deregister(nfsrv_osd_jail_slot); nfsrv_cleanup(&prison0); mtx_destroy(&nfsrc_udpmtx); mtx_destroy(&nfs_v4root_mutex); From nobody Sun Feb 12 07:56:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/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 Sun Feb 12 09:47:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF2h30LvYz3qSwQ; Sun, 12 Feb 2023 09:47:31 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF2h22DQ8z3kdf; Sun, 12 Feb 2023 09:47:30 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of antoine.brodin.freebsd@gmail.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=antoine.brodin.freebsd@gmail.com; dmarc=none Received: by mail-lf1-f47.google.com with SMTP id v17so14956209lfd.7; Sun, 12 Feb 2023 01:47:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a2bHPE+lk8nZCUO2/WEaQvW8lGV9sCErUkJCp1xX0cU=; b=PpaRpUkOHJx69red+0VYBCMp7ASznLj+ijHjtAJ0co4qrm+4xQn3nfoLDjFL2TAgk5 lO5SNilPE6picWDHeHPFrH650bhvjJVR1dvMU8Md3IoesHtA7jlZXGkqcfTH1x2/lQMt NY8DORFA4hfLHOzBf4V1vInPDnG6b9+JeitQ3Gr6uHklwgboHW4ckanaoA0U2B6dwn1S QgYD8pBMLI15Hw0W5gSshKxXnQpXJyG3W26V12Skl80CW4i99+UYP8CPjaFWX1kQkir9 GjiEbA41rELQPnvg/5HjQ0hn2S0lr9lAX06vEXvp2hLykj0m7uixAk5HpvvItoey890i xmRQ== X-Gm-Message-State: AO0yUKXBl6GZDycUdaJQw2Chb0Y8Jhis3KABQOvP6IU5qiI2/FZPfO+K 02hKz2Yl6AU9rBEr1yZZQE7lX79GwIdUmrOgDaENUxK6rzA= X-Google-Smtp-Source: AK7set+Ri60q2bpiKqo6jh0GDVvCk00DYw7Of+rxH2DG7120YknVD1dQF+gorbN+XRSBD5fw71Hm7C+tl4Oq+ey0HtU= X-Received: by 2002:ac2:431a:0:b0:4b5:5bf8:24fd with SMTP id l26-20020ac2431a000000b004b55bf824fdmr3444235lfh.187.1676195247496; Sun, 12 Feb 2023 01:47:27 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202301291318.30TDIq4Q008231@gitrepo.freebsd.org> In-Reply-To: <202301291318.30TDIq4Q008231@gitrepo.freebsd.org> From: Antoine Brodin Date: Sun, 12 Feb 2023 09:47:15 +0000 Message-ID: Subject: Re: git: c21b080f3dc2 - main - cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. To: Dmitry Chagin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; NEURAL_HAM_SHORT(-0.99)[-0.992]; FORGED_SENDER(0.30)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.47:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.47:from]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4PF2h22DQ8z3kdf X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Sun, Jan 29, 2023 at 1:18 PM Dmitry Chagin wrote: > > The branch main has been updated by dchagin: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > commit c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > Author: Dmitry Chagin > AuthorDate: 2023-01-29 13:17:33 +0000 > Commit: Dmitry Chagin > CommitDate: 2023-01-29 13:17:33 +0000 > > cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. > > Under Linux to sched_[g|s]etaffinity() functions the value returned from a call > to gettid(2) (thread id) can be passed in the argument pid. Specifying pid as 0 > will set the attribute for the calling thread, and passing the value returned > from a call to getpid(2) (process id) will set the attribute for the main thread > of the thread group. > > Native cpuset(2) family of system calls has "which" argument to determine how > the value of id argument is interpreted, i.e., CPU_WHICH_TID is used to pass > a thread id and CPU_WHICH_PID - to pass a process id. > > For now native sched_[g|s]etaffinity() implementation is wrong as uses "which" > CPU_WHICH_PID to pass both (process and thread id) to the kernel. To fix this > adding a new "which" CPU_WHICH_TIDPID intended to handle both id's. > > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D38209 > MFC after: 1 week > --- > lib/libc/gen/sched_getaffinity.c | 2 +- > lib/libc/gen/sched_setaffinity.c | 2 +- > lib/libc/sys/cpuset.2 | 4 +++- > sys/kern/kern_cpuset.c | 42 +++++++++++++++++++++++++++++++++++++++- > sys/sys/cpuset.h | 1 + > 5 files changed, 47 insertions(+), 4 deletions(-) Hello, This broke math/py-numpy on main and stable/13 https://pkg-status.freebsd.org/gohan03/data/main-amd64-default-baseline/p52768539d46f_scd3193f640/logs/errors/py39-numpy-1.24.1,1.log https://pkg-status.freebsd.org/gohan02/data/13stable-amd64-quarterly-baseline/841610d9bfc6/logs/errors/py39-numpy-1.23.5_1,1.log File "/wrkdirs/usr/ports/math/py-numpy/work-py39/numpy-1.23.5/numpy/distutils/misc_util.py", line 93, in get_num_build_jobs cpu_count = len(os.sched_getaffinity(0)) OverflowError: could not allocate a large enough CPU set Cheers, Antoine From nobody Sun Feb 12 10:40:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF3sw6Dprz3qYyF; Sun, 12 Feb 2023 10:41:08 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF3sw1qBqz3qbf; Sun, 12 Feb 2023 10:41:08 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 31CAexS4004575; Sun, 12 Feb 2023 13:40:59 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 31CAexA4004574; Sun, 12 Feb 2023 13:40:59 +0300 (MSK) (envelope-from dchagin) Date: Sun, 12 Feb 2023 13:40:59 +0300 From: Dmitry Chagin To: Antoine Brodin Cc: Dmitry Chagin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c21b080f3dc2 - main - cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. Message-ID: References: <202301291318.30TDIq4Q008231@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4PF3sw1qBqz3qbf X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sun, Feb 12, 2023 at 09:47:15AM +0000, Antoine Brodin wrote: > On Sun, Jan 29, 2023 at 1:18 PM Dmitry Chagin wrote: > > > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > commit c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > Author: Dmitry Chagin > > AuthorDate: 2023-01-29 13:17:33 +0000 > > Commit: Dmitry Chagin > > CommitDate: 2023-01-29 13:17:33 +0000 > > > > cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. > > > > Under Linux to sched_[g|s]etaffinity() functions the value returned from a call > > to gettid(2) (thread id) can be passed in the argument pid. Specifying pid as 0 > > will set the attribute for the calling thread, and passing the value returned > > from a call to getpid(2) (process id) will set the attribute for the main thread > > of the thread group. > > > > Native cpuset(2) family of system calls has "which" argument to determine how > > the value of id argument is interpreted, i.e., CPU_WHICH_TID is used to pass > > a thread id and CPU_WHICH_PID - to pass a process id. > > > > For now native sched_[g|s]etaffinity() implementation is wrong as uses "which" > > CPU_WHICH_PID to pass both (process and thread id) to the kernel. To fix this > > adding a new "which" CPU_WHICH_TIDPID intended to handle both id's. > > > > Reviewed by: kib > > Differential Revision: https://reviews.freebsd.org/D38209 > > MFC after: 1 week > > --- > > lib/libc/gen/sched_getaffinity.c | 2 +- > > lib/libc/gen/sched_setaffinity.c | 2 +- > > lib/libc/sys/cpuset.2 | 4 +++- > > sys/kern/kern_cpuset.c | 42 +++++++++++++++++++++++++++++++++++++++- > > sys/sys/cpuset.h | 1 + > > 5 files changed, 47 insertions(+), 4 deletions(-) > > > Hello, > > This broke math/py-numpy on main and stable/13 > > https://pkg-status.freebsd.org/gohan03/data/main-amd64-default-baseline/p52768539d46f_scd3193f640/logs/errors/py39-numpy-1.24.1,1.log > https://pkg-status.freebsd.org/gohan02/data/13stable-amd64-quarterly-baseline/841610d9bfc6/logs/errors/py39-numpy-1.23.5_1,1.log > > File "/wrkdirs/usr/ports/math/py-numpy/work-py39/numpy-1.23.5/numpy/distutils/misc_util.py", > line 93, in get_num_build_jobs > cpu_count = len(os.sched_getaffinity(0)) > OverflowError: could not allocate a large enough CPU set hi, Antoine, on stable/13 dchagin@heemeyer:~ % uname -a FreeBSD heemeyer.club 13.2-STABLE FreeBSD 13.2-STABLE #268 stable/13-n254471-51485f81b01a-dirty: Sat Feb 11 12:16:21 MSK 2023 dchagin@heemeyer.club:/usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 dchagin@heemeyer:~ % python3.9 Python 3.9.16 (main, Dec 18 2022, 01:15:32) [Clang 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a on freebsd13 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> len(os.sched_getaffinity(0)) 1 >>> os.sched_getaffinity(0) {0} >>> exit() dchagin@heemeyer:~ % on current: dchagin@mordor:~/freebsd % uname -a FreeBSD mordor.heemeyer.club 14.0-CURRENT FreeBSD 14.0-CURRENT #458 futex-n260850-52456667491d-dirty: Sat Feb 11 14:24:46 MSK 2023 dchagin@mordor.heemeyer.club:/home/dchagin/tmp/obj/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 dchagin@mordor:~/freebsd % python3.9 Python 3.9.16 (main, Dec 18 2022, 01:24:21) [Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc1238 on freebsd14 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> len(os.sched_getaffinity(0)) 16 >>> os.sched_getaffinity(0) {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} >>> exit() dchagin@mordor:~/freebsd % could you please show out of os.sched_getaffinity(0) ? From nobody Sun Feb 12 11:12:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF4Zk3PX3z3p8P6; Sun, 12 Feb 2023 11:13:02 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF4Zj2Kyrz3tsm; Sun, 12 Feb 2023 11:13:01 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of dchagin@heemeyer.club has no SPF policy when checking 195.93.173.158) smtp.mailfrom=dchagin@heemeyer.club; dmarc=none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 31CBCxYA000914; Sun, 12 Feb 2023 14:12:59 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 31CBCxEe000913; Sun, 12 Feb 2023 14:12:59 +0300 (MSK) (envelope-from dchagin) Date: Sun, 12 Feb 2023 14:12:59 +0300 From: Dmitry Chagin To: Antoine Brodin Cc: Dmitry Chagin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c21b080f3dc2 - main - cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. Message-ID: References: <202301291318.30TDIq4Q008231@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-2.10 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MIME_GOOD(-0.10)[text/plain]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[dchagin]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[heemeyer.club]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4PF4Zj2Kyrz3tsm X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Sun, Feb 12, 2023 at 01:40:59PM +0300, Dmitry Chagin wrote: > On Sun, Feb 12, 2023 at 09:47:15AM +0000, Antoine Brodin wrote: > > On Sun, Jan 29, 2023 at 1:18 PM Dmitry Chagin wrote: > > > > > > The branch main has been updated by dchagin: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > > > commit c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > Author: Dmitry Chagin > > > AuthorDate: 2023-01-29 13:17:33 +0000 > > > Commit: Dmitry Chagin > > > CommitDate: 2023-01-29 13:17:33 +0000 > > > > > > cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. > > > > > > Under Linux to sched_[g|s]etaffinity() functions the value returned from a call > > > to gettid(2) (thread id) can be passed in the argument pid. Specifying pid as 0 > > > will set the attribute for the calling thread, and passing the value returned > > > from a call to getpid(2) (process id) will set the attribute for the main thread > > > of the thread group. > > > > > > Native cpuset(2) family of system calls has "which" argument to determine how > > > the value of id argument is interpreted, i.e., CPU_WHICH_TID is used to pass > > > a thread id and CPU_WHICH_PID - to pass a process id. > > > > > > For now native sched_[g|s]etaffinity() implementation is wrong as uses "which" > > > CPU_WHICH_PID to pass both (process and thread id) to the kernel. To fix this > > > adding a new "which" CPU_WHICH_TIDPID intended to handle both id's. > > > > > > Reviewed by: kib > > > Differential Revision: https://reviews.freebsd.org/D38209 > > > MFC after: 1 week > > > --- > > > lib/libc/gen/sched_getaffinity.c | 2 +- > > > lib/libc/gen/sched_setaffinity.c | 2 +- > > > lib/libc/sys/cpuset.2 | 4 +++- > > > sys/kern/kern_cpuset.c | 42 +++++++++++++++++++++++++++++++++++++++- > > > sys/sys/cpuset.h | 1 + > > > 5 files changed, 47 insertions(+), 4 deletions(-) > > > > > > Hello, > > > > This broke math/py-numpy on main and stable/13 > > > > https://pkg-status.freebsd.org/gohan03/data/main-amd64-default-baseline/p52768539d46f_scd3193f640/logs/errors/py39-numpy-1.24.1,1.log > > https://pkg-status.freebsd.org/gohan02/data/13stable-amd64-quarterly-baseline/841610d9bfc6/logs/errors/py39-numpy-1.23.5_1,1.log > > > > File "/wrkdirs/usr/ports/math/py-numpy/work-py39/numpy-1.23.5/numpy/distutils/misc_util.py", > > line 93, in get_num_build_jobs > > cpu_count = len(os.sched_getaffinity(0)) > > OverflowError: could not allocate a large enough CPU set > > hi, Antoine, > > on stable/13 > dchagin@heemeyer:~ % uname -a > FreeBSD heemeyer.club 13.2-STABLE FreeBSD 13.2-STABLE #268 stable/13-n254471-51485f81b01a-dirty: Sat Feb 11 12:16:21 MSK 2023 dchagin@heemeyer.club:/usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > dchagin@heemeyer:~ % python3.9 > Python 3.9.16 (main, Dec 18 2022, 01:15:32) > [Clang 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a on freebsd13 > Type "help", "copyright", "credits" or "license" for more information. > >>> import os > >>> len(os.sched_getaffinity(0)) > 1 > >>> os.sched_getaffinity(0) > {0} > >>> exit() > dchagin@heemeyer:~ % > > on current: > dchagin@mordor:~/freebsd % uname -a > FreeBSD mordor.heemeyer.club 14.0-CURRENT FreeBSD 14.0-CURRENT #458 futex-n260850-52456667491d-dirty: Sat Feb 11 14:24:46 MSK 2023 dchagin@mordor.heemeyer.club:/home/dchagin/tmp/obj/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > dchagin@mordor:~/freebsd % python3.9 > Python 3.9.16 (main, Dec 18 2022, 01:24:21) > [Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc1238 on freebsd14 > Type "help", "copyright", "credits" or "license" for more information. > >>> import os > >>> len(os.sched_getaffinity(0)) > 16 > >>> os.sched_getaffinity(0) > {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} > >>> exit() > dchagin@mordor:~/freebsd % > > > could you please show out of os.sched_getaffinity(0) ? and os.cpu_count() also sysctl kern.smp thanks From nobody Sun Feb 12 11:46:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF5Kk28H0z3pDPk; Sun, 12 Feb 2023 11:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF5Kk1Ss7z41KG; Sun, 12 Feb 2023 11:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676202410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YU45OO3K2R3h4jRMtQ1BPBZI+RdW5YMVq2kI6m4tAdQ=; b=ps/SAbWEMVujgdSdPrqO/8DkjfM9a49Fq2JUxhRZOmzu+5lu8hDLgrvmghdf4aNWCq3M4l hmylh7nL4jQf+E8UZyBN3xsckyb9RX+R8gWVYbxTqxEwL/c8R1kSoVB3muvvhtyx8L77LQ lVuhJKmflurnxW8Y+cCWYfKClkwrziwmBZaVMpzV1Fjo1nyIv3NsZU2wbl2if7la2vMHFi 95C0arBgwx2WEzHOldpbJAqLkXx1lxbXBtYqETVom/rk6JDYUbL32/6HwiNBJgJKhYjAkH gNtAm5ft/GxCVCELpjJeYGmCUbvaffTFimeGddhC6jXZrXk2SzEPwCHiGi89aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676202410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YU45OO3K2R3h4jRMtQ1BPBZI+RdW5YMVq2kI6m4tAdQ=; b=NtsJ9erGkzGzYhH71PO+RljFpoN16b6xDT6F3pBb7OQAIJa2fA/GRPi5XBErC64mO1lWHt WX21E9t9WEVl/RGk7Lg3BIFvDu3yCHU31IxRXvA9vj/dxvT4sqZRl2sCova18Rs9yBgxxr rdQDO4E27lgj+BjEBIDhwURwKnMEvu+GlADUVxrQuu1dUq4VQpPlTxcWS2Aj3cpabwTD/N hdvGVB1gWbve29wv3n7r12lKZNuAwDbE8PHXM6T9gAobNMaAQLrc9oy91g/PP24VyzB6wc 9iU7H5FHWpnMmpzULuDSryS9bzCwyk0HrzwoC8QPmVlc8Tl+DDM/Fbev1EiXvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676202410; a=rsa-sha256; cv=none; b=EWWBRXNap8UCWBcq5QDIz2QTtAo9hlAWP07JspS9JWBBIrvS/lssWgEmvZqkGJC73FBy4Z rXBrypEhtPTq+733aGGnF+mHimaxwyrXN0w0QfgoEVsCrfg6UIPxXQlDqGCvgL66ztEZRh XTVIRxV7p6wwqqJ9qFgGSJm2VQ2CH5WNyLcVET8qM9uXoN72IGkoVdfWzqt97H33PyIeHH 417h1Rb1x++HKH0W3oUuA9Zpqme5t+9lm7hhg/7dPjhWxaNwz5FJQoMiry9MwJ+rfdC8vZ bZbHPreXGq7QL82847FDMUSBycXzQd/qDeBB8sCSPJKNwrO4ri8fhGmPrtw++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 4PF5Kk0Qcfzd6V; Sun, 12 Feb 2023 11:46: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 31CBknlp096364; Sun, 12 Feb 2023 11:46:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CBknWF096363; Sun, 12 Feb 2023 11:46:49 GMT (envelope-from git) Date: Sun, 12 Feb 2023 11:46:49 GMT Message-Id: <202302121146.31CBknWF096363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 629d9219d931 - main - netlink: make netlink_snl(3) c++ friendly. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 629d9219d931e63dc49ef046332b2a360e42a5f6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=629d9219d931e63dc49ef046332b2a360e42a5f6 commit 629d9219d931e63dc49ef046332b2a360e42a5f6 Author: Alexander V. Chernikov AuthorDate: 2023-02-10 20:19:09 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-12 11:46:38 +0000 netlink: make netlink_snl(3) c++ friendly. --- sys/netlink/netlink_snl.h | 22 +++++++++++++--------- sys/netlink/netlink_snl_route.h | 6 +++++- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 6e2c4b89a7c4..586cab391046 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -44,6 +44,7 @@ #include #include +__BEGIN_DECLS #define _roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) @@ -83,7 +84,7 @@ lb_allocz(struct linear_buffer *lb, int len) return (NULL); void *data = (void *)(lb->base + lb->offset); lb->offset += len; - return (data); + return ((char *)data); } static inline void @@ -132,10 +133,10 @@ struct snl_hdr_parser { #define SNL_DECLARE_PARSER(_name, _t, _fp, _np) \ static const struct snl_hdr_parser _name = { \ .hdr_off = sizeof(_t), \ - .fp = &((_fp)[0]), \ - .np = &((_np)[0]), \ .fp_size = NL_ARRAY_LEN(_fp), \ .np_size = NL_ARRAY_LEN(_np), \ + .fp = &((_fp)[0]), \ + .np = &((_np)[0]), \ } #define SNL_DECLARE_ATTR_PARSER(_name, _np) \ @@ -175,14 +176,14 @@ snl_init(struct snl_state *ss, int netlink_family) } ss->bufsize = rcvbuf; - ss->buf = malloc(ss->bufsize); + ss->buf = (char *)malloc(ss->bufsize); if (ss->buf == NULL) { snl_free(ss); return (false); } ss->lb.size = SCRATCH_BUFFER_SIZE; - ss->lb.base = calloc(1, ss->lb.size); + ss->lb.base = (char *)calloc(1, ss->lb.size); if (ss->lb.base == NULL) { snl_free(ss); return (false); @@ -360,7 +361,7 @@ snl_attr_get_uint16(struct snl_state *ss __unused, struct nlattr *nla, const void *arg __unused, void *target) { if (NLA_DATA_LEN(nla) == sizeof(uint16_t)) { - *((uint16_t *)target) = *((const uint16_t *)NLA_DATA_CONST(nla)); + *((uint16_t *)target) = *((const uint16_t *)NL_RTA_DATA_CONST(nla)); return (true); } return (false); @@ -371,7 +372,7 @@ snl_attr_get_uint32(struct snl_state *ss __unused, struct nlattr *nla, const void *arg __unused, void *target) { if (NLA_DATA_LEN(nla) == sizeof(uint32_t)) { - *((uint32_t *)target) = *((const uint32_t *)NLA_DATA_CONST(nla)); + *((uint32_t *)target) = *((const uint32_t *)NL_RTA_DATA_CONST(nla)); return (true); } return (false); @@ -396,7 +397,7 @@ snl_attr_get_stringn(struct snl_state *ss, struct nlattr *nla, { int maxlen = NLA_DATA_LEN(nla); - char *buf = snl_allocz(ss, maxlen + 1); + char *buf = (char *)snl_allocz(ss, maxlen + 1); if (buf == NULL) return (false); buf[maxlen] = '\0'; @@ -416,7 +417,8 @@ snl_attr_get_nested(struct snl_state *ss, struct nlattr *nla, const void *arg, v } static inline bool -snl_attr_get_nla(struct snl_state *ss __unused, struct nlattr *nla, void *target) +snl_attr_get_nla(struct snl_state *ss __unused, struct nlattr *nla, + const void *arg __unused, void *target) { *((struct nlattr **)target) = nla; return (true); @@ -440,4 +442,6 @@ snl_field_get_uint32(struct snl_state *ss __unused, void *src, void *target) *((uint32_t *)target) = *((uint32_t *)src); } +__END_DECLS + #endif diff --git a/sys/netlink/netlink_snl_route.h b/sys/netlink/netlink_snl_route.h index 4adb3d697ecd..19841bdd2f50 100644 --- a/sys/netlink/netlink_snl_route.h +++ b/sys/netlink/netlink_snl_route.h @@ -31,6 +31,8 @@ #include #include +__BEGIN_DECLS + /* * Simple Netlink Library - NETLINK_ROUTE helpers */ @@ -100,7 +102,7 @@ snl_attr_get_ip(struct snl_state *ss, struct nlattr *nla, static inline struct sockaddr * parse_rta_via(struct snl_state *ss, struct rtattr *rta, int *perror) { - struct rtvia *via = NL_RTA_DATA(rta); + struct rtvia *via = (struct rtvia *)NL_RTA_DATA(rta); switch (via->rtvia_family) { case AF_INET: @@ -127,4 +129,6 @@ snl_attr_get_ipvia(struct snl_state *ss, struct nlattr *nla, return (false); } +__END_DECLS + #endif From nobody Sun Feb 12 11:46:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF5Kl2nPVz3pDKJ; Sun, 12 Feb 2023 11:46: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 4PF5Kl219Qz41F9; Sun, 12 Feb 2023 11:46:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676202411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJMrtXvY3x3/ydVMTe3VE4AveL8Xsc6yOeU/efYvCBM=; b=p1NDJjtllnS33yf8iOofRGl6Muj2bSXDhrGBg9zfXrProvpreMGvCeC5iHUYjXVNF5Iyop wj7+7ADiB4Rebz6wglioiV3Sie5rO1UDg7u6BB92zwa8h9sAnS0jvE5VrOZ77JFbZc8S96 sdJN2r9lmE+hwfU1RM8JAo1l6Av3LUAqS4qYj2WJRN1d9UsJR4toxLqgr3L+THvt+Qf/ZJ 4MzIdI5ZfXWuMeaRCyPEXngideQKjsNSHPhAMDZXyTo0Pws8El97GJ9qsJ8NVGinIMUB6n Q5doIuwJkCoRHaW/ZTJ/2kDg8Dmv/uBWeCDCkqe2RJXUDSWEkN1SjRHcRjLB/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676202411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJMrtXvY3x3/ydVMTe3VE4AveL8Xsc6yOeU/efYvCBM=; b=eDb9uEIQTGi35XTbRK6kzWf/ygY4B3QBD1uF5iU7OdHXORJJowpaTQ3+BAv9aGZxnTg1M3 4bqwaZAT/A0o1/ZeyvAJX8jJCppzi+ttToSQUnHSLtRE1WRwoVn9LpGIK62cren1HjcADa 64Xhu/zC/xMeUcwBqn/djSVHevaXd8p3jTA47csuXgmp24PuN9bo8MjOj8a+9SKkAtingA CVSw4L8vyg9BFDvU7t2aHwEsX44xYAX9Y4D0wf7ASlRQAlTluUwuw4Q5xBZF2hWW/9LjbI lC2rfLGLPBY5fE63/xjkmoEIZU2yTk08p1SG1RY+g2SaWFT/avkCWPD0jTqmYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676202411; a=rsa-sha256; cv=none; b=lwCemwkYuoNLsycziCDnMBQ7ttpWNgtqBxUbd7nupS6DRo3aW1vEuSsldnu94uKnluZQhr lGHjBUuwe7D0gY4pbL/xPheSTxr2PG8GGZ1v0Ptj3Te2zsGB5Acoz9biVfYlw8ZauzQPuG F8aEuZMhZ84aTRUN2e0ZSNO9MxEYdSWPrsQNsCP84PhlLEJD3GlFlZTu/XrqLPqLFP9iDD aXULxBbYrMcDTg044dLGqYaYflcO2ngWElzwS8InURjMLe+mjOgq4H3rpVy1s+DY5UkAKT Li6G2mDV4Ik0zbCV9+6HaNNqZV+HLR+RFw6auaa3TaYukycLonbxfLNiytmpZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PF5Kl15dLzcmP; Sun, 12 Feb 2023 11:46: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 31CBkpnm096388; Sun, 12 Feb 2023 11:46:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CBkprW096387; Sun, 12 Feb 2023 11:46:51 GMT (envelope-from git) Date: Sun, 12 Feb 2023 11:46:51 GMT Message-Id: <202302121146.31CBkprW096387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 69e7d9b7e6b3 - main - fibs: restrict jail_attach(2) if process fibnum >= numfibs in the jail. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 69e7d9b7e6b369b760e1f189af2e25587b56a102 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=69e7d9b7e6b369b760e1f189af2e25587b56a102 commit 69e7d9b7e6b369b760e1f189af2e25587b56a102 Author: Alexander V. Chernikov AuthorDate: 2023-02-11 15:43:23 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-12 11:46:38 +0000 fibs: restrict jail_attach(2) if process fibnum >= numfibs in the jail. Reported by: olivier Tested by: olivier Reviewed by: kp, glebius Differential Revision: https://reviews.freebsd.org/D38505 MFC after: 1 week --- sys/net/route/route_tables.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c index 637a86573320..be67556915d0 100644 --- a/sys/net/route/route_tables.c +++ b/sys/net/route/route_tables.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -162,6 +163,39 @@ sys_setfib(struct thread *td, struct setfib_args *uap) return (error); } +static int +rtables_check_proc_fib(void *obj, void *data) +{ + struct prison *pr = obj; + struct thread *td = data; + int error = 0; + + if (TD_TO_VNET(td) != pr->pr_vnet) { + /* number of fibs may be lower in a new vnet */ + CURVNET_SET(pr->pr_vnet); + if (td->td_proc->p_fibnum >= V_rt_numfibs) + error = EINVAL; + CURVNET_RESTORE(); + } + return (error); +} + +static void +rtables_prison_destructor(void *data) +{ +} + +static void +rtables_init(void) +{ + osd_method_t methods[PR_MAXMETHOD] = { + [PR_METHOD_ATTACH] = rtables_check_proc_fib, + }; + osd_jail_register(rtables_prison_destructor, methods); +} +SYSINIT(rtables_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, rtables_init, NULL); + + /* * If required, copy interface routes from existing tables to the * newly-created routing table. From nobody Sun Feb 12 12:17:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF6175XnMz3pHL9; Sun, 12 Feb 2023 12:17: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 4PF617523Zz44Lp; Sun, 12 Feb 2023 12:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676204251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UtP0TvAiVBelVr9Mdp4dqwLMPXonMiZE7weX5J6o6WE=; b=SLhLbgRwbYbddKL0szvGKrwjpvZ5OvYNM0yPiCELyZ7za3oIeIOkSBDHdrHqWJwNsJtPfP B+O2KJDJ+BVEoDZL0IYI0FA8KoVMfX1xA5DXNFwP6RCz3W51NQefzHbJOHsECZk/kbx62n 4q8eXyumbRytqnmGdqyY4vo/EMD/+FNnaCuXLISgOCKM1hcH6xg1cQioOwvzP+bAIQ/GCc RBY33xg0H3Hi0zl+UCZo6t4+4nufc/ZipGvI5+DXVfmu1Lp4fiRKM5cZVgVaRN3I7+howh HwFDUABYHpu1zevdBqZJwOdqeKmk4J19QsybY5OHcPZ/93WuXBSOLm0giHhXxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676204251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UtP0TvAiVBelVr9Mdp4dqwLMPXonMiZE7weX5J6o6WE=; b=ao69rjId9mDfDrwb18/WJ8kFuOYegO6muZA0cAJMe5YKAkPjpq6TKbz4ba3eXcMPR2hf1U Pa7iIkYBR8q3mR/ckF+U67rwVbq7Sf3XtmKkS2LJH/xnsE3OwnjA/5EYp6JN1fhqFBop+t 8Kza8LTvfHmyWltLyt4laX0kE44uasA8gf/XDptsIOL+hTyuDu5coM+k+0AW9hxMY8YQXI TPKybHekCIGsaUIq7ZSZ5nFJzgj5IHBGsI0V+KUSkrdhTP6dDg++bR2YLkK8ZKgm+d+AX1 kj9uFJpDvsZEendVbToBspkTWsa7l9frZQMs9/fXCI+9UdIKNHzDVUv51Btg8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676204251; a=rsa-sha256; cv=none; b=Z31GFr8S/XAyWPnhpWajdBGUEVGIgbsYKE2L/80LelaZeZSfg1+ysWX7x4+Lq/vQGESoJD Z1y3kYHS+vD1xFbiNS11dLzgob+30CzWLoyLG4g/Y6rq01gHvDaw8FgwoHIROiIZLZdhHT QLakimMqtXueAOzLavbZQmHH5fZ7VY8V+XxIw0aZvMjyD0e1RoQi4G8RaMz33/UwbW71Z6 2+muLxDVTG/ZYkT3zwpULd4/5buSwXoZe8edPAWSsGQJixzyAfMz2skGneCSR5QoQntkB5 uFLx/QXvNGz7+uEvcKJbJSiGYmrB/OxNiNVJG/qow49NTi1J7krOnk4PC1uG6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PF617450jzdtf; Sun, 12 Feb 2023 12:17: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 31CCHVTD039900; Sun, 12 Feb 2023 12:17:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CCHVof039899; Sun, 12 Feb 2023 12:17:31 GMT (envelope-from git) Date: Sun, 12 Feb 2023 12:17:31 GMT Message-Id: <202302121217.31CCHVof039899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 6d7da7c8490f - main - Revert "netlink: make netlink_snl(3) c++ friendly." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 6d7da7c8490f625642faad93b890354cc749f5ae Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=6d7da7c8490f625642faad93b890354cc749f5ae commit 6d7da7c8490f625642faad93b890354cc749f5ae Author: Alexander V. Chernikov AuthorDate: 2023-02-12 12:16:58 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-12 12:17:05 +0000 Revert "netlink: make netlink_snl(3) c++ friendly." Was pushed accidentally. This reverts commit 629d9219d931e63dc49ef046332b2a360e42a5f6. --- sys/netlink/netlink_snl.h | 22 +++++++++------------- sys/netlink/netlink_snl_route.h | 6 +----- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 586cab391046..6e2c4b89a7c4 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -44,7 +44,6 @@ #include #include -__BEGIN_DECLS #define _roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) @@ -84,7 +83,7 @@ lb_allocz(struct linear_buffer *lb, int len) return (NULL); void *data = (void *)(lb->base + lb->offset); lb->offset += len; - return ((char *)data); + return (data); } static inline void @@ -133,10 +132,10 @@ struct snl_hdr_parser { #define SNL_DECLARE_PARSER(_name, _t, _fp, _np) \ static const struct snl_hdr_parser _name = { \ .hdr_off = sizeof(_t), \ - .fp_size = NL_ARRAY_LEN(_fp), \ - .np_size = NL_ARRAY_LEN(_np), \ .fp = &((_fp)[0]), \ .np = &((_np)[0]), \ + .fp_size = NL_ARRAY_LEN(_fp), \ + .np_size = NL_ARRAY_LEN(_np), \ } #define SNL_DECLARE_ATTR_PARSER(_name, _np) \ @@ -176,14 +175,14 @@ snl_init(struct snl_state *ss, int netlink_family) } ss->bufsize = rcvbuf; - ss->buf = (char *)malloc(ss->bufsize); + ss->buf = malloc(ss->bufsize); if (ss->buf == NULL) { snl_free(ss); return (false); } ss->lb.size = SCRATCH_BUFFER_SIZE; - ss->lb.base = (char *)calloc(1, ss->lb.size); + ss->lb.base = calloc(1, ss->lb.size); if (ss->lb.base == NULL) { snl_free(ss); return (false); @@ -361,7 +360,7 @@ snl_attr_get_uint16(struct snl_state *ss __unused, struct nlattr *nla, const void *arg __unused, void *target) { if (NLA_DATA_LEN(nla) == sizeof(uint16_t)) { - *((uint16_t *)target) = *((const uint16_t *)NL_RTA_DATA_CONST(nla)); + *((uint16_t *)target) = *((const uint16_t *)NLA_DATA_CONST(nla)); return (true); } return (false); @@ -372,7 +371,7 @@ snl_attr_get_uint32(struct snl_state *ss __unused, struct nlattr *nla, const void *arg __unused, void *target) { if (NLA_DATA_LEN(nla) == sizeof(uint32_t)) { - *((uint32_t *)target) = *((const uint32_t *)NL_RTA_DATA_CONST(nla)); + *((uint32_t *)target) = *((const uint32_t *)NLA_DATA_CONST(nla)); return (true); } return (false); @@ -397,7 +396,7 @@ snl_attr_get_stringn(struct snl_state *ss, struct nlattr *nla, { int maxlen = NLA_DATA_LEN(nla); - char *buf = (char *)snl_allocz(ss, maxlen + 1); + char *buf = snl_allocz(ss, maxlen + 1); if (buf == NULL) return (false); buf[maxlen] = '\0'; @@ -417,8 +416,7 @@ snl_attr_get_nested(struct snl_state *ss, struct nlattr *nla, const void *arg, v } static inline bool -snl_attr_get_nla(struct snl_state *ss __unused, struct nlattr *nla, - const void *arg __unused, void *target) +snl_attr_get_nla(struct snl_state *ss __unused, struct nlattr *nla, void *target) { *((struct nlattr **)target) = nla; return (true); @@ -442,6 +440,4 @@ snl_field_get_uint32(struct snl_state *ss __unused, void *src, void *target) *((uint32_t *)target) = *((uint32_t *)src); } -__END_DECLS - #endif diff --git a/sys/netlink/netlink_snl_route.h b/sys/netlink/netlink_snl_route.h index 19841bdd2f50..4adb3d697ecd 100644 --- a/sys/netlink/netlink_snl_route.h +++ b/sys/netlink/netlink_snl_route.h @@ -31,8 +31,6 @@ #include #include -__BEGIN_DECLS - /* * Simple Netlink Library - NETLINK_ROUTE helpers */ @@ -102,7 +100,7 @@ snl_attr_get_ip(struct snl_state *ss, struct nlattr *nla, static inline struct sockaddr * parse_rta_via(struct snl_state *ss, struct rtattr *rta, int *perror) { - struct rtvia *via = (struct rtvia *)NL_RTA_DATA(rta); + struct rtvia *via = NL_RTA_DATA(rta); switch (via->rtvia_family) { case AF_INET: @@ -129,6 +127,4 @@ snl_attr_get_ipvia(struct snl_state *ss, struct nlattr *nla, return (false); } -__END_DECLS - #endif From nobody Sun Feb 12 17:19:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFDjb6JC8z3qNWH; Sun, 12 Feb 2023 17:19: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 4PFDjb5gSQz3PsX; Sun, 12 Feb 2023 17:19:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676222371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDSEQxzWiALEL4DSu+dcpVhnzsyz/+OI57WSYhJs8Vc=; b=hcstsU07gwXMGq8Gb3X568XGKAnXB8LpeW731L2h0tx9AIXPApinDjpd1B0vWuAEEoOUUC n7IMhVWuc06CfGNjDDL8P0VFiNo6Ap0puESQt/Ua6uNpfI6tIl6z/FKocv3iqSHCLSa8lJ coTwsAeLfcU2gpPe7AL3Ru9yKOR7N/mihxHg8f7iM2OsfZIoGUNWThLvhWYrwtcdmb+0/m pWyG0XDJxhbGa9kcB5UcSLfiJKjfUG66ZID3ZyM6uBpAaWdjIXQ5BLLRN7pKRrMKglCf7p 5ycsLCvu2Pwi3JbekFsyISzkNL0bIfP5dbO3piK5HRZnVfHfiFAQBggxRY0BgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676222371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDSEQxzWiALEL4DSu+dcpVhnzsyz/+OI57WSYhJs8Vc=; b=wg8tZm63282Tr8GaixU+nJyqbg3efXHTBX2gsS9lsFGjEacBFs/iOddh/EOv+xkThfvoeO inBZh0rkEvJ9EZiAjtSVRpi0N39kKQcK4eSW9pGS94mApeKVdjc76Tbig8wedG9BKPbU/x f3t3NJwrqNE+Y86JaVhpmegGFfH/mhpfOHbd9UWHEXLkAIte6IxiruZprvTCNAHLlGoI+6 tNewh7WVm+fJF/nn3KfIT7vwQ8XI6Lb9CvnsVJzlGZ72aQ6TG9ojtDyYW9AffB6bk2AotN fKN2KrpaAgJMwAg6f7MNGkayf9NTK6ld7nb57QaJmlI+8wu6bauV/w+7itxoAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676222371; a=rsa-sha256; cv=none; b=veFcBbiT6dah31jWI8pZms2jlTJv//ghbGyFpBdebpmvJZY7CsoKlABS7upq6yy8rUxJGz jr0faRy8mcpQV88dvhFe+N70pYlg6oD2I8Dsm+kj9VKbzs9uQsUq2TrXGJwwvIBnkliAlc CFn9N7z3fl9YFsDCnsoOgjoQ6b4/sg3ATH6TrMHlwlpHD4oE163ze5S29y1buVPZV8jI1J dmTBR+MZq0m/vjBsM8eXzcmvLy3WmxdZ3jhfbMG2HErWjH1qWwUz4W4b6n6cFIEvn0Bz/M fOk7U+uJtFAWur3hJQHZQKh31FUzACFLNcpwdwtgGSgigOxI1Zt47VORE9tinw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFDjb4cSRzmV9; Sun, 12 Feb 2023 17:19: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 31CHJVdc069086; Sun, 12 Feb 2023 17:19:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CHJVeI069085; Sun, 12 Feb 2023 17:19:31 GMT (envelope-from git) Date: Sun, 12 Feb 2023 17:19:31 GMT Message-Id: <202302121719.31CHJVeI069085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: fcfdb76e12fb - main - nfsd: Fix initialization broken by 7344856e3a6d List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcfdb76e12fb3cdf584e6f06e56e7c48ec475cc6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=fcfdb76e12fb3cdf584e6f06e56e7c48ec475cc6 commit fcfdb76e12fb3cdf584e6f06e56e7c48ec475cc6 Author: Rick Macklem AuthorDate: 2023-02-12 17:16:56 +0000 Commit: Rick Macklem CommitDate: 2023-02-12 17:16:56 +0000 nfsd: Fix initialization broken by 7344856e3a6d Oops, although the vneting macros do not do anything yet, commit 7344856e3a6d did change where things are initialized and one of the initialization functions was not being called early enough. This patch moves nfsrvd_init(0) to the function called via (VNET_)SYSINIT() to fix this. Reported by: olivier MFC after: 3 months --- sys/fs/nfsserver/nfs_nfsdkrpc.c | 1 - sys/fs/nfsserver/nfs_nfsdport.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsserver/nfs_nfsdkrpc.c b/sys/fs/nfsserver/nfs_nfsdkrpc.c index 696af8a0e409..45459d115346 100644 --- a/sys/fs/nfsserver/nfs_nfsdkrpc.c +++ b/sys/fs/nfsserver/nfs_nfsdkrpc.c @@ -531,7 +531,6 @@ nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args) */ NFSD_LOCK(); if (NFSD_VNET(nfsrv_numnfsd) == 0) { - nfsrvd_init(0); nfsdev_time = time_second; p = td->td_proc; PROC_LOCK(p); diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 834a6b069899..bcc49f8bcac3 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3532,6 +3532,7 @@ nfsd_mntinit(void) return; } NFSD_VNET(nfsrv_mntinited) = true; + nfsrvd_init(0); NFSD_UNLOCK(); if (curthread->td_ucred->cr_prison == &prison0) From nobody Sun Feb 12 17:24:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFDqc2bWQz3qNmb; Sun, 12 Feb 2023 17:24: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 4PFDqb6QPXz3R6C; Sun, 12 Feb 2023 17:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676222683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fiy4VJ8hIaMpjOuK/STpErOvqIDYxubdE7w+XSmG1+k=; b=iOSWA1XXxt8F46/9xPmGGm18tUPMoGOMSE+N9z+nn+hxL1LyFupcB4UA10OdbmqFwe+rhJ fnyYbkD52SZh70/+kcC2QKf+2bNEwn6/yRBBZ2Diolr7sjvlhP9TcGaPPpr+uHwsanhDz2 /Kje+IYKk5gfVltFdPjh+WFIaD2R7rv6F8aH/xajbqaKNwTLidrnta/KkKzKGVE62s7v8b yxfZMFlM56DC9dgXlsWI3XKP4McxNqhmaU/SEtBnKiHxkaIszt1JcQxTs909kSVqKu8BPO tLYu5TaGGMgsonuQzhsr6A26/tuu9SnPB1WDoqfz5V1bdtWwNm2aZLPwQzDTMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676222683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fiy4VJ8hIaMpjOuK/STpErOvqIDYxubdE7w+XSmG1+k=; b=nldcLFpWC6nYPNZAnkh9b8OAm5+D3V2vrFdqf0MpfXCZiUmAxzCC+eEIZEEHDJ1IiEOlXI zHeaEcHAxusARNrkJ177xlD+XaD1g5xGLl/X9qHAqZFCgr+hl5sYXYiqqGK9omPax6tUVq TX2GjhjLkMne5kPwtCYzF+yYsVoJeJAH/N0XXnmp28LWLV2mu3xgr3c3MdhG6quVR31zSr h9i2SGyqzrplkNIev0XH64vTWcnGPjCEfBSVXCIkmrDKyeC0bplOMT9xLbl4M/X9YafviY AGE8jgAlg4VPszo1gVOBnFYh6vjjvefUedY38NqbM+t2LXZ6X/X3UdkM03/6jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676222683; a=rsa-sha256; cv=none; b=LmiX0o5ke9eM2xversIJlFaEgW1uGFaPvPh5+P4x4A8uZZ8bQRCgKhkuVQN8jo1ItUdG+p 0V0aNN3oqMydfVC1Tfn+Bzkef3/LwQVUaFPVQ4WqSwLXHZTjO6j9YYXn1FGreqhU7WOZgI Q4Xmr1sdW3Uj2YKFdzWKBJCKlGDoRt5XvQVvyQYGZneeRkTXYubpCKYgddktoz+WrDfAjn qlPmCnP9pErRkLv8IAthF674DNOCqhkh7mxBj3myZblZgXxkqOfMleLko51k0Zvk9OwfBX /UZcmxtCXqgKLiCTmP2ttr7aDOX01PtJfoe6MOamXtMCwKYIK+00KoCAcV88kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFDqb5WBRzmW3; Sun, 12 Feb 2023 17:24: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 31CHOhAo082380; Sun, 12 Feb 2023 17:24:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CHOhBR082379; Sun, 12 Feb 2023 17:24:43 GMT (envelope-from git) Date: Sun, 12 Feb 2023 17:24:43 GMT Message-Id: <202302121724.31CHOhBR082379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 10d16789a383 - main - linux(4): Get rid of the opt_compat.h include. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10d16789a383a5b9e007dfd4c2e7844e044eaf7d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=10d16789a383a5b9e007dfd4c2e7844e044eaf7d commit 10d16789a383a5b9e007dfd4c2e7844e044eaf7d Author: Dmitry Chagin AuthorDate: 2023-02-12 17:24:32 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-12 17:24:32 +0000 linux(4): Get rid of the opt_compat.h include. Since e013e369 COMPAT_LINUX, COMPAT_LINUX32 build options are removed, so include of opt_compat.h is no more needed. MFC after: 2 weeks --- sys/amd64/linux32/linux32_machdep.c | 2 -- sys/amd64/linux32/linux32_sysvec.c | 2 -- sys/arm64/linux/linux_dummy_machdep.c | 2 -- sys/compat/linux/linux_elf.c | 2 -- sys/compat/linux/linux_event.c | 2 -- sys/compat/linux/linux_file.c | 2 -- sys/compat/linux/linux_fork.c | 2 -- sys/compat/linux/linux_futex.c | 2 -- sys/compat/linux/linux_getcwd.c | 2 -- sys/compat/linux/linux_ioctl.c | 2 -- sys/compat/linux/linux_ipc.c | 2 -- sys/compat/linux/linux_misc.c | 2 -- sys/compat/linux/linux_signal.c | 2 -- sys/compat/linux/linux_socket.c | 2 -- sys/compat/linux/linux_stats.c | 2 -- sys/compat/linux/linux_sysctl.c | 2 -- sys/compat/linux/linux_time.c | 2 -- sys/compat/linux/linux_timer.c | 2 -- sys/compat/linux/linux_uid16.c | 2 -- sys/compat/linux/linux_vdso.c | 2 -- sys/i386/linux/linux_copyout.c | 2 -- sys/modules/linux/Makefile | 1 - sys/modules/linux64/Makefile | 1 - sys/x86/linux/linux_dummy_x86.c | 2 -- 24 files changed, 46 deletions(-) diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 9746c4bd7cdf..5599cbff2525 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -33,8 +33,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 6e40a6a82a39..88720ac7199b 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -32,8 +32,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_compat.h" - #include __FBSDID("$FreeBSD$"); diff --git a/sys/arm64/linux/linux_dummy_machdep.c b/sys/arm64/linux/linux_dummy_machdep.c index 22ad39a84eeb..40cab9baad10 100644 --- a/sys/arm64/linux/linux_dummy_machdep.c +++ b/sys/arm64/linux/linux_dummy_machdep.c @@ -28,8 +28,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index cde72e3ed99a..43df9508d470 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -40,8 +40,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c index 002987ed3c0e..fc27996580c2 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 3b712cf71e60..29a0afaeedda 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index 7654e447f878..6918868b2c50 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -31,8 +31,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index d16e047f831c..7d75889d2dce 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c index 4917641be5e5..304a72d06588 100644 --- a/sys/compat/linux/linux_getcwd.c +++ b/sys/compat/linux/linux_getcwd.c @@ -38,8 +38,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index deb84fd8dc93..a9d39ef18429 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_compat.h" - #include __FBSDID("$FreeBSD$"); diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index 134e353122c1..5f0c22b49e58 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_compat.h" - #ifdef COMPAT_LINUX32 #include #include diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index f9b720cfc0b8..98bbe4b4cbb9 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -32,8 +32,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 09bcbcef4427..26da86eba9f7 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -47,8 +47,6 @@ __FBSDID("$FreeBSD$"); #include -#include "opt_compat.h" - #ifdef COMPAT_LINUX32 #include #include diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 42dd7bcb3d36..4bf528943d4f 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -/* XXX we use functions that might not exist. */ -#include "opt_compat.h" #include "opt_inet6.h" #include diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index a1cc2bb7bf8b..1049cb54748b 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c index 36f76c088ca3..abf2c898902d 100644 --- a/sys/compat/linux/linux_sysctl.c +++ b/sys/compat/linux/linux_sysctl.c @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c index 32db84a570b9..c35d257cd78c 100644 --- a/sys/compat/linux/linux_time.c +++ b/sys/compat/linux/linux_time.c @@ -37,8 +37,6 @@ __FBSDID("$FreeBSD$"); __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.14 2006/05/14 03:40:54 christos Exp $"); #endif -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_timer.c b/sys/compat/linux/linux_timer.c index 3e844704f132..4b888eac7718 100644 --- a/sys/compat/linux/linux_timer.c +++ b/sys/compat/linux/linux_timer.c @@ -30,8 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 4dd4129cfa0b..149d75459bc8 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/compat/linux/linux_vdso.c b/sys/compat/linux/linux_vdso.c index f5fc7a20b1ef..b4093e64eb83 100644 --- a/sys/compat/linux/linux_vdso.c +++ b/sys/compat/linux/linux_vdso.c @@ -26,8 +26,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) #define __ELF_WORD_SIZE 32 #else diff --git a/sys/i386/linux/linux_copyout.c b/sys/i386/linux/linux_copyout.c index 5672787d5df7..3227d904a235 100644 --- a/sys/i386/linux/linux_copyout.c +++ b/sys/i386/linux/linux_copyout.c @@ -31,8 +31,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index ffb19782c225..b3d662740df9 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -34,7 +34,6 @@ SRCS= linux${SFX}_dummy_machdep.c \ linux_timer.c \ linux_uid16.c \ linux_vdso.c \ - opt_compat.h \ opt_inet6.h \ opt_ktrace.h \ opt_posix.h \ diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index 7d9929f7e14b..7f264471bcd8 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -29,7 +29,6 @@ SRCS= linux_dummy_machdep.c \ linux_time.c \ linux_vdso.c \ linux_timer.c \ - opt_compat.h \ opt_ktrace.h \ opt_inet6.h \ opt_posix.h \ diff --git a/sys/x86/linux/linux_dummy_x86.c b/sys/x86/linux/linux_dummy_x86.c index c48443096180..54799c1f0df2 100644 --- a/sys/x86/linux/linux_dummy_x86.c +++ b/sys/x86/linux/linux_dummy_x86.c @@ -28,8 +28,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" - #include #include #include From nobody Sun Feb 12 19:58:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFJDr6DlRz3rBl1; Sun, 12 Feb 2023 19:58:20 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFJDr4GH6z42R7; Sun, 12 Feb 2023 19:58:20 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f182.google.com with SMTP id z37so2350015ljq.8; Sun, 12 Feb 2023 11:58:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eoNwjiSNe0S1uKLyMTxDZAQuU5rM5MsLgHFGQIMCxwg=; b=Rmds9JYeRBx5N8wUZfaGQoj23JdQzLYj4mRSxXDghwZULup1I+4ITG6aXXy4ana2XL a7YbFRhoJeprPJYkcqr4+QUWEujpUqlLglN4papdm+oq+I+RoC4EbDCPhGiLxkgnopt4 LsYozS3WKu3lWVL7n28nmHb8eKHnfDUK44a2Q+D9kS6O8Rdr9sHaTNvRf0OMgaQO20dK TakDrfLYtemWw8QkPvpGFay3Wp2F/ztEitHY6jZbM3MMfVJ71Ate5FGzr1fKTMMMoX28 Lt6v3BGdKmc1YiBBZ6P/paF7RxpeQezUvNVUcX2UIQehK+qkednimNyPzSVyeCxcSQFf WXHQ== X-Gm-Message-State: AO0yUKU6jOz/sSV8sH4X9xQGXbbaUjIc9qk9PspT0p3QVL1q/LdUi1aB bpgxeATgaVMhYo9JTlZjaQ6pV9lhxDC36n/1ToI= X-Google-Smtp-Source: AK7set/C/3cp/vVSEABW3mN+XsEKTWcNfWjUS9ArJnhfYW08PCTMUnxu86LZ3KUsLydKavfbVV9JUarJ8BS69qYCaco= X-Received: by 2002:a2e:b537:0:b0:28f:81a2:6eb with SMTP id z23-20020a2eb537000000b0028f81a206ebmr4160023ljm.118.1676231898022; Sun, 12 Feb 2023 11:58:18 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202301291318.30TDIq4Q008231@gitrepo.freebsd.org> In-Reply-To: From: Antoine Brodin Date: Sun, 12 Feb 2023 19:58:07 +0000 Message-ID: Subject: Re: git: c21b080f3dc2 - main - cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. To: Dmitry Chagin Cc: Dmitry Chagin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PFJDr4GH6z42R7 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]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sun, Feb 12, 2023 at 11:13 AM Dmitry Chagin wrote: > > On Sun, Feb 12, 2023 at 01:40:59PM +0300, Dmitry Chagin wrote: > > On Sun, Feb 12, 2023 at 09:47:15AM +0000, Antoine Brodin wrote: > > > On Sun, Jan 29, 2023 at 1:18 PM Dmitry Chagin wrote: > > > > > > > > The branch main has been updated by dchagin: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > > > > > commit c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > Author: Dmitry Chagin > > > > AuthorDate: 2023-01-29 13:17:33 +0000 > > > > Commit: Dmitry Chagin > > > > CommitDate: 2023-01-29 13:17:33 +0000 > > > > > > > > cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. > > > > > > > > Under Linux to sched_[g|s]etaffinity() functions the value returned from a call > > > > to gettid(2) (thread id) can be passed in the argument pid. Specifying pid as 0 > > > > will set the attribute for the calling thread, and passing the value returned > > > > from a call to getpid(2) (process id) will set the attribute for the main thread > > > > of the thread group. > > > > > > > > Native cpuset(2) family of system calls has "which" argument to determine how > > > > the value of id argument is interpreted, i.e., CPU_WHICH_TID is used to pass > > > > a thread id and CPU_WHICH_PID - to pass a process id. > > > > > > > > For now native sched_[g|s]etaffinity() implementation is wrong as uses "which" > > > > CPU_WHICH_PID to pass both (process and thread id) to the kernel. To fix this > > > > adding a new "which" CPU_WHICH_TIDPID intended to handle both id's. > > > > > > > > Reviewed by: kib > > > > Differential Revision: https://reviews.freebsd.org/D38209 > > > > MFC after: 1 week > > > > --- > > > > lib/libc/gen/sched_getaffinity.c | 2 +- > > > > lib/libc/gen/sched_setaffinity.c | 2 +- > > > > lib/libc/sys/cpuset.2 | 4 +++- > > > > sys/kern/kern_cpuset.c | 42 +++++++++++++++++++++++++++++++++++++++- > > > > sys/sys/cpuset.h | 1 + > > > > 5 files changed, 47 insertions(+), 4 deletions(-) > > > > > > > > > Hello, > > > > > > This broke math/py-numpy on main and stable/13 > > > > > > https://pkg-status.freebsd.org/gohan03/data/main-amd64-default-baseline/p52768539d46f_scd3193f640/logs/errors/py39-numpy-1.24.1,1.log > > > https://pkg-status.freebsd.org/gohan02/data/13stable-amd64-quarterly-baseline/841610d9bfc6/logs/errors/py39-numpy-1.23.5_1,1.log > > > > > > File "/wrkdirs/usr/ports/math/py-numpy/work-py39/numpy-1.23.5/numpy/distutils/misc_util.py", > > > line 93, in get_num_build_jobs > > > cpu_count = len(os.sched_getaffinity(0)) > > > OverflowError: could not allocate a large enough CPU set > > > > hi, Antoine, > > > > on stable/13 > > dchagin@heemeyer:~ % uname -a > > FreeBSD heemeyer.club 13.2-STABLE FreeBSD 13.2-STABLE #268 stable/13-n254471-51485f81b01a-dirty: Sat Feb 11 12:16:21 MSK 2023 dchagin@heemeyer.club:/usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > > dchagin@heemeyer:~ % python3.9 > > Python 3.9.16 (main, Dec 18 2022, 01:15:32) > > [Clang 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a on freebsd13 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import os > > >>> len(os.sched_getaffinity(0)) > > 1 > > >>> os.sched_getaffinity(0) > > {0} > > >>> exit() > > dchagin@heemeyer:~ % > > > > on current: > > dchagin@mordor:~/freebsd % uname -a > > FreeBSD mordor.heemeyer.club 14.0-CURRENT FreeBSD 14.0-CURRENT #458 futex-n260850-52456667491d-dirty: Sat Feb 11 14:24:46 MSK 2023 dchagin@mordor.heemeyer.club:/home/dchagin/tmp/obj/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > > dchagin@mordor:~/freebsd % python3.9 > > Python 3.9.16 (main, Dec 18 2022, 01:24:21) > > [Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc1238 on freebsd14 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import os > > >>> len(os.sched_getaffinity(0)) > > 16 > > >>> os.sched_getaffinity(0) > > {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} > > >>> exit() > > dchagin@mordor:~/freebsd % > > > > > > could you please show out of os.sched_getaffinity(0) ? > > and os.cpu_count() > also sysctl kern.smp Here is what I have in the head jail: >>> len(os.sched_getaffinity(0)) Traceback (most recent call last): File "", line 1, in OverflowError: could not allocate a large enough CPU set >>> os.sched_getaffinity(0) Traceback (most recent call last): File "", line 1, in OverflowError: could not allocate a large enough CPU set >>> os.cpu_count() 64 >>> root@mainamd64PR269425-default:~ # sysctl kern.smp kern.smp.forward_signal_enabled: 1 kern.smp.topology: 0 kern.smp.cores: 32 kern.smp.threads_per_core: 2 kern.smp.cpus: 64 kern.smp.disabled: 0 kern.smp.active: 1 kern.smp.maxcpus: 256 kern.smp.maxid: 63 Antoine From nobody Sun Feb 12 21:13:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFKv31tr5z3rLHb; Sun, 12 Feb 2023 21:13: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 4PFKv31FwMz4J7t; Sun, 12 Feb 2023 21:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676236383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NsYwT3HfqjUOQyiK60I8Jahsvj4a97xcA5xqJlMMgIs=; b=x4Jl1Ioc98ar8Ykp0tkYi7Zh5vtUjiblguFZtFW7PGdNMnQR2s11z1Ib3Y5j1lWsNsV8wW yKWs5a4E1Iaa/5gS6TARWth5Q7pkQ1xxs+VKCKv6as0cKf17kLZcttuYOhwBHjCsP34SOD 4kboC0m/2PqtVY3nuHsZB3RzySwCHEC47FPkVKePZfSD6YIP2fmlm2qomJb3R/aOZiE8la B7zzTYEoCTcIJgVn8Ee7SULvN+VgdOE0UZxZBefUx1tVrYl4UdwNFLAGnp2cUfIjHhSilX v40efr/dEPFfRUlewczyYgo28C2jC41Jp8iulrUdG533zkkKMjkYRxeDBOvizw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676236383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NsYwT3HfqjUOQyiK60I8Jahsvj4a97xcA5xqJlMMgIs=; b=brYchLE3A3pjBO9/ySQXTt4g0P1Y8IcYAwnzqJTrYzep2kAogVoRxb0uOKl7TaPPgYb1Nj /eUsWPSskxOH6vceO+PFB3yoKDMXeBXNT/Jtzp7TB4SchTNwVBi+hqkzsLvDfKsmEheouh 2CGExLhBHyNbSxwvgU/ocsCrZhU2HhfvLyRwPt0Sd74n260dFyxhuCQURO2PnGlSAkV3yp kfMBHyHiRJx8UpmKyjt+TKaEvyBRRqAUae4c4EwlfPwk4T1E+InaUC35w99y9RSXtthlgW +GwY7bETfM2B3J8jAGEDUmcDVjwY712O3vgxwFq0ErBgydxXjotqaWG4MH7g0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676236383; a=rsa-sha256; cv=none; b=TiG9v3fhf/E+zOLI7TtFbkuG9rP8RChUDyPfu4n8JvgDNQoKUHXCXyr9Zas4tKCaPhYDF+ umVbAODD8zE0xlmoRFDQT5Luci92oRaj/Szhbe5t5bV7PC9IxCnpoPJqZzgJxZkreiuEZz kzzpZZuZRQU9wecDjv8722oo/rOhCXeoxxnP5YV3DMRgN6Nj/SMBO3g43uMgKbelB7lBTQ nO/m5Plw8NNSoLoOg5Irb/38z+EFxpqvPonAa/8E2Z0wIygahGj7C7gqn7HSMpxFmGnUPR 2GyuK4my4S8qfu0VD07uN+hFEfLPNRC2O2/CBhd2NmMnoQ9fN8MN3LT4mm+mVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFKv275THztLL; Sun, 12 Feb 2023 21:13: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 31CLD2wi012259; Sun, 12 Feb 2023 21:13:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CLD2av012258; Sun, 12 Feb 2023 21:13:02 GMT (envelope-from git) Date: Sun, 12 Feb 2023 21:13:02 GMT Message-Id: <202302122113.31CLD2av012258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: eca005d8531f - main - zlib: silence K&R warns List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eca005d8531fd153f46f941f3101e73cdf181a0b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=eca005d8531fd153f46f941f3101e73cdf181a0b commit eca005d8531fd153f46f941f3101e73cdf181a0b Author: Mateusz Guzik AuthorDate: 2023-02-12 21:12:34 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-12 21:12:34 +0000 zlib: silence K&R warns Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/conf/files | 18 +++++++++++------- sys/modules/zlib/Makefile | 2 ++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 9171b434a7bf..53f90f7afc22 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard libkern/strvalid.c standard libkern/timingsafe_bcmp.c standard contrib/zlib/adler32.c optional crypto | geom_uzip | \ - mxge | ddb_ctf | gzio | zfs | zlib + mxge | ddb_ctf | gzio | zfs | zlib \ + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" contrib/zlib/compress.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-cast-qual" + compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype" contrib/zlib/crc32.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" contrib/zlib/deflate.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-cast-qual" + compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype" contrib/zlib/inffast.c optional crypto | geom_uzip | \ - mxge | ddb_ctf | gzio | zfs | zlib + mxge | ddb_ctf | gzio | zfs | zlib \ + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" contrib/zlib/inflate.c optional crypto | geom_uzip | \ - mxge | ddb_ctf | gzio | zfs | zlib + mxge | ddb_ctf | gzio | zfs | zlib \ + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" contrib/zlib/inftrees.c optional crypto | geom_uzip | \ - mxge | ddb_ctf | gzio | zfs | zlib + mxge | ddb_ctf | gzio | zfs | zlib \ + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" contrib/zlib/trees.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" contrib/zlib/uncompr.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-cast-qual" + compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype" contrib/zlib/zutil.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile index 6391255e512b..178d3a3f7ab7 100644 --- a/sys/modules/zlib/Makefile +++ b/sys/modules/zlib/Makefile @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=${NO_WSTRICT_PROTOTYPES} # crc32.c:586 CWARNFLAGS.trees.c+=${NO_WSTRICT_PROTOTYPES} # trees.c:232 CWARNFLAGS.zutil.c+=${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 +CWARNFLAGS+=-Wno-deprecated-non-prototype + .include From nobody Sun Feb 12 21:18:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFL1r4c4yz3rLjQ for ; Sun, 12 Feb 2023 21:18:56 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFL1r2klvz4JZr for ; Sun, 12 Feb 2023 21:18:56 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f49.google.com with SMTP id r18so7440473wmq.5 for ; Sun, 12 Feb 2023 13:18:56 -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=cE6lz/4G7ZhN3pb+bPl4vz6LlnW12mxXiB+ltMignYE=; b=STkxjwlhBb1WMV66jWxVWDz42arjQmMWkACDYL6jmcZXrp3NYXmZaavJQ0Znsp57bO IVyyzD6TKn6zsEiE5mebLg6rHUR/Zyx6cAAlJDpgkIyjxPFy3DXFDE2PJhTrN34OxV/e IkRMsMyAuHfrVwQmzUlf+W8Lg7+zaMUEs2+ZNgmwWwYc6WGutRu8xyidhVh8c+i5YUUs fWpHe3bxBwbhdr0RJpQDQ4V928BxZwZWc7kAjx7/Un+SL3TySv9DZ6D/0FbKlkNlIjJ6 +YvGLcUGqdWt4UdCqMbL6DZaqNhakobX8w+sXU5vaoNg0ifebEiRGroDErV/NcATD2XC Dcqg== X-Gm-Message-State: AO0yUKXQc0nNn2ly58NeBTW7IQZGuHSMPOKsaYpafF9XuGsaD/E7HgGv ktKtPeFVE8YcnrTiSWvEHfaIPA== X-Google-Smtp-Source: AK7set/hLDRjo3uWW3z69qDx4Es5ZAus9LfoVdVjqwnhG04XvlBPKtKGDscyDKJm2vImW+Jso9FtjA== X-Received: by 2002:a05:600c:490a:b0:3dc:433a:e952 with SMTP id f10-20020a05600c490a00b003dc433ae952mr17211145wmp.33.1676236734977; Sun, 12 Feb 2023 13:18:54 -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 l19-20020a05600c2cd300b003dfefe115b9sm13199360wmc.0.2023.02.12.13.18.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Feb 2023 13:18:54 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns From: Jessica Clarke In-Reply-To: <202302122113.31CLD2av012258@gitrepo.freebsd.org> Date: Sun, 12 Feb 2023 21:18:53 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4PFL1r2klvz4JZr 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 12 Feb 2023, at 21:13, Mateusz Guzik wrote: >=20 > The branch main has been updated by mjg: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e73c= df181a0b >=20 > commit eca005d8531fd153f46f941f3101e73cdf181a0b > Author: Mateusz Guzik > AuthorDate: 2023-02-12 21:12:34 +0000 > Commit: Mateusz Guzik > CommitDate: 2023-02-12 21:12:34 +0000 >=20 > zlib: silence K&R warns >=20 > Sponsored by: Rubicon Communications, LLC ("Netgate") > --- > sys/conf/files | 18 +++++++++++------- > sys/modules/zlib/Makefile | 2 ++ > 2 files changed, 13 insertions(+), 7 deletions(-) >=20 > diff --git a/sys/conf/files b/sys/conf/files > index 9171b434a7bf..53f90f7afc22 100644 > --- a/sys/conf/files > +++ b/sys/conf/files > @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard > libkern/strvalid.c standard > libkern/timingsafe_bcmp.c standard > contrib/zlib/adler32.c optional crypto | geom_uzip | \ > - mxge | ddb_ctf | gzio | zfs | zlib > + mxge | ddb_ctf | gzio | zfs | zlib \ > + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" This doesn=E2=80=99t exist pre-Clang 15. Jess > contrib/zlib/compress.c optional crypto | geom_uzip | \ > mxge | ddb_ctf | gzio | zfs | zlib \ > - compile-with "${NORMAL_C} -Wno-cast-qual" > + compile-with "${NORMAL_C} -Wno-cast-qual = -Wno-deprecated-non-prototype" > contrib/zlib/crc32.c optional crypto | geom_uzip | \ > mxge | ddb_ctf | gzio | zfs | zlib \ > compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > contrib/zlib/deflate.c optional crypto | geom_uzip | \ > mxge | ddb_ctf | gzio | zfs | zlib \ > - compile-with "${NORMAL_C} -Wno-cast-qual" > + compile-with "${NORMAL_C} -Wno-cast-qual = -Wno-deprecated-non-prototype" > contrib/zlib/inffast.c optional crypto | geom_uzip | \ > - mxge | ddb_ctf | gzio | zfs | zlib > + mxge | ddb_ctf | gzio | zfs | zlib \ > + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > contrib/zlib/inflate.c optional crypto | geom_uzip | \ > - mxge | ddb_ctf | gzio | zfs | zlib > + mxge | ddb_ctf | gzio | zfs | zlib \ > + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > contrib/zlib/inftrees.c optional crypto | geom_uzip | \ > - mxge | ddb_ctf | gzio | zfs | zlib > + mxge | ddb_ctf | gzio | zfs | zlib \ > + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > contrib/zlib/trees.c optional crypto | geom_uzip | \ > mxge | ddb_ctf | gzio | zfs | zlib \ > compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > contrib/zlib/uncompr.c optional crypto | geom_uzip | \ > mxge | ddb_ctf | gzio | zfs | zlib \ > - compile-with "${NORMAL_C} -Wno-cast-qual" > + compile-with "${NORMAL_C} -Wno-cast-qual = -Wno-deprecated-non-prototype" > contrib/zlib/zutil.c optional crypto | geom_uzip | \ > mxge | ddb_ctf | gzio | zfs | zlib \ > compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile > index 6391255e512b..178d3a3f7ab7 100644 > --- a/sys/modules/zlib/Makefile > +++ b/sys/modules/zlib/Makefile > @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPES} # = crc32.c:586 > CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 > CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 >=20 > +CWARNFLAGS+=3D-Wno-deprecated-non-prototype > + > .include From nobody Sun Feb 12 21:23:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFL7P6m7pz3p8DY; Sun, 12 Feb 2023 21:23:45 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (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 4PFL7P2jHVz4KXr; Sun, 12 Feb 2023 21:23:45 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x236.google.com with SMTP id bd6so8752100oib.6; Sun, 12 Feb 2023 13:23:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=u27xuN1lplR2O6jI4ehTKuoJzAn1tDMLU7wUDV8Mf0A=; b=DUoCnqbljfikMEhmaquSbvOZo7SmvTigPv05TpZwRumWbn3Gt1FphCxFOHgD/0v6El TQKwpGLrolm5tkyrdfnXaO+RNdGJdG7opdtsDwVyfNqNIJ0ldurscgMXkZzBDaRuY5LS 3UbSTfdk+BbVVqUzRF88D/VmgpMicIOeFelxyipAbFgFtJVHHlm453kvCCgQAGvIhZfo wcS2ZEfdM2KFGZMNJDqMq3S1k/lq9ZMzcP8ttnyYzEGNjclIrxSyINUHHwhnfy0kqWKx AygkGaAb+9nd45O0h9URYMlVivM3Pv/lqC0CWIrqfXqqzo3oG7o8OmpHWjrTs7ncA0Ip 4N/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u27xuN1lplR2O6jI4ehTKuoJzAn1tDMLU7wUDV8Mf0A=; b=3i15F+Be5CAkPqHTrHwZMKkCw6zca/u/PL1aGySrh/e4rmtu/mY7L2hC2o3/6pgPFU e6Meh5knGaoKTaq3U7sUIzZbN+8mgUOekNPfnbV5CeFuTcDBbDwRgOsrHlqFUEoD5Zq7 PnjUWZ3LKt3Ty4OyFC7wrKJfHZhjTOm+XF1vpSfhakdFLL/NXMO8L4t+KeKAH4YOJT8k Yv/s9iNOp4LWFh4OHa3XaL3dPq08UXbQl+7FDFH+MDh3Wg0sUwYDHqto7EDowga6BsJZ wDHU/79FdliSa9pI3EgI/pU/gVWzs+09cbA2yBLEfrS1R0dlQ7kF0xeoc2j2EX8eOQl+ DI4Q== X-Gm-Message-State: AO0yUKXtmEPAHE7/nflZVj6LPwHZBIWrDofBtrRmg419vSCneH1dFz2C XZ2ZLxvqRsvh+41HtoTwrKgF87ZTYOshIsPp/dWVO4of X-Google-Smtp-Source: AK7set9rxI3idqD/ckrtvRN9vo5Lh/+G/BdNreg6p4dSV3dLZKh5io2TayIHRMViXarBczshdGclpsh4Jctq77tBSNU= X-Received: by 2002:aca:91a:0:b0:37d:6ebd:605 with SMTP id 26-20020aca091a000000b0037d6ebd0605mr586999oij.159.1676237023676; Sun, 12 Feb 2023 13:23:43 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:6c92:0:b0:4b3:d953:974c with HTTP; Sun, 12 Feb 2023 13:23:43 -0800 (PST) In-Reply-To: <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> From: Mateusz Guzik Date: Sun, 12 Feb 2023 22:23:43 +0100 Message-ID: Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PFL7P2jHVz4KXr X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2/12/23, Jessica Clarke wrote: > On 12 Feb 2023, at 21:13, Mateusz Guzik wrote: >> >> The branch main has been updated by mjg: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e7= 3cdf181a0b >> >> commit eca005d8531fd153f46f941f3101e73cdf181a0b >> Author: Mateusz Guzik >> AuthorDate: 2023-02-12 21:12:34 +0000 >> Commit: Mateusz Guzik >> CommitDate: 2023-02-12 21:12:34 +0000 >> >> zlib: silence K&R warns >> >> Sponsored by: Rubicon Communications, LLC ("Netgate") >> --- >> sys/conf/files | 18 +++++++++++------- >> sys/modules/zlib/Makefile | 2 ++ >> 2 files changed, 13 insertions(+), 7 deletions(-) >> >> diff --git a/sys/conf/files b/sys/conf/files >> index 9171b434a7bf..53f90f7afc22 100644 >> --- a/sys/conf/files >> +++ b/sys/conf/files >> @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard >> libkern/strvalid.c standard >> libkern/timingsafe_bcmp.c standard >> contrib/zlib/adler32.c optional crypto | geom_uzip | \ >> - mxge | ddb_ctf | gzio | zfs | zlib >> + mxge | ddb_ctf | gzio | zfs | zlib \ >> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > > This doesn=E2=80=99t exist pre-Clang 15. > this is main-only and it already has llvm15. the build requirement is top of the branch, so I don't see a problem. if you ran into trouble cross-compiling, you should probably update that env instead of expecting working around the warn in the tree for older compilers > Jess > >> contrib/zlib/compress.c optional crypto | geom_uzip | \ >> mxge | ddb_ctf | gzio | zfs | zlib \ >> - compile-with "${NORMAL_C} -Wno-cast-qual" >> + compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype= " >> contrib/zlib/crc32.c optional crypto | geom_uzip | \ >> mxge | ddb_ctf | gzio | zfs | zlib \ >> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> contrib/zlib/deflate.c optional crypto | geom_uzip | \ >> mxge | ddb_ctf | gzio | zfs | zlib \ >> - compile-with "${NORMAL_C} -Wno-cast-qual" >> + compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype= " >> contrib/zlib/inffast.c optional crypto | geom_uzip | \ >> - mxge | ddb_ctf | gzio | zfs | zlib >> + mxge | ddb_ctf | gzio | zfs | zlib \ >> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> contrib/zlib/inflate.c optional crypto | geom_uzip | \ >> - mxge | ddb_ctf | gzio | zfs | zlib >> + mxge | ddb_ctf | gzio | zfs | zlib \ >> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> contrib/zlib/inftrees.c optional crypto | geom_uzip | \ >> - mxge | ddb_ctf | gzio | zfs | zlib >> + mxge | ddb_ctf | gzio | zfs | zlib \ >> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> contrib/zlib/trees.c optional crypto | geom_uzip | \ >> mxge | ddb_ctf | gzio | zfs | zlib \ >> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> contrib/zlib/uncompr.c optional crypto | geom_uzip | \ >> mxge | ddb_ctf | gzio | zfs | zlib \ >> - compile-with "${NORMAL_C} -Wno-cast-qual" >> + compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype= " >> contrib/zlib/zutil.c optional crypto | geom_uzip | \ >> mxge | ddb_ctf | gzio | zfs | zlib \ >> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile >> index 6391255e512b..178d3a3f7ab7 100644 >> --- a/sys/modules/zlib/Makefile >> +++ b/sys/modules/zlib/Makefile >> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPES} # >> crc32.c:586 >> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 >> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 >> >> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype >> + >> .include > > --=20 Mateusz Guzik From nobody Sun Feb 12 21:33:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFLL93KFRz3p97G; Sun, 12 Feb 2023 21:33:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFLL92XRlz4LRM; Sun, 12 Feb 2023 21:33:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676237585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M8cn0es/woDLIAcmAyt0v+txsxNoCZcLv4TF6xqIE6s=; b=AnOl+UBBeT3VZ4ePzy/46F+mFxm5pl4qDy3bnfVkmTZFaFbWze69VFAKAaa6UT4bmHEs9l B0Uv18CiUYUl51J9akXUKe030lUBQWuplkZkTY2c/zXYK5qBa1XHssl/oSeySo3T1mygCn gH1iiNG2+TkOrf4k56adnLPC+likUdMLP5hyJ/8DwrtWx97AIwQ1sKmuq0lJf6aWu5nwmt ukaJquS5cDHuG5KwWZcUxIgZqXIBoCf2VOjQzb8AROzUHK4Bu6ehpTWdQLnIasLu40U/sj C1yJb7sZNq8lMaj5v2UEj7lEDWNCluyxF0buoQZ+hXVbLyfSKUXLjLcMlj/mZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676237585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M8cn0es/woDLIAcmAyt0v+txsxNoCZcLv4TF6xqIE6s=; b=cYcUHNREdpDQ8HgP96sCJ81hPVmgWcodE+gone8yqZZfFj5WP8JsNHCpMYIzT3M0UA0Wq3 rspNARpOfd1TAdlLS58hV4Bka4ZOSNgEJ+8fnKISR73p8l7nuTcSieNBjJ7SWci1fh9Gky MMKC+UzYyc2FLQjk+gj0LhlOGnXOzYzpl1DPx7GCHsvT9G+myRv+fh0WA//4Vy+LPT4ooV j8rT0OIg0yoC2Q/gKWi/okivXRlH27wjdBx2l+K4pFWRbQM3UbcLG170aIp18qI+QORUDH KfUnDmplbU+pOzV9PocqdslQiEa14QXOojNIizhDJo240n7NjZitbQdkzdC1rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676237585; a=rsa-sha256; cv=none; b=XdxZSCQTPUpb5dsSqKxBCiOuhKV9nuNlWH2/NjhOKRfbIY4zJVRzqTgFgOhep9gaIiF9Eu Ck8dkOjBwmieXoofXj+mPKOt4VZpem8f/5ozV9hLKAVfDQV/YnEmTloLjqx2jyGuXXpJII yVPHo0WgUb2UKVyHNo0Q9kgLEF6UA9jSBaSSJteia/PXDvn/15MUQ/kueVdlCoRnRKz/y8 XR0sRhmoe3ltvUj/S107MNNx1JLYtpXkr+DX2irYPDiKtm92tXwYVrIF+g9dCI0rGsa9O2 IphdJmbDyZQxoSBH9OdlhBUCUAEFvDalgJeEVGhrdq7litYmj3hJb7UBEezG2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFLL91bgwztgy; Sun, 12 Feb 2023 21:33: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 31CLX5N3040661; Sun, 12 Feb 2023 21:33:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CLX5Xb040660; Sun, 12 Feb 2023 21:33:05 GMT (envelope-from git) Date: Sun, 12 Feb 2023 21:33:05 GMT Message-Id: <202302122133.31CLX5Xb040660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joerg Wunsch Subject: git: 57228a493335 - main - ARM release build: enable IPv6 SLAAC by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: joerg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57228a49333505aebbc992f3799819667630f255 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by joerg: URL: https://cgit.FreeBSD.org/src/commit/?id=57228a49333505aebbc992f3799819667630f255 commit 57228a49333505aebbc992f3799819667630f255 Author: Joerg Wunsch AuthorDate: 2023-02-12 21:26:52 +0000 Commit: Joerg Wunsch CommitDate: 2023-02-12 21:32:16 +0000 ARM release build: enable IPv6 SLAAC by default When building ARM release images, enable IPv6 SLAAC by default in addition to IPv4 DHCP. Unlike amd64 (and other desktop/server) releases, ARM releases on SoC setups are usually deployed by just using the installation image, so there is no interactive network configuration. Not having IPv6 included by default is kind of an anachronism these days, given that FreeBSD with the KAME project once pioneered IPv6 technology. MFC after: 2 weeks --- release/tools/arm.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 99bfde33c801..9fa76db8b2af 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -219,7 +219,7 @@ arm_install_base() { local hostname hostname="$(echo ${KERNEL} | tr '[:upper:]' '[:lower:]')" echo "hostname=\"${hostname}\"" > ${CHROOTDIR}/${DESTDIR}/etc/rc.conf - echo 'ifconfig_DEFAULT="DHCP"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf + echo 'ifconfig_DEFAULT="DHCP inet6 accept_rtadv"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'sshd_enable="YES"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'sendmail_enable="NONE"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'sendmail_submit_enable="NO"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf From nobody Sun Feb 12 21:36:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFLQd52Jpz3p9Tv for ; Sun, 12 Feb 2023 21:36:57 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 4PFLQd35bnz4Ltm for ; Sun, 12 Feb 2023 21:36:57 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f54.google.com with SMTP id m20-20020a05600c3b1400b003e1e754657aso1538700wms.2 for ; Sun, 12 Feb 2023 13:36:57 -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=QF7UTPvJHqYex33t8gxQgJeJ03WCMvVBcA0da33ApHQ=; b=2YCT/t09vZ1U1NeJY5VL0pr3uN+ejm121VsEhqro46tj2ei2t1WJ4gTgkMAhdqSOS1 +zfJY9P+nrQNeWjZKTUS8RMc3sBcIvbu7qNaVkdH/xJD8SJE5EhMxFgMYc0yR+RpIrjz IXOg1eEyYWS+x74cIc2eNfeZslMKcX/7RcDkzXA6uo5EDCby3Y+llhA0hkDQochL0Kzd s1OSzDkAE2ytOOXsVoNpng+SD5Ggi7FhzEHsKan1vhQJqwiZGXcs5PXeWxe0PS7FWHXj OEVhBKQUhBxihxb76/GSBnh5Gk5ZBy5/7wgEcIEAgXiVygyX5ZTRoeH8xXe0Xe5qaPBP Hvgg== X-Gm-Message-State: AO0yUKV4kZ0UJJ828fp6Ik+9QqGup2KVFN03zXC0xvo1GcYJY20NOuNX hIIMlkNghjy7PwMuWL9mErW3lA== X-Google-Smtp-Source: AK7set/V5RaHHgX/FIu23vTxb3R2NAnT6PRB7qBn7eAJjOn8OKSV1R+Byo8GJb/Ab7x9K4Ng1E38eA== X-Received: by 2002:a05:600c:a687:b0:3db:bc5:b2ae with SMTP id ip7-20020a05600ca68700b003db0bc5b2aemr17054493wmb.41.1676237815839; Sun, 12 Feb 2023 13:36:55 -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 h8-20020a05600c314800b003e11ad0750csm11147859wmo.47.2023.02.12.13.36.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Feb 2023 13:36:55 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns From: Jessica Clarke In-Reply-To: Date: Sun, 12 Feb 2023 21:36:54 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4PFLQd35bnz4Ltm 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 12 Feb 2023, at 21:23, Mateusz Guzik wrote: >=20 > On 2/12/23, Jessica Clarke wrote: >> On 12 Feb 2023, at 21:13, Mateusz Guzik wrote: >>>=20 >>> The branch main has been updated by mjg: >>>=20 >>> URL: >>> = https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e73c= df181a0b >>>=20 >>> commit eca005d8531fd153f46f941f3101e73cdf181a0b >>> Author: Mateusz Guzik >>> AuthorDate: 2023-02-12 21:12:34 +0000 >>> Commit: Mateusz Guzik >>> CommitDate: 2023-02-12 21:12:34 +0000 >>>=20 >>> zlib: silence K&R warns >>>=20 >>> Sponsored by: Rubicon Communications, LLC ("Netgate") >>> --- >>> sys/conf/files | 18 +++++++++++------- >>> sys/modules/zlib/Makefile | 2 ++ >>> 2 files changed, 13 insertions(+), 7 deletions(-) >>>=20 >>> diff --git a/sys/conf/files b/sys/conf/files >>> index 9171b434a7bf..53f90f7afc22 100644 >>> --- a/sys/conf/files >>> +++ b/sys/conf/files >>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard >>> libkern/strvalid.c standard >>> libkern/timingsafe_bcmp.c standard >>> contrib/zlib/adler32.c optional crypto | geom_uzip | \ >>> - mxge | ddb_ctf | gzio | zfs | zlib >>> + mxge | ddb_ctf | gzio | zfs | zlib \ >>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >>=20 >> This doesn=E2=80=99t exist pre-Clang 15. >>=20 >=20 > this is main-only and it already has llvm15. the build requirement is > top of the branch, so I don't see a problem. >=20 > if you ran into trouble cross-compiling, you should probably update > that env instead of expecting working around the warn in the tree for > older compilers That is not our policy. Please fix this. Jess >> Jess >>=20 >>> contrib/zlib/compress.c optional crypto | geom_uzip | \ >>> mxge | ddb_ctf | gzio | zfs | zlib \ >>> - compile-with "${NORMAL_C} -Wno-cast-qual" >>> + compile-with "${NORMAL_C} -Wno-cast-qual = -Wno-deprecated-non-prototype" >>> contrib/zlib/crc32.c optional crypto | geom_uzip | \ >>> mxge | ddb_ctf | gzio | zfs | zlib \ >>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >>> contrib/zlib/deflate.c optional crypto | geom_uzip | \ >>> mxge | ddb_ctf | gzio | zfs | zlib \ >>> - compile-with "${NORMAL_C} -Wno-cast-qual" >>> + compile-with "${NORMAL_C} -Wno-cast-qual = -Wno-deprecated-non-prototype" >>> contrib/zlib/inffast.c optional crypto | geom_uzip | \ >>> - mxge | ddb_ctf | gzio | zfs | zlib >>> + mxge | ddb_ctf | gzio | zfs | zlib \ >>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >>> contrib/zlib/inflate.c optional crypto | geom_uzip | \ >>> - mxge | ddb_ctf | gzio | zfs | zlib >>> + mxge | ddb_ctf | gzio | zfs | zlib \ >>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >>> contrib/zlib/inftrees.c optional crypto | geom_uzip | \ >>> - mxge | ddb_ctf | gzio | zfs | zlib >>> + mxge | ddb_ctf | gzio | zfs | zlib \ >>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >>> contrib/zlib/trees.c optional crypto | geom_uzip | \ >>> mxge | ddb_ctf | gzio | zfs | zlib \ >>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >>> contrib/zlib/uncompr.c optional crypto | geom_uzip | \ >>> mxge | ddb_ctf | gzio | zfs | zlib \ >>> - compile-with "${NORMAL_C} -Wno-cast-qual" >>> + compile-with "${NORMAL_C} -Wno-cast-qual = -Wno-deprecated-non-prototype" >>> contrib/zlib/zutil.c optional crypto | geom_uzip | \ >>> mxge | ddb_ctf | gzio | zfs | zlib \ >>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >>> diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile >>> index 6391255e512b..178d3a3f7ab7 100644 >>> --- a/sys/modules/zlib/Makefile >>> +++ b/sys/modules/zlib/Makefile >>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPES} # >>> crc32.c:586 >>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 >>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 >>>=20 >>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype >>> + >>> .include >>=20 >>=20 >=20 >=20 > --=20 > Mateusz Guzik From nobody Sun Feb 12 21:38:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFLS81Wx8z3p9lX; Sun, 12 Feb 2023 21:38: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 4PFLS80zYQz4MLV; Sun, 12 Feb 2023 21:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676237896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6POHTpktpJBdwSi+EzAMq1P9hASuEWTs3FD/OwGh54=; b=pVuOisuCqCho+vJRlaL6LrjT/TIikNJnqtj+I/ZIwPzQb8FeqLelWuHGetP2G4Kq2PBHH5 w+Q8w9MFB/WkKvGvWoSjr84AYCySyqvChMV29Mmdd9fPq0lNpvcekM6tiixD9wNxNgMqDI NfFmug9FGvLUVVWVFxMYIfyQvS5ncRDuqb4U2McfEXe9YW+CKyB2T/nj6nA5R1Gy2vpyJ/ iVqMiwLkVp9XsM7GgLA1daUVOCuY+vzACM3d9d/BVmEnUGaxHLYk7au0p/3SvHcx/I0ljy K/9uiPP2PAWK2sQwM5ZTXMQJSFriv4CK/5rloO2dOlHcwWKXm3Sx3mQJYrvZXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676237896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6POHTpktpJBdwSi+EzAMq1P9hASuEWTs3FD/OwGh54=; b=kiuUzbJHUBTOLwaOoeGviBC/Dh71isurVSRuLIyuPRMOlWZx6VpkvKsAujBIJBuOxyn4/r ISfn46hhkxcsLLEHIWjmCz+btKoTcTFDaheqAGjFtrZZNMkKpVO7nqMs8y5fXLltHqDbeO wNWhwdPoK9wtsWb7vBhYmQ8mF4E3gGTwlTtaRVB3MXu2nmvWQMhsfROhh/rdq8j2EtklH5 w+oIxhRbQiyQO2ClN9S2tfnHwggdIrM4WRxYZVh/V+ahLutDSZRL49hQrJw1KINyVCQdMZ 7sqlah1XrlEPGs9pO0O5q5gOC64YZIphP5T7fjqfd/ysTsO3LkuxEV6Iv+HM8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676237896; a=rsa-sha256; cv=none; b=lIVz0d1WKGqpkznuCCjQ/YOA5q3iDfEtRJWqJJ+QkO4vglnsCjwi//FC5q5GEBjISc0PzL gPDKLU17+TtNr2HGqZWBJ58bTz/NKNrjb+pHXrw4RwYwKheSGZRwzMPM5F6+OVyj2l0K8B fH1EOsa7w4qcz+VafTNcKAP6eJgTC4J3yx+1MDD+2p3N9yvw9rN5/NxQM6a79SdYQhfPwx ZJU4NWwqBT+5ml9mtXa0XcqKrq5y9g6eYfgA238J5NmLe39o01uguUnBApc7HM6PzFsnGp yI5Xz+ufponTLg/k1e93DwAVnzn5R09eeLfdGjb3q1DQ4XnAr1BnVSqDo6wCQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFLS76q0pzth0; Sun, 12 Feb 2023 21:38: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 31CLcFat041558; Sun, 12 Feb 2023 21:38:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CLcF5J041557; Sun, 12 Feb 2023 21:38:15 GMT (envelope-from git) Date: Sun, 12 Feb 2023 21:38:15 GMT Message-Id: <202302122138.31CLcF5J041557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 16d10ee0235a - main - lge: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16d10ee0235abb217773aa46b927c8c1513f3261 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=16d10ee0235abb217773aa46b927c8c1513f3261 commit 16d10ee0235abb217773aa46b927c8c1513f3261 Author: Mateusz Guzik AuthorDate: 2023-02-12 21:37:24 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-12 21:38:11 +0000 lge: ansify Reported by: clang 15 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/lge/if_lge.c | 123 ++++++++++++++++----------------------------------- 1 file changed, 37 insertions(+), 86 deletions(-) diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c index e977e4e6897c..bbca5dfb77c2 100644 --- a/sys/dev/lge/if_lge.c +++ b/sys/dev/lge/if_lge.c @@ -211,10 +211,7 @@ MODULE_DEPEND(lge, miibus, 1, 1, 1); * Read a word of data stored in the EEPROM at address 'addr.' */ static void -lge_eeprom_getword(sc, addr, dest) - struct lge_softc *sc; - int addr; - u_int16_t *dest; +lge_eeprom_getword(struct lge_softc *sc, int addr, u_int16_t *dest) { int i; u_int32_t val; @@ -245,12 +242,7 @@ lge_eeprom_getword(sc, addr, dest) * Read a sequence of words from the EEPROM. */ static void -lge_read_eeprom(sc, dest, off, cnt, swap) - struct lge_softc *sc; - caddr_t dest; - int off; - int cnt; - int swap; +lge_read_eeprom(struct lge_softc *sc, caddr_t dest, int off, int cnt, int swap) { int i; u_int16_t word = 0, *ptr; @@ -268,9 +260,7 @@ lge_read_eeprom(sc, dest, off, cnt, swap) } static int -lge_miibus_readreg(dev, phy, reg) - device_t dev; - int phy, reg; +lge_miibus_readreg(device_t dev, int phy, int reg) { struct lge_softc *sc; int i; @@ -300,9 +290,7 @@ lge_miibus_readreg(dev, phy, reg) } static int -lge_miibus_writereg(dev, phy, reg, data) - device_t dev; - int phy, reg, data; +lge_miibus_writereg(device_t dev, int phy, int reg, int data) { struct lge_softc *sc; int i; @@ -325,8 +313,7 @@ lge_miibus_writereg(dev, phy, reg, data) } static void -lge_miibus_statchg(dev) - device_t dev; +lge_miibus_statchg(device_t dev) { struct lge_softc *sc; struct mii_data *mii; @@ -379,8 +366,7 @@ lge_hash_maddr(void *arg, struct sockaddr_dl *sdl, u_int count) } static void -lge_setmulti(sc) - struct lge_softc *sc; +lge_setmulti(struct lge_softc *sc) { if_t ifp; uint32_t hashes[2] = { 0, 0 }; @@ -411,8 +397,7 @@ lge_setmulti(sc) } static void -lge_reset(sc) - struct lge_softc *sc; +lge_reset(struct lge_softc *sc) { int i; @@ -429,7 +414,7 @@ lge_reset(sc) /* Wait a little while for the chip to get its brains in order. */ DELAY(1000); - return; + return; } /* @@ -437,8 +422,7 @@ lge_reset(sc) * IDs against our list and return a device name if we find a match. */ static int -lge_probe(dev) - device_t dev; +lge_probe(device_t dev) { const struct lge_type *t; @@ -461,8 +445,7 @@ lge_probe(dev) * setup and ethernet/BPF attach. */ static int -lge_attach(dev) - device_t dev; +lge_attach(device_t dev) { u_char eaddr[ETHER_ADDR_LEN]; struct lge_softc *sc; @@ -471,7 +454,7 @@ lge_attach(dev) sc = device_get_softc(dev); sc->lge_dev = dev; - + mtx_init(&sc->lge_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->lge_stat_callout, &sc->lge_mtx, 0); @@ -592,8 +575,7 @@ fail: } static int -lge_detach(dev) - device_t dev; +lge_detach(device_t dev) { struct lge_softc *sc; if_t ifp; @@ -627,8 +609,7 @@ lge_detach(dev) * Initialize the transmit descriptors. */ static int -lge_list_tx_init(sc) - struct lge_softc *sc; +lge_list_tx_init(struct lge_softc *sc) { struct lge_list_data *ld; struct lge_ring_data *cd; @@ -653,8 +634,7 @@ lge_list_tx_init(sc) * points back to the first. */ static int -lge_list_rx_init(sc) - struct lge_softc *sc; +lge_list_rx_init(struct lge_softc *sc) { struct lge_list_data *ld; struct lge_ring_data *cd; @@ -684,10 +664,7 @@ lge_list_rx_init(sc) * Initialize an RX descriptor and attach an MBUF cluster. */ static int -lge_newbuf(sc, c, m) - struct lge_softc *sc; - struct lge_rx_desc *c; - struct mbuf *m; +lge_newbuf(struct lge_softc *sc, struct lge_rx_desc *c, struct mbuf *m) { struct mbuf *m_new = NULL; char *buf = NULL; @@ -752,8 +729,7 @@ lge_newbuf(sc, c, m) } static int -lge_alloc_jumbo_mem(sc) - struct lge_softc *sc; +lge_alloc_jumbo_mem(struct lge_softc *sc) { caddr_t ptr; int i; @@ -795,8 +771,7 @@ lge_alloc_jumbo_mem(sc) } static void -lge_free_jumbo_mem(sc) - struct lge_softc *sc; +lge_free_jumbo_mem(struct lge_softc *sc) { struct lge_jpool_entry *entry; @@ -825,13 +800,12 @@ lge_free_jumbo_mem(sc) * Allocate a jumbo buffer. */ static void * -lge_jalloc(sc) - struct lge_softc *sc; +lge_jalloc(struct lge_softc *sc) { struct lge_jpool_entry *entry; - + entry = SLIST_FIRST(&sc->lge_jfree_listhead); - + if (entry == NULL) { #ifdef LGE_VERBOSE device_printf(sc->lge_dev, "no free jumbo buffers\n"); @@ -880,9 +854,7 @@ lge_jfree(struct mbuf *m) * the higher level protocols. */ static void -lge_rxeof(sc, cnt) - struct lge_softc *sc; - int cnt; +lge_rxeof(struct lge_softc *sc, int cnt) { struct mbuf *m; if_t ifp; @@ -964,8 +936,7 @@ lge_rxeof(sc, cnt) } static void -lge_rxeoc(sc) - struct lge_softc *sc; +lge_rxeoc(struct lge_softc *sc) { if_t ifp; @@ -981,8 +952,7 @@ lge_rxeoc(sc) */ static void -lge_txeof(sc) - struct lge_softc *sc; +lge_txeof(struct lge_softc *sc) { struct lge_tx_desc *cur_tx = NULL; if_t ifp; @@ -1024,8 +994,7 @@ lge_txeof(sc) } static void -lge_tick(xsc) - void *xsc; +lge_tick(void *xsc) { struct lge_softc *sc; struct mii_data *mii; @@ -1063,8 +1032,7 @@ lge_tick(xsc) } static void -lge_intr(arg) - void *arg; +lge_intr(void *arg) { struct lge_softc *sc; if_t ifp; @@ -1123,10 +1091,7 @@ lge_intr(arg) * pointers to the fragment pointers. */ static int -lge_encap(sc, m_head, txidx) - struct lge_softc *sc; - struct mbuf *m_head; - u_int32_t *txidx; +lge_encap(struct lge_softc *sc, struct mbuf *m_head, u_int32_t *txidx) { struct lge_frag *f = NULL; struct lge_tx_desc *cur_tx; @@ -1174,8 +1139,7 @@ lge_encap(sc, m_head, txidx) */ static void -lge_start(ifp) - if_t ifp; +lge_start(if_t ifp) { struct lge_softc *sc; @@ -1186,8 +1150,7 @@ lge_start(ifp) } static void -lge_start_locked(ifp) - if_t ifp; +lge_start_locked(if_t ifp) { struct lge_softc *sc; struct mbuf *m_head = NULL; @@ -1235,8 +1198,7 @@ lge_start_locked(ifp) } static void -lge_init(xsc) - void *xsc; +lge_init(void *xsc) { struct lge_softc *sc = xsc; @@ -1246,8 +1208,7 @@ lge_init(xsc) } static void -lge_init_locked(sc) - struct lge_softc *sc; +lge_init_locked(struct lge_softc *sc) { if_t ifp = sc->lge_ifp; @@ -1375,8 +1336,7 @@ lge_init_locked(sc) * Set media options. */ static int -lge_ifmedia_upd(ifp) - if_t ifp; +lge_ifmedia_upd(if_t ifp) { struct lge_softc *sc; @@ -1389,8 +1349,7 @@ lge_ifmedia_upd(ifp) } static void -lge_ifmedia_upd_locked(ifp) - if_t ifp; +lge_ifmedia_upd_locked(if_t ifp) { struct lge_softc *sc; struct mii_data *mii; @@ -1410,9 +1369,7 @@ lge_ifmedia_upd_locked(ifp) * Report current media status. */ static void -lge_ifmedia_sts(ifp, ifmr) - if_t ifp; - struct ifmediareq *ifmr; +lge_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) { struct lge_softc *sc; struct mii_data *mii; @@ -1430,10 +1387,7 @@ lge_ifmedia_sts(ifp, ifmr) } static int -lge_ioctl(ifp, command, data) - if_t ifp; - u_long command; - caddr_t data; +lge_ioctl(if_t ifp, u_long command, caddr_t data) { struct lge_softc *sc = if_getsoftc(ifp); struct ifreq *ifr = (struct ifreq *) data; @@ -1496,8 +1450,7 @@ lge_ioctl(ifp, command, data) } static void -lge_watchdog(sc) - struct lge_softc *sc; +lge_watchdog(struct lge_softc *sc) { if_t ifp; @@ -1521,8 +1474,7 @@ lge_watchdog(sc) * RX and TX lists. */ static void -lge_stop(sc) - struct lge_softc *sc; +lge_stop(struct lge_softc *sc) { int i; if_t ifp; @@ -1572,8 +1524,7 @@ lge_stop(sc) * get confused by errant DMAs when rebooting. */ static int -lge_shutdown(dev) - device_t dev; +lge_shutdown(device_t dev) { struct lge_softc *sc; From nobody Sun Feb 12 21:40:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFLVl0238z3p9m7; Sun, 12 Feb 2023 21:40:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) (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 4PFLVk5Pfrz4N1m; Sun, 12 Feb 2023 21:40:30 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-15fe106c7c7so13234210fac.8; Sun, 12 Feb 2023 13:40:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=X488yGmqrqiuGWqcUfeQePb8kTIxriUGToQkUCeJoLE=; b=VKPbntdFu1xYz9H1GzmD3dRdtS3p7OsPhB+lbH+/Ab2sC3Aaa+O2GkdTNLphT/4ylX v7dhOVdP49G/+ks2GM9X5fW2viSJ5cvJdpI91RlYN8sisaiNUutax+QJmdsgRUBSQIpO P3zoXeoUI+2HYR09caXeegS/yn9GNAv6XRf8q+z9Zrb183CcCBdPS5VINL9Bje4L+0S+ Gy38mAM7hNoTarYIEJnoSSJ5lisXzgI94FGxWLb4xuGSAA8U7mzLEgUDl22vWyE4OZ/+ G/j6ohXYKL8Tv1imEs+mUa1winiMinXYYsTWmB/XofQM6/BEmdiL3+a1EXBcoan+4iLD DDOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X488yGmqrqiuGWqcUfeQePb8kTIxriUGToQkUCeJoLE=; b=hFMOaVJT2r55lNWPwW0fcYR/AX4Z1mBJTXsHy/uUeBvFooLfLL0qgSKCqsCy5Cfu6R KU9JBU3OVM9rb4CWb9qj+qFv9yFVzS0YmKmd+JCj8MCMcSkGK3bgYIFSMbb3zzp+jjQX DUEGkPfx04WpmaK6FHuPmva1VOe0X+2vDp4jYwa6KnVLen6rMpk+7a/1HgydT/LpVCUx 5Y06Z+nQGw9AV2WlmUAAiRR8/dH1rNdG0Wt75dx5PqU7M6j9u1YQFJvyzCl11Fjfwlk3 e3s3Wu9aSx3UzQVsDoZekbJTuN6zMzwGPpwdn9xC6e+usKCkQ99gag3TSvhpsEUUOsBZ xi+g== X-Gm-Message-State: AO0yUKXPR4pyj02iGzDDU2AWCAPhT8M4UCAkRZVjFr84wHWoP+WpVbQz TkVPGuGQ2lf8WWWpfqfyk9zlYyAhfhuBr1FkvpW+5OBL X-Google-Smtp-Source: AK7set+DgcdzUt5dWoCRarhiRp+RVuE2AjPIiUbWW2s+hcWjWeqeHkeEVtrLDhREldAgTyP3eD1VZHug11FeRf3sGJc= X-Received: by 2002:a05:6870:1250:b0:16d:c7db:f60f with SMTP id 16-20020a056870125000b0016dc7dbf60fmr906411oao.159.1676238029407; Sun, 12 Feb 2023 13:40:29 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:6c92:0:b0:4b3:d953:974c with HTTP; Sun, 12 Feb 2023 13:40:28 -0800 (PST) In-Reply-To: <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> From: Mateusz Guzik Date: Sun, 12 Feb 2023 22:40:28 +0100 Message-ID: Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PFLVk5Pfrz4N1m X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2/12/23, Jessica Clarke wrote: > On 12 Feb 2023, at 21:23, Mateusz Guzik wrote: >> >> On 2/12/23, Jessica Clarke wrote: >>> On 12 Feb 2023, at 21:13, Mateusz Guzik wrote: >>>> >>>> The branch main has been updated by mjg: >>>> >>>> URL: >>>> https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101= e73cdf181a0b >>>> >>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b >>>> Author: Mateusz Guzik >>>> AuthorDate: 2023-02-12 21:12:34 +0000 >>>> Commit: Mateusz Guzik >>>> CommitDate: 2023-02-12 21:12:34 +0000 >>>> >>>> zlib: silence K&R warns >>>> >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") >>>> --- >>>> sys/conf/files | 18 +++++++++++------- >>>> sys/modules/zlib/Makefile | 2 ++ >>>> 2 files changed, 13 insertions(+), 7 deletions(-) >>>> >>>> diff --git a/sys/conf/files b/sys/conf/files >>>> index 9171b434a7bf..53f90f7afc22 100644 >>>> --- a/sys/conf/files >>>> +++ b/sys/conf/files >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard >>>> libkern/strvalid.c standard >>>> libkern/timingsafe_bcmp.c standard >>>> contrib/zlib/adler32.c optional crypto | geom_uzip | \ >>>> - mxge | ddb_ctf | gzio | zfs | zlib >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >>> >>> This doesn=E2=80=99t exist pre-Clang 15. >>> >> >> this is main-only and it already has llvm15. the build requirement is >> top of the branch, so I don't see a problem. >> >> if you ran into trouble cross-compiling, you should probably update >> that env instead of expecting working around the warn in the tree for >> older compilers > > That is not our policy. Please fix this. > Are you sure about that? I distinctly recall the supported path to get top of the latest stable branch first, from there you should be able to build the toolchain and the kernel. afaics the above change did not affect it If you insist, I can look for the exact paragraph in the docs. > Jess > >>> Jess >>> >>>> contrib/zlib/compress.c optional crypto | geom_uzip | \ >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >>>> -Wno-deprecated-non-prototype" >>>> contrib/zlib/crc32.c optional crypto | geom_uzip | \ >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >>>> contrib/zlib/deflate.c optional crypto | geom_uzip | \ >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >>>> -Wno-deprecated-non-prototype" >>>> contrib/zlib/inffast.c optional crypto | geom_uzip | \ >>>> - mxge | ddb_ctf | gzio | zfs | zlib >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >>>> contrib/zlib/inflate.c optional crypto | geom_uzip | \ >>>> - mxge | ddb_ctf | gzio | zfs | zlib >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >>>> contrib/zlib/inftrees.c optional crypto | geom_uzip | \ >>>> - mxge | ddb_ctf | gzio | zfs | zlib >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >>>> contrib/zlib/trees.c optional crypto | geom_uzip | \ >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >>>> contrib/zlib/uncompr.c optional crypto | geom_uzip | \ >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >>>> -Wno-deprecated-non-prototype" >>>> contrib/zlib/zutil.c optional crypto | geom_uzip | \ >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >>>> diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile >>>> index 6391255e512b..178d3a3f7ab7 100644 >>>> --- a/sys/modules/zlib/Makefile >>>> +++ b/sys/modules/zlib/Makefile >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPES} # >>>> crc32.c:586 >>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 >>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 >>>> >>>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype >>>> + >>>> .include >>> >>> >> >> >> -- >> Mateusz Guzik > > --=20 Mateusz Guzik From nobody Sun Feb 12 21:47:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFLgW22nSz3pBjm for ; Sun, 12 Feb 2023 21:48:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 4PFLgV30D1z4PgS for ; Sun, 12 Feb 2023 21:48:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52c.google.com with SMTP id s11so2844264edd.10 for ; Sun, 12 Feb 2023 13:48:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=b6EMt36rQx3PkAReBAI9tmz5BdnxulUmzgFrG9vUxf4=; b=JRizj2vkmB+bndcurHmU33RfUvhQv/HW2va9M3synaYcfIGHv8qP0I6e5hU22yviTE Bd6OqZkqleSzm8n7HwwzZBZ0amjwk/Kxxa7ryprA2VFW9Q1HLj29dKhiCZEelcq1WfYK And1JgpTznxLlPu3WemIbelY2cZ4rbNE9GtY8VOWZXUpc960CcuVYVFcABccBytd8fpK XCAWvVGMkTLojVkaz3DkZ9TYSb8dVfS8YBhkoAlxpoY8H/kh4GpR+RDlB44fz4fKBOae AvKkgoflyATH/AYtg8qXxAI3/qBPXvqB8hIzYcE3LSxsfiBRKxV+FKtfWZeQnjXfunOt nl1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=b6EMt36rQx3PkAReBAI9tmz5BdnxulUmzgFrG9vUxf4=; b=1vgepM+hIXNGIPfEPoaDV7j35fSGh2IuBG27xwCJJNne5Adzoq8K6+bQMLjnib00aw f0uKHpIzvuy+c/mwjE9L//ng5L372JmAs7ZtkKlSqbvo9/1GZd22jLgcL81I17sGU5dc sS6IyVKmG6MiDYOfki3fO6m0Q7kHUFtzykdFrLoHYPvun3StATrbDHWevT8nCc9dMAIv 6+pPrBi/eA+MvT5JmpbOYa55PZrklFPwHOuMdFNYQZMPlHfuKISugHzOpyl9xpKX7qi2 W4LsEjDoryC58YeedI+QVL/Wa07TLAAKER8lmsmsLjwImRACPYEMN+QXegMbRu4kM8tl /YBQ== X-Gm-Message-State: AO0yUKUm0XPaI3gDD1I+AoKpACSHdX+cm7mogaGDxxM0aBDyA3q2uMG+ 2knjb6dPwG0CZ5zelXkiLtd9A9C/Mxo5wbnJ0wyhfg== X-Google-Smtp-Source: AK7set+3PM2va1UnBiqJ339om+FhrPkfIC358s55j7RwIJUoNTprMtMrPfRqh9QqyJ94FT/dsuQ2Mz9Xlf0mHk1ECCQ= X-Received: by 2002:a50:d51d:0:b0:4ac:b74b:a6a3 with SMTP id u29-20020a50d51d000000b004acb74ba6a3mr2022120edi.0.1676238483915; Sun, 12 Feb 2023 13:48:03 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> In-Reply-To: From: Warner Losh Date: Sun, 12 Feb 2023 14:47:52 -0700 Message-ID: Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns To: Mateusz Guzik Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000649e8305f487af00" X-Rspamd-Queue-Id: 4PFLgV30D1z4PgS X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000649e8305f487af00 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik wrote: > On 2/12/23, Jessica Clarke wrote: > > On 12 Feb 2023, at 21:23, Mateusz Guzik wrote: > >> > >> On 2/12/23, Jessica Clarke wrote: > >>> On 12 Feb 2023, at 21:13, Mateusz Guzik wrote: > >>>> > >>>> The branch main has been updated by mjg: > >>>> > >>>> URL: > >>>> > https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e73= cdf181a0b > >>>> > >>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b > >>>> Author: Mateusz Guzik > >>>> AuthorDate: 2023-02-12 21:12:34 +0000 > >>>> Commit: Mateusz Guzik > >>>> CommitDate: 2023-02-12 21:12:34 +0000 > >>>> > >>>> zlib: silence K&R warns > >>>> > >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") > >>>> --- > >>>> sys/conf/files | 18 +++++++++++------- > >>>> sys/modules/zlib/Makefile | 2 ++ > >>>> 2 files changed, 13 insertions(+), 7 deletions(-) > >>>> > >>>> diff --git a/sys/conf/files b/sys/conf/files > >>>> index 9171b434a7bf..53f90f7afc22 100644 > >>>> --- a/sys/conf/files > >>>> +++ b/sys/conf/files > >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard > >>>> libkern/strvalid.c standard > >>>> libkern/timingsafe_bcmp.c standard > >>>> contrib/zlib/adler32.c optional crypto | geom_uzip | \ > >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >>> > >>> This doesn=E2=80=99t exist pre-Clang 15. > >>> > >> > >> this is main-only and it already has llvm15. the build requirement is > >> top of the branch, so I don't see a problem. > >> > >> if you ran into trouble cross-compiling, you should probably update > >> that env instead of expecting working around the warn in the tree for > >> older compilers > > > > That is not our policy. Please fix this. > > > > Are you sure about that? I distinctly recall the supported path to get > top of the latest stable branch first, from there you should be able > to build the toolchain and the kernel. > > afaics the above change did not affect it > > If you insist, I can look for the exact paragraph in the docs. > The fix is trivial. https://reviews.freebsd.org/D38550 Please focus your efforts on commenting on the above and testing it out. Warner > > Jess > > > >>> Jess > >>> > >>>> contrib/zlib/compress.c optional crypto | geom_uzip | \ > >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >>>> -Wno-deprecated-non-prototype" > >>>> contrib/zlib/crc32.c optional crypto | geom_uzip | \ > >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >>>> contrib/zlib/deflate.c optional crypto | geom_uzip | \ > >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >>>> -Wno-deprecated-non-prototype" > >>>> contrib/zlib/inffast.c optional crypto | geom_uzip | \ > >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >>>> contrib/zlib/inflate.c optional crypto | geom_uzip | \ > >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >>>> contrib/zlib/inftrees.c optional crypto | geom_uzip | \ > >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >>>> contrib/zlib/trees.c optional crypto | geom_uzip | \ > >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >>>> contrib/zlib/uncompr.c optional crypto | geom_uzip | \ > >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >>>> -Wno-deprecated-non-prototype" > >>>> contrib/zlib/zutil.c optional crypto | geom_uzip | \ > >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >>>> diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile > >>>> index 6391255e512b..178d3a3f7ab7 100644 > >>>> --- a/sys/modules/zlib/Makefile > >>>> +++ b/sys/modules/zlib/Makefile > >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPES} # > >>>> crc32.c:586 > >>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 > >>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 > >>>> > >>>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype > >>>> + > >>>> .include > >>> > >>> > >> > >> > >> -- > >> Mateusz Guzik > > > > > > > -- > Mateusz Guzik > --000000000000649e8305f487af00 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Feb 12, 2023 at 2:40 PM Mateu= sz Guzik <mjguzik@gmail.com>= wrote:
On 2/12/= 23, Jessica Clarke <jrtc27@freebsd.org> wrote:
> On 12 Feb 2023, at 21:23, Mateusz Guzik <mjguzik@gmail.com> wrote:
>>
>> On 2/12/23, Jessica Clarke <jrtc27@freebsd.org> wrote:
>>> On 12 Feb 2023, at 21:13, Mateusz Guzik <mjg@FreeBSD.org>= ; wrote:
>>>>
>>>> The branch main has been updated by mjg:
>>>>
>>>> URL:
>>>> h= ttps://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e73cdf= 181a0b
>>>>
>>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b
>>>> Author:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.o= rg>
>>>> AuthorDate: 2023-02-12 21:12:34 +0000
>>>> Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.o= rg>
>>>> CommitDate: 2023-02-12 21:12:34 +0000
>>>>
>>>>=C2=A0 =C2=A0zlib: silence K&R warns
>>>>
>>>>=C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Rubicon Communicatio= ns, LLC ("Netgate")
>>>> ---
>>>> sys/conf/files=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | = 18 +++++++++++-------
>>>> sys/modules/zlib/Makefile |=C2=A0 2 ++
>>>> 2 files changed, 13 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/sys/conf/files b/sys/conf/files
>>>> index 9171b434a7bf..53f90f7afc22 100644
>>>> --- a/sys/conf/files
>>>> +++ b/sys/conf/files
>>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 standard
>>>> libkern/strvalid.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0standa= rd
>>>> libkern/timingsafe_bcmp.c=C2=A0 standard
>>>> contrib/zlib/adler32.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0optional crypto | geom_uzip | \
>>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib
>>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-deprecated-non= -prototype"
>>>
>>> This doesn=E2=80=99t exist pre-Clang 15.
>>>
>>
>> this is main-only and it already has llvm15. the build requirement= is
>> top of the branch, so I don't see a problem.
>>
>> if you ran into trouble cross-compiling, you should probably updat= e
>> that env instead of expecting working around the warn in the tree = for
>> older compilers
>
> That is not our policy. Please fix this.
>

Are you sure about that? I distinctly recall the supported path to get
top of the latest stable branch first, from there you should be able
to build the toolchain and the kernel.

afaics the above change did not affect it

If you insist, I can look for the exact paragraph in the docs.

The fix is trivial.


Please focus your efforts on commenting o= n the above and testing it out.

Warner
= =C2=A0
> Jess
>
>>> Jess
>>>
>>>> contrib/zlib/compress.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 optional crypto | geom_uzip | \
>>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>> -=C2=A0 compile-with "${NORMAL_C} -Wno-cast-qual"= ;
>>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-cast-qual
>>>> -Wno-deprecated-non-prototype"
>>>> contrib/zlib/crc32.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>>=C2=A0 =C2=A0 compile-with "${NORMAL_C} ${NO_WSTRICT_P= ROTOTYPES}"
>>>> contrib/zlib/deflate.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0optional crypto | geom_uzip | \
>>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>> -=C2=A0 compile-with "${NORMAL_C} -Wno-cast-qual"= ;
>>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-cast-qual
>>>> -Wno-deprecated-non-prototype"
>>>> contrib/zlib/inffast.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0optional crypto | geom_uzip | \
>>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib
>>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-deprecated-non= -prototype"
>>>> contrib/zlib/inflate.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0optional crypto | geom_uzip | \
>>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib
>>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-deprecated-non= -prototype"
>>>> contrib/zlib/inftrees.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 optional crypto | geom_uzip | \
>>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib
>>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-deprecated-non= -prototype"
>>>> contrib/zlib/trees.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>>=C2=A0 =C2=A0 compile-with "${NORMAL_C} ${NO_WSTRICT_P= ROTOTYPES}"
>>>> contrib/zlib/uncompr.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0optional crypto | geom_uzip | \
>>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>> -=C2=A0 compile-with "${NORMAL_C} -Wno-cast-qual"= ;
>>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-cast-qual
>>>> -Wno-deprecated-non-prototype"
>>>> contrib/zlib/zutil.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>>>>=C2=A0 =C2=A0 compile-with "${NORMAL_C} ${NO_WSTRICT_P= ROTOTYPES}"
>>>> diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/= Makefile
>>>> index 6391255e512b..178d3a3f7ab7 100644
>>>> --- a/sys/modules/zlib/Makefile
>>>> +++ b/sys/modules/zlib/Makefile
>>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTO= TYPES} #
>>>> crc32.c:586
>>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:2= 32
>>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:2= 7,32
>>>>
>>>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype
>>>> +
>>>> .include <bsd.kmod.mk>
>>>
>>>
>>
>>
>> --
>> Mateusz Guzik <mjguzik gmail.com>
>
>


--
Mateusz Guzik <mjguzik gmail.com>
--000000000000649e8305f487af00-- From nobody Sun Feb 12 21:53:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFLnC5fQxz3pC9K; Sun, 12 Feb 2023 21:53: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 4PFLnC4lnbz4RHy; Sun, 12 Feb 2023 21:53:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676238783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XmbiYB/2cJt87roCsGffSlNHKWs3yUyhPDEW0l9WUyI=; b=cqIQA5xlREwzeWsGUcDiIDYdxX+fsvvJ8njJgOOFQWV6XK67FIQizUFjnCLelkIjPDBkal PQ0N2sV957JLJVMS6t9AU+UddYtKyBWMQS8+9ijw3UsZNLYxQjpeIwRKA8I6NG6oo9S64u xM8Alit/ZRHdDbDMQAj5HK4I4dUe4P8EsaoydeYQ3TY/AJLCO5uKGNQ8kX2JL8Cvwu8KV2 xdLQEekHNLayNUK0I5WNk7oBRnAQOcnobXjQWZBwRCIPMtRkMRj4KKEN9NXiZIsKYl0eaI vA7G6btXCMBsYqFT4x7+/OARmhh6Q/VjOK9LsX7A7XSrDBcZ+uKfCCWO+OliUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676238783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XmbiYB/2cJt87roCsGffSlNHKWs3yUyhPDEW0l9WUyI=; b=ogf07zNtyRPTHrKAUBcg1TAtpiSV4UQGtr2+vIwNBvTX/81AkONaPhHYRQktsKnjuREDhZ Xaupj5AvS9x4BJ3KX7VGtmgicgtZJqwq/HpMaJbx0rmpTPOumJnuKU2zGzn3NjqIA2Oltq rVW9eIyWF9vz9cJAPkma+hQwTPXkFbXNI3s7wtuE/SBwLfjSibAOHXvbmMJWANJnjs3lmw UMfSY3y20GXreOYRiWXrhmGpuT1EkwlX14z0+x/k4utnziAz+fc0c8Yjvi2NIpv45++Ccl K4e42Ew9lc+vSoKTEbKbaMIRQnbVpvgHD4YU1e+0BaN2MWAiWJvv/GdpBdls2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676238783; a=rsa-sha256; cv=none; b=W1yIXVQukB8zf2T+kvJtEhMtFXl6oEjBNTxQVo1p5NkOvohUOxMTmVWVjQABisMwEN2xOl QmaqmK8/Iq2uCexgXO4HAbZnDD2HJq4jjbzWlof9LS0uvOLodMFNl321pCrdXieJ4k9rds Az5UiXaFMHPTaj+wNgXKRkqr6GuA0PPGH/uDOIP6ktDkU7btH55tJQfoGMNxBACF6A5Uwd lTW2q+7JstR5lLrVtfMMVF4hkzv347voAl3Hqz0lJWidn9xi1x03SaaD8gBig5T9HxfdX+ DOaom7IJCg50Tu598FbekP+sA3L98ne/fISMTru2AQqzvhNP+Qu+T2jJrHa87A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFLnC3pZLztjc; Sun, 12 Feb 2023 21:53: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 31CLr3xn069223; Sun, 12 Feb 2023 21:53:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CLr3Na069222; Sun, 12 Feb 2023 21:53:03 GMT (envelope-from git) Date: Sun, 12 Feb 2023 21:53:03 GMT Message-Id: <202302122153.31CLr3Na069222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: ab0440af75ba - main - nfsd: Continue adding macros so nfsd can run in a vnet prison List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab0440af75ba0c2dbf263c5441ccbe4058515fff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=ab0440af75ba0c2dbf263c5441ccbe4058515fff commit ab0440af75ba0c2dbf263c5441ccbe4058515fff Author: Rick Macklem AuthorDate: 2023-02-12 21:52:13 +0000 Commit: Rick Macklem CommitDate: 2023-02-12 21:52:13 +0000 nfsd: Continue adding macros so nfsd can run in a vnet prison Commit 7344856e3a6d added a lot of macros that will front end vnet macros so that nfsd(8) can run in vnet prison. This patch adds some more of them. MFC after: 3 months --- sys/fs/nfs/nfsdport.h | 2 +- sys/fs/nfs/nfsrvstate.h | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sys/fs/nfs/nfsdport.h b/sys/fs/nfs/nfsdport.h index 6d468219adf3..26bd57d5736d 100644 --- a/sys/fs/nfs/nfsdport.h +++ b/sys/fs/nfs/nfsdport.h @@ -92,7 +92,7 @@ struct nfsexstuff { bcmp(&(f1)->fh_fid, &(f2)->fh_fid, sizeof(struct fid)) == 0) #define NFSLOCKHASH(f) \ - (&nfslockhash[nfsrv_hashfh(f) % nfsrv_lockhashsize]) + (&NFSD_VNET(nfslockhash)[nfsrv_hashfh(f) % nfsrv_lockhashsize]) #define NFSFPVNODE(f) ((f)->f_vnode) #define NFSFPCRED(f) ((f)->f_cred) diff --git a/sys/fs/nfs/nfsrvstate.h b/sys/fs/nfs/nfsrvstate.h index 4c171e8b3f50..4dc9729a952f 100644 --- a/sys/fs/nfs/nfsrvstate.h +++ b/sys/fs/nfs/nfsrvstate.h @@ -58,18 +58,18 @@ LIST_HEAD(nfsdontlisthead, nfsdontlist); TAILQ_HEAD(nfsuserhashhead, nfsusrgrp); #define NFSCLIENTHASH(id) \ - (&nfsclienthash[(id).lval[1] % nfsrv_clienthashsize]) + (&NFSD_VNET(nfsclienthash)[(id).lval[1] % nfsrv_clienthashsize]) #define NFSSTATEHASH(clp, id) \ (&((clp)->lc_stateid[(id).other[2] % nfsrv_statehashsize])) #define NFSUSERHASH(id) \ - (&nfsuserhash[(id) % nfsrv_lughashsize]) + (&NFSD_VNET(nfsuserhash)[(id) % nfsrv_lughashsize]) #define NFSUSERNAMEHASH(p, l) \ - (&nfsusernamehash[((l)>=4?(*(p)+*((p)+1)+*((p)+2)+*((p)+3)):*(p)) \ + (&NFSD_VNET(nfsusernamehash)[((l)>=4?(*(p)+*((p)+1)+*((p)+2)+*((p)+3)):*(p)) \ % nfsrv_lughashsize]) #define NFSGROUPHASH(id) \ - (&nfsgrouphash[(id) % nfsrv_lughashsize]) + (&NFSD_VNET(nfsgrouphash)[(id) % nfsrv_lughashsize]) #define NFSGROUPNAMEHASH(p, l) \ - (&nfsgroupnamehash[((l)>=4?(*(p)+*((p)+1)+*((p)+2)+*((p)+3)):*(p)) \ + (&NFSD_VNET(nfsgroupnamehash)[((l)>=4?(*(p)+*((p)+1)+*((p)+2)+*((p)+3)):*(p)) \ % nfsrv_lughashsize]) struct nfssessionhash { @@ -77,7 +77,8 @@ struct nfssessionhash { struct nfssessionhashhead list; }; #define NFSSESSIONHASH(f) \ - (&nfssessionhash[nfsrv_hashsessionid(f) % nfsrv_sessionhashsize]) + (&NFSD_VNET(nfssessionhash)[nfsrv_hashsessionid(f) % \ + nfsrv_sessionhashsize]) struct nfslayouthash { struct mtx mtx; From nobody Sun Feb 12 21:54:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFLpv1D0Yz3pC9l; Sun, 12 Feb 2023 21:54:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) (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 4PFLpt65pfz4RSK; Sun, 12 Feb 2023 21:54:30 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x230.google.com with SMTP id 20so8792246oix.5; Sun, 12 Feb 2023 13:54:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dmIidRDacOtXrVLvmMexxYqGKHD6kP2LLh8ZQriXb5o=; b=eNThqQHo8XweQD+8DvoTCre5l8laUAX2pqRK/lrNzRFsR/aYAeTFs/U5dkWiBoAyDX oJtBSbzlHnDSXY8UO2dwh8EoIeVkqTat1IFCSE7V3mZkVOPg29NOLFSMJsUc1p8oQWDz YLSLGojy4d+xWFtmURzO4Yq2MRj0wQLV/7CQG54WAxXlvkFqMxOg94icdZCK+cBjb0+f 7OHGfZcRmxkBsNzHuf/uXdrq5icRmYTSXIuUtNv6+1ILmF1YkFt8T7slb8kt+9M/F9Op SbfQRf/lFIJmLpe2krmzabikOp8eoGALGOXrPMql2U4MouBlZT7wrFoePOmDMNu/KFca oZ2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dmIidRDacOtXrVLvmMexxYqGKHD6kP2LLh8ZQriXb5o=; b=K8NVuYH11iGfpeA4fY5JahPuolFGO+2ovr55j15ScnvbgxifSGBEB6Znp5N1wkEpNZ 9QtFjwDiQhX6AjHePpl+jAKwkHPEuD3LZeO48kvWkOSuM6pno/bjO7G7tfAAq6pbI9qr g5g85DDhEbMmv3Jr1/6oPesZkyub/9S2n0jBYYn9rmYfTnP+NwemsM3yGtLLmrIuHFIY SmcYIwKkwmulBgGZ126W3JDtajRYitlciWu4Sy+rYBlxe6rWiE2jkSshOoEhCvtUzCUH Ik/Pf5zZVuoiGcFlFxtfLdUoLV5vwN6Yv94fG5nj5a5oVVNYTVf04wYeKCpwXOf+gLLQ Bf8Q== X-Gm-Message-State: AO0yUKXzCBiKYv2eRlpe4PJbkKnryLuDX4lQ9160Ors5NgDFbu+N0DM5 vgT1ekTys+mkoIZGQRyLFwumE+U6KThfyvaeiuuVcXo6 X-Google-Smtp-Source: AK7set/KuYOrbbAbqMlfJHe0rD9PMU9z/WTbM/sFuehz8s4dxABdPp5aqbz9NUQSFFQaVLHtLcTToL0338SDlSIuggA= X-Received: by 2002:aca:3c05:0:b0:378:348b:9346 with SMTP id j5-20020aca3c05000000b00378348b9346mr1085754oia.81.1676238869477; Sun, 12 Feb 2023 13:54:29 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:6c92:0:b0:4b3:d953:974c with HTTP; Sun, 12 Feb 2023 13:54:28 -0800 (PST) In-Reply-To: References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> From: Mateusz Guzik Date: Sun, 12 Feb 2023 22:54:28 +0100 Message-ID: Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns To: Warner Losh Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PFLpt65pfz4RSK X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2/12/23, Warner Losh wrote: > On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik wrote: > >> On 2/12/23, Jessica Clarke wrote: >> > On 12 Feb 2023, at 21:23, Mateusz Guzik wrote: >> >> >> >> On 2/12/23, Jessica Clarke wrote: >> >>> On 12 Feb 2023, at 21:13, Mateusz Guzik wrote: >> >>>> >> >>>> The branch main has been updated by mjg: >> >>>> >> >>>> URL: >> >>>> >> https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e7= 3cdf181a0b >> >>>> >> >>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b >> >>>> Author: Mateusz Guzik >> >>>> AuthorDate: 2023-02-12 21:12:34 +0000 >> >>>> Commit: Mateusz Guzik >> >>>> CommitDate: 2023-02-12 21:12:34 +0000 >> >>>> >> >>>> zlib: silence K&R warns >> >>>> >> >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") >> >>>> --- >> >>>> sys/conf/files | 18 +++++++++++------- >> >>>> sys/modules/zlib/Makefile | 2 ++ >> >>>> 2 files changed, 13 insertions(+), 7 deletions(-) >> >>>> >> >>>> diff --git a/sys/conf/files b/sys/conf/files >> >>>> index 9171b434a7bf..53f90f7afc22 100644 >> >>>> --- a/sys/conf/files >> >>>> +++ b/sys/conf/files >> >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard >> >>>> libkern/strvalid.c standard >> >>>> libkern/timingsafe_bcmp.c standard >> >>>> contrib/zlib/adler32.c optional crypto | geom_uzip | \ >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> >>> >> >>> This doesn=E2=80=99t exist pre-Clang 15. >> >>> >> >> >> >> this is main-only and it already has llvm15. the build requirement is >> >> top of the branch, so I don't see a problem. >> >> >> >> if you ran into trouble cross-compiling, you should probably update >> >> that env instead of expecting working around the warn in the tree for >> >> older compilers >> > >> > That is not our policy. Please fix this. >> > >> >> Are you sure about that? I distinctly recall the supported path to get >> top of the latest stable branch first, from there you should be able >> to build the toolchain and the kernel. >> >> afaics the above change did not affect it >> >> If you insist, I can look for the exact paragraph in the docs. >> > > The fix is trivial. > > https://reviews.freebsd.org/D38550 > > Please focus your efforts on commenting on the above and testing it out. > there is no warn with it but where is it stated that a compiler older than the newest in the tree is supported for kernel builds? > > >> > Jess >> > >> >>> Jess >> >>> >> >>>> contrib/zlib/compress.c optional crypto | geom_uzip | \ >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >> >>>> -Wno-deprecated-non-prototype" >> >>>> contrib/zlib/crc32.c optional crypto | geom_uzip | \ >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> >>>> contrib/zlib/deflate.c optional crypto | geom_uzip | \ >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >> >>>> -Wno-deprecated-non-prototype" >> >>>> contrib/zlib/inffast.c optional crypto | geom_uzip | \ >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> >>>> contrib/zlib/inflate.c optional crypto | geom_uzip | \ >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> >>>> contrib/zlib/inftrees.c optional crypto | geom_uzip | \ >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> >>>> contrib/zlib/trees.c optional crypto | geom_uzip | \ >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> >>>> contrib/zlib/uncompr.c optional crypto | geom_uzip | \ >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >> >>>> -Wno-deprecated-non-prototype" >> >>>> contrib/zlib/zutil.c optional crypto | geom_uzip | \ >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> >>>> diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile >> >>>> index 6391255e512b..178d3a3f7ab7 100644 >> >>>> --- a/sys/modules/zlib/Makefile >> >>>> +++ b/sys/modules/zlib/Makefile >> >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPES} # >> >>>> crc32.c:586 >> >>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 >> >>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 >> >>>> >> >>>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype >> >>>> + >> >>>> .include >> >>> >> >>> >> >> >> >> >> >> -- >> >> Mateusz Guzik >> > >> > >> >> >> -- >> Mateusz Guzik >> > --=20 Mateusz Guzik From nobody Sun Feb 12 22:02:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFM0Z30ySz3pDhm; Sun, 12 Feb 2023 22:02:54 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFM0Y6Wygz4Srr; Sun, 12 Feb 2023 22:02:53 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 31CM2nKj002276; Mon, 13 Feb 2023 01:02:49 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 31CM2nrK002275; Mon, 13 Feb 2023 01:02:49 +0300 (MSK) (envelope-from dchagin) Date: Mon, 13 Feb 2023 01:02:49 +0300 From: Dmitry Chagin To: Antoine Brodin Cc: Dmitry Chagin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c21b080f3dc2 - main - cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. Message-ID: References: <202301291318.30TDIq4Q008231@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4PFM0Y6Wygz4Srr X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sun, Feb 12, 2023 at 07:58:07PM +0000, Antoine Brodin wrote: > On Sun, Feb 12, 2023 at 11:13 AM Dmitry Chagin wrote: > > > > On Sun, Feb 12, 2023 at 01:40:59PM +0300, Dmitry Chagin wrote: > > > On Sun, Feb 12, 2023 at 09:47:15AM +0000, Antoine Brodin wrote: > > > > On Sun, Jan 29, 2023 at 1:18 PM Dmitry Chagin wrote: > > > > > > > > > > The branch main has been updated by dchagin: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > > > > > > > commit c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > > Author: Dmitry Chagin > > > > > AuthorDate: 2023-01-29 13:17:33 +0000 > > > > > Commit: Dmitry Chagin > > > > > CommitDate: 2023-01-29 13:17:33 +0000 > > > > > > > > > > cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. > > > > > > > > > > Under Linux to sched_[g|s]etaffinity() functions the value returned from a call > > > > > to gettid(2) (thread id) can be passed in the argument pid. Specifying pid as 0 > > > > > will set the attribute for the calling thread, and passing the value returned > > > > > from a call to getpid(2) (process id) will set the attribute for the main thread > > > > > of the thread group. > > > > > > > > > > Native cpuset(2) family of system calls has "which" argument to determine how > > > > > the value of id argument is interpreted, i.e., CPU_WHICH_TID is used to pass > > > > > a thread id and CPU_WHICH_PID - to pass a process id. > > > > > > > > > > For now native sched_[g|s]etaffinity() implementation is wrong as uses "which" > > > > > CPU_WHICH_PID to pass both (process and thread id) to the kernel. To fix this > > > > > adding a new "which" CPU_WHICH_TIDPID intended to handle both id's. > > > > > > > > > > Reviewed by: kib > > > > > Differential Revision: https://reviews.freebsd.org/D38209 > > > > > MFC after: 1 week > > > > > --- > > > > > lib/libc/gen/sched_getaffinity.c | 2 +- > > > > > lib/libc/gen/sched_setaffinity.c | 2 +- > > > > > lib/libc/sys/cpuset.2 | 4 +++- > > > > > sys/kern/kern_cpuset.c | 42 +++++++++++++++++++++++++++++++++++++++- > > > > > sys/sys/cpuset.h | 1 + > > > > > 5 files changed, 47 insertions(+), 4 deletions(-) > > > > > > > > > > > > Hello, > > > > > > > > This broke math/py-numpy on main and stable/13 > > > > > > > > https://pkg-status.freebsd.org/gohan03/data/main-amd64-default-baseline/p52768539d46f_scd3193f640/logs/errors/py39-numpy-1.24.1,1.log > > > > https://pkg-status.freebsd.org/gohan02/data/13stable-amd64-quarterly-baseline/841610d9bfc6/logs/errors/py39-numpy-1.23.5_1,1.log > > > > > > > > File "/wrkdirs/usr/ports/math/py-numpy/work-py39/numpy-1.23.5/numpy/distutils/misc_util.py", > > > > line 93, in get_num_build_jobs > > > > cpu_count = len(os.sched_getaffinity(0)) > > > > OverflowError: could not allocate a large enough CPU set > > > > > > hi, Antoine, > > > > > > on stable/13 > > > dchagin@heemeyer:~ % uname -a > > > FreeBSD heemeyer.club 13.2-STABLE FreeBSD 13.2-STABLE #268 stable/13-n254471-51485f81b01a-dirty: Sat Feb 11 12:16:21 MSK 2023 dchagin@heemeyer.club:/usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > > > dchagin@heemeyer:~ % python3.9 > > > Python 3.9.16 (main, Dec 18 2022, 01:15:32) > > > [Clang 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a on freebsd13 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> import os > > > >>> len(os.sched_getaffinity(0)) > > > 1 > > > >>> os.sched_getaffinity(0) > > > {0} > > > >>> exit() > > > dchagin@heemeyer:~ % > > > > > > on current: > > > dchagin@mordor:~/freebsd % uname -a > > > FreeBSD mordor.heemeyer.club 14.0-CURRENT FreeBSD 14.0-CURRENT #458 futex-n260850-52456667491d-dirty: Sat Feb 11 14:24:46 MSK 2023 dchagin@mordor.heemeyer.club:/home/dchagin/tmp/obj/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > > > dchagin@mordor:~/freebsd % python3.9 > > > Python 3.9.16 (main, Dec 18 2022, 01:24:21) > > > [Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc1238 on freebsd14 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> import os > > > >>> len(os.sched_getaffinity(0)) > > > 16 > > > >>> os.sched_getaffinity(0) > > > {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} > > > >>> exit() > > > dchagin@mordor:~/freebsd % > > > > > > > > > could you please show out of os.sched_getaffinity(0) ? > > > > and os.cpu_count() > > also sysctl kern.smp > > Here is what I have in the head jail: > > >>> len(os.sched_getaffinity(0)) > Traceback (most recent call last): > File "", line 1, in > OverflowError: could not allocate a large enough CPU set > >>> os.sched_getaffinity(0) > Traceback (most recent call last): > File "", line 1, in > OverflowError: could not allocate a large enough CPU set > >>> os.cpu_count() > 64 > >>> > root@mainamd64PR269425-default:~ # sysctl kern.smp > kern.smp.forward_signal_enabled: 1 > kern.smp.topology: 0 > kern.smp.cores: 32 > kern.smp.threads_per_core: 2 > kern.smp.cpus: 64 > kern.smp.disabled: 0 > kern.smp.active: 1 > kern.smp.maxcpus: 256 > kern.smp.maxid: 63 thanks, I've implemented python os_sched_getaffinity_impl and could not get a similar result. Is it posiible that you run old wolrd (pre 3e11d3f6)? From nobody Sun Feb 12 22:06:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFM4s3gHyz3pF8N for ; Sun, 12 Feb 2023 22:06:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 4PFM4s19G6z4Tbd for ; Sun, 12 Feb 2023 22:06:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x535.google.com with SMTP id d40so9356928eda.8 for ; Sun, 12 Feb 2023 14:06:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WkOdkICzmaQsG0IpwEpJ3rhCMYGWCSIGjZCpqjKDS4k=; b=RRPYrFGPCxBjgLCvyynBiUvcu++QBp4MMYm3d3dhAVowPU3ph/BUGDkmYQIJHz+zdc K2mD/5qpf67Mt1npyGrljcZY4bCRQ1j5nlLS7OqWRPcTgY8lVVyBGwUNZhIs6XZ9eoBB Wh3Q7auz60nXlX5uI+cbPrCyoR+gha+uOe/t1F3SgYeFsLeKbDaqani19uvOCsQx/Atg xXPsv+pgjkptz8aX/c/UPwbe3I0UVx/dLM4Js3Q312dMkD1Rh/lRlCvj/GyDq4eajzLP PeYiONnEb2ifwF2FSFzM3Bf5ZWT17W8lLIYtgRz6wU38wDIiIlNJzVs7+tNRhHORuiIE r+Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WkOdkICzmaQsG0IpwEpJ3rhCMYGWCSIGjZCpqjKDS4k=; b=PEP9kLUTrI0De2dnv+DH7WugiFmCX4jVmCXOD/XUw9/FoGIcXEERQLy1wzOKJzk2Af QMwuIQzoWD/Hf9jZwvbWJMdDSNJ3hkJNOwjfowTxMlFPGUoWpXdE8Zy4eG2Xn03/AoLm dFtYAsn40LNeS9Z6gIrVc/wy3+GvscufFvIpVhpyO+Cy2JrVaNZOEMzgTcM6ca4lhIdT eQM3Wtv4ivECJFFcU587XGtzhdTICdr4mH4Gj9VDV4hmBp0nq/VFlRTRVoPRt6l0FyNY G89pv/1mVN3hDUcRhRpMFjuOjf4Ew1yl7PPEQhv1A9z6kyfuCaZWMRnpxw+avvErxPSr ngTQ== X-Gm-Message-State: AO0yUKXdfdb8lXU/6OtO9a2BQzyPWf6juXheZC8rzG+GSENkG3J7G+7X LHvHKJKMVhRScblzdlSBZUTrqShedrtrVquofrO+8Q== X-Google-Smtp-Source: AK7set8GV7GbKyUbE+AlcnLTvnb3xBBUXggF1eZUkj0TOEkxOY65WYlg4UBYY2hDRnqeYHPf49Km6Wuag536baEqMlQ= X-Received: by 2002:a50:cdca:0:b0:4aa:a255:291f with SMTP id h10-20020a50cdca000000b004aaa255291fmr5137346edj.0.1676239595711; Sun, 12 Feb 2023 14:06:35 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> In-Reply-To: From: Warner Losh Date: Sun, 12 Feb 2023 15:06:24 -0700 Message-ID: Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns To: Mateusz Guzik Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000a947c605f487f118" X-Rspamd-Queue-Id: 4PFM4s19G6z4Tbd X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000a947c605f487f118 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Feb 12, 2023 at 2:54 PM Mateusz Guzik wrote: > On 2/12/23, Warner Losh wrote: > > On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik wrote= : > > > >> On 2/12/23, Jessica Clarke wrote: > >> > On 12 Feb 2023, at 21:23, Mateusz Guzik wrote: > >> >> > >> >> On 2/12/23, Jessica Clarke wrote: > >> >>> On 12 Feb 2023, at 21:13, Mateusz Guzik wrote: > >> >>>> > >> >>>> The branch main has been updated by mjg: > >> >>>> > >> >>>> URL: > >> >>>> > >> > https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e73= cdf181a0b > >> >>>> > >> >>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b > >> >>>> Author: Mateusz Guzik > >> >>>> AuthorDate: 2023-02-12 21:12:34 +0000 > >> >>>> Commit: Mateusz Guzik > >> >>>> CommitDate: 2023-02-12 21:12:34 +0000 > >> >>>> > >> >>>> zlib: silence K&R warns > >> >>>> > >> >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") > >> >>>> --- > >> >>>> sys/conf/files | 18 +++++++++++------- > >> >>>> sys/modules/zlib/Makefile | 2 ++ > >> >>>> 2 files changed, 13 insertions(+), 7 deletions(-) > >> >>>> > >> >>>> diff --git a/sys/conf/files b/sys/conf/files > >> >>>> index 9171b434a7bf..53f90f7afc22 100644 > >> >>>> --- a/sys/conf/files > >> >>>> +++ b/sys/conf/files > >> >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard > >> >>>> libkern/strvalid.c standard > >> >>>> libkern/timingsafe_bcmp.c standard > >> >>>> contrib/zlib/adler32.c optional crypto | geom_uzip | = \ > >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >> >>> > >> >>> This doesn=E2=80=99t exist pre-Clang 15. > >> >>> > >> >> > >> >> this is main-only and it already has llvm15. the build requirement = is > >> >> top of the branch, so I don't see a problem. > >> >> > >> >> if you ran into trouble cross-compiling, you should probably update > >> >> that env instead of expecting working around the warn in the tree f= or > >> >> older compilers > >> > > >> > That is not our policy. Please fix this. > >> > > >> > >> Are you sure about that? I distinctly recall the supported path to get > >> top of the latest stable branch first, from there you should be able > >> to build the toolchain and the kernel. > >> > >> afaics the above change did not affect it > >> > >> If you insist, I can look for the exact paragraph in the docs. > >> > > > > The fix is trivial. > > > > https://reviews.freebsd.org/D38550 > > > > Please focus your efforts on commenting on the above and testing it out= . > > > > there is no warn with it > > but where is it stated that a compiler older than the newest in the > tree is supported for kernel builds? > As a project we've always benefitted from flexibility when it's trivial to be flexible. Warner > > > > > >> > Jess > >> > > >> >>> Jess > >> >>> > >> >>>> contrib/zlib/compress.c optional crypto | geom_uzip | = \ > >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >> >>>> -Wno-deprecated-non-prototype" > >> >>>> contrib/zlib/crc32.c optional crypto | geom_uzip | = \ > >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >> >>>> contrib/zlib/deflate.c optional crypto | geom_uzip | = \ > >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >> >>>> -Wno-deprecated-non-prototype" > >> >>>> contrib/zlib/inffast.c optional crypto | geom_uzip | = \ > >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >> >>>> contrib/zlib/inflate.c optional crypto | geom_uzip | = \ > >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >> >>>> contrib/zlib/inftrees.c optional crypto | geom_uzip | = \ > >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >> >>>> contrib/zlib/trees.c optional crypto | geom_uzip | = \ > >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >> >>>> contrib/zlib/uncompr.c optional crypto | geom_uzip | = \ > >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >> >>>> -Wno-deprecated-non-prototype" > >> >>>> contrib/zlib/zutil.c optional crypto | geom_uzip | = \ > >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >> >>>> diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefil= e > >> >>>> index 6391255e512b..178d3a3f7ab7 100644 > >> >>>> --- a/sys/modules/zlib/Makefile > >> >>>> +++ b/sys/modules/zlib/Makefile > >> >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPES} = # > >> >>>> crc32.c:586 > >> >>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 > >> >>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 > >> >>>> > >> >>>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype > >> >>>> + > >> >>>> .include > >> >>> > >> >>> > >> >> > >> >> > >> >> -- > >> >> Mateusz Guzik > >> > > >> > > >> > >> > >> -- > >> Mateusz Guzik > >> > > > > > -- > Mateusz Guzik > --000000000000a947c605f487f118 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Feb 12, 2023 at 2:54 PM Mateu= sz Guzik <mjguzik@gmail.com>= wrote:
On 2/12/= 23, Warner Losh <imp= @bsdimp.com> wrote:
> On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik <mjguzik@gmail.com> wrote:
>
>> On 2/12/23, Jessica Clarke <jrtc27@freebsd.org> wrote:
>> > On 12 Feb 2023, at 21:23, Mateusz Guzik <mjguzik@gmail.com> wrote:
>> >>
>> >> On 2/12/23, Jessica Clarke <jrtc27@freebsd.org> wrote:
>> >>> On 12 Feb 2023, at 21:13, Mateusz Guzik <mjg@FreeB= SD.org> wrote:
>> >>>>
>> >>>> The branch main has been updated by mjg:
>> >>>>
>> >>>> URL:
>> >>>>
>> https://c= git.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e73cdf181a0b
>> >>>>
>> >>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b >> >>>> Author:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@= FreeBSD.org>
>> >>>> AuthorDate: 2023-02-12 21:12:34 +0000
>> >>>> Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@= FreeBSD.org>
>> >>>> CommitDate: 2023-02-12 21:12:34 +0000
>> >>>>
>> >>>>=C2=A0 =C2=A0zlib: silence K&R warns
>> >>>>
>> >>>>=C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Rubicon Com= munications, LLC ("Netgate")
>> >>>> ---
>> >>>> sys/conf/files=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 | 18 +++++++++++-------
>> >>>> sys/modules/zlib/Makefile |=C2=A0 2 ++
>> >>>> 2 files changed, 13 insertions(+), 7 deletions(-)=
>> >>>>
>> >>>> diff --git a/sys/conf/files b/sys/conf/files
>> >>>> index 9171b434a7bf..53f90f7afc22 100644
>> >>>> --- a/sys/conf/files
>> >>>> +++ b/sys/conf/files
>> >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 standard
>> >>>> libkern/strvalid.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0standard
>> >>>> libkern/timingsafe_bcmp.c=C2=A0 standard
>> >>>> contrib/zlib/adler32.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>> >>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib
>> >>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>> >>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-depre= cated-non-prototype"
>> >>>
>> >>> This doesn=E2=80=99t exist pre-Clang 15.
>> >>>
>> >>
>> >> this is main-only and it already has llvm15. the build re= quirement is
>> >> top of the branch, so I don't see a problem.
>> >>
>> >> if you ran into trouble cross-compiling, you should proba= bly update
>> >> that env instead of expecting working around the warn in = the tree for
>> >> older compilers
>> >
>> > That is not our policy. Please fix this.
>> >
>>
>> Are you sure about that? I distinctly recall the supported path to= get
>> top of the latest stable branch first, from there you should be ab= le
>> to build the toolchain and the kernel.
>>
>> afaics the above change did not affect it
>>
>> If you insist, I can look for the exact paragraph in the docs.
>>
>
> The fix is trivial.
>
>
https://reviews.freebsd.org/D38550
>
> Please focus your efforts on commenting on the above and testing it ou= t.
>

there is no warn with it

but where is it stated that a compiler older than the newest in the
tree is supported for kernel builds?

As= a project we've always benefitted from flexibility when it's trivi= al to
be flexible.

Warner
<= div>=C2=A0
>
>
>> > Jess
>> >
>> >>> Jess
>> >>>
>> >>>> contrib/zlib/compress.c=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 optional crypto | geom_uzip | \
>> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \=
>> >>>> -=C2=A0 compile-with "${NORMAL_C} -Wno-cast-= qual"
>> >>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-cast-= qual
>> >>>> -Wno-deprecated-non-prototype"
>> >>>> contrib/zlib/crc32.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \=
>> >>>>=C2=A0 =C2=A0 compile-with "${NORMAL_C} ${NO_= WSTRICT_PROTOTYPES}"
>> >>>> contrib/zlib/deflate.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \=
>> >>>> -=C2=A0 compile-with "${NORMAL_C} -Wno-cast-= qual"
>> >>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-cast-= qual
>> >>>> -Wno-deprecated-non-prototype"
>> >>>> contrib/zlib/inffast.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>> >>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib
>> >>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>> >>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-depre= cated-non-prototype"
>> >>>> contrib/zlib/inflate.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>> >>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib
>> >>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>> >>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-depre= cated-non-prototype"
>> >>>> contrib/zlib/inftrees.c=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 optional crypto | geom_uzip | \
>> >>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib
>> >>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \
>> >>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-depre= cated-non-prototype"
>> >>>> contrib/zlib/trees.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \=
>> >>>>=C2=A0 =C2=A0 compile-with "${NORMAL_C} ${NO_= WSTRICT_PROTOTYPES}"
>> >>>> contrib/zlib/uncompr.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \=
>> >>>> -=C2=A0 compile-with "${NORMAL_C} -Wno-cast-= qual"
>> >>>> +=C2=A0 compile-with "${NORMAL_C} -Wno-cast-= qual
>> >>>> -Wno-deprecated-non-prototype"
>> >>>> contrib/zlib/zutil.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip | \
>> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs | zlib \=
>> >>>>=C2=A0 =C2=A0 compile-with "${NORMAL_C} ${NO_= WSTRICT_PROTOTYPES}"
>> >>>> diff --git a/sys/modules/zlib/Makefile b/sys/modu= les/zlib/Makefile
>> >>>> index 6391255e512b..178d3a3f7ab7 100644
>> >>>> --- a/sys/modules/zlib/Makefile
>> >>>> +++ b/sys/modules/zlib/Makefile
>> >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTR= ICT_PROTOTYPES} #
>> >>>> crc32.c:586
>> >>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # = trees.c:232
>> >>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # = zutil.c:27,32
>> >>>>
>> >>>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype
>> >>>> +
>> >>>> .include <bsd.kmod.mk>
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Mateusz Guzik <mjguzik gmail.com>
>> >
>> >
>>
>>
>> --
>> Mateusz Guzik <mjguzik gmail.com>
>>
>


--
Mateusz Guzik <mjguzik gmail.com>
--000000000000a947c605f487f118-- From nobody Sun Feb 12 22:12:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFMCP4TGrz3pFSm; Sun, 12 Feb 2023 22:12:17 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 4PFMCP2rqTz4VhJ; Sun, 12 Feb 2023 22:12:17 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-x32e.google.com with SMTP id d21-20020a056830005500b0068bd2e0b25bso3224031otp.1; Sun, 12 Feb 2023 14:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/GH/5WzUWO8XPUxbxsQ6cJcIV9TTJ+UbbluYXPhONOQ=; b=Lnfm+/cIKaxXXciNIA79YZxG2On2oFanmmY2BdcQ6CFezfXFw3AMG61G0VbbuUlloi yWlfASOxmjuYk93quhy1RA4TQYT886fdZ8PRYqAYMPF42FdHbYAmpHeTct30vji0R4Vq jh6iFiZK5NzHscYfgCNFLhMA1V0b4k9mUrlnuHfmAIxoLYLtqjYwP47WnPgxMc6wQuT3 G4ern9NIRIaf3EW90Lq66bHCKQwKfh63hMWRZ5OyoewyOaLA7dIB3CElMVdAhM2uhUdY hEFDURPFLYV6/vQovCi/vZgjl9avJEzHIirM5nBN4sFzTuCUJMM1On0i3Nr6O2RelOQF 7jiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/GH/5WzUWO8XPUxbxsQ6cJcIV9TTJ+UbbluYXPhONOQ=; b=OqWonfkzaOFW457iIEl+dlZOqpzxZgzNVvjvtN6t5ovN1m2lXCEMkwCAebuJHS9aoJ gH/VLaa3SI3xkV/RnhejzOd0tBHsdXviC38P6U8/3iE6Jfpd8Lv3ZLhTfezVvVCHhsc4 sl09QGmvNqcj6u2bYw0vkI8HSsuY98zu4U+SHY0jIheqfa6VTWLk1h+zJHWR1aJ3j8jW 7a/XyR0e2YHC2cQ6JPDsGsii/UG3aOEYOV0f93VsIsMHZ+6T75TZ/SMQXrAmSxH2ZsB7 YbwM8ML7vP/rH8p+tNWIOyk94HKiq+uhk2SCbCy4Pm+4+AboF425PRklUiUTukF0Ea8N xqhA== X-Gm-Message-State: AO0yUKU/kIuXSQVVhNZN9RklIwpkyUhCV0V5P1dxQaXNrUMJIxv5vwDF 1BiG9RGFXknaLGYcOb8Py0VEMAzay2bnEv8PIR3JGS3N X-Google-Smtp-Source: AK7set+OnFs25hqv9QpAheyFLYIqtKyTvb25ioD6XJA8IozjVoULCvzRddjBPFmihQoe6A2jDvsA7fYkuDj0YgCNnqw= X-Received: by 2002:a05:6830:1db5:b0:66e:f6cb:cb4e with SMTP id z21-20020a0568301db500b0066ef6cbcb4emr2162950oti.105.1676239936440; Sun, 12 Feb 2023 14:12:16 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:6c92:0:b0:4b3:d953:974c with HTTP; Sun, 12 Feb 2023 14:12:15 -0800 (PST) In-Reply-To: References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> From: Mateusz Guzik Date: Sun, 12 Feb 2023 23:12:15 +0100 Message-ID: Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns To: Warner Losh Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PFMCP2rqTz4VhJ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2/12/23, Warner Losh wrote: > On Sun, Feb 12, 2023 at 2:54 PM Mateusz Guzik wrote: > >> On 2/12/23, Warner Losh wrote: >> > On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik >> > wrote: >> > >> >> On 2/12/23, Jessica Clarke wrote: >> >> > On 12 Feb 2023, at 21:23, Mateusz Guzik wrote: >> >> >> >> >> >> On 2/12/23, Jessica Clarke wrote: >> >> >>> On 12 Feb 2023, at 21:13, Mateusz Guzik wrote: >> >> >>>> >> >> >>>> The branch main has been updated by mjg: >> >> >>>> >> >> >>>> URL: >> >> >>>> >> >> >> https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e7= 3cdf181a0b >> >> >>>> >> >> >>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b >> >> >>>> Author: Mateusz Guzik >> >> >>>> AuthorDate: 2023-02-12 21:12:34 +0000 >> >> >>>> Commit: Mateusz Guzik >> >> >>>> CommitDate: 2023-02-12 21:12:34 +0000 >> >> >>>> >> >> >>>> zlib: silence K&R warns >> >> >>>> >> >> >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") >> >> >>>> --- >> >> >>>> sys/conf/files | 18 +++++++++++------- >> >> >>>> sys/modules/zlib/Makefile | 2 ++ >> >> >>>> 2 files changed, 13 insertions(+), 7 deletions(-) >> >> >>>> >> >> >>>> diff --git a/sys/conf/files b/sys/conf/files >> >> >>>> index 9171b434a7bf..53f90f7afc22 100644 >> >> >>>> --- a/sys/conf/files >> >> >>>> +++ b/sys/conf/files >> >> >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard >> >> >>>> libkern/strvalid.c standard >> >> >>>> libkern/timingsafe_bcmp.c standard >> >> >>>> contrib/zlib/adler32.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib >> >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> >> >>> >> >> >>> This doesn=E2=80=99t exist pre-Clang 15. >> >> >>> >> >> >> >> >> >> this is main-only and it already has llvm15. the build requirement >> >> >> is >> >> >> top of the branch, so I don't see a problem. >> >> >> >> >> >> if you ran into trouble cross-compiling, you should probably updat= e >> >> >> that env instead of expecting working around the warn in the tree >> >> >> for >> >> >> older compilers >> >> > >> >> > That is not our policy. Please fix this. >> >> > >> >> >> >> Are you sure about that? I distinctly recall the supported path to ge= t >> >> top of the latest stable branch first, from there you should be able >> >> to build the toolchain and the kernel. >> >> >> >> afaics the above change did not affect it >> >> >> >> If you insist, I can look for the exact paragraph in the docs. >> >> >> > >> > The fix is trivial. >> > >> > https://reviews.freebsd.org/D38550 >> > >> > Please focus your efforts on commenting on the above and testing it >> > out. >> > >> >> there is no warn with it >> >> but where is it stated that a compiler older than the newest in the >> tree is supported for kernel builds? >> > > As a project we've always benefitted from flexibility when it's trivial t= o > be flexible. > Look, I just want the build to be warn-free again and I don't care how zlib is handled for that purpose. I do note though that if "compiler flexibility" if you will is to be expected, it should be stated somewhere. Again, I only recall the opposite -- top of main needed to build the kernel. > Warner > > >> > >> > >> >> > Jess >> >> > >> >> >>> Jess >> >> >>> >> >> >>>> contrib/zlib/compress.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >> >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >> >> >>>> -Wno-deprecated-non-prototype" >> >> >>>> contrib/zlib/crc32.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> >> >>>> contrib/zlib/deflate.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >> >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >> >> >>>> -Wno-deprecated-non-prototype" >> >> >>>> contrib/zlib/inffast.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib >> >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> >> >>>> contrib/zlib/inflate.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib >> >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> >> >>>> contrib/zlib/inftrees.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib >> >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" >> >> >>>> contrib/zlib/trees.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> >> >>>> contrib/zlib/uncompr.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" >> >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual >> >> >>>> -Wno-deprecated-non-prototype" >> >> >>>> contrib/zlib/zutil.c optional crypto | geom_uzip | >> >> >>>> \ >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ >> >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" >> >> >>>> diff --git a/sys/modules/zlib/Makefile >> >> >>>> b/sys/modules/zlib/Makefile >> >> >>>> index 6391255e512b..178d3a3f7ab7 100644 >> >> >>>> --- a/sys/modules/zlib/Makefile >> >> >>>> +++ b/sys/modules/zlib/Makefile >> >> >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPES}= # >> >> >>>> crc32.c:586 >> >> >>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 >> >> >>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 >> >> >>>> >> >> >>>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype >> >> >>>> + >> >> >>>> .include >> >> >>> >> >> >>> >> >> >> >> >> >> >> >> >> -- >> >> >> Mateusz Guzik >> >> > >> >> > >> >> >> >> >> >> -- >> >> Mateusz Guzik >> >> >> > >> >> >> -- >> Mateusz Guzik >> > --=20 Mateusz Guzik From nobody Sun Feb 12 22:18:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFMLK3v9xz3pFsr; Sun, 12 Feb 2023 22:18: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 4PFMLK2w2tz4W23; Sun, 12 Feb 2023 22:18:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676240297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=St7TaOb6N0U6OGqcEYPsaG9JhGCCTf+XDqybJ3088rQ=; b=hHDBhu/drIN8InMHMi54Wgo2r6pEnZk5oeUD3NCqzS4L6Nf7jO3j4K7JYbkSkmdvATbUhM KQVmwLqiSUILaxNW9rkcET0oIhQmx0+OdK8n8cUUWoO5DPR/wdDHsznfZw2rix6PS3MTKS 2FRDiiYJPQigjOL7qKrhxaDYMloLHy8bRm6D8qHdmGaVeOFn5Xvkerm3kSkJlbT4wbusb3 JPvTV3kqtCL6ngfwAVMZLMt9q5y82YIHSm8TnvMl3miK7TfZgu+GNC6a8yBrzJKHIV1UoX UBooBsc0SvfNbxvfFmFXO+WSRYALn7hJtpOUd+CfxRvwuyc7WGr8u2ZdUHXWYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676240297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=St7TaOb6N0U6OGqcEYPsaG9JhGCCTf+XDqybJ3088rQ=; b=VgRvuKYDb07qmltw2438GqwPNoVAjl/atR2OEYFAZAbH1xwPozS3TQJjBlbnSpUhFIMaeT bNRviVeGdKIE63tnkc2UNYi4NK14EVak+TvRG1E1U5LmOlPYdF3Rawdr5t0R9UUOD8/OAZ 01x2KkOZni3WpZgvtOQ6d/5fTo92F6D9gL3sxbJtUQcLN5QglOj1AUQfK9U96owXBrOmVC I2yZt9vAv71QNWmplCLl1sU60YEyvvjGNDScX2NBlYa5OM3+QqusRg/556j+RIvqfau/Ga TDHSOozH9dRfADNrfwkNbjoR1B6nvGWMK7OXjQ/e1QgEk3pjJ1lsZEJFlAbk+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676240297; a=rsa-sha256; cv=none; b=rZo1f8j8ywd8we2iPzSeyqhWR253de6lVD21dz2tZRGYjUG7QdoBRBo/96QvIuqyycZBfT I6575VfXZQUFTMZEeo7TCILlSMwRO5JkLEXdC83btm393GjPMdlQEOjWGksHJEUSOeNUzE xerpzEBN4LnBAA97ecwxL7Whf1St+fWtKQFgwN2G5GUL9o6cjEEnTPD/ivrs0bKJSfSC0a Ug5RP745n2lO3kmUvKoQg+GrPrmQqqURlNcW9St1t6OeJF06k7VWO9vU9lg9btb21z+C+N ed8MkyTos+g2XhNwP84fX8jsA7gB73ZHSLXW7TM7Gatx4berPkjl4XCj1Bfu0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFMLK1rS1zvW4; Sun, 12 Feb 2023 22:18: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 31CMIHvn098493; Sun, 12 Feb 2023 22:18:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CMIHfj098492; Sun, 12 Feb 2023 22:18:17 GMT (envelope-from git) Date: Sun, 12 Feb 2023 22:18:17 GMT Message-Id: <202302122218.31CMIHfj098492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 81b9905234e3 - main - man5/rc.conf.5: document utx_enable variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81b9905234e34a778dd524385279c2a807d83308 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=81b9905234e34a778dd524385279c2a807d83308 commit 81b9905234e34a778dd524385279c2a807d83308 Author: Ceri Davies AuthorDate: 2023-02-12 22:17:46 +0000 Commit: Ceri Davies CommitDate: 2023-02-12 22:17:46 +0000 man5/rc.conf.5: document utx_enable variable. --- share/man/man5/rc.conf.5 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index e67273cf0ea2..c979ffe6cae1 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 14, 2022 +.Dd February 12, 2023 .Dt RC.CONF 5 .Os .Sh NAME @@ -4495,6 +4495,13 @@ Bus address of the USB Bluetooth controller. Check the output of .Xr usbconfig 8 on your system to find this information. +.It Va utx_enable +.Pq Vt bool +Set to +.Dq Li YES +to enable user accounting through the +.Xr utx 8 +facility. .It Va netwait_enable .Pq Vt bool If set to @@ -4965,6 +4972,7 @@ these are the flags to pass to the .Xr sysrc 8 , .Xr unbound 8 , .Xr usbconfig 8 , +.Xr utx 8 , .Xr wlandebug 8 , .Xr yp 8 , .Xr ypbind 8 , From nobody Sun Feb 12 22:23:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFMSD6HwWz3pGY1; Sun, 12 Feb 2023 22:23:24 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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 4PFMSD4V7qz4Xkp; Sun, 12 Feb 2023 22:23:24 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f180.google.com with SMTP id g14so12692449ljh.10; Sun, 12 Feb 2023 14:23:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P6v5g17tVYFKGHUlYDOV4dlbvmR0BBv2WcfEEGnpY5M=; b=zpPQGvdpIdLOXarrzwunGiE+bdxiJjvB+WZ1/o+jnip2etv4Z8TD/icakIloRrdtHQ AURMMl5zsAxugcDyTa5FCNyHKb7waR/xtHJNND+NFW72vvWyi7DuVNEDWG6OQ8umlgR9 U+gYrmF2cxns+WpSyX65ty84f+W+Z5Irol4vInceNhZEd+PuJe0wH1tYNX3LYYgd4SH9 GxQ4SfegVVbWCelylNcAZmCNcseBzNvLVfwtVx2Ex/OUGnj4lYMNFNK1bsTmTa5jQeqd 6cZQtqePQEDSmBUT4SRr12+rh+ylYXmbySIduNw6tRCWSY7IhKfaL6xnSutpCDuRbP1H t5tw== X-Gm-Message-State: AO0yUKUtTUtjGBNJd60UeZ4v46/ZzyxGUBPKpT/BmmevfbcNwixETYxl 98Xc8d5r8PJolz9pQtuvy9dCv/IeAm0FmypaPOR9/veg X-Google-Smtp-Source: AK7set9slpyf1nwWQ65H9k636Z5rYZMigoG8iah8jWhruBDY8q/apXDXt/zuDKQy5unGSYyFX+4aWJkxNSNp57ez1vs= X-Received: by 2002:a2e:b537:0:b0:28f:81a2:6eb with SMTP id z23-20020a2eb537000000b0028f81a206ebmr4204626ljm.118.1676240602999; Sun, 12 Feb 2023 14:23:22 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202301291318.30TDIq4Q008231@gitrepo.freebsd.org> In-Reply-To: From: Antoine Brodin Date: Sun, 12 Feb 2023 22:23:12 +0000 Message-ID: Subject: Re: git: c21b080f3dc2 - main - cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. To: Dmitry Chagin Cc: Dmitry Chagin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PFMSD4V7qz4Xkp X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.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 Sun, Feb 12, 2023 at 10:02 PM Dmitry Chagin wrote: > On Sun, Feb 12, 2023 at 07:58:07PM +0000, Antoine Brodin wrote: > > On Sun, Feb 12, 2023 at 11:13 AM Dmitry Chagin wrote: > > > > > > On Sun, Feb 12, 2023 at 01:40:59PM +0300, Dmitry Chagin wrote: > > > > On Sun, Feb 12, 2023 at 09:47:15AM +0000, Antoine Brodin wrote: > > > > > On Sun, Jan 29, 2023 at 1:18 PM Dmitry Chagin wrote: > > > > > > > > > > > > The branch main has been updated by dchagin: > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > > > > > > > > > commit c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > > > Author: Dmitry Chagin > > > > > > AuthorDate: 2023-01-29 13:17:33 +0000 > > > > > > Commit: Dmitry Chagin > > > > > > CommitDate: 2023-01-29 13:17:33 +0000 > > > > > > > > > > > > cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. > > > > > > > > > > > > Under Linux to sched_[g|s]etaffinity() functions the value returned from a call > > > > > > to gettid(2) (thread id) can be passed in the argument pid. Specifying pid as 0 > > > > > > will set the attribute for the calling thread, and passing the value returned > > > > > > from a call to getpid(2) (process id) will set the attribute for the main thread > > > > > > of the thread group. > > > > > > > > > > > > Native cpuset(2) family of system calls has "which" argument to determine how > > > > > > the value of id argument is interpreted, i.e., CPU_WHICH_TID is used to pass > > > > > > a thread id and CPU_WHICH_PID - to pass a process id. > > > > > > > > > > > > For now native sched_[g|s]etaffinity() implementation is wrong as uses "which" > > > > > > CPU_WHICH_PID to pass both (process and thread id) to the kernel. To fix this > > > > > > adding a new "which" CPU_WHICH_TIDPID intended to handle both id's. > > > > > > > > > > > > Reviewed by: kib > > > > > > Differential Revision: https://reviews.freebsd.org/D38209 > > > > > > MFC after: 1 week > > > > > > --- > > > > > > lib/libc/gen/sched_getaffinity.c | 2 +- > > > > > > lib/libc/gen/sched_setaffinity.c | 2 +- > > > > > > lib/libc/sys/cpuset.2 | 4 +++- > > > > > > sys/kern/kern_cpuset.c | 42 +++++++++++++++++++++++++++++++++++++++- > > > > > > sys/sys/cpuset.h | 1 + > > > > > > 5 files changed, 47 insertions(+), 4 deletions(-) > > > > > > > > > > > > > > > Hello, > > > > > > > > > > This broke math/py-numpy on main and stable/13 > > > > > > > > > > https://pkg-status.freebsd.org/gohan03/data/main-amd64-default-baseline/p52768539d46f_scd3193f640/logs/errors/py39-numpy-1.24.1,1.log > > > > > https://pkg-status.freebsd.org/gohan02/data/13stable-amd64-quarterly-baseline/841610d9bfc6/logs/errors/py39-numpy-1.23.5_1,1.log > > > > > > > > > > File "/wrkdirs/usr/ports/math/py-numpy/work-py39/numpy-1.23.5/numpy/distutils/misc_util.py", > > > > > line 93, in get_num_build_jobs > > > > > cpu_count = len(os.sched_getaffinity(0)) > > > > > OverflowError: could not allocate a large enough CPU set > > > > > > > > hi, Antoine, > > > > > > > > on stable/13 > > > > dchagin@heemeyer:~ % uname -a > > > > FreeBSD heemeyer.club 13.2-STABLE FreeBSD 13.2-STABLE #268 stable/13-n254471-51485f81b01a-dirty: Sat Feb 11 12:16:21 MSK 2023 dchagin@heemeyer.club:/usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > > > > dchagin@heemeyer:~ % python3.9 > > > > Python 3.9.16 (main, Dec 18 2022, 01:15:32) > > > > [Clang 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a on freebsd13 > > > > Type "help", "copyright", "credits" or "license" for more information. > > > > >>> import os > > > > >>> len(os.sched_getaffinity(0)) > > > > 1 > > > > >>> os.sched_getaffinity(0) > > > > {0} > > > > >>> exit() > > > > dchagin@heemeyer:~ % > > > > > > > > on current: > > > > dchagin@mordor:~/freebsd % uname -a > > > > FreeBSD mordor.heemeyer.club 14.0-CURRENT FreeBSD 14.0-CURRENT #458 futex-n260850-52456667491d-dirty: Sat Feb 11 14:24:46 MSK 2023 dchagin@mordor.heemeyer.club:/home/dchagin/tmp/obj/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > > > > dchagin@mordor:~/freebsd % python3.9 > > > > Python 3.9.16 (main, Dec 18 2022, 01:24:21) > > > > [Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc1238 on freebsd14 > > > > Type "help", "copyright", "credits" or "license" for more information. > > > > >>> import os > > > > >>> len(os.sched_getaffinity(0)) > > > > 16 > > > > >>> os.sched_getaffinity(0) > > > > {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} > > > > >>> exit() > > > > dchagin@mordor:~/freebsd % > > > > > > > > > > > > could you please show out of os.sched_getaffinity(0) ? > > > > > > and os.cpu_count() > > > also sysctl kern.smp > > > > Here is what I have in the head jail: > > > > >>> len(os.sched_getaffinity(0)) > > Traceback (most recent call last): > > File "", line 1, in > > OverflowError: could not allocate a large enough CPU set > > >>> os.sched_getaffinity(0) > > Traceback (most recent call last): > > File "", line 1, in > > OverflowError: could not allocate a large enough CPU set > > >>> os.cpu_count() > > 64 > > >>> > > root@mainamd64PR269425-default:~ # sysctl kern.smp > > kern.smp.forward_signal_enabled: 1 > > kern.smp.topology: 0 > > kern.smp.cores: 32 > > kern.smp.threads_per_core: 2 > > kern.smp.cpus: 64 > > kern.smp.disabled: 0 > > kern.smp.active: 1 > > kern.smp.maxcpus: 256 > > kern.smp.maxid: 63 > > > thanks, I've implemented python os_sched_getaffinity_impl and could not > get a similar result. Is it posiible that you run old wolrd > (pre 3e11d3f6)? This is with a new world, and a kernel that is a few weeks old. Antoine From nobody Sun Feb 12 22:43:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFMv30tbkz3pJkP; Sun, 12 Feb 2023 22:43:11 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFMv25wqlz4lGH; Sun, 12 Feb 2023 22:43:10 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 31CMh936006698; Mon, 13 Feb 2023 01:43:09 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 31CMh8YW006697; Mon, 13 Feb 2023 01:43:08 +0300 (MSK) (envelope-from dchagin) Date: Mon, 13 Feb 2023 01:43:08 +0300 From: Dmitry Chagin To: Antoine Brodin Cc: Dmitry Chagin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c21b080f3dc2 - main - cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. Message-ID: References: <202301291318.30TDIq4Q008231@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4PFMv25wqlz4lGH X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sun, Feb 12, 2023 at 10:23:12PM +0000, Antoine Brodin wrote: > On Sun, Feb 12, 2023 at 10:02 PM Dmitry Chagin wrote: > > On Sun, Feb 12, 2023 at 07:58:07PM +0000, Antoine Brodin wrote: > > > On Sun, Feb 12, 2023 at 11:13 AM Dmitry Chagin wrote: > > > > > > > > On Sun, Feb 12, 2023 at 01:40:59PM +0300, Dmitry Chagin wrote: > > > > > On Sun, Feb 12, 2023 at 09:47:15AM +0000, Antoine Brodin wrote: > > > > > > On Sun, Jan 29, 2023 at 1:18 PM Dmitry Chagin wrote: > > > > > > > > > > > > > > The branch main has been updated by dchagin: > > > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > > > > > > > > > > > commit c21b080f3dc2f5e91ada608d4385b7ed6538ba9b > > > > > > > Author: Dmitry Chagin > > > > > > > AuthorDate: 2023-01-29 13:17:33 +0000 > > > > > > > Commit: Dmitry Chagin > > > > > > > CommitDate: 2023-01-29 13:17:33 +0000 > > > > > > > > > > > > > > cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux. > > > > > > > > > > > > > > Under Linux to sched_[g|s]etaffinity() functions the value returned from a call > > > > > > > to gettid(2) (thread id) can be passed in the argument pid. Specifying pid as 0 > > > > > > > will set the attribute for the calling thread, and passing the value returned > > > > > > > from a call to getpid(2) (process id) will set the attribute for the main thread > > > > > > > of the thread group. > > > > > > > > > > > > > > Native cpuset(2) family of system calls has "which" argument to determine how > > > > > > > the value of id argument is interpreted, i.e., CPU_WHICH_TID is used to pass > > > > > > > a thread id and CPU_WHICH_PID - to pass a process id. > > > > > > > > > > > > > > For now native sched_[g|s]etaffinity() implementation is wrong as uses "which" > > > > > > > CPU_WHICH_PID to pass both (process and thread id) to the kernel. To fix this > > > > > > > adding a new "which" CPU_WHICH_TIDPID intended to handle both id's. > > > > > > > > > > > > > > Reviewed by: kib > > > > > > > Differential Revision: https://reviews.freebsd.org/D38209 > > > > > > > MFC after: 1 week > > > > > > > --- > > > > > > > lib/libc/gen/sched_getaffinity.c | 2 +- > > > > > > > lib/libc/gen/sched_setaffinity.c | 2 +- > > > > > > > lib/libc/sys/cpuset.2 | 4 +++- > > > > > > > sys/kern/kern_cpuset.c | 42 +++++++++++++++++++++++++++++++++++++++- > > > > > > > sys/sys/cpuset.h | 1 + > > > > > > > 5 files changed, 47 insertions(+), 4 deletions(-) > > > > > > > > > > > > > > > > > > Hello, > > > > > > > > > > > > This broke math/py-numpy on main and stable/13 > > > > > > > > > > > > https://pkg-status.freebsd.org/gohan03/data/main-amd64-default-baseline/p52768539d46f_scd3193f640/logs/errors/py39-numpy-1.24.1,1.log > > > > > > https://pkg-status.freebsd.org/gohan02/data/13stable-amd64-quarterly-baseline/841610d9bfc6/logs/errors/py39-numpy-1.23.5_1,1.log > > > > > > > > > > > > File "/wrkdirs/usr/ports/math/py-numpy/work-py39/numpy-1.23.5/numpy/distutils/misc_util.py", > > > > > > line 93, in get_num_build_jobs > > > > > > cpu_count = len(os.sched_getaffinity(0)) > > > > > > OverflowError: could not allocate a large enough CPU set > > > > > > > > > > hi, Antoine, > > > > > > > > > > on stable/13 > > > > > dchagin@heemeyer:~ % uname -a > > > > > FreeBSD heemeyer.club 13.2-STABLE FreeBSD 13.2-STABLE #268 stable/13-n254471-51485f81b01a-dirty: Sat Feb 11 12:16:21 MSK 2023 dchagin@heemeyer.club:/usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > > > > > dchagin@heemeyer:~ % python3.9 > > > > > Python 3.9.16 (main, Dec 18 2022, 01:15:32) > > > > > [Clang 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a on freebsd13 > > > > > Type "help", "copyright", "credits" or "license" for more information. > > > > > >>> import os > > > > > >>> len(os.sched_getaffinity(0)) > > > > > 1 > > > > > >>> os.sched_getaffinity(0) > > > > > {0} > > > > > >>> exit() > > > > > dchagin@heemeyer:~ % > > > > > > > > > > on current: > > > > > dchagin@mordor:~/freebsd % uname -a > > > > > FreeBSD mordor.heemeyer.club 14.0-CURRENT FreeBSD 14.0-CURRENT #458 futex-n260850-52456667491d-dirty: Sat Feb 11 14:24:46 MSK 2023 dchagin@mordor.heemeyer.club:/home/dchagin/tmp/obj/home/dchagin/freebsd/amd64.amd64/sys/YOY amd64 > > > > > dchagin@mordor:~/freebsd % python3.9 > > > > > Python 3.9.16 (main, Dec 18 2022, 01:24:21) > > > > > [Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc1238 on freebsd14 > > > > > Type "help", "copyright", "credits" or "license" for more information. > > > > > >>> import os > > > > > >>> len(os.sched_getaffinity(0)) > > > > > 16 > > > > > >>> os.sched_getaffinity(0) > > > > > {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} > > > > > >>> exit() > > > > > dchagin@mordor:~/freebsd % > > > > > > > > > > > > > > > could you please show out of os.sched_getaffinity(0) ? > > > > > > > > and os.cpu_count() > > > > also sysctl kern.smp > > > > > > Here is what I have in the head jail: > > > > > > >>> len(os.sched_getaffinity(0)) > > > Traceback (most recent call last): > > > File "", line 1, in > > > OverflowError: could not allocate a large enough CPU set > > > >>> os.sched_getaffinity(0) > > > Traceback (most recent call last): > > > File "", line 1, in > > > OverflowError: could not allocate a large enough CPU set > > > >>> os.cpu_count() > > > 64 > > > >>> > > > root@mainamd64PR269425-default:~ # sysctl kern.smp > > > kern.smp.forward_signal_enabled: 1 > > > kern.smp.topology: 0 > > > kern.smp.cores: 32 > > > kern.smp.threads_per_core: 2 > > > kern.smp.cpus: 64 > > > kern.smp.disabled: 0 > > > kern.smp.active: 1 > > > kern.smp.maxcpus: 256 > > > kern.smp.maxid: 63 > > > > > > thanks, I've implemented python os_sched_getaffinity_impl and could not > > get a similar result. Is it posiible that you run old wolrd > > (pre 3e11d3f6)? > > This is with a new world, and a kernel that is a few weeks old. > > Antoine ok, so I need some help from you, I've put test program to https://people.freebsd.org/~dchagin/bsd_sched_getaffinity.tar please build and run like ktrace -di ./getaffinity, then kdump -HAR -m 64 > affinity.log and send log to me please. I can't reproduce problem in any my environment, I'll have hw with 88 cores only at the end of week. Thank you From nobody Mon Feb 13 01:19:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/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 01:52:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFS5w4wKkz3pxhZ for ; Mon, 13 Feb 2023 01:52:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (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 4PFS5w2TcCz3l7b for ; Mon, 13 Feb 2023 01:52:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62a.google.com with SMTP id gr7so28367564ejb.5 for ; Sun, 12 Feb 2023 17:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FT5aMJrFrMFhpHcN9mGpTOScP5Gp3OclSmKb+zlJUGY=; b=bTBWG3TkwO8psREX7KDgT9mt+mrKxH83kV7kGVikjrDxY60gPn7p+E2QD7crMu+6d+ FYpF+jDqywq4S6ldmDjlikHnJ5vr8gqPajyDTK9P9/2SZg1GJoFhQT3JV8n7nQaA+bJ0 2j/VXryDjKyhiIDZq+N33NY62Jpxk0SDldJCmX9ObZPjYJTRontAVZ6yokeTyIbsxKRz oM6kuHCVDMr6slA0QoaPvFY8N0kUMbeC3KrbR2HTgMFjRqlUA3EjGldfMA3s8lxBVgpq +LJbeQX6o6Xd5aVQvNe6QD2adG+Fwna/tMP1dBxzAeyCyWxysquG/qUHbPFDe/C71uxw OcHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FT5aMJrFrMFhpHcN9mGpTOScP5Gp3OclSmKb+zlJUGY=; b=rabwR7uOTLz59vo5biVKWJEaZpyHjbG3fEsqWVhyodzzb3JrENhqqJNqCUEcEjzi27 70OReQWNO4mhZuSxgiU9CwA1bSGKv2c3uug2nlNqVzyOv5pg9fOxfbpisOpf4Ldk5Pzj TgiDcNPCPlCnpRJPrmsQnREneHQ3GqQ7jCkJ4erjVvZYc9o7ciRp5LUfDHUVvaPrYHxe +rjpYwBIjd9sGAapxJT0tWQujUCZqTflrhs+mhKTMZbqYyPsSvj9dGLPkusFhDZqJ25h +s3EiAOOaX/0/MCAbx2uflLsML/x63hu8tMMptzjPKv6O1F7T8BX1V8NdDIeLOot71ta FHSQ== X-Gm-Message-State: AO0yUKULBrEjcejiS4cnFeC6r3Gua6nkBhHt/rkH2vyAk3+s2WD0cbij YQPzQKBmeCx5K4f5NEw6z4z0zABbRYU6r4+IZOmGGg== X-Google-Smtp-Source: AK7set8H2qKfrG4wFnRRBUIO7QJCxHit17sbKGcEDgOEpbi1TJrPs9trEAlk9PwK6txhuQudCVyb3P7CbbUqytl7xso= X-Received: by 2002:a17:906:8403:b0:8b0:7c88:e869 with SMTP id n3-20020a170906840300b008b07c88e869mr2150482ejx.2.1676253171093; Sun, 12 Feb 2023 17:52:51 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> In-Reply-To: From: Warner Losh Date: Sun, 12 Feb 2023 18:52:47 -0700 Message-ID: Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns To: Mateusz Guzik Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000d124d105f48b1a39" X-Rspamd-Queue-Id: 4PFS5w2TcCz3l7b X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000d124d105f48b1a39 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Feb 12, 2023 at 3:12 PM Mateusz Guzik wrote: > On 2/12/23, Warner Losh wrote: > > On Sun, Feb 12, 2023 at 2:54 PM Mateusz Guzik wrote= : > > > >> On 2/12/23, Warner Losh wrote: > >> > On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik > >> > wrote: > >> > > >> >> On 2/12/23, Jessica Clarke wrote: > >> >> > On 12 Feb 2023, at 21:23, Mateusz Guzik wrote= : > >> >> >> > >> >> >> On 2/12/23, Jessica Clarke wrote: > >> >> >>> On 12 Feb 2023, at 21:13, Mateusz Guzik wrote= : > >> >> >>>> > >> >> >>>> The branch main has been updated by mjg: > >> >> >>>> > >> >> >>>> URL: > >> >> >>>> > >> >> > >> > https://cgit.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e73= cdf181a0b > >> >> >>>> > >> >> >>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b > >> >> >>>> Author: Mateusz Guzik > >> >> >>>> AuthorDate: 2023-02-12 21:12:34 +0000 > >> >> >>>> Commit: Mateusz Guzik > >> >> >>>> CommitDate: 2023-02-12 21:12:34 +0000 > >> >> >>>> > >> >> >>>> zlib: silence K&R warns > >> >> >>>> > >> >> >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") > >> >> >>>> --- > >> >> >>>> sys/conf/files | 18 +++++++++++------- > >> >> >>>> sys/modules/zlib/Makefile | 2 ++ > >> >> >>>> 2 files changed, 13 insertions(+), 7 deletions(-) > >> >> >>>> > >> >> >>>> diff --git a/sys/conf/files b/sys/conf/files > >> >> >>>> index 9171b434a7bf..53f90f7afc22 100644 > >> >> >>>> --- a/sys/conf/files > >> >> >>>> +++ b/sys/conf/files > >> >> >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c standard > >> >> >>>> libkern/strvalid.c standard > >> >> >>>> libkern/timingsafe_bcmp.c standard > >> >> >>>> contrib/zlib/adler32.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >> >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >> >> >>> > >> >> >>> This doesn=E2=80=99t exist pre-Clang 15. > >> >> >>> > >> >> >> > >> >> >> this is main-only and it already has llvm15. the build requireme= nt > >> >> >> is > >> >> >> top of the branch, so I don't see a problem. > >> >> >> > >> >> >> if you ran into trouble cross-compiling, you should probably > update > >> >> >> that env instead of expecting working around the warn in the tre= e > >> >> >> for > >> >> >> older compilers > >> >> > > >> >> > That is not our policy. Please fix this. > >> >> > > >> >> > >> >> Are you sure about that? I distinctly recall the supported path to > get > >> >> top of the latest stable branch first, from there you should be abl= e > >> >> to build the toolchain and the kernel. > >> >> > >> >> afaics the above change did not affect it > >> >> > >> >> If you insist, I can look for the exact paragraph in the docs. > >> >> > >> > > >> > The fix is trivial. > >> > > >> > https://reviews.freebsd.org/D38550 > >> > > >> > Please focus your efforts on commenting on the above and testing it > >> > out. > >> > > >> > >> there is no warn with it > >> > >> but where is it stated that a compiler older than the newest in the > >> tree is supported for kernel builds? > >> > > > > As a project we've always benefitted from flexibility when it's trivial > to > > be flexible. > > > > Look, I just want the build to be warn-free again and I don't care how > zlib is handled for that purpose. > > I do note though that if "compiler flexibility" if you will is to be > expected, it should be stated somewhere. Again, I only recall the > opposite -- top of main needed to build the kernel. > % cd src % find . -name Makefile\* -o -name \*.mk | xargs grep clang | wc 760 2843 57563 % find . -name Makefile\* -o -name \*.mk | xargs grep gcc | wc 337 1760 25053 % find . -name Makefile\* -o -name \*.mk | xargs grep COMPILER_VERSION | wc 79 478 6061 over 1000 clang or gcc specific bits speaks for itself. Warner > > Warner > > > > > >> > > >> > > >> >> > Jess > >> >> > > >> >> >>> Jess > >> >> >>> > >> >> >>>> contrib/zlib/compress.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >> >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >> >> >>>> -Wno-deprecated-non-prototype" > >> >> >>>> contrib/zlib/crc32.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >> >> >>>> contrib/zlib/deflate.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >> >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >> >> >>>> -Wno-deprecated-non-prototype" > >> >> >>>> contrib/zlib/inffast.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >> >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >> >> >>>> contrib/zlib/inflate.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >> >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >> >> >>>> contrib/zlib/inftrees.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> - mxge | ddb_ctf | gzio | zfs | zlib > >> >> >>>> + mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> + compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" > >> >> >>>> contrib/zlib/trees.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >> >> >>>> contrib/zlib/uncompr.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> - compile-with "${NORMAL_C} -Wno-cast-qual" > >> >> >>>> + compile-with "${NORMAL_C} -Wno-cast-qual > >> >> >>>> -Wno-deprecated-non-prototype" > >> >> >>>> contrib/zlib/zutil.c optional crypto | geom_uzip= | > >> >> >>>> \ > >> >> >>>> mxge | ddb_ctf | gzio | zfs | zlib \ > >> >> >>>> compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" > >> >> >>>> diff --git a/sys/modules/zlib/Makefile > >> >> >>>> b/sys/modules/zlib/Makefile > >> >> >>>> index 6391255e512b..178d3a3f7ab7 100644 > >> >> >>>> --- a/sys/modules/zlib/Makefile > >> >> >>>> +++ b/sys/modules/zlib/Makefile > >> >> >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D${NO_WSTRICT_PROTOTYPE= S} # > >> >> >>>> crc32.c:586 > >> >> >>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTOTYPES} # trees.c:232 > >> >> >>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 > >> >> >>>> > >> >> >>>> +CWARNFLAGS+=3D-Wno-deprecated-non-prototype > >> >> >>>> + > >> >> >>>> .include > >> >> >>> > >> >> >>> > >> >> >> > >> >> >> > >> >> >> -- > >> >> >> Mateusz Guzik > >> >> > > >> >> > > >> >> > >> >> > >> >> -- > >> >> Mateusz Guzik > >> >> > >> > > >> > >> > >> -- > >> Mateusz Guzik > >> > > > > > -- > Mateusz Guzik > --000000000000d124d105f48b1a39 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Feb 12, 2023 at 3:12 PM Mateu= sz Guzik <mjguzik@gmail.com>= wrote:
On 2/12/= 23, Warner Losh <imp= @bsdimp.com> wrote:
> On Sun, Feb 12, 2023 at 2:54 PM Mateusz Guzik <mjguzik@gmail.com> wrote:
>
>> On 2/12/23, Warner Losh <imp@bsdimp.com> wrote:
>> > On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik <mjguzik@gmail.com>
>> > wrote:
>> >
>> >> On 2/12/23, Jessica Clarke <jrtc27@freebsd.org> wrote:
>> >> > On 12 Feb 2023, at 21:23, Mateusz Guzik <mjguzik@gmail.com> w= rote:
>> >> >>
>> >> >> On 2/12/23, Jessica Clarke <jrtc27@freebsd.org> wrote: >> >> >>> On 12 Feb 2023, at 21:13, Mateusz Guzik <= mjg@FreeBSD.org> wrote:
>> >> >>>>
>> >> >>>> The branch main has been updated by mjg:=
>> >> >>>>
>> >> >>>> URL:
>> >> >>>>
>> >>
>> https://c= git.FreeBSD.org/src/commit/?id=3Deca005d8531fd153f46f941f3101e73cdf181a0b
>> >> >>>>
>> >> >>>> commit eca005d8531fd153f46f941f3101e73cd= f181a0b
>> >> >>>> Author:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik= <mjg@FreeBSD.org>
>> >> >>>> AuthorDate: 2023-02-12 21:12:34 +0000 >> >> >>>> Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik= <mjg@FreeBSD.org>
>> >> >>>> CommitDate: 2023-02-12 21:12:34 +0000 >> >> >>>>
>> >> >>>>=C2=A0 =C2=A0zlib: silence K&R warns<= br> >> >> >>>>
>> >> >>>>=C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Ru= bicon Communications, LLC ("Netgate")
>> >> >>>> ---
>> >> >>>> sys/conf/files=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 | 18 +++++++++++-------
>> >> >>>> sys/modules/zlib/Makefile |=C2=A0 2 ++ >> >> >>>> 2 files changed, 13 insertions(+), 7 del= etions(-)
>> >> >>>>
>> >> >>>> diff --git a/sys/conf/files b/sys/conf/f= iles
>> >> >>>> index 9171b434a7bf..53f90f7afc22 100644<= br> >> >> >>>> --- a/sys/conf/files
>> >> >>>> +++ b/sys/conf/files
>> >> >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.= c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 standard
>> >> >>>> libkern/strvalid.c=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0standard
>> >> >>>> libkern/timingsafe_bcmp.c=C2=A0 standard=
>> >> >>>> contrib/zlib/adler32.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zl= ib
>> >> >>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zl= ib \
>> >> >>>> +=C2=A0 compile-with "${NORMAL_C} -= Wno-deprecated-non-prototype"
>> >> >>>
>> >> >>> This doesn=E2=80=99t exist pre-Clang 15.
>> >> >>>
>> >> >>
>> >> >> this is main-only and it already has llvm15. the= build requirement
>> >> >> is
>> >> >> top of the branch, so I don't see a problem.=
>> >> >>
>> >> >> if you ran into trouble cross-compiling, you sho= uld probably update
>> >> >> that env instead of expecting working around the= warn in the tree
>> >> >> for
>> >> >> older compilers
>> >> >
>> >> > That is not our policy. Please fix this.
>> >> >
>> >>
>> >> Are you sure about that? I distinctly recall the supporte= d path to get
>> >> top of the latest stable branch first, from there you sho= uld be able
>> >> to build the toolchain and the kernel.
>> >>
>> >> afaics the above change did not affect it
>> >>
>> >> If you insist, I can look for the exact paragraph in the = docs.
>> >>
>> >
>> > The fix is trivial.
>> >
>> >
https://reviews.freebsd.org/D38550
>> >
>> > Please focus your efforts on commenting on the above and test= ing it
>> > out.
>> >
>>
>> there is no warn with it
>>
>> but where is it stated that a compiler older than the newest in th= e
>> tree is supported for kernel builds?
>>
>
> As a project we've always benefitted from flexibility when it'= s trivial to
> be flexible.
>

Look, I just want the build to be warn-free again and I don't care how<= br> zlib is handled for that purpose.

I do note though that if "compiler flexibility" if you will is to= be
expected, it should be stated somewhere. Again, I only recall the
opposite -- top of main needed to build the kernel.
% cd src
% find . -name Makefile\* -o -name \*.mk | = xargs grep clang | wc
=C2=A0 =C2=A0 =C2=A0760 =C2=A0 =C2=A02843 =C2=A0 5= 7563
% find . -name Makefile\* -o -name \*.mk | xargs grep gcc | wc
= =C2=A0 =C2=A0 =C2=A0337 =C2=A0 =C2=A01760 =C2=A0 25053
% find . -name Ma= kefile\* -o -name \*.mk | xargs grep COMPILER_VERSION | wc
=C2=A0 =C2=A0= =C2=A0 79 =C2=A0 =C2=A0 478 =C2=A0 =C2=A06061
=C2=A0
over 1000 clang or gcc specific bits speaks for itself.
<= br>
Warner
> Warner
>
>
>> >
>> >
>> >> > Jess
>> >> >
>> >> >>> Jess
>> >> >>>
>> >> >>>> contrib/zlib/compress.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs= | zlib \
>> >> >>>> -=C2=A0 compile-with "${NORMAL_C} -= Wno-cast-qual"
>> >> >>>> +=C2=A0 compile-with "${NORMAL_C} -= Wno-cast-qual
>> >> >>>> -Wno-deprecated-non-prototype"
>> >> >>>> contrib/zlib/crc32.c=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs= | zlib \
>> >> >>>>=C2=A0 =C2=A0 compile-with "${NORMAL= _C} ${NO_WSTRICT_PROTOTYPES}"
>> >> >>>> contrib/zlib/deflate.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs= | zlib \
>> >> >>>> -=C2=A0 compile-with "${NORMAL_C} -= Wno-cast-qual"
>> >> >>>> +=C2=A0 compile-with "${NORMAL_C} -= Wno-cast-qual
>> >> >>>> -Wno-deprecated-non-prototype"
>> >> >>>> contrib/zlib/inffast.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zl= ib
>> >> >>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zl= ib \
>> >> >>>> +=C2=A0 compile-with "${NORMAL_C} -= Wno-deprecated-non-prototype"
>> >> >>>> contrib/zlib/inflate.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zl= ib
>> >> >>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zl= ib \
>> >> >>>> +=C2=A0 compile-with "${NORMAL_C} -= Wno-deprecated-non-prototype"
>> >> >>>> contrib/zlib/inftrees.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>> -=C2=A0 mxge | ddb_ctf | gzio | zfs | zl= ib
>> >> >>>> +=C2=A0 mxge | ddb_ctf | gzio | zfs | zl= ib \
>> >> >>>> +=C2=A0 compile-with "${NORMAL_C} -= Wno-deprecated-non-prototype"
>> >> >>>> contrib/zlib/trees.c=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs= | zlib \
>> >> >>>>=C2=A0 =C2=A0 compile-with "${NORMAL= _C} ${NO_WSTRICT_PROTOTYPES}"
>> >> >>>> contrib/zlib/uncompr.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs= | zlib \
>> >> >>>> -=C2=A0 compile-with "${NORMAL_C} -= Wno-cast-qual"
>> >> >>>> +=C2=A0 compile-with "${NORMAL_C} -= Wno-cast-qual
>> >> >>>> -Wno-deprecated-non-prototype"
>> >> >>>> contrib/zlib/zutil.c=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional crypto | geom_uzip |
>> >> >>>> \
>> >> >>>>=C2=A0 =C2=A0 mxge | ddb_ctf | gzio | zfs= | zlib \
>> >> >>>>=C2=A0 =C2=A0 compile-with "${NORMAL= _C} ${NO_WSTRICT_PROTOTYPES}"
>> >> >>>> diff --git a/sys/modules/zlib/Makefile >> >> >>>> b/sys/modules/zlib/Makefile
>> >> >>>> index 6391255e512b..178d3a3f7ab7 100644<= br> >> >> >>>> --- a/sys/modules/zlib/Makefile
>> >> >>>> +++ b/sys/modules/zlib/Makefile
>> >> >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=3D= ${NO_WSTRICT_PROTOTYPES} #
>> >> >>>> crc32.c:586
>> >> >>>> CWARNFLAGS.trees.c+=3D${NO_WSTRICT_PROTO= TYPES} # trees.c:232
>> >> >>>> CWARNFLAGS.zutil.c+=3D${NO_WSTRICT_PROTO= TYPES} # zutil.c:27,32
>> >> >>>>
>> >> >>>> +CWARNFLAGS+=3D-Wno-deprecated-non-proto= type
>> >> >>>> +
>> >> >>>> .include <bsd.kmod.mk>
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Mateusz Guzik <mjguzik gmail.com>
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> Mateusz Guzik <mjguzik gmail.com>
>> >>
>> >
>>
>>
>> --
>> Mateusz Guzik <mjguzik gmail.com>
>>
>


--
Mateusz Guzik <mjguzik gmail.com>
--000000000000d124d105f48b1a39-- From nobody Mon Feb 13 04:57:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFXBY0PNlz3qY6j; Mon, 13 Feb 2023 04:57:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFXBX6ls8z45j5; Mon, 13 Feb 2023 04:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676264229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2xjpDPC6fqHVl52q1mnaXuAG608gjfZ53vU3BaGJDwI=; b=yvnSB70dg1BYhBVSxP/j7aR6fqticZcHXyDvLzsG9CwtO3hT25hoVFzMk2/ikh23MhPjMd pm9xEV6IIJz33As6FBjwp2tAjEA4AxJMLHXHvMc7e4wzANR2aJPxWfRcyrvP4CTGy1uzvr OA6Bhh7a0H2CpF0g0FWbUXU4X+A/Rqt5SbaNSsIq6g9y28b0nWhlpx5859PEyc5KhQ3XTK +POU4012UiD4rpA7ptMHjgUlIkBeCgVIsqz5zl8Boc/AKjL9QdKq/8EMQJkQgweD0hi81T DW9zss9ab5SSro62/JrMgqZSyLW8aeT9m72lC2MXIyXvSz6UVAdGJC1BAgbvlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676264228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2xjpDPC6fqHVl52q1mnaXuAG608gjfZ53vU3BaGJDwI=; b=tyIm8t1+oHO8LPpn9uEyXr82QFOFGAQvi+CmPKP9JVK0VntXrDoxAJJFD2KTk9+7dGBoTm w6BV1aaeXZo+GCCf7blm84U+9p/vu7DpYenLqLMxSXXBaMgZIWwopyEE1xV+jSOqDiDmpY G0SUSoR8s2rTS3qsyH5CDdFO6FOpYOUhW5mlRwX8CPuCnLu7Wht2RSoOki26ie2Rzc2nQn riaBaF8nHg1XIGBkS/YtkFu9auPLyRsvXs8N1M6WhTjeO5yIHSq022uID3bfsjAXlDZDMg rIei4QtGM1L+J94/YaBjXZM/RUyF+b4nn9qyiwtWIZehlgajtKkPTnXvoNe/iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676264228; a=rsa-sha256; cv=none; b=ccAXN5dSlEjlfmlVSSDih0JWdCzUq3UUpPLHYKENut7pT9DUl5jKtyPow8czxKk0pdZTQi gmRa3dFvN8iudJ2wkARQ2p28pgNsNbgi0/a8QNoqsZb0AfoqKEKewOaTG9Ae6z7B3Xv05A 35R/C/DxdJEofqumY0eyjJdQhwOZ+/vqqLLdoyhj/1P3fcC3gd3K8fJ5yncEyZm/TQiGlx PzNUrFeB2BMeLN82mnLGJ1P0W93daj75FqMLTVUWd8p8KEBGjYRAnzQKwz8kqyIyrKHHwM bKQsDiyF9WMuKJ2cLxyXZ+4pEIE0PcchhTL2LJ2x4gS5b40aocTp+6Ky1yYXCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFXBX5pVMz1525; Mon, 13 Feb 2023 04:57: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 31D4v8Mr067793; Mon, 13 Feb 2023 04:57:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D4v8Hh067792; Mon, 13 Feb 2023 04:57:08 GMT (envelope-from git) Date: Mon, 13 Feb 2023 04:57:08 GMT Message-Id: <202302130457.31D4v8Hh067792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 39e8c2a29a86 - main - cleanvar: Be more careful when cleaning up /var. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39e8c2a29a860bdb69ffcfbc06de4d4ad103b458 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=39e8c2a29a860bdb69ffcfbc06de4d4ad103b458 commit 39e8c2a29a860bdb69ffcfbc06de4d4ad103b458 Author: Xin LI AuthorDate: 2023-02-13 04:56:17 +0000 Commit: Xin LI CommitDate: 2023-02-13 04:56:17 +0000 cleanvar: Be more careful when cleaning up /var. The cleanvar script uses find -delete to remove stale files under /var, which could lead to unwanted removal of files in some unusual scenarios. For example, when a mounted fdescfs(5) is present under /var/run/samba/fd, find(1) could descend into a directory that is out of /var/run and remove files that should not be removed. To mitigate this, modify the script to use find -x, which restricts the find scope to one file system only instead of descending into mounted file systems. PR: 269213 MFC after: 1 week --- libexec/rc/rc.d/cleanvar | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/rc/rc.d/cleanvar b/libexec/rc/rc.d/cleanvar index fcfd365268c3..a682021ce5f6 100755 --- a/libexec/rc/rc.d/cleanvar +++ b/libexec/rc/rc.d/cleanvar @@ -31,15 +31,15 @@ cleanvar_start() { if [ -d /var/run -a ! -f /var/run/clean_var ]; then # Skip over logging sockets - find /var/run \( -type f -or -type s ! -name log -and ! -name logpriv \) -delete + find -x /var/run \( -type f -or -type s ! -name log -and ! -name logpriv \) -delete >/var/run/clean_var fi if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then - find /var/spool/lock -type f -delete + find -x /var/spool/lock -type f -delete >/var/spool/lock/clean_var fi if [ -d /var/spool/uucp/.Temp ]; then - find /var/spool/uucp/.Temp -delete + find -x /var/spool/uucp/.Temp -delete fi } From nobody Mon Feb 13 05:39:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFY7T5GyDz3r7Sy; Mon, 13 Feb 2023 05: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 4PFY7T4rcsz49h8; Mon, 13 Feb 2023 05: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=1676266773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OVyRz/C3J8HqIwsENHBNLpVyn0dux5kW3AK/z2G3K8w=; b=s6GpSRqGBXvkc3dLQb6vZ3N02INLKODsvgcStZo0AnXRvnT7bw0O4rlgGz4JRRqBEE8n99 szrVcJ5JR8Lf+qp3x1sm1y/5U+LlYadLVXB7zHK1BfeCgYNWEUWy3g/7SIm4AQ3UhdC9YN IxJZTMkm+/fdvt/zHxnlc342ZD5hmYpYXjz0j7VwDM72i+PC4jksIy+UCsu7TCrtdPzvLP 1Z4+LwESIP1Yo8HC7uA2bdgZpokYoPyYccX7XR4S46iJ5Ad398QeaGPwwzEraSKo5L+Nbf ohLcwzvT9AzqNWKMueJhR0kQK5d4IPRuspHg/ncZJQ8Rn4gEkRE8rrR5bfkL/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676266773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OVyRz/C3J8HqIwsENHBNLpVyn0dux5kW3AK/z2G3K8w=; b=JpyGaCP0zZmEovox6JEXh9Gb5v5Hn0YirzQhTcloTd2Cdscl4Zp6nUyTNfBsRrFRNg+w3Y QCfq3cl8HXg3JdfDUXh9wgTAGASuLaD+Q4NQcfxs5af71toeNxoxE2pjepxM88DdUPvqqU 4hnIN7p/JLu3A/lMH/ZMEU9kg7z7ceWVGTwszFxxdSnUx9sqsoj+umfofRWLwfJzszqzKY OR3xaGPa1bMNXkzwvOhQFl9OF7FXVBTJ/AAfTSZDlRwS53UKfmu2sPHUFCYwwrVSVgbnoD eDxpfsJywybpzNxBzJVrAq70FdHoT/qkQuGUpc92BVh8nuHw3Ng/l6/hq2/wnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676266773; a=rsa-sha256; cv=none; b=eTkqNEhYX5jM2zxR/C2M3oFNQLNKmHz19XB2tNqBccsyISXo7XfqYuOQAPfbjRNkhandsD AlocSOvWz7pu6ROZ99/clUw2VmUEfhRCe/KanfYEOemtSViVqd1dk0i9CYpxweuXHjcABr GUVuM6kkIrmuI6AvJJM29p23igV/k2gEwTMyFead5yVeEdDYfO2oeg6D1j7UxePZzNX1/u 9jcgWhm20Pw6OpkGtVXxQ1vv7huju/OMVOUbAAtwmhIJFad1/YQlXevONYmDlA1ypu9PNe MzBzkZSDpZzeBdqXQQhQrWvLcEmIyLY/XvNNiQLXB0B6FFzOMjm9+kFUZqf3sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFY7T3wBqz1667; Mon, 13 Feb 2023 05: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 31D5dXoZ025195; Mon, 13 Feb 2023 05:39:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D5dXGn025194; Mon, 13 Feb 2023 05:39:33 GMT (envelope-from git) Date: Mon, 13 Feb 2023 05:39:33 GMT Message-Id: <202302130539.31D5dXGn025194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 71948c15ba9e - main - rpc: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71948c15ba9e6db536e7a26c65f2f22ee03f1630 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=71948c15ba9e6db536e7a26c65f2f22ee03f1630 commit 71948c15ba9e6db536e7a26c65f2f22ee03f1630 Author: Mateusz Guzik AuthorDate: 2023-02-13 05:39:10 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 05:39:10 +0000 rpc: ansify Reported by: clang 15 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/rpc/rpc_generic.c | 9 +++------ sys/rpc/svc_auth_unix.c | 6 ++---- sys/rpc/svc_dg.c | 5 +---- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c index 0e1797272a03..43caffea6dd2 100644 --- a/sys/rpc/rpc_generic.c +++ b/sys/rpc/rpc_generic.c @@ -146,8 +146,7 @@ __rpc_get_t_size(int af, int proto, int size) * Find the appropriate address buffer size */ u_int -__rpc_get_a_size(af) - int af; +__rpc_get_a_size(int af) { switch (af) { case AF_INET: @@ -567,8 +566,7 @@ __rpc_getconfip(const char *nettype) * unset, i.e. iterate over all visible entries in netconfig. */ void * -__rpc_setconf(nettype) - const char *nettype; +__rpc_setconf(const char *nettype) { struct handle *handle; @@ -688,8 +686,7 @@ __rpc_getconf(void *vhandle) } void -__rpc_endconf(vhandle) - void * vhandle; +__rpc_endconf(void *vhandle) { struct handle *handle; diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index de46bf438f0e..441f70e4a8af 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -135,10 +135,8 @@ done: * Looks up longhand in a cache. */ /*ARGSUSED*/ -enum auth_stat -_svcauth_short(rqst, msg) - struct svc_req *rqst; - struct rpc_msg *msg; +enum auth_stat +_svcauth_short(struct svc_req *rqst, struct rpc_msg *msg) { return (AUTH_REJECTEDCRED); } diff --git a/sys/rpc/svc_dg.c b/sys/rpc/svc_dg.c index bf3cbd2a6137..dcab970b63fa 100644 --- a/sys/rpc/svc_dg.c +++ b/sys/rpc/svc_dg.c @@ -292,10 +292,7 @@ svc_dg_destroy(SVCXPRT *xprt) static bool_t /*ARGSUSED*/ -svc_dg_control(xprt, rq, in) - SVCXPRT *xprt; - const u_int rq; - void *in; +svc_dg_control(SVCXPRT *xprt, const u_int rq, void *in) { return (FALSE); From nobody Mon Feb 13 06:10:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFYqC1mrfz3rBNY; Mon, 13 Feb 2023 06:10: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 4PFYqC1DpTz4DlD; Mon, 13 Feb 2023 06:10:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676268631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7OS9i8x5OH1kOMAEWBot5fO7WRdxkUmpm3ekL/0VOnc=; b=UpAR827+d39J1Icp/6HNdgvR31CEe8jykmGox73N6Zj9YqPaPjpv+0MFX6feqgvBT8QyDR xvO3ONATOgy6GD6MTc+F+0AvPiDBEwJUpKKTFTCTQ3wAnYlWROOGUbvkpPEZRiHrWgs1i2 UsvYbFJCxSHg0nmwe2xp0IjPRzRejH6Ygj1LSqARnU2WWrAMt92n+cgN4FdnFf3FeTYXcu RK3sCHqmJECDsf2UY2bXahCL2quhh+ccz2r+U5/wo5LyZRu0ILyvrPPpA848mTFdcGzV/2 VF/9zfq+Kdij7Y8cgSh36fRzNPzW3Hz/SQY+K4+o3337BBVN7Aapv/r7m7iZkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676268631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7OS9i8x5OH1kOMAEWBot5fO7WRdxkUmpm3ekL/0VOnc=; b=yDT3JDfaGOor9KnNvwKuCPE/WYMzae9JIP5cYOE1WNKra3/RVidZ/lLQIHxBEMtB+EV1Tu EgLqyd11BhDeW47MJoZptB8SY3aEYVwI7xDm+8JOj2DEDkUH+7CMPevnfFCjmG4H/kc4n0 pn3K4gXGeNNlItC5wQFhagN05V9ILIiXRIvTDZPNsiWneAs+UWtFzGfW8sH/KGOa5mX/Gq f+2fttuetLr1x637+TruPypHAphOw6SRF3n806EfyKT4WfyDO8DsMivX9g5CtmEZSrT4Un +hN5jzdHGfc2kSazedm9uWN9cUkuHq9BtLgEDBIH+JM5lqSoOBh+avACfS4psg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676268631; a=rsa-sha256; cv=none; b=TP07ngM0YtU1ZWHmtr4bn6q05UWVxFXxkfF8kl3ajWAhKS8GUj73R1WWhL5mOdM3YmyINH x6OUOya3nvigXjvHq7doDLGFn0zvFQb6XxomtWhJkvb/h+ywghQfubmUyGJKNULqQpxah9 uqKZQPZ0xlyZkfwydN5gTkP2pWcyDgLJsSh1p/JCY+wBgStsfp2jaKE+gVKARgVFprndtJ p9a2D5g27oMEpq4bV3HG7QUmx0nO5/DkojYh8ih6ceKcp0iMIJrVDVP0DpwBgHXRJupFoG QgzmE6KDY9x58li4CzhnnZhMmcc8HKPtHGFE5dIONyp1mg42oYN0ZjXQQz4ulg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFYqC0HJhz16Pl; Mon, 13 Feb 2023 06:10: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 31D6AU2A076642; Mon, 13 Feb 2023 06:10:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D6AUHe076641; Mon, 13 Feb 2023 06:10:30 GMT (envelope-from git) Date: Mon, 13 Feb 2023 06:10:30 GMT Message-Id: <202302130610.31D6AUHe076641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 96f4ab26633a - main - wg: add a test for the home jail socket feature List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96f4ab26633a457c52fdb9c45f48dcb052b408a4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=96f4ab26633a457c52fdb9c45f48dcb052b408a4 commit 96f4ab26633a457c52fdb9c45f48dcb052b408a4 Author: Kyle Evans AuthorDate: 2023-02-13 05:59:20 +0000 Commit: Kyle Evans CommitDate: 2023-02-13 05:59:35 +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) Differential Revision: https://reviews.freebsd.org/D37755 --- 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 1612e05ef168..80461127fde7 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 Mon Feb 13 06:10:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFYqD261gz3rBQl; Mon, 13 Feb 2023 06:10:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFYqD1f3bz4Dns; Mon, 13 Feb 2023 06:10:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676268632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKT3lE1kdhsGIB6AAB0HHLaPxivLszCHosQh39tx7UI=; b=KOGQ4a2UpZRlN4p97WuH9U2usPlkDlo2m5dgYUKqvJGJ2D9OtgZAa+rWALW6LioLeLtoPo m7ofOSSYj3VBj4J0axfVfwPKUVcjTnQK08ahg0+a4qk5FF1zkv9ihIopamCacwT9ZvoJTs brjO3E8eR4l/CC3YSbr4grFpBFPIiXmwaDEn+G+oeEqxUyix9YLdBO/lz1yEfGF5KEgkhA V0amZfxbktOl+pvePR8o6doxDDPBpKOgY/bTAKcknPp/g905z0Q4BOm0BDtFeZvPFo9/Rx wYkYp05Jv5cNaI8LDvpZmQGaRxNSxrzA62eh8pny2plWjvVRBhuJg2IPScT9yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676268632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKT3lE1kdhsGIB6AAB0HHLaPxivLszCHosQh39tx7UI=; b=ffv8FGCOD/U8R4LRohcXGt+YVOhGm17XHifjNh7NH0aS4r0syZ0EjJEr0X+4VT5sU5jate V0iAOn6bRrf1dSGdj+NbAhWaodpY5yqRspK8lQSGcK6iyaXd/H2Zff+kZkwJIlSjvX0aH7 X/XRnRmVBW+OamYxouKSbN4BXoNofn1g7k6z/mLAwdiPTVTENwk2vQIyp6ECznU0kDagzW Bz7NQR3hr1vxxxVZ+u5gHPBdSs3s+CTJM+F9V3NOb/5+cmJ91AtEt8kmHHXcmJly1SPcNW 3gnA2XW3cLj8t/HzllLABn4h/8Byx/xfd4iPjoRc/+MKVzagd+4BTaZ26Z+4jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676268632; a=rsa-sha256; cv=none; b=LNOmaayHNwuVmF7veX6Cg9k61hx9ga95oJ6f+AhwXY2PMumloCZgVQEeYT4b5UZkVDGLNd oDYw/pLrtnR1xfUHSgactsfCfFQKNDkrqQBdu35oMswgw4t6G8oI6yncM16V0BDqzi8bOc D/Yd2lyZ+XrFQZ7NJL93QHwAvA72EteQcB3/e//u7B80DyVhTqNmcqBha1E0hGWqM3ONyz QRemcTvac0/GqaPOj5nWYQUS+j/VfPeoGF3Fs/9Z4xfbtZ5Bb6cndfLZtqQtUoz5fVGEPQ Yy9FduSo0PBAThw5Q8HnxzpjaGc3quHw/GPLo1j1un7CML8UQ2+9wKXE+ixvOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFYqD0lWrz17BQ; Mon, 13 Feb 2023 06:10: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 31D6AW0U077418; Mon, 13 Feb 2023 06:10:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D6AWxO077411; Mon, 13 Feb 2023 06:10:32 GMT (envelope-from git) Date: Mon, 13 Feb 2023 06:10:32 GMT Message-Id: <202302130610.31D6AWxO077411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: e63dcbe7a2cb - main - wg: tests: remove an obsolete workaround List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e63dcbe7a2cb8f6b6932cef48e70f3372f4df737 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e63dcbe7a2cb8f6b6932cef48e70f3372f4df737 commit e63dcbe7a2cb8f6b6932cef48e70f3372f4df737 Author: Kyle Evans AuthorDate: 2023-02-13 05:59:21 +0000 Commit: Kyle Evans CommitDate: 2023-02-13 05:59:46 +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 Differential Revision: https://reviews.freebsd.org/D37755 --- 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 80461127fde7..446626b1d1d9 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 Mon Feb 13 06:15:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFYxF4RRrz3rBmm; Mon, 13 Feb 2023 06:15: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 4PFYxF3vmqz4FkM; Mon, 13 Feb 2023 06:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676268945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JWl/2Q5mj331yPe9grSN3jYaC2yLjpKlNLrCa+sZEHk=; b=rYNwbXCjtq4QteEin00OsGdN4DhNWX7GSH/sxHskzJHtps3i/UOldlsI46iExR1rKYW/VU VbxWewP4ino0YKb3LVnIo+TsSsq6VrmsebBxgaKEY5zsMojg5pkqjkBprF4tVJ7wVRLVuj fpvV+9ni6UqSDAhUiPj58QKsg33G5vdeaVim9f9pQgWPMmpFlS8UPZi7mlYfHBntwAjnw4 OVnyBq19C3vWQvcTFuvHDrwkoHkhdyl6Pd1clzdp8p8az0ktW2yqKmeXRC6u+jXbomG6nL urQtrr6SEjV40ynfZTfBrYSziI85j1SCagmgMQUGZJmGPZKDA1tEmbpaGoSiOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676268945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JWl/2Q5mj331yPe9grSN3jYaC2yLjpKlNLrCa+sZEHk=; b=QX8fx3tSpP8GKpymRheddruzuiiSFuNKd7EJVg/V+x0FMrkHFR+3vU6ju4dtkxbqhFpdyJ a2uy/x1sdbK9sovFIDqXYIlLOHjKACKm+rlwS/2mebdrgVcjluK/wd2UHMTjebOl2+DOcA jDe/wo0EFmejm0SoLfYlfOGagt6tUN2iP1V4IN4Bdlv4MQErvpmVWZLoEMGgY4kwABxILf tsL+gQznV/ORXcRPrV/LdMI6ZQm9jxkfA+nGtQxLAU7Uci7isHzvqoEFegSgni3pIwObnY qmAWYjhOrWESIOGJ4Scd5z9QosqasuM257nwyT8cMJQSgymlqtOomDDqUxq4nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676268945; a=rsa-sha256; cv=none; b=lHTtMk60m1tZkLuFPI5QeWhNcZpweKEy4h/a5LjspkwKvTlKcKEoy4C5CaoEQ0HO52hqoI Z3qkKThoxdr0WzjktXP4RNlP9XNV18ybBVhLLIvjsWlC6P8wbZCDSs/sjBFdHastBWnuem dokhdzKZ80aOQtgfnmQK80dWMIXkbiEPZ1dHxeBKW4gln6yJ/KNh3aUzdSh2JnFAXejbG3 Do4jduXvEPgpIajG5x0pqe4R+sxbGCZeSOem0UZJrIjpwXkVfFFjYDC/vSmELDtb8g/4kU CpmQojqkKHz1lOXceXJs1Yw45lKLVIk9jNyriGZB2dVihi3DFT61P1eOUW0LqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFYxF2zrGz16nw; Mon, 13 Feb 2023 06:15: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 31D6FjrP081744; Mon, 13 Feb 2023 06:15:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D6FjNG081743; Mon, 13 Feb 2023 06:15:45 GMT (envelope-from git) Date: Mon, 13 Feb 2023 06:15:45 GMT Message-Id: <202302130615.31D6FjNG081743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 7e688ed49348 - main - patch: omit filename if the prompt was ignored List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e688ed493482c5346d969e7667856d8ced8d87a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7e688ed493482c5346d969e7667856d8ced8d87a commit 7e688ed493482c5346d969e7667856d8ced8d87a Author: Kyle Evans AuthorDate: 2023-01-24 16:46:01 +0000 Commit: Kyle Evans CommitDate: 2023-02-13 06:15:08 +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. Differential Revision: https://reviews.freebsd.org/D38179 --- 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 Mon Feb 13 06:32:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFZJy1WfYz3rDWt; Mon, 13 Feb 2023 06:32: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 4PFZJy134Pz4HQL; Mon, 13 Feb 2023 06:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676269970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uMZOBanGkwXWkIbNzYtudLqqdK8LtbhILXxSHQlYXwQ=; b=s45Sy6HD27cLOrsl0X0xPybRKuZounRjgF9McQnJp1JnlyeytQyDBFrJFcM6R0OGezWMqO z1sWVOo0yqXZ3OUSZINTX2p4XTLQEP2NC12AjbMlWDsQWH/zXhB8aNlUwOLJdCN+g2h9/n J7FCMjvwQSyMsIsnmAgIgS0A7+bAQqyc2fXXa9fniot2Ju7+yNmV5Z6qi6qf1SQ72RXih4 +hY0+9Jo3CRH5bknVZmYoZDIxsfB0dvpZUMk9bugzNH/qiQ6KVA+nCqVT5OpZfVqBlSsyY 2KOx82wXrulug+GOsjveoFdgcVT9gZcaw5Sx2tpo0k2d9dxC8fxsxGdiHwweUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676269970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uMZOBanGkwXWkIbNzYtudLqqdK8LtbhILXxSHQlYXwQ=; b=cho6SMBjp3HZ08X/fIfJ0v3fbL8SXiOW0wHHajylV53cMET75Mgk8bZGw/W5e0/f8B96+6 pNZPFQGWI36mtovkxkfWCVQIQbZgrGrNTvBvWQPMdtatT3oyPXW5c+UoxlXzRjmDMxj7K+ a5s1Rw12GxOYbDa275dOxVnLe8jxrO7iGo7yMa5zG969KRF3FKlzNXallMh+QitQwEcLy8 57xLCY9zd6XaHLF7m7+SYxhVw9Zw2R27216RWz7iIv7pSFg2rTaE1JAoMATGT56EZ7iNrQ kzzQeW1hZtptbYv8vSFVFUMdRJmaHIEFOHKIfgEBI1vQYvO5DOzAKxno+kwiiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676269970; a=rsa-sha256; cv=none; b=WyVoADPJTlro4jIUzdCsEyPsnWPc6ThSTYHcgOUNBvC0gLK6c6ZYTQMC9bixPRxWm9rqs6 40huNjrqI80pSQbh+G2+pngQ2JDb9QKp3u30CzYf1vfDkiE3cILvZSIwwRQamelNWT4M2g 6zHgpN3V8JhnIBVKiuK4P8DxY+l16fnDlz04/V3TGtsjMB6JK33kiexFAAKf9uNR0WU2nj zfEIvrcN/CDhX+1/zSh9N/gis+w9M6DV66ZGVIJ5lctQlO+TBfYBcFobbJZ4Tvp6bmKPGu ooxs+3mvPLSdt8+HHMX7VPuPJUcw1VK/bvD3/q5VnfKxVOazCSVPBuCHdH5nBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFZJy05bWz17rR; Mon, 13 Feb 2023 06:32: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 31D6WnPV009931; Mon, 13 Feb 2023 06:32:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D6WnZC009928; Mon, 13 Feb 2023 06:32:49 GMT (envelope-from git) Date: Mon, 13 Feb 2023 06:32:49 GMT Message-Id: <202302130632.31D6WnZC009928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 8d78a0d331ec - main - md5: fix *sum -c with missing files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d78a0d331ec2c168efe6cb85bbc2da86e9a6124 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8d78a0d331ec2c168efe6cb85bbc2da86e9a6124 commit 8d78a0d331ec2c168efe6cb85bbc2da86e9a6124 Author: Kyle Evans AuthorDate: 2023-02-13 06:32:38 +0000 Commit: Kyle Evans CommitDate: 2023-02-13 06:32:38 +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) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D37374 --- 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 Mon Feb 13 06:34:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFZLM6TzRz3rDX2; Mon, 13 Feb 2023 06:34: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 4PFZLM5mbbz4HwD; Mon, 13 Feb 2023 06:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676270043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YqVBXBYsM7W0uGtvOeWWeR28A7hkzGhbbugulRnJ8qY=; b=vBWNZ/PV1pgzPRTx7eZV0Q5uj+aVr85T3SDkTJi8dQr31mJH4DLRw0BREV1JPbZT0764eH xUnU7GdgDxshSUQVTwmR7sV6+hJsSqG9CxffANEAxLFAclIPzJtgWrPsnrbrBJpt0/KXyv o2/3FYCsJ9dvuPM9mhGxDLMGh9PJii3geObRPNqLcrES4pqYSpjTlw2znjngaUkSthAMZo S2fSs0hGC8ObYGwIIzNfQpRtmYxpzIfgmaPkJnV0M3B9IlJtnvKt2OYF/BH8xS25SScFa9 Tz1or8UpN3GUewl4PwfHgjsxdDohRb4z/kVDma7K/LP6PXkr3fqKCwOdetGNCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676270043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YqVBXBYsM7W0uGtvOeWWeR28A7hkzGhbbugulRnJ8qY=; b=B8uc8LZCZgud0BLW4QzdnM2FTOOnyi20ftWe1VpZUl/rIWEBXKPML05KxDV7zmCQGSET3Q R7RMfzVTJQmCmj/9woAtVTOk2Uo9sGCAramurXFf9/Qkzm8/iEb3V5+bbXHlCt3Vt5HjP6 hZEr2X4esgJ2FGQejXIjAu/BAbCIJ9W8pyVFLx6J2RTqnbO63AGi9bSGcU7d3SAY/YqzzJ l7fCpLe7CAhdVnF7TOMY+1Y1qKTZZI9aDytcIZjCu46XbosofoZZt1Xcjw2UrBepmXRrXN rTZ4HLJIBRm9vZzXMQyyDg1f4t6jpW5jvQeqXzCWuz9H7F5X0oX186/SFDy17w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676270043; a=rsa-sha256; cv=none; b=wV/wnwImNit44tunhjY2jIv9qi1NoeW7eAfwqmwmj1nkooQ1IGngXwTuIMGTlOpIF8jixI M12/TBRWr8qFoK4GS1FMNatsrJ1dGUTzJvs3yVwZPD/5OxM7DLdmM69sM9WWngR7sve6EC UA+GmsPpmfoGd1AXGR67Z/mTdCSAKhHjpKdPggHKSCFr1fOahuadjj2H+fUL1uc32PBrH1 8xdXHo/dDLFo7n0O007ZzCrtJeCwBEXoiZ+ApKqiKqoOJk7EhZtFlpyQ4w9ALriOEX2bf9 0nVla+4Kg6FlKuXr7e1xkyp1T1alnRwsnL/kqpREI7E+hFYrAaIObHfoWaeg2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFZLM4mZnz17tZ; Mon, 13 Feb 2023 06:34: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 31D6Y3gg010341; Mon, 13 Feb 2023 06:34:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D6Y3YI010340; Mon, 13 Feb 2023 06:34:03 GMT (envelope-from git) Date: Mon, 13 Feb 2023 06:34:03 GMT Message-Id: <202302130634.31D6Y3YI010340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: f123c6c425d4 - main - libc: popen: slightly simplify cloexec logic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f123c6c425d4161b06f237996662496abbd78b94 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f123c6c425d4161b06f237996662496abbd78b94 commit f123c6c425d4161b06f237996662496abbd78b94 Author: Kyle Evans AuthorDate: 2023-02-13 06:33:52 +0000 Commit: Kyle Evans CommitDate: 2023-02-13 06:33:57 +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 Differential Revision: https://reviews.freebsd.org/D37987 --- 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 Mon Feb 13 06:44:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFZZX5P78z3rFCR; Mon, 13 Feb 2023 06:44: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 4PFZZX4Ntrz4JkW; Mon, 13 Feb 2023 06:44:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676270676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYdVzfSlfcBsE1qi4FZjHPIEHWxeLVW7R248l7h7noE=; b=A/ymn079PMO9Qdar4OGj/dtVkS0CdYRDI8WbPuvttPYTFJypEW/bF6NdhZNqGEfmFGCqNV JrA9YEMHixDAbeokYGVKY/xJx6f9s3k4pFFlyOAAh+s0pX5riiT9OBaMomkTmo5GI1U6Yk u4Pg3sAFh5tuzXsoa3p3DMyDArtg0ss0MDGJ4HQyhIfsCnFain3PaVeXlDn+EzWuh0aNEP s5o2jcvX9vLskxNMgvFmUpmKR0eUa2XX7FXBcjg8K/Edqkcs1IrhXwhlCJgsu8ktbaWEuq ODzK0KwotfBeM4ZPlMAWg1sw1M2a5j9LH3pMUe2AX77Ul+/0tFyj5Gg4UfNiPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676270676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYdVzfSlfcBsE1qi4FZjHPIEHWxeLVW7R248l7h7noE=; b=Y+aE0mt/yCjqypQu+tE3NxcAheiFP/gUoPSaP6zkhd45q+w4r5/OTkvVnM5AYzZwcPPbCF fG0VABU5xEPzfyYyOMcVzXzoAYwX6kwSQ2ytDLPcj/NduqiA6L9pDcMPF7RETsmfVmAmuo R7vbqKuz84xE+NCd69iftCaiYvwtOdt5o0R841AWnZoYYT/Z6AmU1XMRO15ieAyYwq7gs6 UcOEOhwLcTYjJB3WJqqH2MrifMWHXQ7CPw210ciQp+a1m1GyLQlRP2ts3CuQ0NNEszUIg6 7zy1GhyzekddJFQ2PI7pvfyUKknAccIKom5JinX9aLDJLoR5YfVMOCzfdr9WQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676270676; a=rsa-sha256; cv=none; b=QaTTPg3UAOsw0vt9xor30N/JVw5TL4h1PCqqIxih4ulY0DchZXt5dGsbiBi+UV9Jy2WmgZ Lnah8OFPhAhiqPaVQYWf9/6nRWu97L7ZQTCUhl851JJN/F38PaWA7wMeoyCohwTHfZp64q WQU5AxtHWdaLZcem11GmTp5ACoigcV8GHQ9as/lzaU/uLqJpbN4Cl2OEvvvutPZmPRn02v C6LZhW9lWyWXVqOjWMB22bwChnPgji5OJN1dnFtgM4XX9WG1AB3v9bxNR0SrH2uBVxTOv8 B0zlddvsd/oQNNniEUZUFRn9iCi7nwP4pCmeMbaQGb3KClMGtJyvASxSgnCLzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFZZX3R71z17Qt; Mon, 13 Feb 2023 06:44: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 31D6ia9w024610; Mon, 13 Feb 2023 06:44:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31D6iaO5024609; Mon, 13 Feb 2023 06:44:36 GMT (envelope-from git) Date: Mon, 13 Feb 2023 06:44:36 GMT Message-Id: <202302130644.31D6iaO5024609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: deb63adf945d - main - top: fix sorting by pid (-o pid) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: deb63adf945d446ed91a9d84124c71f15ae571d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=deb63adf945d446ed91a9d84124c71f15ae571d1 commit deb63adf945d446ed91a9d84124c71f15ae571d1 Author: Kyle Evans AuthorDate: 2023-02-13 06:39:04 +0000 Commit: Kyle Evans CommitDate: 2023-02-13 06:43:32 +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) --- 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 Mon Feb 13 10:58:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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 14:27:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFmsM2M23z3r9XX; Mon, 13 Feb 2023 14:28:07 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 4PFmsL5LYFz4Fp5; Mon, 13 Feb 2023 14:28:06 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-f50.google.com with SMTP id h24so19143252lfv.6; Mon, 13 Feb 2023 06:28:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zbiPdrqRKXoQ9w0qRFOBjvUUVHONLnuwt0weBcXrkmg=; b=GXafKcYqfy6dMgOBpen7bwCKOGDuxTQECV/gliEFs1T91TtbcKVAAj+CZXxPfTzIqs 4Sl14a+fsDnvaOl4QcRzVHmFMStTQL3IslQMIM6QXmaQw1i8W7iE13a58tvviCIwKPc6 GCDsfGM8xRF1tgvyGXzzunfJ0qLjj5orMPtzxdNsOcDw9CnsMiQ+c4w9z1zxyVHkvupf PsMvP4SxXmBy5nYyNHVBGWmh+XXuG1+/2N6nz93txeRcFt2Rye/09x/0VL2FErfswfAn fAQL7UjAYfEFPWPeNZ6742p3rvnWW3tAw3yTzSSnBoGlpT+iLY08azUVEmMOiFx1Az7p kcOQ== X-Gm-Message-State: AO0yUKU85Nyk9mRuCFiWf9fZGv+6z8ca9WeGLsSM4zmJGWjz478bH8MY H3vDW1Rb/ridi5AR+LxAZsGuoM/qLIvZvC+hmQw= X-Google-Smtp-Source: AK7set8mlZEs2g8lYVXn5uiOVPYg5f6GwTwbNLFxxmbXZHcwadUYa4K2DFOJJE+9VxyTlfoOd8CVkXdnRspU7eK3aTg= X-Received: by 2002:ac2:5dc9:0:b0:4d4:fcdb:6376 with SMTP id x9-20020ac25dc9000000b004d4fcdb6376mr5452006lfq.218.1676298484471; Mon, 13 Feb 2023 06:28:04 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> In-Reply-To: From: Ed Maste Date: Mon, 13 Feb 2023 09:27:57 -0500 Message-ID: Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns To: Mateusz Guzik Cc: Warner Losh , Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PFmsL5LYFz4Fp5 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 Sun, 12 Feb 2023 at 17:12, Mateusz Guzik wrote: > > I do note though that if "compiler flexibility" if you will is to be > expected, it should be stated somewhere. Again, I only recall the > opposite -- top of main needed to build the kernel. We have always attempted to allow world and kernel to build with a slightly older compiler, in particular at least for the period immediately following a tool chain update. We'd like to avoid having downstream projects or others with slightly atypical build configurations avoid surprise breakage. For example, Cirrus-CI runs use a toolchain package to reduce the build time, and it is now failing: https://cirrus-ci.com/github/freebsd/freebsd-src/main. This is easily fixed by bumping the toolchain package version of course, but it is much better if we can avoid this altogether. From nobody Mon Feb 13 15:10:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFnpd1fdNz3rFsG; Mon, 13 Feb 2023 15:10: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 4PFnpd09wtz4LMP; Mon, 13 Feb 2023 15:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xZmYV14NkMr3I7msX/DE4bMCRHILGJMcGfecdFP8w6w=; b=I75h3MATneO1pVR5nhnyQzhV/3/ccrXN0+qY/cVxaCd3lOiUuDFwioeTv2qtvDCoFLIL10 AmgdIEHPhgphsdZ7y2z12la+t1RZgHkuN7t8SzVJC6eXd5LZBWv3bcSNSsY+8Fk2Ji1obX kB88fpcIr6tk5vu3KrcvMsaNMfK23hUKVa5asQYjA0E+JtIyHFN8cMC8dCjYyILEgr8z6Y 7/xCuB4WOp2mmrg5y8psNPA9WtemYe5wHBzStF30tixnEckXQkwIW70xwdoV0gKlinKFGV 04ZbZvlraAH312bzXMev0nl1DOHN78P9gxQvBnVLOoLd+hNmGBMAchpmUNW7kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xZmYV14NkMr3I7msX/DE4bMCRHILGJMcGfecdFP8w6w=; b=FE6gh+Sj7uGqCiK02toi/JU5f/NuUCmil9WpIi/U2MaFok0wBDjWeKsC1mM3WzGxzbt+jt NKfr/w+A244tjoJCJesL+6IZu1hIiRfR2LTrtUhzE4CCa9xS6NC28F/KJlL/b1P8FgdYRY +N6xUKpdLtreofEHUV42Ajz9pzE2RT1wMdHA6pYHtkwTFa+MkHYfX7SADA0iujPewyn/cv 2YoyUNcP0Aubu7e6z0aKJn9s3iz1DOnkpaHHuot9q2jrflIJ52HoUOuySY/kwyZC9uBt14 AS4n24FsVX9uxypZT2wClIIVllxGq7FAL7MkCPy20rESbOJvBdSMWiEKiEO/1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676301049; a=rsa-sha256; cv=none; b=f46NtvvcHjp5uNCYNpjRsHjKSbmg6kBsenhM2KPxlz4RpZuhhg+TZU2Cw+kFqyN69C2PPu ToCTt1kzKGoN+5wDRb1GAcwJdBIrmJC2oMFtKjsoXKlCgB5pJw/rp2aZE5POUciuEI8tvu G3j3DS0ymeGUacgbrcL6dmZUepMcRPKwjedBd9bhhP8ZjoDFjXpJrsLg/DspLK4lzsXctO L0CRSmtx/gwyaR/WVESvcGXoR8UlTKxUmuzV7b9wvpzU6+gTscS4MgOoLtvlFav1PX5gVm wrm2Neo1hKWNFrbGhZejqsANF3ZbibrPrxSgyqHdw18Qg3ksoBhEEKPWwpsAAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFnpc67BSzND9; Mon, 13 Feb 2023 15:10: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 31DFAmUf048394; Mon, 13 Feb 2023 15:10:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DFAmWO048393; Mon, 13 Feb 2023 15:10:48 GMT (envelope-from git) Date: Mon, 13 Feb 2023 15:10:48 GMT Message-Id: <202302131510.31DFAmWO048393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 67fca20eb2ce - main - Cirrus-CI: use llvm15 toolchain packages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67fca20eb2cea55fb2eaacc22807ee4741894796 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=67fca20eb2cea55fb2eaacc22807ee4741894796 commit 67fca20eb2cea55fb2eaacc22807ee4741894796 Author: Ed Maste AuthorDate: 2023-02-13 14:28:35 +0000 Commit: Ed Maste CommitDate: 2023-02-13 14:29:36 +0000 Cirrus-CI: use llvm15 toolchain packages As of commit 50d7464c3fe6 we use llvm15 as the system toolchain, and commit eca005d8531f added compiler options incompatible with earlier versions. Switch to llvm15 packages. Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 272032aa05fc..77510e1ea09e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -16,13 +16,13 @@ task: env: TARGET: amd64 TARGET_ARCH: amd64 - TOOLCHAIN_PKG: llvm14 + TOOLCHAIN_PKG: llvm15 - name: World and kernel arm64 build and boot smoke test trigger_type: manual env: TARGET: arm64 TARGET_ARCH: aarch64 - TOOLCHAIN_PKG: llvm14 + TOOLCHAIN_PKG: llvm15 - name: World and kernel gcc12 amd64 build and boot smoke test trigger_type: manual env: From nobody Mon Feb 13 15:19:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFp0H1jP6z3rGcP; Mon, 13 Feb 2023 15:19:11 +0000 (UTC) (envelope-from mat@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFp0H0d5wz4PKn; Mon, 13 Feb 2023 15:19:11 +0000 (UTC) (envelope-from mat@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n6xtwscc+gjd+duULQW63pfTNgHx+fXDok1hbcaiUcw=; b=dxNnqLXtx0kGP3YCzG8WfC1J2/uTeSrYPO3XIBZLKjYrQr3ZwyH/o4Xrq2i4xemfp6sNfT lgS8I7ReDsatSZ6DGJsvmp0xe8bQsBRnpRvWZCwNPGECjY13Bse3ptf5/oFVnvhN/JKXeA NHTt/HJHZlGV5yC+j7RUkg5gdRpJKLtz3T36WytgUpvpoPurIWxRw2Shjw7UgQMyJqx0wj PA7aiTX51j2ZpsW9OT98oqt+R5n+MdAjB0wm9QTL1tjie7P1l8C/BAvAP47f3LG2qpfPl5 apJrru9ROllasGb+8qy56mcLOntI2+PQsawn9sLUpKjhlyzFjGNWaNe5GI0DKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n6xtwscc+gjd+duULQW63pfTNgHx+fXDok1hbcaiUcw=; b=M2BQciyqgu53shL6jnEzqJzEG3g7jmHPftXizW0Nqkjd9AVudE20d/IUu0h9c8e/WSm8sy 6xbeNyc4GIsrVUWlqE5qfJwH4zeGrmmd9uRsOiKGor1nrvnLJpgwL2U73xLaHJrvmlx85Q 3mJ6NCSr4dscI3HucxybdY/ate8VLhnYvN5fwFFHMO7CQaryxtjdsoh8r4SCNIpJCGvAoJ v93fPSrkhzs0HHI7uNz9bY+O+teXWrUI6n6gYuZCffk3D1qJWrnHgKBqSLi21cdJ8+1PvI Vt8rMcfXd50EpGc/xar8uB76UaXBxK94U9OmWxCRGnzwF1jIR9gXhvYMIqo3hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676301551; a=rsa-sha256; cv=none; b=tn/3xmCrHuPuRO98tfLP2V7B+VyZvGJOVKyWYhh9ywsCb+jUAroQtr5RQ9Twpp40VCauZv lleopY5NUlAAmOzH21gBqsRZStCUg9I4jiibR4S5+jKN5Mr0CjVOgFNDR0IvTgJnij2VQY EY6QWmkScn14EspijIBeajRfU2MgwmQeCTwVAqjKkmL7AMmEnslJtk65lMr44LRheTc2Qe KC/B30+OFqH/FgkTTOmvbN6hU4cZo/s/+kAjh1/M8gUtXO4fjxTOA2n/8LwzI8GwBrgjCQ g4o+ucO1uHs0jKqW+jKZrWgjrJ4d0egYkLwIuwRiOBPqVIKGALCzQpc2JYlOkg== Received: from mail.j.mat.cc (owncloud.cube.mat.cc [IPv6:2a01:678:4:1::228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.mat.cc", Issuer "R3" (verified OK)) (Authenticated sender: mat/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PFp0G60dHzFrx; Mon, 13 Feb 2023 15:19:10 +0000 (UTC) (envelope-from mat@freebsd.org) Received: from aching.in.mat.cc (unknown [IPv6:2a01:678:ab:50:b21d:ca1a:88e2:2d18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: mat@mat.cc) by mail.j.mat.cc (Postfix) with ESMTPSA id 5BC3C942D80; Mon, 13 Feb 2023 15:19:09 +0000 (UTC) Date: Mon, 13 Feb 2023 16:19:08 +0100 From: Mathieu Arnold To: Mateusz Guzik Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: eca005d8531f - main - zlib: silence K&R warns Message-ID: <20230213151908.plgthmmbjyvhmigg@aching.in.mat.cc> References: <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yjj3t4dwktid3qbs" Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N --yjj3t4dwktid3qbs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 12, 2023 at 10:40:28PM +0100, Mateusz Guzik wrote: > > >=20 > Are you sure about that? I distinctly recall the supported path to get > top of the latest stable branch first, from there you should be able > to build the toolchain and the kernel. >=20 > afaics the above change did not affect it >=20 > If you insist, I can look for the exact paragraph in the docs. Technically, no, you have to be able to build the next release from the previous release. For example, when 13.0 was released on 2021-04-13, the latest release was 12.2, which was released on 2020-10-27, and you had to be able to build it with 12.2. Right now, the latest release is 13.1, so one should be able to build HEAD from 13.1. In the close future, when 14.0 gets cut in july this year (probably) the latest release would have been 13.2, so you will have to be able to build it from a 13.2. --=20 Mathieu Arnold --yjj3t4dwktid3qbs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQITBAABCgB9FiEE9XJBpJetWizkEBUef2IOCp6dQb4FAmPqVOtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY1 NzI0MUE0OTdBRDVBMkNFNDEwMTUxRTdGNjIwRTBBOUU5RDQxQkUACgkQf2IOCp6d Qb4Zzgv9EvBygCQzLKyE3i8D6peLiZ/eWym9DBsRBpIPSHxqL92DUV2eXimTmQP+ 6bFhZvH9styl/LWMylAMox6G+YjqR4hq+YwgmjTuGLwKAUEmw/qptzotMKyKPbTn mItRMrLz+1FVZawrLp8RVmV7qef4C6IFpsEU9rVx8Y2FsZhFrAN7cKnSAt5GFUzZ ySoJS8OutQa45paKwHNcrzO5MUhy6xYT5kzP07C3xHBuGOIn9p/zSLRg6yG8pljr N7tZsJ+rZOrQm7VNsYKm1qPz9IV2i4RSfG390kgH6aqohdRA7E+QGkM3V/fxdSwQ 8Gm2xxrMsbNQPUgKDwpX3vNNgxYUygJjymOTlE1zvfORCAPAZBL6spdVePKYhTt8 Ct5Y2HsRwz8lFymKhjYNF0BHbuVDrqw42eBnyWxA89MSbaSl14yBw9q7ubBxoBlZ k4e/6eWBFPGPoQnfc7F8ydAmYuAsgAEzGxuTOFSU3SAjrzNVVd5z5oqc3iuYcPr4 RRSBmBEJ =Rwiv -----END PGP SIGNATURE----- --yjj3t4dwktid3qbs-- From nobody Mon Feb 13 15:23:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFp4z5gM7z3rH8J; Mon, 13 Feb 2023 15:23: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 4PFp4z4yZrz4PfV; Mon, 13 Feb 2023 15:23:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OmKnEbIKr1jopjcl9hcAUfCJ94h3qpceJB68OpGlbaM=; b=hfjcPIgFT/GYMHzl09C4ALXx6muhaybBxo61Rgm6jh6LHDXAbzA0ut86ue3B/JvBX3JaEH lqTacIOmsXxanJTod10rzq7lfeY2eaZISPSPWIJLzLzqUBZ1ubb2WIhWXjtLh9nVwEgHHd Q++DzlbjomZjBAtsPrDP0iP/FRGNy9Kp1fjXaoylHubbZVeuNHT/5hIjIfvB3Z1opZM/Q5 eFX0coO80jx7UZEiEdm+4J4sP532QJXWajnsA+S3T0Sl5zr9lDmeOIKPMXVUDyREZRuKM7 bzM6JEZ8nLyU1OdV8CLxIwJd42WqVAY9V6S6QHukcZdC/A3uVLU7cvk+UX+GVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OmKnEbIKr1jopjcl9hcAUfCJ94h3qpceJB68OpGlbaM=; b=wGPj+PaZXQP8jwBNISIzaiMobi7u3qB4OucgfYr0K6oQLiLilzbNdeBi4nmqnF1MgETOYE gdjAiWHAueJJSbLYR2rUUu6lzZpQ4vGCjnqKYFVmHa4MDYQzlJ5n1/JNJG/0P8/BJjbH/S nQ/JNeggdZC/BWIOgZP5XE7S/8iTi9cceKyPzKMEcYZ4HtGxtIcp9oHLVA0+6AyTUsELxo 2MIxd/ezSYSrzEHs9mSTpBgcgi5HZ/ggT3ig65uuMsDQbT2mMW1uOtksvtF6GQZ9Q5g4zO Az76yZxrJ92/vMhEc0z3qRMr2hUbf22eqBymwqkytVanHTxX+letz6igixYdHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676301795; a=rsa-sha256; cv=none; b=sci8zgPhV3VM9dIzIKsBBlrieXptA0Wz6hAYBmfVA1CduRMq8y+KCAxjMXZmzTAz4I8xHZ S4nynr4Vo1+23GRYpZyM9yEHZuHrLAMKum4QZlAFseW88RnQb4S05gYF4QmMIWkDa33eGK qHedQjNkfsDDEJB9X/7IVYs/tvNRTHKudMGlxTeVay3UTLE5asUH8e4H97RDGeBdErab+C ydRnpRQhogi4cP3QXkQH7BmzIW3KyV/R1w6c07LY7G0rHhV06LUhs35dhtsL3EFyW4YW1n bfr6MtgtPY8b4uyIIGZ84jYq7s9TaJYQrjxLf0VvNFzfMC4achZNWvVccnXRGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFp4z3gYvzNfH; Mon, 13 Feb 2023 15:23: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 31DFNFwO068031; Mon, 13 Feb 2023 15:23:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DFNFs9068030; Mon, 13 Feb 2023 15:23:15 GMT (envelope-from git) Date: Mon, 13 Feb 2023 15:23:15 GMT Message-Id: <202302131523.31DFNFs9068030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 09c4c1e83665 - main - prof: Remove sysctl docs for sysctls that are now gone. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09c4c1e836659a30aa68790e9b7e7536d1194ef4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=09c4c1e836659a30aa68790e9b7e7536d1194ef4 commit 09c4c1e836659a30aa68790e9b7e7536d1194ef4 Author: Warner Losh AuthorDate: 2023-02-13 15:18:50 +0000 Commit: Warner Losh CommitDate: 2023-02-13 15:18:50 +0000 prof: Remove sysctl docs for sysctls that are now gone. GRPOF based kernel profiling was removed in aa3ea612be36. However, the docs for the sysctls were not. Remove them belatedly. Sponsored by: Netflix --- lib/libc/gen/sysctl.3 | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3 index 2d8da3974086..c4883e0aeb4d 100644 --- a/lib/libc/gen/sysctl.3 +++ b/lib/libc/gen/sysctl.3 @@ -349,7 +349,6 @@ information. .It Dv KERN_OSTYPE Ta string Ta no .It Dv KERN_POSIX1 Ta integer Ta no .It Dv KERN_PROC Ta node Ta not applicable -.It Dv KERN_PROF Ta node Ta not applicable .It Dv KERN_QUANTUM Ta integer Ta yes .It Dv KERN_SAVED_IDS Ta integer Ta no .It Dv KERN_SECURELVL Ta integer Ta raise only @@ -477,41 +476,6 @@ implies the current process. .It Dv KERN_PROC_ARGS Ta "A process ID" .It Dv KERN_PROC_PATHNAME Ta "A process ID" .El -.It Li KERN_PROF -Return profiling information about the kernel. -If the kernel is not compiled for profiling, -attempts to retrieve any of the KERN_PROF values will -fail with -.Er ENOENT . -The third level names for the string and integer profiling information -is detailed below. -The changeable column shows whether a process with appropriate -privilege may change the value. -.Bl -column "GPROFXGMONPARAMXXX" "struct gmonparamXXX" -offset indent -.It Sy Third Level Name Ta Sy Type Ta Sy Changeable -.It Dv GPROF_STATE Ta integer Ta yes -.It Dv GPROF_COUNT Ta u_short[\|] Ta yes -.It Dv GPROF_FROMS Ta u_short[\|] Ta yes -.It Dv GPROF_TOS Ta struct tostruct Ta yes -.It Dv GPROF_GMONPARAM Ta struct gmonparam Ta no -.El -.Pp -The variables are as follows: -.Bl -tag -width 6n -.It Li GPROF_STATE -Returns GMON_PROF_ON or GMON_PROF_OFF to show that profiling -is running or stopped. -.It Li GPROF_COUNT -Array of statistical program counter counts. -.It Li GPROF_FROMS -Array indexed by program counter of call-from points. -.It Li GPROF_TOS -Array of -.Va struct tostruct -describing destination of calls and their counts. -.It Li GPROF_GMONPARAM -Structure giving the sizes of the above arrays. -.El .It Li KERN_QUANTUM The maximum period of time, in microseconds, for which a process is allowed to run without being preempted if other processes are in the run queue. From nobody Mon Feb 13 15:23:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFp5061CHz3rGyd; Mon, 13 Feb 2023 15:23: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 4PFp505YM2z4PxW; Mon, 13 Feb 2023 15:23:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3qIUAdkdqOUTuzd+aYq78kTKZItTdrTpsDNLDtJAJ/c=; b=sPdXnKCW6d2yulmWtonAO6hghS1/avqtj46sMsysBT8N/+jRUTGTe3N1bj1Y9zfZ0rJd3G Fc39B9poRch2iZp+jWmM3z9vOW0QkoIhCOGtipBjxJITx2tOAEfqQ5LVRD/joJn9vGm+sh hIEAcdidHOHtJF0k82hpwxJJ3yoHZgVKHdefNlx5+YI8XCyiM8yUttK3MmmuxI2WOmb/m6 tZQg0uVnYjqXZdme0Q1EKkJyg2cZ+wiLCnACvZynVNWZdmPS4XToNA55Cgse9mvXQl3RKF FOOodMWFY2Vj2O6z3vlvEN5hp/4MQO+9gXSEyd12bqqmof7e62QynSbhb1DFkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3qIUAdkdqOUTuzd+aYq78kTKZItTdrTpsDNLDtJAJ/c=; b=AKiKE/P4Zj8Q/4JqssMQPQ4nezEG4OEEig5zWygjYEL9xqJPqS04M8GifV0usMoDA/68rA QLky7rvUSySfjvTLU2jYjJWw3/zYe7N3tpphdnEcMZVl0fjLDkfks3LVIKq2xzXXsm14J6 0jVMcLDfyGMvSl4sr9qa+Yb8RZCTtTRzfzv7NwAUrzoA1cQBLmMObKQAt6Viltto7IAJ2f QKr2AHtAl4d8+fAvKsbo2ZIGO7gNKFkOJcxRYNzCvthJ9vE+o1E0HmQv08jGaXk4jfpPqF IcSU1L2wtL6Pi1bxCLZQY5cU06XenXtjqFdleF6K5Q6bXRS5fcL4U4nTvkqaJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676301796; a=rsa-sha256; cv=none; b=fDn7e08MDZ9naeBqpQl2Q3NRQf8irpQkOAe027R/k5g1EVT8LSihDvSGDV3cDGYAIe0yvl r7TmVQE5Nt3BtDRG8CDgnUOSuzVCpR/tp9m83vmzmk0oADPOgksIFA4rY2RqjsaOBBcxnj j3LqRWlQpd5OJPmXKCgIwFonnDJmvv+BP34pKq7oeNEKPvRpM4XY1MTLgsygNhNZ0Ga5wJ 3tqHj7bYLrmv18abn5Mq0zjAo5JSyqHr1FYZ/1YC8+UnHGfNXCiGaOxMLDZwDUBqH+9jgO V10KORLa9XDYx/iyfAswn6Zv7Fpx3bTOcs+HFdZ9qnfMHp7KmL6Eq3fp2pJZ2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFp504XRrzNYm; Mon, 13 Feb 2023 15:23: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 31DFNGHG068062; Mon, 13 Feb 2023 15:23:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DFNGiW068061; Mon, 13 Feb 2023 15:23:16 GMT (envelope-from git) Date: Mon, 13 Feb 2023 15:23:16 GMT Message-Id: <202302131523.31DFNGiW068061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b9f235ba3178 - main - Properly conditionalize clang 15-only flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9f235ba3178e5315cc1c77c87febd033cf69b3e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b9f235ba3178e5315cc1c77c87febd033cf69b3e commit b9f235ba3178e5315cc1c77c87febd033cf69b3e Author: Warner Losh AuthorDate: 2023-02-13 15:19:00 +0000 Commit: Warner Losh CommitDate: 2023-02-13 15:19:00 +0000 Properly conditionalize clang 15-only flags Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38550 --- sys/conf/files | 20 ++++++++++---------- sys/conf/kern.pre.mk | 5 +++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 53f90f7afc22..952aab6f1b6e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4100,34 +4100,34 @@ libkern/strvalid.c standard libkern/timingsafe_bcmp.c standard contrib/zlib/adler32.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" + compile-with "${ZLIB_C}" contrib/zlib/compress.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype" + compile-with "${ZLIB_C}" contrib/zlib/crc32.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" + compile-with "${ZLIB_C}" contrib/zlib/deflate.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype" + compile-with "${ZLIB_C}" contrib/zlib/inffast.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" + compile-with "${ZLIB_C}" contrib/zlib/inflate.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" + compile-with "${ZLIB_C}" contrib/zlib/inftrees.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-deprecated-non-prototype" + compile-with "${ZLIB_C}" contrib/zlib/trees.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" + compile-with "${ZLIB_C}" contrib/zlib/uncompr.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} -Wno-cast-qual -Wno-deprecated-non-prototype" + compile-with "${ZLIB_C}" contrib/zlib/zutil.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib \ - compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" + compile-with "${ZLIB_C}" dev/zlib/zlib_mod.c optional crypto | geom_uzip | \ mxge | ddb_ctf | gzio | zfs | zlib dev/zlib/zcalloc.c optional crypto | geom_uzip | \ diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 49437ac6c2da..1a94709eaded 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -278,6 +278,11 @@ DTRACE_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${DTRACE_CFLAGS} DTRACE_C= ${CC} -c ${DTRACE_CFLAGS} ${WERROR} ${.IMPSRC} DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${WERROR} ${.IMPSRC} +# zlib code supports systems that are quite old, but will fix this issue once C2x gets radified. +# see https://github.com/madler/zlib/issues/633 for details +ZLIB_CFLAGS= -Wno-cast-qual ${NO_WDEPRECATED_NON_PROTOTYPE} -Wno-strict-prototypes +ZLIB_C= ${CC} -c ${CFLAGS} ${WERROR} ${ZLIB_CFLAGS} ${.IMPSRC} + # Special flags for managing the compat compiles for DTrace/FBT FBT_CFLAGS= -DBUILDING_DTRACE -nostdinc -I$S/cddl/dev/fbt/${MACHINE_CPUARCH} -I$S/cddl/dev/fbt ${CDDL_CFLAGS} -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" From nobody Mon Feb 13 15:23:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFp51716hz3rH4b; Mon, 13 Feb 2023 15:23: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 4PFp516XNkz4Q79; Mon, 13 Feb 2023 15:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qzdbaXNgzyury+l3o/h0za0B8SOf9EY9s3elQ9XHwp4=; b=smXFTUZvjCHReJzXGvi1QyZYMXndGrTBTJ96M4zspEBkYyDI648I6AvvGqzaVCYv3S5B1N gjArwarygiZ9etQuUkZt3AM3jwP/L86NbJUjJxy20IFT3DpjKD9vosEZ4audCs1bn4iJ5B /rX+/WNi/4r75mlCBCRB/iIchaKhantZbt+MjQ2dZIiJkXUlfHUGJ5qXYo6eHA1XxvO6G3 Egqv3S5H2zYSx7fgK/UEc8sve+Z0WF4tMSBYThVKD9oRnZ9hQzHc2c/2139OZzkGPdMhQA 0f+f+PAlHEWKoD2NabP4CW1Bh2lS6mqoskls5uqhMSY2N+Et1pwVRCQ45rBqMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676301797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qzdbaXNgzyury+l3o/h0za0B8SOf9EY9s3elQ9XHwp4=; b=ypmofS2J0SrNySD/N2/TxZrTvvViMJdUF1drsxqMRs4MBAZfhhYTgYwa1vMdRynEgUCHl5 PuNRjl86kG9E60v2CR9xTqUbX+4Xyw6qU4bLK8WJHdkMGWlaC+Cti5+ZQGvDfrPubjUlkQ /bQWZq9KbPS+XG82A7Sf66W44fDDlraQWV4OSCj3quSeZtat+Zr9Qb8Vgn2dQv4d320gZ7 rv3gTt2BHlj5ETXKTXySD+T6et8W7HyToTB3hF3i448IV/UvnoVnJEtGqUqiNUGH+h8S/l qda/O6JXdodbGrbm0GFuYP3hhHPpQzlMsMRZKrjjPMhT99iSCbpai15YCSpoMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676301797; a=rsa-sha256; cv=none; b=IVxL19oxN1vXo3RUaLndAb5m4vc1NuglXX9qQjHfcAQsGbxLkeITHMYKlfFR3TREmXi/GQ XZh5ijRJGd4oiS2LVYkxm+cXXxJzBw9MZLY65Ul6MLA7cLKRTv8B+SrEp0MVlSM1XGCxon 6mp/Dq7+yxFgchWj9pZVzur7SRhUXx+zorb0rWEVgRqLFuJvWE/tXpxrdXTSNGpLpUDIgT y2rq1J6417T9upYtNdA3GbCjEWK2lKXQrYYhxa2HRRa+vFfv2/F5q3PNjLElX+PIcbRQEC 9F4/BMQpGZx4ZZgciJk8Gwt63KQzLZ0achtsNQ4nl4cs57D1bFLRWQC76SmhLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFp515TrgzNYn; Mon, 13 Feb 2023 15:23: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 31DFNHo1068086; Mon, 13 Feb 2023 15:23:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DFNHn1068085; Mon, 13 Feb 2023 15:23:17 GMT (envelope-from git) Date: Mon, 13 Feb 2023 15:23:17 GMT Message-Id: <202302131523.31DFNHn1068085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9768746ba83e - main - bearssl: Suppress warnings from functions that have no args List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9768746ba83efa02837c5b9c66348db6e900208f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9768746ba83efa02837c5b9c66348db6e900208f commit 9768746ba83efa02837c5b9c66348db6e900208f Author: Warner Losh AuthorDate: 2023-02-13 15:19:40 +0000 Commit: Warner Losh CommitDate: 2023-02-13 15:19:40 +0000 bearssl: Suppress warnings from functions that have no args clag15 is much pickier than others, so suppress the warning until upstream can be updated. Sponsored by: Netflix --- lib/libbearssl/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libbearssl/Makefile.inc b/lib/libbearssl/Makefile.inc index dd0e242c8ef0..2af4864d8441 100644 --- a/lib/libbearssl/Makefile.inc +++ b/lib/libbearssl/Makefile.inc @@ -4,4 +4,4 @@ BEARSSL?= ${SRCTOP}/contrib/bearssl BEARSSL_SRC= ${BEARSSL}/src CFLAGS+= -I${BEARSSL}/inc - +CFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} From nobody Mon Feb 13 16:06:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFq2Z6ryGz3rMBs; Mon, 13 Feb 2023 16:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFq2Z617Tz3JTg; Mon, 13 Feb 2023 16:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676304374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cEZ5Jck38YH6SWP/Teml+AovQBhe+aL7v6XedqnxcUs=; b=W54RBHJursADxx5Ob5P4Veau1KOER9WENiT7FTb1JERz0jb3dQif1FQ6TEGL08dahHLdZ8 m3zrM402ppkA918thAQ8kajZ+xj7UL1YUarBD0wuPOGd7HU/ZkH+ltOnIzJkQN5u6yavhz JDVyP7cjol7VB1auMxrNTSwv4tz+S8pZquheXUAGQoXSEYJ3+1OZMRjBTTd0wFg9yUa4Ca WGSjyC/xrfuX/dmYmnlezj5qHJvIBJx+EH3V84sIzWXyE/OMR0q5ndtVeatLLezwxhHtGd NUPlHJItJ00dFPCJEv07RifNtOAFZg+LRgyz5ur7Ol8I6gSp0t/1Ftegs52Ndw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676304374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cEZ5Jck38YH6SWP/Teml+AovQBhe+aL7v6XedqnxcUs=; b=Ct2151wBqupsnni/ICZDZOwyQCRlOe9h7Kz+epVrBpVpGr7z359NBPslKelYCkGCna9oJe bAySWzLPVn/1zFptbYoSlcebiDgN2w+TPxUnJpaYVxhNJ4QGzNWXW8K+sA6T9x4LUXIqq4 EdZfrs2go1p367QHXQy254S6QI785Use1RuUqWZmpxi3Opi4eUHSvwH0a7vPU0oDmarP8n QKcLga9e2eGzDPy5jzTpIu8DUv/ex59KynuNPMmEavhbwr4lNivKpKk+gvXTE/Wzv2dFBw BefupD2hyAOxiyc3dEpDMbdAL1MMwpZJD7wYOuSBmYz4S96UJBKRWUHfuJcVKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676304374; a=rsa-sha256; cv=none; b=x6WgXWo9NTzgk4Ik3lFYuVbZ6CiQ+dKsaiul/RFhBL7GDaMVJqxMsrQDueeFWnkqy2CWh2 kROXbBC54QqLfxTss9NTlkRnF+q6oscV/iNtPHyzusoulhKd38I8XNuGpbIeCD+32j72Jp XptQKTvRXikldYUuYw8gMJk0dJ5HTv+c5w0ZV9L9G4Vba99fWQugNgz0E/ypxOK76XeS9R kLVllGTpgvM3cEucWkjHZvFl1aKMHp6rH1eYd6eBaaEf18jvx1cuSzFX6cen9fC5yzhz8M xqgZcXz7wa54qQkJtza3nFN7AQQcGlT9l4DrxFUJbvnTcpiJpVy5Q0ykqfUKpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFq2Z53tDzPlt; Mon, 13 Feb 2023 16:06: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 31DG6EwG025882; Mon, 13 Feb 2023 16:06:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DG6Ehu025881; Mon, 13 Feb 2023 16:06:14 GMT (envelope-from git) Date: Mon, 13 Feb 2023 16:06:14 GMT Message-Id: <202302131606.31DG6Ehu025881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 4bd4e4b45e8b - main - sesutil: don't malloc in a tight loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4bd4e4b45e8bfbe855406098f393bdf4eda7104d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4bd4e4b45e8bfbe855406098f393bdf4eda7104d commit 4bd4e4b45e8bfbe855406098f393bdf4eda7104d Author: Alan Somers AuthorDate: 2023-02-09 22:23:51 +0000 Commit: Alan Somers CommitDate: 2023-02-13 16:04:05 +0000 sesutil: don't malloc in a tight loop Reported by: mav MFC after: 1 week Sponsored by: Axcient Reviwed by: mav Differential Revision: https://reviews.freebsd.org/D38473 --- usr.sbin/sesutil/sesutil.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/usr.sbin/sesutil/sesutil.c b/usr.sbin/sesutil/sesutil.c index 989216690edf..22bd0127a484 100644 --- a/usr.sbin/sesutil/sesutil.c +++ b/usr.sbin/sesutil/sesutil.c @@ -417,6 +417,17 @@ objmap(int argc, char **argv __unused) usage(stderr, "map"); } + memset(&e_desc, 0, sizeof(e_desc)); + /* SES4r02 allows element descriptors of up to 65536 characters */ + e_desc.elm_desc_str = calloc(UINT16_MAX, sizeof(char)); + if (e_desc.elm_desc_str == NULL) + xo_err(EXIT_FAILURE, "calloc()"); + + e_devname.elm_devnames = calloc(128, sizeof(char)); + if (e_devname.elm_devnames == NULL) + xo_err(EXIT_FAILURE, "calloc()"); + e_devname.elm_names_size = 128; + /* Get the list of ses devices */ if (glob(uflag, 0, NULL, &g) == GLOB_NOMATCH) { globfree(&g); @@ -481,28 +492,16 @@ objmap(int argc, char **argv __unused) xo_err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } /* Get the description of the element */ - memset(&e_desc, 0, sizeof(e_desc)); e_desc.elm_idx = e_ptr[j].elm_idx; e_desc.elm_desc_len = UINT16_MAX; - e_desc.elm_desc_str = calloc(UINT16_MAX, sizeof(char)); - if (e_desc.elm_desc_str == NULL) { - close(fd); - xo_err(EXIT_FAILURE, "calloc()"); - } if (ioctl(fd, ENCIOC_GETELMDESC, (caddr_t) &e_desc) < 0) { close(fd); xo_err(EXIT_FAILURE, "ENCIOC_GETELMDESC"); } + e_desc.elm_desc_str[e_desc.elm_desc_len] = '\0'; /* Get the device name(s) of the element */ - memset(&e_devname, 0, sizeof(e_devname)); e_devname.elm_idx = e_ptr[j].elm_idx; - e_devname.elm_names_size = 128; - e_devname.elm_devnames = calloc(128, sizeof(char)); - if (e_devname.elm_devnames == NULL) { - close(fd); - xo_err(EXIT_FAILURE, "calloc()"); - } if (ioctl(fd, ENCIOC_GETELMDEVNAMES, (caddr_t) &e_devname) <0) { /* Continue even if we can't look up devnames */ @@ -525,14 +524,14 @@ 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"); free(e_ptr); close(fd); } globfree(&g); + free(e_devname.elm_devnames); + free(e_desc.elm_desc_str); xo_close_list("enclosures"); xo_close_container("sesutil"); xo_finish(); @@ -727,6 +726,10 @@ show(int argc, char **argv __unused) first_ses = true; + e_desc.elm_desc_str = calloc(UINT16_MAX, sizeof(char)); + if (e_desc.elm_desc_str == NULL) + xo_err(EXIT_FAILURE, "calloc()"); + /* Get the list of ses devices */ if (glob(uflag, 0, NULL, &g) == GLOB_NOMATCH) { globfree(&g); @@ -808,19 +811,14 @@ show(int argc, char **argv __unused) continue; /* Get the description of the element */ - memset(&e_desc, 0, sizeof(e_desc)); e_desc.elm_idx = e_ptr[j].elm_idx; e_desc.elm_desc_len = UINT16_MAX; - e_desc.elm_desc_str = calloc(UINT16_MAX, sizeof(char)); - if (e_desc.elm_desc_str == NULL) { - close(fd); - xo_err(EXIT_FAILURE, "calloc()"); - } if (ioctl(fd, ENCIOC_GETELMDESC, (caddr_t) &e_desc) < 0) { close(fd); xo_err(EXIT_FAILURE, "ENCIOC_GETELMDESC"); } + e_desc.elm_desc_str[e_desc.elm_desc_len] = '\0'; switch (e_ptr[j].elm_type) { case ELMTYP_DEVICE: @@ -853,7 +851,6 @@ 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) @@ -863,6 +860,7 @@ show(int argc, char **argv __unused) close(fd); } globfree(&g); + free(e_desc.elm_desc_str); xo_close_list("enclosures"); xo_close_container("sesutil"); xo_finish(); From nobody Mon Feb 13 16:08:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFq4l5bw5z3rMSH; Mon, 13 Feb 2023 16:08: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 4PFq4l55kbz3Jl9; Mon, 13 Feb 2023 16:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676304487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nOZ96H7ZNHZbYR4ClX6orsoi2p0RE/iP9vQ2O2KVF84=; b=bHeEIP8+s+pqz99h7WF72afDvA6ZhtsHU+Vf/pFuwNe4hpQdtshiNOjXXUfyiL7Kp9EdaA A+jhE8H2kgWR17AjGjchAR0BIx5G4XyOu33y6xfLuUgRWXAa76BrkHGbhRjBrpCiWvrmT0 tOG9dkZnQuIP8HHq0C83DeV1oscRC4Z4L7ShSrAOe/dYVmpZCFHE40Hb6xFYgXXPefKSoD vNxRFxHDI56aka0RGH9zC3ozdOuYV5C3CMqU6JP+BL9hnKLdAWvCbtUuyHK4b5dRyKN4lZ 7O0xFMzRyK90rWPkcCl5btmzzZ/rTsSNpd8XbygGwZb+QPKAIwwXxSGxo5N/nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676304487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nOZ96H7ZNHZbYR4ClX6orsoi2p0RE/iP9vQ2O2KVF84=; b=ZlCdqAnXgCtoLMioG/0PkvRBeb3iOuI9Ku73SMVCe+ABrioMgBmazFL9WNZFcNWQW5w7tv Bm8O38Y8RLM2NROQ22lZ0btvedNvT77e2G4qsqnBbc0+lynx7LLpT6kUKoxlCHJdaGOUXi t6qEDVQweAIHqgnLVTLtpuQaMcw+3FhNaVkt5c7hgqPqHZoPB50h4g8IWl+AheJR9lcvF4 4dEwc3dhvf40siDmYtDlcPGIGJPMXSysTSfp4WFVVYCf4suRQyBFvO/ahtlUoq2x+By2HX 0VNZPYHskX9NJtI4vO/x85Ydh+Yv3CuWiCjSIpx+PYU/I38MZAplw1eZ7PwurQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676304487; a=rsa-sha256; cv=none; b=ny3gnvgKbwfp5m8R4zsGjrrnWOHIcPTAEsCVFN2m8fvLqSdiXGpJL28zeT+8h6cl4N9//5 NXTxbqjNRLxla7+worZirwXQPaZ8fB4C7mFM7VUw5KQQGBLyBTqcvmmJQy5+Ld6iR8O0Gb uNF3IdPa0avjoM/ZEk1ybMfvGTi1X6MLFYjCyVK/Zx0U6ppZ622XPmWxFkr76G/i0gvKpm kCrQrk6jYCUHLPLnqcmKm23tIlnCyokoD17e1A+Vwg2d8qFZCt0W8j5G5tnnKfYovdsVIe hMW8pCZKeZXbxxiXWc9nKropk/zBTIkMUxzLLyzVKQg7/A8gamkK0yrX7giPGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFq4l47vDzPtN; Mon, 13 Feb 2023 16:08: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 31DG87rV026219; Mon, 13 Feb 2023 16:08:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DG875C026218; Mon, 13 Feb 2023 16:08:07 GMT (envelope-from git) Date: Mon, 13 Feb 2023 16:08:07 GMT Message-Id: <202302131608.31DG875C026218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 06c07e120332 - main - Complete removal of opt_compat.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06c07e1203324bfe8ab4526c82dbb750864272d5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=06c07e1203324bfe8ab4526c82dbb750864272d5 commit 06c07e1203324bfe8ab4526c82dbb750864272d5 Author: Dmitry Chagin AuthorDate: 2023-02-13 16:07:38 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-13 16:07:38 +0000 Complete removal of opt_compat.h Since Linux emulation layer build options was removed there is no reason to keep opt_compat.h. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38548 MFC after: 2 weeks --- sys/amd64/amd64/trap.c | 1 - sys/conf/options | 1 - sys/i386/i386/trap.c | 1 - sys/modules/crypto/Makefile | 1 - sys/opencrypto/crypto.c | 1 - 5 files changed, 5 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 39a2ef1d373f..28ee3a3b6959 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); */ #include "opt_clock.h" -#include "opt_compat.h" #include "opt_cpu.h" #include "opt_hwpmc_hooks.h" #include "opt_isa.h" diff --git a/sys/conf/options b/sys/conf/options index 3b2be66ba602..7855a2f3f20e 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -100,7 +100,6 @@ COMPAT_FREEBSD11 opt_global.h COMPAT_FREEBSD12 opt_global.h COMPAT_FREEBSD13 opt_global.h COMPAT_LINUXKPI opt_dontuse.h -_COMPAT_LINUX32 opt_compat.h # XXX: make sure opt_compat.h exists COMPILING_LINT opt_global.h CY_PCI_FASTINTR DEADLKRES opt_watchdog.h diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index f4f6e7109a16..d80b809eccb5 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); */ #include "opt_clock.h" -#include "opt_compat.h" #include "opt_cpu.h" #include "opt_hwpmc_hooks.h" #include "opt_isa.h" diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile index b93f8d55c41c..a31a266d7e6d 100644 --- a/sys/modules/crypto/Makefile +++ b/sys/modules/crypto/Makefile @@ -98,7 +98,6 @@ SRCS += curve25519.c CFLAGS.curve25519.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT} SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h -SRCS += opt_compat.h SRCS += opt_ddb.h SRCS += cbc_mac.c SRCS += xform_cbc_mac.c diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index 0baa61c089d3..75d00ccb9832 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); * PURPOSE. */ -#include "opt_compat.h" #include "opt_ddb.h" #include From nobody Mon Feb 13 16:19:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFqKL4nMlz3rNkg; Mon, 13 Feb 2023 16:19: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 4PFqKL48G7z3MWT; Mon, 13 Feb 2023 16:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676305142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+nVB5L8ukv6KxfV0oo3EUQOAlUS5i21R3zgT2s24Bao=; b=sTu7Xgmzyob38zqqcWNpeCEUQCYucY5k/0XOny5bXO38li0MPSxcz/LqFATc3UH22LeqeS vhuFjf5hzkwaNkr8Ss/10TpzdVsWHSj4VDx9tN4/OH48on3B8eAPgKhPu6TMB1p5OZsMCv vNd1hzG8UIvgL4gigqW7mG/3d2uRTlQwugUJntniaWnEbe4AnTuSFVPVarFPn13znzkZjr yGquxi6JUcBOIgXu3w1JJ2v53gF+O74qPIi74NjfExu5M4fjBviADlu9pr9EQksbR5YgxB dsTVTtewxe4kd/gIF/jPYQM9oVDTR9ulM9YrAlTCXyGve9VW6IMN6HfhfSDJhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676305142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+nVB5L8ukv6KxfV0oo3EUQOAlUS5i21R3zgT2s24Bao=; b=PUsZ7J1Rjk9boqf2fNgZmhLIQmwo9YvbDpVjiXRfsytRcfqRVz4w8/Pvw6qPpjNnYAICvS EdUTX9ORY6BakRF9r6MUAFYmjdEgcJrJ+TUDd6nSHzMevxuO47yCqijtLgO6aKvvB9AAyE WkOzNL8CleyG43unLntXlZ8G5dRY9hqTBB6P8RfepqBkC8v1gdbl9nYlknNOz170iiDK+V Tl9lxRxSnGcyvL4jP24H5Vp+l6r8B5XcZ6XQBPF3jO3csCM0kAe+vMV4U7/n0yF90Jkdzc SVUNtQJq5QjqSB0J4xlmEVRLwKnFqVHWsjPy40gczI80p3gl8D/+P4frmZPJ/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676305142; a=rsa-sha256; cv=none; b=aK1xVHkBgJvXLMcmoOLeh/xj6fktABWG9o9bibSSu2cCSqPrmQOKlOkn7d9YHRYgOv+H4Q qVr3TD3WZAv45Oqx9n8xprokvO21A2apZ1cZ6aRJvA3Vw/sgAvy4tWu1xNfcPHLiadVHE6 IcsAOzT/vv6GuqOJzLipc8EjNGtn97oIXQhZwz9ZQGkuyv7t3PEhsVURepTyfkgDT55FAs I/zFz+byqDW9OMBoPpt9/c/i+raBDoYYgyZHDnwvkG9qvwv39c772defBe1+9WETUkZs8n /ylePS+/MT0rbF+6lP+U1uuT+WgJeBzH3nGN1unBYwoG/1nqGSyRoSbJGQ9o/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 4PFqKL3FW7zPdF; Mon, 13 Feb 2023 16:19: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 31DGJ2x0040729; Mon, 13 Feb 2023 16:19:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DGJ2EU040728; Mon, 13 Feb 2023 16:19:02 GMT (envelope-from git) Date: Mon, 13 Feb 2023 16:19:02 GMT Message-Id: <202302131619.31DGJ2EU040728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 4c163a548080 - main - Change "ctlstat -P"'s schema List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c163a5480809d0dc8b68dd00bf2ba7d882450f9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4c163a5480809d0dc8b68dd00bf2ba7d882450f9 commit 4c163a5480809d0dc8b68dd00bf2ba7d882450f9 Author: Alan Somers AuthorDate: 2023-01-25 18:00:49 +0000 Commit: Alan Somers CommitDate: 2023-02-13 16:18:38 +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. MFC after: 1 week Sponsored by: Axcient Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D38500 --- 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 Mon Feb 13 17:15:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFrZb4L6lz3rVCd; Mon, 13 Feb 2023 17:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFrZb3s0Cz3mcq; Mon, 13 Feb 2023 17:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676308535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j2uNWKZS6gwMFmESi8IeLHVawv/v4VxVhgNc1qLU2M8=; b=u33UP6+VnOC0iHupF8lCrrG6DMVcCtqI8LM8DVojhINcbWt63nCe0g1MSZt+r3/gRG8BR3 8z31LEONSvWT19A8KRBqzkFGLiiM4axWq7W9dfAlZ5Q6HpLWO3kBbGAX4fgZhX673qkcZP x6+YQGWgT57w4GTo6sOzWpEdXiUp6XtzXLkiIJiWp6AKruWJVgxhmW2vXF88V/dfxWwQA5 sgiWUw3r5R7GoQr85ROKroLQZ+eTo2vdwF5vpuxHKNlHf/8WMetSyURxywaJeiqN8A4Iv9 U7lZU56dJAyPmkUmWzY+JtXCjoXlz5eUtUn7lxnhDKSYS80NrpuMFpxQ9th8tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676308535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j2uNWKZS6gwMFmESi8IeLHVawv/v4VxVhgNc1qLU2M8=; b=DzelDL4alUwh9DEUY/xh6M8O7E1mK/gD0xIKHNZShdd5i8NGsjVfAYibE+izAtG1/fiLZe qR4w5DB4tFe61/WSIixjH/AEpBAi/z/14y0pbvkioHkEjUDT+k4VbYL3c/OSFo8CXVPUf7 Z6vVkMS8eAmAbXEBNuE1UoY8Vmou/WM/62bU3N+PwqPr91opZM3dT2HT2V+kUps8aU+Q1Q Cxi5EA6Ee2KcYk+ySkF1dsdi59oPIbMlYYb1Mb7cxHg5BvRzQufroR5IqJ760WspHPDFUo yjv/r83atfMDLMpjJCgWxqNFsMeddmHSrw/6d0uRodqUUVLA40SQ7Ph24V01Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676308535; a=rsa-sha256; cv=none; b=XYjUOlBTspoUmH50O3eZhCIzQ29BRtbJbSS/GVOUrn231zs1sXrBqxvQ8/w3e2yco0nZLZ 4AWOxIwssJK77Yy3wE6+PDtbuivysf5aQLWg7r2myzEtOq2UfEhIYeibrOOUjqX7onPI6k tcMks7u1+dfWDorVGhrHyOzGxy09V01jyPSclssSvwpjF5ff6+F7D4Yhh7x9A/hhgeMrh2 rTWFjspjLbJ8yAZ1X75NiP0wjT6aDOlDnbe69goPDw1zUWejbmbqiZxy7o97Z23nJkbHTt YnPokBkaHrrWzzAJqjgfjNlTPExabGxoCn19LeU/uc8CcdkjsN23X51dh8YTZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFrZb2vCJzQp9; Mon, 13 Feb 2023 17:15: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 31DHFZrc025864; Mon, 13 Feb 2023 17:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DHFZUE025863; Mon, 13 Feb 2023 17:15:35 GMT (envelope-from git) Date: Mon, 13 Feb 2023 17:15:35 GMT Message-Id: <202302131715.31DHFZUE025863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b80185c26724 - main - zlib: Use NO_WDEPRECATED_NON_PROTOTYPE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b80185c267243a57bbc3e03fd2b47680672d6050 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b80185c267243a57bbc3e03fd2b47680672d6050 commit b80185c267243a57bbc3e03fd2b47680672d6050 Author: Warner Losh AuthorDate: 2023-02-13 16:15:58 +0000 Commit: Warner Losh CommitDate: 2023-02-13 16:59:51 +0000 zlib: Use NO_WDEPRECATED_NON_PROTOTYPE Also add it to kern.mk so it's available for module builds. Sponsored by: Netflix Noticed by: mjg Fixes: b9f235ba3178 Differential Revision: https://reviews.freebsd.org/D38550 --- sys/conf/kern.mk | 1 + sys/modules/zlib/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index bdceeba3a5b3..2668b7e5296e 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -53,6 +53,7 @@ CWARNEXTRA+= -Wno-error=array-parameter CWARNEXTRA+= -Wno-error=deprecated-non-prototype CWARNEXTRA+= -Wno-error=strict-prototypes CWARNEXTRA+= -Wno-error=unused-but-set-variable +NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype .endif .endif # clang diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile index 178d3a3f7ab7..b5a55b9812bb 100644 --- a/sys/modules/zlib/Makefile +++ b/sys/modules/zlib/Makefile @@ -25,6 +25,6 @@ CWARNFLAGS.crc32.c+=${NO_WSTRICT_PROTOTYPES} # crc32.c:586 CWARNFLAGS.trees.c+=${NO_WSTRICT_PROTOTYPES} # trees.c:232 CWARNFLAGS.zutil.c+=${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 -CWARNFLAGS+=-Wno-deprecated-non-prototype - .include + +CWARNFLAGS+=${NO_WDEPRECATED_NON_PROTOTYPE} # https://github.com/madler/zlib/issues/633 From nobody Mon Feb 13 17:52:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFsP56LrPz3rYSQ; Mon, 13 Feb 2023 17:52: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 4PFsP55QZJz3sZD; Mon, 13 Feb 2023 17:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676310745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3vgnugvT1ILNsiHFsbe0is8xhurjI1xiUYpgkYu+mM=; b=KjO7udnsHGzm+GSw9AgAQUsXVZu2+6eiy167Ks9B9olFCxOd59eH3wjAKvY20346us8lY4 kkHiIW+ejin6jl0vcz2P3xMRCMcRDLdvl0z2dD1TtrKcK2i/KDN8PYUmjH+jQKbNNF7/dw 6J5Gy3C3UqPRnCPRzL2H84Nhk5qYF65P5thSwXvFVmnP/O7WtcI7ha8F4Q0BTJm+uC74MY Si0Z0sixdoyN9Ly4MlNumGaGKHYqEHrer3EB4bTIvgzoD643aMwBPco2bgI0KRQxciCeIg pNICrf2RMUWPECLdyIw3sx5yaqo4+6en8C2SbUGit/fSGmNTYeiWfNvHIxUE3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676310745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3vgnugvT1ILNsiHFsbe0is8xhurjI1xiUYpgkYu+mM=; b=we0jQb2VfEthN+KRIkaNNtqk+r7YRWqLhGIOqA5j0TH5ZTePpuAYGEczL4MUT9waFaB/sy 5LnQNMnW2O3cmicgmMg7X+rcz1fux4+utVchRGYp05ES/ZXHEZeU6Zt/ThncM3QzsUp4cI 3kbwfChxCL7MJDQZXy4uxPoiR8tI0g+x/qO1NRoc/QyyZsU5vAn9s2mmgaMQcqjP28yumh hPyO74sDXen8Dd7B/d52x/h24J0SGdCTOe6qWeoUqS3Ma3M0x7AfG0zz/LNlW9KquKQ8Lk LI3w3LXnuHRqQdk7jqzZp0ZLT/j372nlBkQwtvKLUonSWgiLYdhXQbxTAvrung== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676310745; a=rsa-sha256; cv=none; b=AoOShm962VTsPUbqHt9OFMLnNt0U9eOrRuaxnlr5B0rsM9KlOWuyXxkHi+fCBheJH+xKVS nrTly/iwU4RIcGWeeyCKRUFEOf5rmErC1L13hEt56jn41324OvN4cZH1hTtgGJmOkZMc4Y pYHxfTFcWcKv0yOsai3+e0uxrtwl9g13ODeElyJ3TzyjHdlddUYurUatbux3KbvRaO4Zql pGnXsfeDjc3yHnIynbnog7JHl8/KY0lfMED5QJ7cd/nKluTD453VBRetCgfmxYiqFAucTN 1RzbMDj/7EzkTqGVzxG/UyYu52ds0vDo29BGasLkjegckbLhZlLzC/vekEO0XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFsP54VwFzSMw; Mon, 13 Feb 2023 17:52: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 31DHqPnI082088; Mon, 13 Feb 2023 17:52:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DHqP7m082087; Mon, 13 Feb 2023 17:52:25 GMT (envelope-from git) Date: Mon, 13 Feb 2023 17:52:25 GMT Message-Id: <202302131752.31DHqP7m082087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 99553344e984 - main - ofwbus: trim includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99553344e984929dd9f409ed30532902bc85791d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=99553344e984929dd9f409ed30532902bc85791d commit 99553344e984929dd9f409ed30532902bc85791d Author: Mitchell Horne AuthorDate: 2023-02-13 17:42:56 +0000 Commit: Mitchell Horne CommitDate: 2023-02-13 17:45:01 +0000 ofwbus: trim includes Nothing in the file today relies on these. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D38491 --- sys/dev/ofw/ofwbus.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index 5ea0ba313353..a466da546579 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -39,16 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include -#ifdef INTRNG -#include -#endif - -#include -#include #include #include From nobody Mon Feb 13 17:52:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFsP71Rnbz3rYL0; Mon, 13 Feb 2023 17:52: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 4PFsP66fZBz3srG; Mon, 13 Feb 2023 17:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676310746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zu827UAFCDJZ2QyysD17yyQmu723E55EWGkIYoQcOzM=; b=b2bCMO1nabyiyL0qTsr6NSPhRtq6xRL/sdi2Am+VQIwxt7TZ6SmmHAAbARzVUOnp9B2p4N bSMZY7iIXUt3dL2n8mjq9g/Kie9/xhXsuYY20b7Lbe1zni8JVhw3MXF1o3gdzSb2GqtoRy 85/ogZeS7ERNw0WZgdUDgBlnDS1aiZlNxn5qZCiBlVnRsDLL/nu5i6qZl61AQ6CVFVuTlV 4oBAEB3enkxOa4+RZTpHsUZar1JZ1ELPcbMxavQmfgLwzska5CflqIjK52hsJi01bFBThT kW+aIhFl+e7d5/65weJV32XoCTGfzz2mRlLRinJV/7pdwGCmrVIVDq6eIk75KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676310746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zu827UAFCDJZ2QyysD17yyQmu723E55EWGkIYoQcOzM=; b=fDX9XxuVocMAJxibSGKUprVLz0uJ7WtYlOrC5hw1v0/4s2dCrjXu6zL94vcLf/D6ng3F41 LPJ+Ht31h+8ygKXerCVSyd16S3GxwztlBmXEi06FkR6pFNrG/vAOpqcAb1Znb96A2g/ToG R6tRwHckKd1bfayY1jU1hWFJktmQmlOxX9q6frveWB9ovAD+D1YfIZ1hxdTP8NL2gS9p4Y x3Mkr824/6vMWu4n5HKSBgTtSa2i6KhnYDAe9f/CGy1IXd6kP9c28SNyfImhLEJ10Wh9MJ LXEPMyka5AwusDN7p41X//o1yHGbaT9I/CTcVhR6mInO7zd3PI7flB6X9TX3Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676310746; a=rsa-sha256; cv=none; b=hdI89sKmw4r0W6zLt4NzZpokd/G9e8TLfkhUg8PPbWFNB8fGrWGSjPI+Iblkoof6ap12Sx VZx4mmfwZyc+kLJlXDKCEbETdfJaGQSDovcMV6ffkkol7shdRm4bxEwkPQ9hSK0h/ADM8h LyZ6hz3gQth/+rfoCrFUaI4zxBihBR9ao2XER9HVW4egHk11rOcuy/G/70yWT9PhaxyaRi cKRi7FDs58VZxejBtqvlrIjvI2oRRc3gyKr7TCSWVRx6A4uhJJ0ErKhqevY8WGkU/V/xNB bKhjkmZZ/IeOAcO6stIT48LeYWVJl7YEUEwdOerEmPZOiW2wqNurxCjBPfpEGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFsP65BgGzS99; Mon, 13 Feb 2023 17:52: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 31DHqQQZ082112; Mon, 13 Feb 2023 17:52:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DHqQrC082111; Mon, 13 Feb 2023 17:52:26 GMT (envelope-from git) Date: Mon, 13 Feb 2023 17:52:26 GMT Message-Id: <202302131752.31DHqQrC082111@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 53d5e65eead0 - main - ofwbus: remove arm64 ifdefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53d5e65eead0f713c5e256018d46edbec0a96c11 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=53d5e65eead0f713c5e256018d46edbec0a96c11 commit 53d5e65eead0f713c5e256018d46edbec0a96c11 Author: Mitchell Horne AuthorDate: 2023-02-13 17:43:25 +0000 Commit: Mitchell Horne CommitDate: 2023-02-13 17:45:01 +0000 ofwbus: remove arm64 ifdefs Rather than using the DEVICE_IDENTIFY method, let's have other ofwbus-using platforms add ofwbus0 explicitly in nexus, like arm64. This gives them the same flexibility, e.g. if riscv starts supporting ACPI, and cleans up the #ifdefs. We were doing this already on riscv, but adjust the 'order' parameters. Reviewed by: andrew, jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38492 --- sys/arm/arm/nexus.c | 5 ++++- sys/dev/ofw/ofwbus.c | 25 ++----------------------- sys/powerpc/powerpc/nexus.c | 4 ++++ sys/riscv/riscv/nexus.c | 10 +++++++--- 4 files changed, 17 insertions(+), 27 deletions(-) diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index a2e043ff7c31..0cd960ec3682 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -182,8 +182,11 @@ nexus_attach(device_t dev) if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0)) panic("nexus_attach irq_rman"); + /* First, add ofwbus0. */ + device_add_child(dev, "ofwbus", 0); + /* - * First, deal with the children we know about already + * Next, deal with the children we know about already. */ bus_generic_probe(dev); bus_generic_attach(dev); diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index a466da546579..cc8c66170cdb 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -54,12 +54,10 @@ __FBSDID("$FreeBSD$"); * The ofwbus (which is a pseudo-bus actually) iterates over the nodes that * hang from the Open Firmware root node and adds them as devices to this bus * (except some special nodes which are excluded) so that drivers can be - * attached to them. + * attached to them. There should be only one ofwbus in the system, added + * directly as a child of nexus0. */ -#ifndef __aarch64__ -static device_identify_t ofwbus_identify; -#endif static device_probe_t ofwbus_probe; static device_attach_t ofwbus_attach; static bus_alloc_resource_t ofwbus_alloc_resource; @@ -67,9 +65,6 @@ static bus_release_resource_t ofwbus_release_resource; static device_method_t ofwbus_methods[] = { /* Device interface */ -#ifndef __aarch64__ - DEVMETHOD(device_identify, ofwbus_identify), -#endif DEVMETHOD(device_probe, ofwbus_probe), DEVMETHOD(device_attach, ofwbus_attach), @@ -87,28 +82,12 @@ EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(ofwbus, 1); -#ifndef __aarch64__ -static void -ofwbus_identify(driver_t *driver, device_t parent) -{ - - /* Check if Open Firmware has been instantiated */ - if (OF_peer(0) == 0) - return; - - if (device_find_child(parent, "ofwbus", -1) == NULL) - BUS_ADD_CHILD(parent, 0, "ofwbus", -1); -} -#endif - static int ofwbus_probe(device_t dev) { -#ifdef __aarch64__ if (OF_peer(0) == 0) return (ENXIO); -#endif device_set_desc(dev, "Open Firmware Device Tree"); return (BUS_PROBE_NOWILDCARD); diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c index 2e756782d47d..c0d4f8396cfa 100644 --- a/sys/powerpc/powerpc/nexus.c +++ b/sys/powerpc/powerpc/nexus.c @@ -146,6 +146,10 @@ nexus_attach(device_t dev) rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR) != 0) panic("%s: failed to set up rmans.", __func__); + /* Add ofwbus0. */ + device_add_child(dev, "ofwbus", 0); + + /* Now, probe children. */ bus_generic_probe(dev); bus_generic_attach(dev); diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index ae0bfe388484..33720475844f 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -165,9 +165,13 @@ nexus_attach(device_t dev) if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0)) panic("nexus_attach irq_rman"); - nexus_add_child(dev, 8, "timer", 0); - nexus_add_child(dev, 9, "rcons", 0); - nexus_add_child(dev, 10, "ofwbus", 0); + /* + * Add direct children of nexus. Devices will be probed and attached + * through ofwbus0. + */ + nexus_add_child(dev, 0, "timer", 0); + nexus_add_child(dev, 1, "rcons", 0); + nexus_add_child(dev, 2, "ofwbus", 0); bus_generic_probe(dev); bus_generic_attach(dev); From nobody Mon Feb 13 17:52:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFsP83RCQz3rYR7; Mon, 13 Feb 2023 17:52: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 4PFsP807kWz3srY; Mon, 13 Feb 2023 17:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676310748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7W5RiSsqc2VVLoZuTUL242bNFgQiCfdq9ZNWTK+g1E=; b=ewcMQYh+Zr+eVL3Np/9/vAs2jmAH0b3CdN8lnG59c+IWaMshvpd+vZtyRztmgNS/KOoCmd C23sFmpyZgT7eCFEsB714VFMjOht6PDTuKtZzTyB5a1rNqcmElleoHgiMXmwDfMI7XdX1o mnF7fiBQu/sAjE2vmw6xPdQtgbwyRw66BxUZP7lyyFpyV0pjka78Yu0+1KXIqkON9weqrP WytbhubbECDG/9yBTEb14zJ1m5MwcdVHEU2qLslydK2++E7+U/SgRdAjAH9JGCmYCrgWSs uUT3XZUiJQTxGyHjMM82gQOvqhL4w0WAh4DEC1AiUbEcrymBUlGsaSgf8oc3cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676310748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7W5RiSsqc2VVLoZuTUL242bNFgQiCfdq9ZNWTK+g1E=; b=Ta3WCfDhKYwQLpHSKC/KV6WF0xzX+JCghNosDzZjnWUn05hESMT2Atm1I1EJQbSkaQI0ND tSMSkHzOEtDUQTFqc7UwmCwKaTG1OxAWZnP5BTAE8L7nixH6LOr+h+2Qyu8HEkm/e7rbA2 xUj6NDiR7cI6/E+4auKeKpEMrINoqZ9Fin7Omsyzi+Z/tlEaa3gzUG+q39FQq94ab441a4 1IiyfUxwotKkJOOos5fNH9zugux9iJblci+33JL6n8RQI5ZSLZo8Zrw1cHz3t58cDFWZCo 6xeIJub2gTaYpIPy28SqRMSJOAyYTL3V9zp575QHaxOR2bHPxnog0ZWxj317Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676310748; a=rsa-sha256; cv=none; b=SvYqpeEry/eTQnDKY2YaTmVHx9Xc9GX4nYH65uXGDTBeFD8biGyEUzMZdBIsw4IMMY60hS A2Z46NCacpYTyKaDMzFkh2CS8utWj/qJB0wglJ+Py/pNx9KNxlT6sVF3JHufhIldNlUvRR +yDP3SGePbD/iw9xAw1KpTwG1A1CUxukxmHLTc8YALrUrNsxvQJrZP+iYPI3CQ9Aofr3Tm MIS08bYeZ5oKBlBVdywazeFSjfZPzRsPj03BRk56VjanTbBSF2tg0mgsdSnwX9+tTQAPr5 ya5NHllaaKaWNV1DAcOnYzlZYJfKG86VsOKTOiyfR0Ci1rQjsXP97wftaeM0JA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFsP767KwzS9B; Mon, 13 Feb 2023 17:52: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 31DHqRdA082145; Mon, 13 Feb 2023 17:52:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DHqRAB082144; Mon, 13 Feb 2023 17:52:27 GMT (envelope-from git) Date: Mon, 13 Feb 2023 17:52:27 GMT Message-Id: <202302131752.31DHqRAB082144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: afca197f5240 - main - ofwbus: only allow unit number zero List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afca197f5240ce2c2c7abfe5c9fbc50ba55f178b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=afca197f5240ce2c2c7abfe5c9fbc50ba55f178b commit afca197f5240ce2c2c7abfe5c9fbc50ba55f178b Author: Mitchell Horne AuthorDate: 2023-02-13 17:44:03 +0000 Commit: Mitchell Horne CommitDate: 2023-02-13 17:45:01 +0000 ofwbus: only allow unit number zero ofwbus has always been the root of attachment for OFW/FDT platforms. It may have simplebus children, but we expect only one instance of the ofwbus driver, added directly by nexus. We may as well ensure this remains the case. Reviewed by: jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38493 --- sys/dev/ofw/ofwbus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index cc8c66170cdb..80d013cd06ee 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -89,6 +89,11 @@ ofwbus_probe(device_t dev) if (OF_peer(0) == 0) return (ENXIO); + /* Only one instance of ofwbus. */ + if (device_get_unit(dev) != 0) + panic("ofwbus added with non-zero unit number: %d\n", + device_get_unit(dev)); + device_set_desc(dev, "Open Firmware Device Tree"); return (BUS_PROBE_NOWILDCARD); } From nobody Mon Feb 13 18:06:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFsjs3gx8z3rZty; Mon, 13 Feb 2023 18:06: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 4PFsjs2vtJz3w1C; Mon, 13 Feb 2023 18:06:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676311617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9yyPBdIfORxmlMUFlHLkDz/YQIDVvzNhp450wn7non0=; b=UVcBLiVX4uajM3+VpWlxYk6BF4/PDMRu6cO1Od3YoylxURmMNG6xzweO4klYTtpNB7RGmH jQw8+2yaQUaJm8iVUo46L3gpanbyT202tIj8/+eXiIP1q1e0zXMBRCqchHc7dvf4OjlmlG xE2weSqjtOijqVDhrBnFMoUrmeGdbfcZG4KpRkbq7Kww9iVUq2mFDJxhv84d+aFGScP0qM e1++Kz2BkD/21cS1en9POPUaATpHw6xlbUtZM3ikseyuN9gjeVJ9Ch4UIFNA0zxdnFsZAw s8X0vQ/L7OwgIirKuaohHHTE4RxT0L40+bnUbbd1hs3ZnQ9KHA/m/OJD74+Ipw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676311617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9yyPBdIfORxmlMUFlHLkDz/YQIDVvzNhp450wn7non0=; b=ZekuBwlBZPwsZOE+AAG+GAv1O01qqGj4Ngwx1WkLBK3GUhow2T3UNG2se+6S2+Os2s1w88 eLxYf3jOquuIfaxrBZxTtS9IzcZXhVGR6XrxzegYOxuVxxdwgvvYDse19dsvMktZKphTET x1qaOuK+l1pxIYW5pUS7SuS1itcE3vwYGwjXYC/+NRnIypfBxIQI1mbpeND5PGiXNcmsnA ht8zD8TULBE0BcBkmu5ilS2bW1iMhLvcLwFpgBb+BqGCKNE4/UsiCffhWd7af1ODieeOzt RTsem6+B2SkvhG46phXKvD//G0ffS5/XWqDaBZnNcQYcWQOXAiRzNj5rd8xVNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676311617; a=rsa-sha256; cv=none; b=D5I8qAwVwyLXyBwIW2Lidn6wTws+tzg5NICm/nCJaEPM36WmUaf7cZle3sMDtXNf7HiKfm gUCuhxIDl8iweAhVZAEqD4/4ubnPC0JnWT29CLULmOqwAGANMNjdSAyCsWuQV8HVPc7GoJ io5TJl52fRwt7NNRj5WpT0DCvaecgNS/FIkWrn5aXJby7wKte+0hMbiS+iBraM3C9EyLlv CT8mAMb3aT53/AO3+nx+mP3eIV5fX2St7+aD4r34nQlxXAiGOVHaRhb4YF2gq4fm5h0LSU /QfaeixKZB9thUhv44rk5MyC63Ovw2XXn1TtuI5cLfyPKfnLj0M2mr2m3PCtRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFsjs21tzzS7L; Mon, 13 Feb 2023 18:06: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 31DI6v3E097604; Mon, 13 Feb 2023 18:06:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DI6vqF097603; Mon, 13 Feb 2023 18:06:57 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:06:57 GMT Message-Id: <202302131806.31DI6vqF097603@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ec6b2822188a - main - ipfilter: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec6b2822188a8103807b5eb5d70128c1ae2e9c6d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ec6b2822188a8103807b5eb5d70128c1ae2e9c6d commit ec6b2822188a8103807b5eb5d70128c1ae2e9c6d Author: Mateusz Guzik AuthorDate: 2023-02-13 18:05:57 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:05:57 +0000 ipfilter: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 6 ++---- sys/netpfil/ipfilter/netinet/ip_ftp_pxy.c | 4 +--- sys/netpfil/ipfilter/netinet/ip_htable.c | 4 +--- sys/netpfil/ipfilter/netinet/ip_state.c | 4 +--- sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 16 ++++++++-------- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 0dfc23d3dd1f..95c8b73e6388 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -924,8 +924,7 @@ bad: int -ipf_verifysrc(fin) - fr_info_t *fin; +ipf_verifysrc(fr_info_t *fin) { struct nhop_object *nh; @@ -1010,8 +1009,7 @@ ipf_ifpaddr(ipf_main_softc_t *softc, int v, int atype, void *ifptr, u_32_t -ipf_newisn(fin) - fr_info_t *fin; +ipf_newisn(fr_info_t *fin) { u_32_t newiss; newiss = arc4random(); diff --git a/sys/netpfil/ipfilter/netinet/ip_ftp_pxy.c b/sys/netpfil/ipfilter/netinet/ip_ftp_pxy.c index b305094e9704..fff99c8c5b33 100644 --- a/sys/netpfil/ipfilter/netinet/ip_ftp_pxy.c +++ b/sys/netpfil/ipfilter/netinet/ip_ftp_pxy.c @@ -266,9 +266,7 @@ ipf_p_ftp_setpending(ipf_main_softc_t *softc, ftpinfo_t *ftp) void -ipf_p_ftp_del(softc, aps) - ipf_main_softc_t *softc; - ap_session_t *aps; +ipf_p_ftp_del(ipf_main_softc_t *softc, ap_session_t *aps) { ftpinfo_t *ftp; diff --git a/sys/netpfil/ipfilter/netinet/ip_htable.c b/sys/netpfil/ipfilter/netinet/ip_htable.c index acdd441e0476..3e67242f3624 100644 --- a/sys/netpfil/ipfilter/netinet/ip_htable.c +++ b/sys/netpfil/ipfilter/netinet/ip_htable.c @@ -177,9 +177,7 @@ ipf_htable_soft_destroy(ipf_main_softc_t *softc, void *arg) /* Initialise the hash table ready for use. */ /* ------------------------------------------------------------------------ */ static int -ipf_htable_soft_init(softc, arg) - ipf_main_softc_t *softc; - void *arg; +ipf_htable_soft_init(ipf_main_softc_t *softc, void *arg) { ipf_htable_softc_t *softh = arg; diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index 463416f454a9..2e6913db8f88 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -4551,9 +4551,7 @@ ipf_checkicmp6matchingstate(fr_info_t *fin) /* Initialise the array of timeout queues for TCP. */ /* ------------------------------------------------------------------------ */ void -ipf_sttab_init(softc, tqp) - ipf_main_softc_t *softc; - ipftq_t *tqp; +ipf_sttab_init(ipf_main_softc_t *softc, ipftq_t *tqp) { int i; diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index aa55ef2d8aec..6d4ec5e5a408 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -542,14 +542,14 @@ ipfclose(dev_t dev, int flags) * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -static int ipfread(dev, uio, ioflag) - int ioflag; #ifdef __FreeBSD__ - struct cdev *dev; +static int ipfread(struct cdev *dev, struct uio *uio, int ioflag) #else +static int ipfread(dev, uio, ioflag) + int ioflag; dev_t dev; -#endif struct uio *uio; +#endif { int error; int unit = GET_MINOR(dev); @@ -585,14 +585,14 @@ static int ipfread(dev, uio, ioflag) * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -static int ipfwrite(dev, uio, ioflag) - int ioflag; #ifdef __FreeBSD__ - struct cdev *dev; +static int ipfwrite(struct cdev *dev, struct uio *uio, int ioflag) #else +static int ipfwrite(dev, uio, ioflag) + int ioflag; dev_t dev; -#endif struct uio *uio; +#endif { int error; From nobody Mon Feb 13 18:10:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFsnt4dp7z3rbP0; Mon, 13 Feb 2023 18:10:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFsnt49q8z3wg3; Mon, 13 Feb 2023 18:10:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676311826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tc+18dZRKAD9TY8xPfMq8fZ9E7TnijLcrYEujwHwVmM=; b=u+MHlf9hvyJSoRzuP5z5jhSy9xorbzsxY7DRNZsoTjvLAIJD9b2fZKTWX7MkEOaLKL6nni IrmqzLsHZCx3pMWetUTk8lQ2uWkVoq97sDTgxXkzOlJATc12bhkH9mc2hB3gZogyLqsOAy 2dZp6XvIIlNxVQQs0lzG2msymMz5dm8BE1lGXYdNpmMRKlDWEghpzvR8uUeu8jrNsQ+u1i V6xCQiwXv2l34N2pNiwpkmAA9HNwinDXlKyhAfXDMqao7FhdMm5z/wudhkzcCf/j9RKaDD l1+24ldUGTu1a85Ui6I24Ud1oNe1X3FPAQauMYwsX8FjT8nMJJdZuAVvUSLsyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676311826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tc+18dZRKAD9TY8xPfMq8fZ9E7TnijLcrYEujwHwVmM=; b=MYua4JD3sIpvoF8yFhDPYmPRkq8WooiXN9lFE/A1HlT0o57lmuoxzp38721r0X8a3XB25Y tEbNWuIHQ9YvsmmmbAcBUR9PGpvy7+XVQg8/utrOR3Jpv2Sy4eLnpw2lX9UiN+ocPcDsGB 6gUFoe015mCn0PL4qRFNTr5eO3DJX/nnbhZrDNRRc/xqxOH0tTgcB/HOkNjkZz7slR76PU t2SRxCivLSAhdyhJP+ecr+IArs42Ph72sCKBtTJEz5JRd+fc+BtogEzgKXiLIHHkbz2wAW NIsz/k79+Ck/C9Xs/nQs+ZWBV5LrJyA3h9yF68X1yAKxWX07VgRn5Ybb8M3bDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676311826; a=rsa-sha256; cv=none; b=yg5KbVew1gNdSx+ofM7G4UNg8XcNzWI2xpApT5eDDqR6fO3KOzWIIpUFyXCJ9Ll2VnG4Ds aJ+8zBJg/ZfnDluYnnspvnD+G7C4cHkY0CIX/v36VxDcwIRbl6/PkQor5qNTahp3ctOeED iHKkyRqUL+iZxWkLpSg1JYQ1VtBtbTaY1qv785kQlL9dj04RDFoMVya0rqv+4TCgLStlBR E5+tb9i4JeN5kVudkGF0Nmq6/IHGrlaavgJHJTyF8iM9t3oFuAHSiR2DZ1HWnpqiAbiTVE 4cRmtwHtQ7pn92Avd+AbU9nt5DFiEwBsQC0GGAuv+rGsFpKOnle09davlycQSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFsnt32pMzSdp; Mon, 13 Feb 2023 18:10: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 31DIAQKf006555; Mon, 13 Feb 2023 18:10:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIAQEE006554; Mon, 13 Feb 2023 18:10:26 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:10:26 GMT Message-Id: <202302131810.31DIAQEE006554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: a4532c4c5a86 - main - intr_event(9): fixup Nm field List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4532c4c5a866c90de4967d516241149892cca2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a4532c4c5a866c90de4967d516241149892cca2e commit a4532c4c5a866c90de4967d516241149892cca2e Author: Mitchell Horne AuthorDate: 2023-02-12 18:58:25 +0000 Commit: Mitchell Horne CommitDate: 2023-02-13 18:08:12 +0000 intr_event(9): fixup Nm field --- share/man/man9/intr_event.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/intr_event.9 b/share/man/man9/intr_event.9 index 70ea1e1bfc43..58322caee604 100644 --- a/share/man/man9/intr_event.9 +++ b/share/man/man9/intr_event.9 @@ -36,7 +36,7 @@ .Nm intr_event_add_handler , .Nm intr_event_create , .Nm intr_event_destroy , -.Nm intr_event handle , +.Nm intr_event_handle , .Nm intr_event_remove_handler , .Nm intr_priority .Nd "kernel interrupt handler and thread API" From nobody Mon Feb 13 18:17:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFsxl2DPKz3pdcT; Mon, 13 Feb 2023 18:17: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 4PFsxl1Xbqz3xXM; Mon, 13 Feb 2023 18:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bXghk/VkBu0MYyfPKpUFqJmqOIcZi0/KOI8+FM9jCeM=; b=LiNGjaoX8oGV2tuErIkHNbyAJYQSwi6jA7Ht6eZahLoY6MlvVbix2hbHExG9jTTeAchIbw 8yg0CI8qJCoAlgOJQV8GUwzDn2IDIYGgvsHGmhxhMXTtmeesA9xpNvwRxhW3BSAAEHshrb Ev70R/p/pBXNRwsc8rbAfARbagh3TEhuPZm86KDyuw8mTNK05wFEdiyHdyeM0bV/I0DZLa aY/xKBFkUzL6G/63OznB66Ql61nMgFB6ZGO2jdsL3hTKOnA0W0pJ/cNsQuHhH0+MFam3wQ hKYQ5KJFbO6C+UtZAx2/rftrQfNE7mLLgw9LfT6TTwJ3stkC9hjIVoB3ZAy7Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bXghk/VkBu0MYyfPKpUFqJmqOIcZi0/KOI8+FM9jCeM=; b=SNAxaZlWOnijHWU8CqLKHOMezYoigkwd2lb95lUSzPZ9TvfSllsqdjzhnwEMtC2D8YqwFN PF2WrBsoUd9iQGMGqIhGRYgzOlU4ywvsPKwtpJq55QkNGaw2iPfIBRsDCKwJuEEKkV6UiK Z7NXHyGpKxMYBDXP/IrTLLO8nyegCM5WfFEuWsOnR/N0DeXWyMvVOn/q6AZ+hlZLQDU88W zF25DdeSNvnq83Pjacqvat9WsbWSqkIghmpQtqIrz7kkRUpDIkBAymfRAQXgAYTlpapmCn pgsQg6ADfzCHs+v0qFuwcxc1qUqucKftzv9lZ9DVRDISnYsNGqD/yrF75JqYWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676312235; a=rsa-sha256; cv=none; b=Kbl1FeOoU91L5ENXE8zVYjeTdizW32n+ULeOYvCvdgzSU9mTwBSltcJB7+fV0ZkfVFCZjI ASUE2VQwh87KFVeZcZ2KchmyJW5GpecJoJESH2DCr6GTGA5gMgRl+2OoXa6q9CEYvY4/mD gSYwsc7xnA1NrSdmtkWoNixym3xBGTn5hxFlpvYIJR2j7IXKyRabbSRYsR+OD8n8209rm4 zRMgKK19SJvPrbj5N+eoZ5BmNeqYG4ro1CMKtuXA8zja1UZJPkKgLHRaRuQ3TDQYIrnZAN pqNVMJd3t0EgB2KmkENyoBkG64tDXXvB8Qc6WZ55hALmqkjh53Tr3pbhjrx+5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFsxl0TmZzSlN; Mon, 13 Feb 2023 18:17: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 31DIHEgl012282; Mon, 13 Feb 2023 18:17:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIHEWa012281; Mon, 13 Feb 2023 18:17:14 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:17:14 GMT Message-Id: <202302131817.31DIHEWa012281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: e4542107d8a6 - main - sctp: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4542107d8a6d3bb5174136e7e6b7262c0343337 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e4542107d8a6d3bb5174136e7e6b7262c0343337 commit e4542107d8a6d3bb5174136e7e6b7262c0343337 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:16:28 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:17:10 +0000 sctp: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netinet/sctp_syscalls.c | 43 ++++--------------------------------------- 1 file changed, 4 insertions(+), 39 deletions(-) diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c index 5ae1da98e5da..a4824e963bfa 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -139,12 +139,7 @@ sctp_syscalls_uninit(void) * SCTP syscalls. */ int -sys_sctp_peeloff(td, uap) - struct thread *td; - struct sctp_peeloff_args /* { - int sd; - caddr_t name; - } */ *uap; +sys_sctp_peeloff(struct thread *td, struct sctp_peeloff_args *uap) { struct file *headfp, *nfp = NULL; struct socket *head, *so; @@ -211,17 +206,7 @@ done2: } int -sys_sctp_generic_sendmsg (td, uap) - struct thread *td; - struct sctp_generic_sendmsg_args /* { - int sd, - caddr_t msg, - int mlen, - caddr_t to, - __socklen_t tolen, - struct sctp_sndrcvinfo *sinfo, - int flags - } */ *uap; +sys_sctp_generic_sendmsg(struct thread *td, struct sctp_generic_sendmsg_args *uap) { struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; @@ -320,17 +305,7 @@ sctp_bad2: } int -sys_sctp_generic_sendmsg_iov(td, uap) - struct thread *td; - struct sctp_generic_sendmsg_iov_args /* { - int sd, - struct iovec *iov, - int iovlen, - caddr_t to, - __socklen_t tolen, - struct sctp_sndrcvinfo *sinfo, - int flags - } */ *uap; +sys_sctp_generic_sendmsg_iov(struct thread *td, struct sctp_generic_sendmsg_iov_args *uap) { struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; @@ -446,17 +421,7 @@ sctp_bad2: } int -sys_sctp_generic_recvmsg(td, uap) - struct thread *td; - struct sctp_generic_recvmsg_args /* { - int sd, - struct iovec *iov, - int iovlen, - struct sockaddr *from, - __socklen_t *fromlenaddr, - struct sctp_sndrcvinfo *sinfo, - int *msg_flags - } */ *uap; +sys_sctp_generic_recvmsg(struct thread *td, struct sctp_generic_recvmsg_args *uap) { uint8_t sockbufstore[256]; struct uio auio; From nobody Mon Feb 13 18:24:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFt6L1G86z3pg3C; Mon, 13 Feb 2023 18:24: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 4PFt6L0qCwz3yf6; Mon, 13 Feb 2023 18:24:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvTEAYMCHOLq6f9LB++jvbxCNlc/5nEqtxFTGQ8j7sw=; b=yVAYPa5AxIes/k7V5JCNWa8DTpiAArSYJrbxlHjfkjTimAkds0o+bq8bk2qSez1EN93SeO KIpOQh3MjPvFIjBD2VLFSnMxDTBcRUEkgR2EL3RZ3xrb7lXLpcBrv8VzUvmhuWMlbmd2Uv goNVSBDI2gaRhFK5Wj0mmQrfdwOXFHKYzJcQ/0JJAruzcw71Umqbj0kxg2VFioazweFA+6 aETYRpxI4cbkyfiWkyjm0c5OKS873nvuCk3gOFdIKetFtvi9bB12UZjT90eatfRHVaH6E1 5RcU+HdR1WpzOE2Mq1nZQ0e5P/vguXOFiat6Yf3U66fh2UHVGTWSmG86XmKPTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvTEAYMCHOLq6f9LB++jvbxCNlc/5nEqtxFTGQ8j7sw=; b=YeKWp61oCqV+fCY5QULdYQfv3KF0plu1g4jod1QssuyXaRc6/KEYdsn4vImPwLPnOGT1Kf 8pNFTyki2UO7f+GLsGXs5P43TE/NVsNflacFOGh2fNR8USDu+AdFfbPecBTprdD8R4yE22 0s7nFdb7lnCpV2qHA7wxh5IQg5uvNNq0PTYV4IZS+tN8Q3Hd2M/w5tHwg4NkAeV9EFjRot hMHi7+UpuJo7LbEGmRTpYgCO8VwRrubh5FIY4HoCzIT4C+4hhZgLrqlz325qH3Ua5klwHi QyS3L2qPIin/m67AzrIzsxkClWsiTcJB14ij3SwQGLfcnyms+ImFscZiq2b8pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676312682; a=rsa-sha256; cv=none; b=nx/k953eegoA5Q5xXQaVG2GBibmePuYp833vPbQRKvOZL4jqA4cW7UWOF+7QHm84RMqq/e +78nGzWalbMzmHjDtCMF/zNR5/TQjATAr8XjlHseLzFaBgkuw+z7InaDYhLnoUy9r4ATp0 4LG9mqDFT3y491nRoSrcnecyuEs8993RUmtCiUuTX1DP5J63eSXy6fM+Ju9ad1ogrqqqqO EH5FT4hNflI8u66FSX42o+qZPZxQGaLaOvyZgnvROAHkuWyqdHs9NXjSscE0zZwtCHNc22 Q5Njv9JQLbHr+THBuEJIWY5ufDZ8WnUfk9r4ayfFfqtLZLgEg5fHxMgchsx96w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFt6K6zZhzT2m; Mon, 13 Feb 2023 18:24: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 31DIOf7j025991; Mon, 13 Feb 2023 18:24:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIOfR9025990; Mon, 13 Feb 2023 18:24:41 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:24:41 GMT Message-Id: <202302131824.31DIOfR9025990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 00343b4adcfa - main - uipc: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00343b4adcfa01d7e64ae345768af8f11a10d816 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=00343b4adcfa01d7e64ae345768af8f11a10d816 commit 00343b4adcfa01d7e64ae345768af8f11a10d816 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:20:29 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:20:29 +0000 uipc: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/uipc_syscalls.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index cbf45e53f96f..496e93d76bb0 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -278,12 +278,8 @@ kern_listen(struct thread *td, int s, int backlog) * accept1() */ static int -accept1(td, s, uname, anamelen, flags) - struct thread *td; - int s; - struct sockaddr *uname; - socklen_t *anamelen; - int flags; +accept1(struct thread *td, int s, struct sockaddr *uname, socklen_t *anamelen, + int flags) { struct sockaddr *name; socklen_t namelen; @@ -447,18 +443,14 @@ done: } int -sys_accept(td, uap) - struct thread *td; - struct accept_args *uap; +sys_accept(struct thread *td, struct accept_args *uap) { return (accept1(td, uap->s, uap->name, uap->anamelen, ACCEPT4_INHERIT)); } int -sys_accept4(td, uap) - struct thread *td; - struct accept4_args *uap; +sys_accept4(struct thread *td, struct accept4_args *uap) { if (uap->flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) From nobody Mon Feb 13 18:24:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFt6M2Wqdz3pg0p; Mon, 13 Feb 2023 18:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFt6M1yB1z3ypJ; Mon, 13 Feb 2023 18:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8gqhJJurY5p2LYb1+DO7jcPOwlGwALzPFREJ9HoR6DU=; b=TrVMLTELn5ODImmfeUVY5wmNrD9CZG7bng5h6U3+1cG2Z6B6G9mC67mTPyKDMa4bhNgPJh efdEle2ZzdkVLmVUwdlZ68+kNt/kWdGxuc4GU2oFy+U+s7B1UTVhRo0F96diuaNdAEORsL enFeJWvVL5Ek08bKykYeLreaTKpnbBujjU8Y6eqeK38B1wlBksEyUS1naIwa8wOptPuNPS ssrNflTZMV0y2ZvKrKh5uLc9aKAH/4rO3tMn9cickjjffhD9xyBR4GIVtsKJKitNm63kaR t2MP0zIIT6grDCNAOvFc2Yr7T7EKnkkBAbu6lAY+CRAw+OerJn/iJlEmRWHz9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8gqhJJurY5p2LYb1+DO7jcPOwlGwALzPFREJ9HoR6DU=; b=rQxZ/IbRWO04s98yWh2nsUapJVXSl69gpusNg5so0ZzSFo9CuR6sN+sXadPyAnYz2knctq WReCkoe9Loj5QuslJVpMAGyRy91IYk4JejgKr9WHkM50D5XidwdmqTo/4G80KBlFqXzcwL uwHePAfOpdt6TMNrhE8luG4I8TkNgLV/LzoQDF+Mc4MQl377CGdRmJaQYslhvAr+0jZ+Iw sCIIz1Z2CCTNFOTKNhDdPYBmzJJyDUGdeD099M6K107eFdXun71Uv5cXRv6pEwUlTK6tSY b4tVbQM8yrkTl6iONzyant1F8M5sDl4M5ewI6oj+YLBLB1YvR9hj73nh2tDx9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676312683; a=rsa-sha256; cv=none; b=ivJARsyeJ2vJlXV2xNY8TogSYFL8o6fpvJQyStCPtg7l/TXCgnuTLeSXtTlHEdBKtPHk0r uInzViAJjRAN3xi6W2/Jpq7Jcr/QKSu+fbe+6/DdyQVaNRxJ/bxc9+kmyUiFaOpdqfwOvz hXLoRxWCZTsi41DWJIqyA3CE0dUhcttpQyc+pbNjFMpY2LlTW1kISQ5HOmRoISUONhH3I8 aMKbzfHNtqILg2TPbZIr/9t8UIOoUryV6kTC9be1zB5kjWzjmh+JiBuvOxD4w/6B8O0MBJ w8aSzFiyi0Xb2wIzN97igQBS48DFA+F4xjIlLmhUYW1w4M/j0xXUwnUD3rUOIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFt6M0qgGzT0D; Mon, 13 Feb 2023 18:24: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 31DIOhRd026016; Mon, 13 Feb 2023 18:24:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIOhaF026015; Mon, 13 Feb 2023 18:24:43 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:24:43 GMT Message-Id: <202302131824.31DIOhaF026015@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: bbb6228eae32 - main - vm: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbb6228eae32d30d7f968f1ebe44a5e2d524d254 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=bbb6228eae32d30d7f968f1ebe44a5e2d524d254 commit bbb6228eae32d30d7f968f1ebe44a5e2d524d254 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:23:21 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:23:21 +0000 vm: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/vm/vm_glue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 21d49d976e5a..377df8c18e39 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -580,8 +580,7 @@ vm_forkproc(struct thread *td, struct proc *p2, struct thread *td2, * the process was still executing. */ void -vm_waitproc(p) - struct proc *p; +vm_waitproc(struct proc *p) { vmspace_exitfree(p); /* and clean-out the vmspace */ From nobody Mon Feb 13 18:24:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFt6P071yz3pfrh; Mon, 13 Feb 2023 18:24: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 4PFt6N4xNwz40MK; Mon, 13 Feb 2023 18:24:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEYLN1L3y0j8/U9MBdX9TOEn/50NzosDmg8Os4c04u0=; b=DxS8vg4NJdjliYOPWN9Q/UCIrAQVfGXn/aHkWFBx80ewYo1cLzCTICYS6T44kxPPiPDXg1 Ooiosw4EoRNTSmRIgUEdPNu0mz+9XsGPQyjyRpYaChYxy3PqgkDlPvroZ6uQqRvW+0t0/o sEUp9i60Elm6mx9F8/OyrA5EOjSVL0O933RUQY8HJg5+QALzu22SZHdg4xsBsm92MfPLzs 0Sg/GLoxk8V3xlskl8rjZESx98us9HWa790v+LdijaaTeP2fJ/CgdmHbkjI5mQN4Zc0oQN /sebdVXj9rmZzvjP7TF3+UHELuLube4QyYZ3iWrljEm2GgC+H1MbPc3QJ+VDXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEYLN1L3y0j8/U9MBdX9TOEn/50NzosDmg8Os4c04u0=; b=ng3hwSAmpQjWA1TV1roQzH/x1hw59/+0dNldxghiu8lEJlM2e9IeeY/ftSfkgeuhL3GIIl XIog+cDYvVJXQd0f8SKQkh2OM6rdq+TMoqym/Y8Xsp+5z0FooN4ljx8l4ku4XYZDKZeRzX 3UmpIiufMJUBW99/DzFTFYR67O4yqGZPUPYu2dee9MimT6f4MSIlSa95D4BBR50Zy/vKkF +KnI9M2yDkFcrNvqkMQ51kIBuOQQ367DOEMseSTezAMvtz8uDyATwqBNhRugDK0/1BQYuS aGCfs4KYdolibWatP1hGloMw7Qh0CAUTX1q7r3rd96VXqrdm+eOqpUSq1t/vYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676312684; a=rsa-sha256; cv=none; b=cqGlRrwafkgOShut4SMTvmA3PgqYysx/+qNFFsZqCn5FC6Uwxdvobjyqi+s+DsrU4G0dpn MYMij3dBSFnSnN6BulGKLzJ/5pGqdHbeFoyvx1vLGXa2cCD4SBy7SmwK9tK1WUgEM38JbV XCQKHrP0629yLnXgzNe6wUsTpXaX5uQ8u7IcdoK+cowP4jSVHR2JBSmPAQIXwFVHN5N917 dAr8pSATwFTgDvrKI6K0jniegvobOsosNmS9VYNEy9/N5+utb4QHFot3ef5WuM8vd6eG+h q1Nbq0C/V6MIADbyI7bY7xNPG+N8Exgrk58P1AiVPJSAlsbjdnehVGc65hbGOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFt6N1ZTBzT79; Mon, 13 Feb 2023 18:24: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 31DIOiQg026040; Mon, 13 Feb 2023 18:24:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIOiC0026039; Mon, 13 Feb 2023 18:24:44 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:24:44 GMT Message-Id: <202302131824.31DIOiC0026039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: a066bba2daea - main - ntptime: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a066bba2daeafe5e956abedc43ce64594985391c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a066bba2daeafe5e956abedc43ce64594985391c commit a066bba2daeafe5e956abedc43ce64594985391c Author: Mateusz Guzik AuthorDate: 2023-02-13 18:24:13 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:24:13 +0000 ntptime: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/kern_ntptime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index 6d03413a3113..b632cecdfadb 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -653,8 +653,7 @@ ntp_update_second(int64_t *adjustment, time_t *newsec) * is selected by the STA_MODE status bit. */ static void -hardupdate(offset) - long offset; /* clock offset (ns) */ +hardupdate(long offset /* clock offset (ns) */) { long mtemp; l_fp ftemp; From nobody Mon Feb 13 18:28:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFtCF0b7Dz3pfn3; Mon, 13 Feb 2023 18:28: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 4PFtCF04Ybz40rB; Mon, 13 Feb 2023 18:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yObD1xtcEtnrxiRt7SVpLjjFSLnWb2p4yNcEBSdkSJI=; b=AaJT4LZpGZfaAASZqqa6Sdjl9n06/S8pThidlMuPSpBoal2DCAbWYDEks/GyGLsd6pg6/n Q48JkH4/8wUH3+LpZCaOIUS57P6T8pSoobsz3AK0XjNojlu+Qkw6vzh+lRCRwqGLpoxwcH gdTy2Lo0SRjZ3q8ysQUv73LvSTCzDFfF/SddyjP3oEpsU7XdQANW3SfTIMQ8RYyn4BKAze LgELNEYYCPfHQ71CA3mlWQlWmglkM2pqdGidA6NTDgfI8B2/ioEtJXIbAmwkl8qMXtNfhz UCLFmhj/zVV17eLfS6qfAMgLc54huaTr9ivPFLkNzhpwBlWmgyLecZkk28ob4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676312937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yObD1xtcEtnrxiRt7SVpLjjFSLnWb2p4yNcEBSdkSJI=; b=v4EzrAH0Xa3jmJg5Euvg/BcI3Zh0tsjg0+fqG0WZaJ7/R95z+31JjFwG89ZX3sNjtjYAGU jXMMAhi/wCVtZGq3JpCmnM4VkYgfJLj999maBRXoRLePOMmbGgo7js9oMuV4IfjdNy2Emf ETGIsCtwUXeQ+w740ykjQVVpmDnnvAHaLbrFjqZnOrkCF7UWMPijtNpEnn0DFET68fX5Y2 5lgH6xw50dIbInF+mFIhNQm/ICt+pepDTVbDHOGtyhYQCsYlQ+ivv909rmz7HNqYE6DfEX gQ6WdKBPxhDOdToX+jV2Y9UME9sq/vW9asxhZQANw88HTwmWjkkd3G7+vFDr9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676312937; a=rsa-sha256; cv=none; b=lZft8SJouiYzsVXYPs0IECNfWfLGzOF/zLDAs3HCY2j86mX80BQqsRF4UDO11KUi+Duv5b Ny2fI9ZEoqyJHhXZx8Wp468CLA6H/J1uJVmejfFIK5Wbu/LjXCaZJIPrhuLJnTcGsSULiO oOPrgy1FPjzXtXT89uOr9QS0Tlbx8yas16Ia5aeZy4Mzl/wFH6+hwJzPm3UTAr6FgM3BEd fNTANKN2htEwFaZgryXRzqBxNfe0pd6qS5IXXRcBFNvjA+E81vb0EHpJ1faQgm2o9dMSl2 VVXSRYwVvp2p9PJy0f9WYkuuZ2Pc83fXICnHweF3wNUV/kw+hQ0FMw2VaWM84Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFtCD6CbSzSgP; Mon, 13 Feb 2023 18:28: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 31DISuh4026656; Mon, 13 Feb 2023 18:28:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DISu5k026655; Mon, 13 Feb 2023 18:28:56 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:28:56 GMT Message-Id: <202302131828.31DISu5k026655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: aa0b46948e92 - main - speaker: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa0b46948e92bbfb09002dce083993c0b2465c56 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=aa0b46948e92bbfb09002dce083993c0b2465c56 commit aa0b46948e92bbfb09002dce083993c0b2465c56 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:28:09 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:28:09 +0000 speaker: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/speaker/spkr.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 86b58cda9843..b12effe4ea93 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -403,11 +403,7 @@ static int spkr_active = FALSE; /* exclusion flag */ static char *spkr_inbuf; /* incoming buf */ static int -spkropen(dev, flags, fmt, td) - struct cdev *dev; - int flags; - int fmt; - struct thread *td; +spkropen(struct cdev *dev, int flags, int fmt, struct thread *td) { #ifdef DEBUG (void) printf("spkropen: entering with dev = %s\n", devtoname(dev)); @@ -427,10 +423,7 @@ spkropen(dev, flags, fmt, td) } static int -spkrwrite(dev, uio, ioflag) - struct cdev *dev; - struct uio *uio; - int ioflag; +spkrwrite(struct cdev *dev, struct uio *uio, int ioflag) { #ifdef DEBUG printf("spkrwrite: entering with dev = %s, count = %zd\n", @@ -456,11 +449,7 @@ spkrwrite(dev, uio, ioflag) } static int -spkrclose(dev, flags, fmt, td) - struct cdev *dev; - int flags; - int fmt; - struct thread *td; +spkrclose(struct cdev *dev, int flags, int fmt, struct thread *td) { #ifdef DEBUG (void) printf("spkrclose: entering with dev = %s\n", devtoname(dev)); @@ -474,12 +463,8 @@ spkrclose(dev, flags, fmt, td) } static int -spkrioctl(dev, cmd, cmdarg, flags, td) - struct cdev *dev; - unsigned long cmd; - caddr_t cmdarg; - int flags; - struct thread *td; +spkrioctl(struct cdev *dev, unsigned long cmd, caddr_t cmdarg, int flags, + struct thread *td) { #ifdef DEBUG (void) printf("spkrioctl: entering with dev = %s, cmd = %lx\n", From nobody Mon Feb 13 18:34:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFtKk6rRrz3pgkN; Mon, 13 Feb 2023 18:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFtKk6Kbdz41tQ; Mon, 13 Feb 2023 18:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cqwuzh8jSKuYvVQYga5bhi481D4/tze0UDrp0xVElJk=; b=bwhnaxGWvCHuh3OK/R9WeQvqbzNjA1HguNC0Oy5Kwy5wQwSKt6PfyeBO6h0qsGqljLMvoh 6fSe2zhRgg5OlMhYVs5PtWqbditn1YHawPPMQFAxcQeqErytKyooqHGye24c6ueVKr5C4V aEN3uS55q/cxnrj8vC5IEwcPJTPEQND6eewh6HpmedQSdy39Hyt4mGoNuEEDOn2hJdpFUG b8M0qfPEs+WIFWLAAuyXJ0xorlkG2J7JXeSqSY3xi5dZOT0CsrHeH4FuPs5hXIlKcYmqQG PdYXmXqb3gHUQZWYJgCC3LM/Kk/YO1NQ7fpLUBtBaRppxwI4zuWpGe/ggcOkqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cqwuzh8jSKuYvVQYga5bhi481D4/tze0UDrp0xVElJk=; b=TcbEqxEAxkZn2FvUAMNlLZ/NDMAWo2r/rSOuyMMF7owMXZivyXwEtgQd8p/QYjy1I7HJTu Cod7IrOpgR0UmY0ItCEh+6+j2Fcjg8GJbKlZ19jvfopee2o34rDO1nUO/H6nIYovNYUXMY zT0g4iPRK6eByBXqcCtbo+1RIr0FLce90loxvE6Z08zoVL9zEaNWWiqHo/C+2h4fwcJrmA VDbEuXCukKR0vVu2ajdZY9Z16xQJXOwh8TymuUXT5s/nLdNDQF6wI8KzcP29+KSgqsRjTQ xDc2nx0K4Tell+qlx5D1i8O/HCmmg387MwIkWDDPkd+BAyiX32tUY346jO2X7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676313274; a=rsa-sha256; cv=none; b=IqC55M0Y3/pZZEBpNFlirlj1DYz15tA6gcTMywqrUICax9/BHBqycyk2YLzmnPws8N9OoC 1xqhpT5Bu86d46XetkPXI9/AXzNu9kg5ZxdQudKRrzBRbHjUU9nl/1IdP1wC9jd2rjs1wu PBg5dEEQQ1gThciYepQROODP9m9zjssLLEkS6mLZm9OqEZ/UD8p5iwbzqK3ZrhUcPl6XBk CXa9owjQFwfSAxfSJVEzbb0FzfYgs2SEi5BOP5DjM5ZwGKfw+2p5IRJodfwRVudH+81izt dQOR4svzup8qlt2yTu39OphEpR8iu3v7t0/cdgwuXKJe8gS6RH9cXxAi/t9+MQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFtKk5HYMzSxx; Mon, 13 Feb 2023 18:34: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 31DIYYn8040145; Mon, 13 Feb 2023 18:34:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIYYou040144; Mon, 13 Feb 2023 18:34:34 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:34:34 GMT Message-Id: <202302131834.31DIYYou040144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: c492eb60b303 - main - altq: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c492eb60b30328035129a11c222aaded4d499b44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c492eb60b30328035129a11c222aaded4d499b44 commit c492eb60b30328035129a11c222aaded4d499b44 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:32:45 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:32:45 +0000 altq: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/altq/altq_priq.c | 3 +-- sys/net/altq/altq_red.c | 4 +--- sys/net/altq/altq_subr.c | 43 +++++++++++++------------------------------ 3 files changed, 15 insertions(+), 35 deletions(-) diff --git a/sys/net/altq/altq_priq.c b/sys/net/altq/altq_priq.c index bb679baa236d..6d26116a601b 100644 --- a/sys/net/altq/altq_priq.c +++ b/sys/net/altq/altq_priq.c @@ -575,8 +575,7 @@ priq_getq(struct priq_class *cl) } static struct mbuf * -priq_pollq(cl) - struct priq_class *cl; +priq_pollq(struct priq_class *cl) { return qhead(cl->cl_q); } diff --git a/sys/net/altq/altq_red.c b/sys/net/altq/altq_red.c index cd180f4fca2f..e6fc423f48b9 100644 --- a/sys/net/altq/altq_red.c +++ b/sys/net/altq/altq_red.c @@ -523,9 +523,7 @@ mark_ecn(struct mbuf *m, struct altq_pktattr *pktattr, int flags) } struct mbuf * -red_getq(rp, q) - red_t *rp; - class_queue_t *q; +red_getq(red_t *rp, class_queue_t *q) { struct mbuf *m; diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c index d569aa3f3ab3..c8b98beaba07 100644 --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -148,9 +148,7 @@ ALTQ_FEATURE(fairq, "ALTQ Fair Queuing discipline"); /* look up the queue state by the interface name and the queueing type. */ void * -altq_lookup(name, type) - char *name; - int type; +altq_lookup(char *name, int type) { struct ifnet *ifp; @@ -164,13 +162,10 @@ altq_lookup(name, type) } int -altq_attach(ifq, type, discipline, enqueue, dequeue, request) - struct ifaltq *ifq; - int type; - void *discipline; - int (*enqueue)(struct ifaltq *, struct mbuf *, struct altq_pktattr *); - struct mbuf *(*dequeue)(struct ifaltq *, int); - int (*request)(struct ifaltq *, int, void *); +altq_attach(struct ifaltq *ifq, int type, void *discipline, + int (*enqueue)(struct ifaltq *, struct mbuf *, struct altq_pktattr *), + struct mbuf *(*dequeue)(struct ifaltq *, int), + int (*request)(struct ifaltq *, int, void *)) { IFQ_LOCK(ifq); if (!ALTQ_IS_READY(ifq)) { @@ -189,8 +184,7 @@ altq_attach(ifq, type, discipline, enqueue, dequeue, request) } int -altq_detach(ifq) - struct ifaltq *ifq; +altq_detach(struct ifaltq *ifq) { IFQ_LOCK(ifq); @@ -219,8 +213,7 @@ altq_detach(ifq) } int -altq_enable(ifq) - struct ifaltq *ifq; +altq_enable(struct ifaltq *ifq) { int s; @@ -247,8 +240,7 @@ altq_enable(ifq) } int -altq_disable(ifq) - struct ifaltq *ifq; +altq_disable(struct ifaltq *ifq) { int s; @@ -270,9 +262,7 @@ altq_disable(ifq) #ifdef ALTQ_DEBUG void -altq_assert(file, line, failedexpr) - const char *file, *failedexpr; - int line; +altq_assert(const char *file, int line, const char *failedexpr) { (void)printf("altq assertion \"%s\" failed: file \"%s\", line %d\n", failedexpr, file, line); @@ -293,9 +283,7 @@ altq_assert(file, line, failedexpr) #define TBR_UNSCALE(x) ((x) >> TBR_SHIFT) static struct mbuf * -tbr_dequeue(ifq, op) - struct ifaltq *ifq; - int op; +tbr_dequeue(struct ifaltq *ifq, int op) { struct tb_regulator *tbr; struct mbuf *m; @@ -345,9 +333,7 @@ tbr_dequeue(ifq, op) * if the specified rate is zero, the token bucket regulator is deleted. */ int -tbr_set(ifq, profile) - struct ifaltq *ifq; - struct tb_profile *profile; +tbr_set(struct ifaltq *ifq, struct tb_profile *profile) { struct tb_regulator *tbr, *otbr; @@ -425,8 +411,7 @@ tbr_set(ifq, profile) * MPSAFE */ static void -tbr_timeout(arg) - void *arg; +tbr_timeout(void *arg) { VNET_ITERATOR_DECL(vnet_iter); struct ifnet *ifp; @@ -754,9 +739,7 @@ altq_getqstats(struct pf_altq *a, void *ubuf, int *nbytes, int version) * read and write diffserv field in IPv4 or IPv6 header */ u_int8_t -read_dsfield(m, pktattr) - struct mbuf *m; - struct altq_pktattr *pktattr; +read_dsfield(struct mbuf *m, struct altq_pktattr *pktattr) { struct mbuf *m0; u_int8_t ds_field = 0; From nobody Mon Feb 13 18:36:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFtMQ4fz3z3ph0R; Mon, 13 Feb 2023 18:36: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 4PFtMQ49qDz42H4; Mon, 13 Feb 2023 18:36:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iVs+Yp1xAqAZv/J8+xsTarpycZCgI5oZMmtOYut/jbg=; b=CAzsLYspjXsKEsBqWVeW1yyk3OaEwwEmc1xtEXtL+lNvAds/HMmd9/cI8X+q8Ki+5ewHDu 4S3EoCUekmyvWtKXxzsOXxNjkmNoQqCXqn0R3gVjfOPAEeIDbc2k4Uh43zD35Kq/JiEGRM Lpg8EvyLP59AqJpKm29zAz4ujGJ+bHzDudCxm2wSdwYTKxzbukudibPc6MQCxjHSj3FE/3 zZMZO9iB39pbAovocuUS/j+QOjT7hnkMzofs8u84+2ki4DbC8xtSAYSIzDtbjuep7fBxZs A0ApvYHd6UFG9MdCjDtZO0XmAIlSn5X8gpS6H/npxMTtG+sqf3Khr28aQPIjAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iVs+Yp1xAqAZv/J8+xsTarpycZCgI5oZMmtOYut/jbg=; b=fcHSOZjNMfu6FQQnHRCcfht8vt4rJ0y0TB6ijAIWb8cFRPgdiBtZkkXH0IiXsnDK84kDSq MsPtuMupygBWFdarJUJOOUTL9Y6SYAG7zj8cXqouRmurPXA3/im+jpWJ7/LSrUho1SfqAq hMlDBT6Etda+IeEruQ/FzE2xhU2GIWzZlbK9HteH9SG2KQa1IshD+SG9Cwk5fTBq08bJDe HnEjUlpNFAw9AIRqWqsD7Z2Btm/WHXhDf46+n83gCg17dkKMQC0S/GUCBQrxMm3K0kOLAZ 2Pz1gkVs0y3OckfeBifu36idWF97P0aldQglrQMBqzwqaPQ5FNej1ApBp0HJ0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676313362; a=rsa-sha256; cv=none; b=jMaNle7TUVfqcg+1nEAtdfyKJu2+rDP1znv0s5nGbLabn9kAqGJ86dKeV9UPoBqMD9rurB 9Um1u4TFoSqvgdxk2EId3HkN3BO7PTAERb1qA27Meovl3mU/m5wsXuoZWx8OSUmncwk1ax oLJ5G71UIyVpxJG9cgq4FLSb1Gax+6GDg1ZtHlIKpK8b6fTZfH5uIvN/gP4Pz/mwsHqJxv 2tn8HAqDbQVFB5+QPERv5HCe4TKp+Zg28DCu9fCf5lgL4Pf8p2WoqqHMzrrgHW7sAlkduc xWp29eCIcuxNmxqoyUJvHwGDlorENEa6Vwqzt2g5DLrRFIyZBIBSDlLWXQjQtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFtMQ3D9mzTDr; Mon, 13 Feb 2023 18:36: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 31DIa22m040429; Mon, 13 Feb 2023 18:36:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIa2OE040428; Mon, 13 Feb 2023 18:36:02 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:36:02 GMT Message-Id: <202302131836.31DIa2OE040428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 85d4483d5ead - main - ufs: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85d4483d5ead1c94acfce44d3bfd03236536f9b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=85d4483d5ead1c94acfce44d3bfd03236536f9b9 commit 85d4483d5ead1c94acfce44d3bfd03236536f9b9 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:35:54 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:35:54 +0000 ufs: ansify Reviewed by: Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: --- sys/ufs/ufs/ufs_acl.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/sys/ufs/ufs/ufs_acl.c b/sys/ufs/ufs/ufs_acl.c index c05fade2d645..112cbf5f3018 100644 --- a/sys/ufs/ufs/ufs_acl.c +++ b/sys/ufs/ufs/ufs_acl.c @@ -354,14 +354,7 @@ ufs_getacl_posix1e(struct vop_getacl_args *ap) } int -ufs_getacl(ap) - struct vop_getacl_args /* { - struct vnode *vp; - acl_type_t type; - struct acl *aclp; - struct ucred *cred; - struct thread *td; - } */ *ap; +ufs_getacl(struct vop_getacl_args *ap) { if ((ap->a_vp->v_mount->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS)) == 0) @@ -606,14 +599,7 @@ ufs_setacl_posix1e(struct vop_setacl_args *ap) } int -ufs_setacl(ap) - struct vop_setacl_args /* { - struct vnode *vp; - acl_type_t type; - struct acl *aclp; - struct ucred *cred; - struct thread *td; - } */ *ap; +ufs_setacl(struct vop_setacl_args *ap) { if ((ap->a_vp->v_mount->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS)) == 0) return (EOPNOTSUPP); @@ -681,14 +667,7 @@ ufs_aclcheck_posix1e(struct vop_aclcheck_args *ap) * Check the validity of an ACL for a file. */ int -ufs_aclcheck(ap) - struct vop_aclcheck_args /* { - struct vnode *vp; - acl_type_t type; - struct acl *aclp; - struct ucred *cred; - struct thread *td; - } */ *ap; +ufs_aclcheck(struct vop_aclcheck_args *ap) { if ((ap->a_vp->v_mount->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS)) == 0) From nobody Mon Feb 13 18:37:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFtPN0b0fz3ph5q; Mon, 13 Feb 2023 18:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFtPM6tjqz42qb; Mon, 13 Feb 2023 18:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YOZRThvg0ivoAM2jFUZyE5DZ9KDmypPe7cRKaqTE8eM=; b=GFJyLZMoX7toUmC1xxIuWeXa3Sj4pFtzBSrsqFE7XlucmBkvStmzKXF7jBC5E8Uj01oRy/ YoO1TWKWbjyeegsn8B579s7RRE/3oNZheOnFtiiwWtrfgvIbf2cCL1BSC+pEhB/GxSMhSQ KUkwhd0wF4Q1UoWr15iCaB4SQA1FwTMySlXPLi3t1SbDoiutmWpwNfcqIrH/uA8sKMWf7J TSRSnQMcloo/CPy/2NrBSBGe2SYWUE7FSX90y6tJhBJ8t8pFlRRsKCdAko9Ikr6URZkUib 4IKwTQ60BXWDyWXSAOTyC2XxFr1lWrvt/WdMl+EO0jv8nDolwxWZKLuzYndZAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YOZRThvg0ivoAM2jFUZyE5DZ9KDmypPe7cRKaqTE8eM=; b=d6ikl2kaMnetxOJL0n7+0zveK66avutTnKiwfBzL1R/nVNdBaSdb7TpNlO1J9PtKvbfP6S t5dnglC2MVS2lw+tP7uR8dfSGtMQpqMVXJzrPHoim3/kR0syFJfEFCuxcE2bQUJXNCq8Uv a893OxQ7/0O8Vv1Ll3GUZIQyqh1AFuN4hfXs2I3LVFl96nGQVwqs0UVFlakrIryrmaqE9c sXUxqNuEzLzlAqlaSqYywnlhtda31X/z0aE2GpLtQq2eNnZIMMyvVOP4gjadadSwd4h8Lo jsgR6pE1VwnaGV6IPAbQ8TEcPgGw9DIyGqADNt14EJRDrJLwzP2AsChdxtylPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676313464; a=rsa-sha256; cv=none; b=MJxOOrqUkUOolUiekpWeUTm/YisyW1OCHS7rLzGlnPuhuk1m37xTgaRfjJw7JhHSlK2vwm hIzkv7t4RTlcIehJ1OPxIMguSGwaUVg0HmhvD2RClWHaWVMxUoOiH6txGC4GTqVz/XwJd7 Fugc17voypIDcVz9HhZP5+eW70pkBwmbhgr2x3o3CdnJeusN4vMNvBhuZf9dLwgRSd43W4 SCgwuZwtQ7cNxpAkYOI85o3xnq+fGpX9vHT9z/NMOXe56CDDI5KvuV6KdKYrHxaQmK4fCv G+PwHboZen4g0iUKiR3Z8k7f3/aNgxpq+/T0XIg5I2ABom6WH+o1Fi3nAL/PoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFtPM5x5DzSxy; Mon, 13 Feb 2023 18:37: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 31DIbhG7040749; Mon, 13 Feb 2023 18:37:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIbh7n040748; Mon, 13 Feb 2023 18:37:43 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:37:43 GMT Message-Id: <202302131837.31DIbh7n040748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 1842178ad311 - main - xdr: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1842178ad311267b9c81aaeead9c7b5f2724f8c5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1842178ad311267b9c81aaeead9c7b5f2724f8c5 commit 1842178ad311267b9c81aaeead9c7b5f2724f8c5 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:37:31 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:37:31 +0000 xdr: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/xdr/xdr_mbuf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/xdr/xdr_mbuf.c b/sys/xdr/xdr_mbuf.c index 0cd0b639da68..1f61e7613434 100644 --- a/sys/xdr/xdr_mbuf.c +++ b/sys/xdr/xdr_mbuf.c @@ -158,9 +158,7 @@ xdrmbuf_getlong(XDR *xdrs, long *lp) } static bool_t -xdrmbuf_putlong(xdrs, lp) - XDR *xdrs; - const long *lp; +xdrmbuf_putlong(XDR *xdrs, const long *lp) { int32_t *p; int32_t t = htonl(*lp); From nobody Mon Feb 13 18:38:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFtQ30lM8z3ph5y; Mon, 13 Feb 2023 18:38: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 4PFtQ30CZ9z43DV; Mon, 13 Feb 2023 18:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LqmoeIiNXn0DxKx8npKwgo7Nx3MMOTFzAwYjrKxJ3eA=; b=AoeeQaRRAIlDP9zAhpw8rV9VjutbBJb2/FzqWB7P0CtFujybzEkOG9j0XXcjjBQ5hvzu0s O+JgOuWVb+/nc9HnDSErpigBxQbXHJsR9b3bs0NHVAnEvtomLSUfazWi3nYLBqqaYNYJrR R4DDiqzLwOqZHlT4ZWXow9Kh43LUyJjrJswwMyf+LKK50F2jQZTax0JYD9tcQFu8vT/R5K hl2A6ER25eTsxJoS8wN1lDuKUHPWdlsMSRUoM7XOloqe8YC15AjYlhV1pvjTnghEqP7SOa P2SgD0fNUN37GcQj9L9MEgfJOWCg5+Ugt2b9AGpz/tCzYVcVwL6+MxA9NZCZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LqmoeIiNXn0DxKx8npKwgo7Nx3MMOTFzAwYjrKxJ3eA=; b=leqz7vTDAbNoOVep1CIfz13FiAIeHqXsLy89/YQmlH60FItNO17TLn1CxZDokYSxxsu/gQ 2T2DMJRuyoV3d37G7EQmpXsS0usvJlxKcG3zVHOrOrJpyf+P8iMmA4zBLUOUG1aoRD2MQG OCYjubiM4spfoc8+/JZWwcCiKN4/7hIdAF4fKXE+/PrC81x2aILDRtXRg47yPEfU31tIL2 hS2Uv6UUR+R67PvPe/vWyUv56hKq8oiB7x4C1f6bPXdcKPBiQRBPlQpXked5Tv0G2k0FbA hhOQpu1+sPEEh2qDbwmKEv/Dw+8pIRuCbq2acpUVlUXXMSWI8ok0TP1lSthtXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676313499; a=rsa-sha256; cv=none; b=JZSsaQkuAqtbDYWv7lFiWFe2dA0LLFZMNjy0B6ePD5sDaA3YojHmA+vxJpfEY46TbdElJ0 46ZhjzaotcHedgLNsFtUl75ylqej0+1Dh2MttMRCGfy0C2uRGi3LjqpQ35U7E2DndJjh0A vNEygE9vkUk9PIzMACei3z/hbb4AUsKEYVqf2NySZc5+FoFAkRtnznDyUBIeUMkaZ1qfu3 g/yuvVA33e5XZaAFBi/UEx1YC+FTPJn25nS/rWZ0hrGfKtPIf7mihKkO3pPqX8f2Om6GQ1 /LQyav2uoXqMtEIc09hG+vC9IpX4/vj12ncReslQoJ1h33phu+2/R9W20FvWUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFtQ26MSWzSmY; Mon, 13 Feb 2023 18:38: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 31DIcIaG040917; Mon, 13 Feb 2023 18:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIcIde040916; Mon, 13 Feb 2023 18:38:18 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:38:18 GMT Message-Id: <202302131838.31DIcIde040916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 937b00ac0d2d - main - tcp: add missing void keyword to tcp_stats_init List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 937b00ac0d2ded92e241994c8557d13d68c29b58 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=937b00ac0d2ded92e241994c8557d13d68c29b58 commit 937b00ac0d2ded92e241994c8557d13d68c29b58 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:38:04 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:38:04 +0000 tcp: add missing void keyword to tcp_stats_init Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netinet/tcp_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stats.c b/sys/netinet/tcp_stats.c index 9a01bc789851..4baf964ff9b4 100644 --- a/sys/netinet/tcp_stats.c +++ b/sys/netinet/tcp_stats.c @@ -92,7 +92,7 @@ static int /* Ensure all templates are also added to the userland template list. */ __attribute__ ((constructor)) #endif -tcp_stats_init() +tcp_stats_init(void) { int err, lasterr; From nobody Mon Feb 13 18:38:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFtQp1RMRz3ph3q; Mon, 13 Feb 2023 18:38: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 4PFtQp0tClz43j6; Mon, 13 Feb 2023 18:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GB+cz7gGDQn35MZE5O7wZDpHLW/9gwCvB+99bQ0f3fM=; b=g1cJ6oWpdMdbkvvbKeCdwJfegGjiDtXq0wLUYdV+MN5tRdScjAouHF2XkWXVGheuRaxO1O 3NwD/fu4EE+gVXqYYKFPfFuMDJacYBw3uFNrtCLAmI8Wl9lpfkxIEBxwoe2+GdPr0QtbNY UvmR4TTp5311OvJFH2pgkJzCidtn5p3EnZbb1lOM+weMn4FzwZ/M5Ql7nZiVzhCXTWaThg Fx943TdDNiIY3Z1Pf0KzFZxu6kajT0RiMiplr/KHuzg1ksk1anAEYqVYc+KR7YtijpJ+cY AXAr4EXSAqUDFa8MhuQkg4XLYTOajIldfM/3DgC/uUUr48ctgO9LOsJBeuVkqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676313538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GB+cz7gGDQn35MZE5O7wZDpHLW/9gwCvB+99bQ0f3fM=; b=CdknYLYRPTiqUIwZqag1q9fxHik0nS8v6v8CxDVCZ6+OtjsVhLQwcaEz4zvKB3dzUh8pce ++nPBahvLJHwmGFJXJ94t28OOhBcoXzkBBPjZXUTEYOH1qsVhne+RzPmypiR4Hx7koA/SX fb1zypJju7FvLKp2OQilgydCvIytbP/jljvFys7snnA6iMLileoYa0b8r1rVyyGsW5+N1t yPXnzA7TvHq1me65i+1A8AxbtVYeIiraPSNQGW8A1i8VbJ4m67Pe/s+bVkjXgwwTu/808s siekS2En37zgy1s8oGDz8lgviUqidUkhD+RVRQwFDqCVkeKWSN4brrb+5PS2uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676313538; a=rsa-sha256; cv=none; b=PeWBIohJ51owBOmUhleNuLG/l4pGJulUyQP6Qp4GsJ8U8+n2jTaoxuESeCVakZzpZuZ7St 50ZydUOYUa9jsbJtfpULnZVfwphRJI6peryQiZNlXneAnxkYSaPYVk/D9mceE9j4rOvBqy D6qjBljFyN6dNutoxqHa/yLFJJMjm/cHwRVfEXukYs3j/hQ8W6LHbC3smhQlICuQ9y+0DV O15wSWJ5e1qgguPeAIrYqNiluFCXsv/HW9ZR7wihm1ihaJu8WJHXzmbxacb+4wWa5XVisG Nw5SBEvFNGzWP6/KaqeZvPKg1CDE/GaJ6ZMDnKNA4mnSFPZrFM9YML78R5zbWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFtQn746czSjs; Mon, 13 Feb 2023 18:38: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 31DIcvn2041103; Mon, 13 Feb 2023 18:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DIcvtP041102; Mon, 13 Feb 2023 18:38:57 GMT (envelope-from git) Date: Mon, 13 Feb 2023 18:38:57 GMT Message-Id: <202302131838.31DIcvtP041102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 5173c996bc83 - main - psm: ansify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5173c996bc835988a903d23ad384429e815c7042 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5173c996bc835988a903d23ad384429e815c7042 commit 5173c996bc835988a903d23ad384429e815c7042 Author: Mateusz Guzik AuthorDate: 2023-02-13 18:38:49 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-13 18:38:49 +0000 psm: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/atkbdc/psm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 97bf1b859dd2..a308cc81cd3a 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -7395,9 +7395,8 @@ found: * All values should be numbers derived from getmicrouptime(). */ static int -timeelapsed(start, secs, usecs, now) - const struct timeval *start, *now; - int secs, usecs; +timeelapsed(const struct timeval *start, int secs, int usecs, + const struct timeval *now) { struct timeval snow, tv; From nobody Mon Feb 13 19:51:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFw2z0nxlz3pvV7; Mon, 13 Feb 2023 19:51: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 4PFw2z0J1dz4CcG; Mon, 13 Feb 2023 19:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676317915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bkwDRcigsCYQeHzffEAaf9LExWIqbzOhc1XfjuLjGc8=; b=Xur+pPeVvvdtIiseEAuFqKlXhqiHu8BRe8dNGpRHAfjaSHMGWOE21kjvJanhAr+ZyMzru9 r4cRqytFEPx58lI2/sN4iLatMtGwGjf46+/t9riZgRAXesZBz5lTAx6YsyK6eBLWHAShEM 16QMWb7AXwwXBDVO4MhHp229SBYrD1h3Xlh71+qkHMQhQLY1q/QwYLswybAuU6k9VxkSDC CmXlC6YFoDpeyeTiBAVRGQU3S/vuoreHBuKRdagzusd3yTXavPtYDuwuQJZAQB6CArJuKs T5TqrPl0jTveGJKJK6AJKi1EaVuAODmxUEpCvTVbb5lg4tEwTsZN9umy2ruP4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676317915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bkwDRcigsCYQeHzffEAaf9LExWIqbzOhc1XfjuLjGc8=; b=GRgDGTbRkiSaWOqCteAs0uWr2SUgYN1pQownR9Hy9ZaP+7ePFHcydHesqDEdgIfm1KUu2Z tDGYAWne2NW1i/V19LgZT1q7WRxjl8LvKc4HqDDedRlmXXpCOh1aoUbrTfpcHKkU9XC7D/ E+ekHXJNY7+3iUWUZi3JXg9yhaJoJCUSlHBZtlrBkEL4SA13C8ggBQXdXWPFN18iFIeiCT tVoQD3JzQpeRSfOPisfZ/rZrLfztaoZVmAHPH8W6rQUZam+oLC9q8bvuB3Pbot0xlCDxuy r251r9bavkTmjGRViHqZKifzD7TWyxSme9QCv9AlwTEe0yjeGuSLVQ/oNx9kfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676317915; a=rsa-sha256; cv=none; b=lQcQ7Ub1pUMUd2ltyckhUFjBx/9SpJm3YZDer39JeGb3N2gLW/MpXmus5naARYh2cwz1KI 9AXJtXoLtfbLekHi8egbvcZyn6nYs8JEpdGtzy9r4HZadYG5rNyqk40j28f0XPLEz8uPOl gx0u8LG1maNKfPdRWXvqrX74whQGFmt9ainu5lM33ZhRko6gRHFZ+vVoNfom4zyeHbGVIH 9ByynXzpVNTPOmHLKBbZE4U3zTzwGQuipTVDpIxfRjqvWkpwyi697HLUYaWhFpaDWZxCej hNwLLAIy/HfLblz6EETZv9Uef66vPvjipKiPy0SF7KSrorJ+9WF0rc+ntK4cag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFw2y6VBPzW9r; Mon, 13 Feb 2023 19:51: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 31DJpsFr051988; Mon, 13 Feb 2023 19:51:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DJpspq051987; Mon, 13 Feb 2023 19:51:54 GMT (envelope-from git) Date: Mon, 13 Feb 2023 19:51:54 GMT Message-Id: <202302131951.31DJpspq051987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1a1f7b7df7dd - main - zlib: Add proper NO_WSTRICT_PROTYPES too List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a1f7b7df7dd7c0638b6425dab4d1aea06441168 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1a1f7b7df7dd7c0638b6425dab4d1aea06441168 commit 1a1f7b7df7dd7c0638b6425dab4d1aea06441168 Author: Warner Losh AuthorDate: 2023-02-13 19:00:50 +0000 Commit: Warner Losh CommitDate: 2023-02-13 19:50:56 +0000 zlib: Add proper NO_WSTRICT_PROTYPES too Also move NO_WDEPRECATED_NON_PROTOTYPE to a better place... Sponsored by: Netflix Noticed by: jhb Fixes: b9f235ba3178 --- sys/conf/kern.mk | 2 +- sys/conf/kern.pre.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 2668b7e5296e..74c47479ab9e 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -36,6 +36,7 @@ NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical .endif .if ${COMPILER_VERSION} >= 150000 NO_WSTRICT_PROTOTYPES= -Wno-strict-prototypes +NO_WDEPRECATED_NON_PROTOTYPE= -Wno-deprecated-non-prototype .endif # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is @@ -53,7 +54,6 @@ CWARNEXTRA+= -Wno-error=array-parameter CWARNEXTRA+= -Wno-error=deprecated-non-prototype CWARNEXTRA+= -Wno-error=strict-prototypes CWARNEXTRA+= -Wno-error=unused-but-set-variable -NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype .endif .endif # clang diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 1a94709eaded..e347f9fb9903 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -280,7 +280,7 @@ DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${WERROR} ${.IMPSRC} # zlib code supports systems that are quite old, but will fix this issue once C2x gets radified. # see https://github.com/madler/zlib/issues/633 for details -ZLIB_CFLAGS= -Wno-cast-qual ${NO_WDEPRECATED_NON_PROTOTYPE} -Wno-strict-prototypes +ZLIB_CFLAGS= -Wno-cast-qual ${NO_WDEPRECATED_NON_PROTOTYPE} ${NO_WSTRICT_PROTOTYPES} ZLIB_C= ${CC} -c ${CFLAGS} ${WERROR} ${ZLIB_CFLAGS} ${.IMPSRC} # Special flags for managing the compat compiles for DTrace/FBT From nobody Mon Feb 13 21:09:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmm0ZPQz3q5KJ; Mon, 13 Feb 2023 21:09: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 4PFxml6yxYz4RhB; Mon, 13 Feb 2023 21:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pT0EXrfbLOEFhc+gZNX1Na1/hxgcmm6q4Q95QOGLMlw=; b=OoPc1maW3RR+ab5u5pvCet9/QOISwF+ly8HwFDUD6W6u9XIQKwNoYAy7kde9Lu44Tx6afP M2Elmyv3PNML+mTxv9ZsZA4qtUeLmReNpO0j/8QKvx9i5kaTXZg16pESiemTpf6onLUrj+ FAENcx1p9ECLiAItNJ4MymLdwBbMJ5bZ+GvkF3zQZIEjURyOd31uvVF1icL0mtcLhLV6z4 1FcccmU081d8a76VQQmEk8HVPE8gWrhjalF+RhZJXpB2DUtNrteoB+UAhkZoVaGixuvy/A AcxizNOZMeP1xT/PTAkVp+eJjppAUGdkbihyw/oaYnAe2W4Z39vmDn6jE5FhvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pT0EXrfbLOEFhc+gZNX1Na1/hxgcmm6q4Q95QOGLMlw=; b=nLQGrZecHmvE6cmoXeI6w5gCCXSTx+aj7Sk40DLqNiSvCP0yHJOvs4VvUE0Em6rQLQW4q8 Gnn404lcvPMiacdmgUR+acyGrMaefognRVf+1mONehtFsKSnZ8t6IIAiKiWuQ/WzUXsbQU ZtKvY4IiCe1bOAxkyvNZxkvEYIed/L6L0I6GNeKeDoYLod8/ZKd+LsrqFxyVwInLatCyDg SuiWt4kRbsBNi+ik+xIkiX0+w8XHhr7yWIV76xMhWsYLseTpTlooLTcqqNO05mQR/kqzue xOCQlgOJDCHbfgBIcfgPWw9Tt9N2rpn/nPJimNRLTn6Aj6vZtWo1f50BZO4naw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322584; a=rsa-sha256; cv=none; b=XpHb96ppbpCW/uiKQXL9pCtbi/jbnoKfSXs0zpfjVCgN2uxCZ56Q5GkOxiy3PEFOEKsa22 FIG4V/qcoOM0L8Dl2Q5aETvbNcyB5axOLIhwSUtXcSy/Q6/RL1Tor8WwmAFW6Yf4JE6abf phrJoNsivz1+zhdkbMwra1AHSl0XBCjX9vHGd9qyaJbYFGgFTguFTRgjtOdh/6/eUaSikV 9p48GxHQKRh7he4GoLztYefzg33cpKpeMps88tuMBxV3MTBATDnpRkliq+wwtPo2nzfJwR waZHGTom6AjsieXW6yCFJ39QOlrhjc5FK/zzdtY4Q2FbkqbNea4ywOB+FmrZag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxml5xX2zY4w; Mon, 13 Feb 2023 21:09: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 31DL9hgF056259; Mon, 13 Feb 2023 21:09:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9hUs056258; Mon, 13 Feb 2023 21:09:43 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:43 GMT Message-Id: <202302132109.31DL9hUs056258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a82a8a5e1935 - main - linuxkpi: Define `backlight_get_brightness()` and `backlight_is_blank()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a82a8a5e193587d819288c3c27f1c9472178e10e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a82a8a5e193587d819288c3c27f1c9472178e10e commit a82a8a5e193587d819288c3c27f1c9472178e10e Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-08 17:51:16 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:26 +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 --- 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 Mon Feb 13 21:09:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmn1JZ2z3q5Mt; Mon, 13 Feb 2023 21:09: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 4PFxmn0Wtzz4RWV; Mon, 13 Feb 2023 21:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uM68RcXpgbw+EhmlMlc2mJXKgF/HU5h2J2JtSY39vnQ=; b=wkO1qjfChUp34Ed07Tl5sj2pPi8XczJbZx4WCQI5NFwmo2pnQiWFeiXlphc+wEaFWH+1Ij V71b+Kn9p6Y0lmhmcoCPdhVQoWW2yHbLGrYE9c0JWmF5t/wAmBWX38RbraZAZeRH8p1PCe dA4X3M8dZ4rukFpB5O44hCbNpg/C8jeLHBmjCSL3+nsqTt2crUcjQw/+wQcpYKaKwnaxoU sgPWiLbrec46LRECPpBjvLau0QLUM51pMbBR4Dv7yN7W3NmPOYvRLek2ZBVn0tKHJnIedq qeyUx2m5yBGcYP4HpmmgEBl5Ujoi10VdF+dXI7H+BUP8ZOA3vyVGApPrNBsMYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uM68RcXpgbw+EhmlMlc2mJXKgF/HU5h2J2JtSY39vnQ=; b=Ol/HBXl8yRM9c5c2vMhByV+c9mK7AAglJOwYXK5YKtQCH2LLyKLywMQVtzJfBsejYH3YMh +pbYbwLkjDnfm5wjOqY7bY2IUyDv2uT0BIGj77vwTMwaFgn0vnqpGj2CBdB9Tuz55ZgQBJ IOCfmjRiehHcLDwfajGCZDtUl7cdiwQQgjL/D/lr7JOfquitng/6iZ9z/KIoXnhmhPfV3l F95ikwiOPBKiEPw7HQd6+oOn990Tpp8ZZSZFxJWPifw24quKxidELSVhjCgLDV5aKqbMEb ETsUFrxjI7Y8h4S31yUMRNUzFfkGl8+HD7U4mwMRM+Jk55lIWSUdxL2s9u/0ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322585; a=rsa-sha256; cv=none; b=oX7/RWl7pC5lmOafPrHfYZn2/9yrGHFtRHUm7UkIcnbvioTRDaoD+e2CFv7R4Ubm0+JjrJ k2tmc1mssyELlRl/vR4yPKG/bEiV1x/DcRDwv4TkFK11NuSAnrqFJQRfMgnPTIIxVACDUY q1yUl31dqeNHMKtO0mRnJWdoDpqSg9giFHdG1r3Q7ri0/SSLJmzHrKATyK4x9leBRZdT7z Sd6id3nLdc92N4vttL4OrgBMefphxkjd+fX12S8g+Rz51O5mIoexKNAv4aMjT6s4SAdCzp gFduop0tiWUggEzjQ8px+B09C0hqGWLid1m25LKCldqiP2/w+XE+ZvF5Kh7Qug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxmm6d5NzXYg; Mon, 13 Feb 2023 21:09: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 31DL9ifT056288; Mon, 13 Feb 2023 21:09:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9in6056287; Mon, 13 Feb 2023 21:09:44 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:44 GMT Message-Id: <202302132109.31DL9in6056287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: cf5416908658 - main - linuxkpi: Declare missing `DMI_*` enum entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf5416908658ed0e4f2ae72916dfe1a84d7fd61c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cf5416908658ed0e4f2ae72916dfe1a84d7fd61c commit cf5416908658ed0e4f2ae72916dfe1a84d7fd61c Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-08 17:53:23 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:30 +0000 linuxkpi: Declare missing `DMI_*` enum entries Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38532 --- 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 Mon Feb 13 21:09:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmp2LzPz3q5Mx; Mon, 13 Feb 2023 21:09: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 4PFxmp1Z58z4RZQ; Mon, 13 Feb 2023 21:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=66/kRhUkCSdUPS3FBLaKd0E23AnkDpQiEd/4g+koN5E=; b=e0ROi2XaekIyY4ForUoDb7BtKVoi6lL9fwxf8uVHD6yIgqoa5yajWyza68aHOpRFBiDzTl Yq0hmgHIo+kNEIFnf4sZB1iGnPqgft2naA0/wi4B9yIkyBRux6novWVUsnvaEMXw709fLi TUaeLqO421DtZ4p/eRG5OhfKYiG0UzdspxoBEuI5y2y2j4B+1e9rD2i6zH76/Vv3lIqgw2 3WMIscwiWlA+vRlo8mp53WqbRRiGtc7tgw+E0mAQjcjy7uZ0ORWFr3u3ti5K05Q5Qb2eeW aPvVjLHfSDYUucZ7fE9VR2C3qqRWwg4/nwtIICB/CV6mSQSZdaeJ7r6L/w/BSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=66/kRhUkCSdUPS3FBLaKd0E23AnkDpQiEd/4g+koN5E=; b=lM2dSI81gKd4+s4Bcbcm+Yknd3116weCNn9VmSfU5kUk5/1DvPuvez3XvWFu24Suve+kYj Vn9RCBH5LK9Jhou9UBIKn3H2Q+iLYc19ShBI4l69IpsPd5OhWuhNdeGM9DN305ANelvPhf 8gNWbT6mqLaTdQvu2P+b8VX7AmMiEkEUklZc1op78+/Dn0sgojImhqmn0B/etXVM6Vbrem raBVgvqGYlrjthpu/Mf1LCMXSA0MR1B6WO+WVHuH+G2AHdyOlpfYVdAbUeKADIcv/wI5R9 fHm9m6QFVz2OmiZ5ABvPH9HrBZWoz3qLMbxU33LUZEPTVZwu1poZJGgdQxhf0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322586; a=rsa-sha256; cv=none; b=YHHexaYPHoIyjmBEo9/HNTaiopLEC0AZz4OvBZUFiIUXXjlCOqLCYvv4lOAg7v803ZuFnm he5fXVH2HuvHmJ0WmZMyg/AfCW+IzLCq/EQyc771uhQCHt5QewouQF0KZTMuMI6ld6DAm7 OuO8DV7rq9pZd4RnFYCSZ10DQ4dTTXdXFdGB3MTELyKFXYPGFH9srD0AJk/d9YoP2gmW33 GfV/1iJ2xmId+tUHAIaQMduK5MZ2EY5ZmVihBva/0s5CtD2xFBXxLNvWUrFFML8mpCqDJM PQV8sx/qd/qI8EHolDe3KmL/lTB7TcOcV92jWL2L84dfMcMq8rqXj9dn7UN6+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 4PFxmp0SPhzXrW; Mon, 13 Feb 2023 21:09: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 31DL9jxw056319; Mon, 13 Feb 2023 21:09:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9jSU056318; Mon, 13 Feb 2023 21:09:45 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:45 GMT Message-Id: <202302132109.31DL9jSU056318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 1c6d8146fdec - main - linuxkpi: Update `vga_client_register()` and add `vga_client_unregister()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1c6d8146fdec8267712615c261bf6c8800f8ecfe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1c6d8146fdec8267712615c261bf6c8800f8ecfe commit 1c6d8146fdec8267712615c261bf6c8800f8ecfe Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-08 17:53:57 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:31 +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 --- 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 Mon Feb 13 21:09:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmq2YcVz3q5KP; Mon, 13 Feb 2023 21:09: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 4PFxmq26vPz4Rqw; Mon, 13 Feb 2023 21:09:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sS+YdkeZhyAMOuCkBqOBQANqdb2C8+tlJZuhPqGVR20=; b=o2io79f1HefXuUm/JTt0YVAWSLrxt0f7LfJHhRGbaJdRB4xTE9POClethY8HvRWn2U4Jaf Et1KRIqgCsX+qaXHv5Nr8AhIcP/yrlyrNH7+CaQ8PSz69Zsrwgu4t5L/6jM4JFFA4fWytX A53XDfed8YzQACRODA7n3EvJk0y3KhS1f5ADgsJ4j1WQw9Rp/Vy1Nq+/UvvAYRr2sqIjQd WE3RuHRZA2GccD22/SSfi8zB1ZnfFG+tr2hA7o14s4ugEnqlUfFzBuFbl7KNWShoAa0ch2 /EoJn2hAtILyu3O3P5UYFc5RGBR6gDbzc9F7APdBMd7EUFrkAwIuvV7qcCKkZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sS+YdkeZhyAMOuCkBqOBQANqdb2C8+tlJZuhPqGVR20=; b=e6O1sEvMt6QWvyKeudvjjOPW7Odlg9r5Rse0cq7LhosrbDl0S4v5BWFLxFTjnE0ILI93Mm IdAlEIOwM6TwiRpHFRTWvUjl7UIESHI1+IrDIlJ7Rc9U0dZYk1Hx9gHyjNUbkZqSKcpQGk XBDKnyArX3+8iHdfOR+LgXiWiTg4Ci5B1xFNoJCKWAzrJP+i4Zy/qq4z++pu/UnmMYowiH vsVs5cXGkY7CSU8Gp25nmTav5IfPFSXuH3INS2rNBXIf7fcRxEAU09ULSFSPNzSMKvgwCe N0TrDemm2nBvAQJ1hTkvOX6jOsAn953SShPe6+Rqns2ozm1D939KQglckU44Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322587; a=rsa-sha256; cv=none; b=mDWktXozSoS9slzb6DDaS6O+wEJTrdY23MxnQcJtGyE6F0ZPCkG2MSXzWlSapRTZglmW4L iMvTiuAO2AHbNE85RKpX4hJ/6SZW3xDOistxOY6lsWCJ/49XRIGJRI1gXQEaB5BHG0L6xu aSxQOwjnVen2Ps39ALe0twgB1N54zDYLYQosZdeyMVqHRPfwtWEAXV93UYnqbBPaantvOH 2G0IkEKdlzgrdyI2Pir9WbVpy4AEBben3viMW1JDRqFAA5BpBuHBe9aWXliOlUezEF+k0U n26861SfsxCFnwYwubADFIV1DWhKRZNVu6ikFZbdvjn+HAzg6CakJjOXgV5ZRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxmq1CBjzXrX; Mon, 13 Feb 2023 21:09: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 31DL9lal056353; Mon, 13 Feb 2023 21:09:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9loE056352; Mon, 13 Feb 2023 21:09:47 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:47 GMT Message-Id: <202302132109.31DL9loE056352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 5542309ec6eb - main - linuxkpi: Define `xa_is_err()`, `xa_{store,erase}_irq()` and `xa_{,un}lock_irq*()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 5542309ec6eba3af9e26c50acd654de462181b8e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5542309ec6eba3af9e26c50acd654de462181b8e commit 5542309ec6eba3af9e26c50acd654de462181b8e Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-08 17:55:29 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:31 +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 --- 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 Mon Feb 13 21:09:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmr3qJ8z3q5WS; Mon, 13 Feb 2023 21:09: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 4PFxmr336zz4Rrh; Mon, 13 Feb 2023 21:09:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdMG7b7PhKK2Q0PzHZ13GmPU4b5Kjvaua6aeFwkjMg8=; b=h1onaX1XbBSBuVgDWPP7BWWNJe9hZaem0d/1lnUDDEoSpGcAnzA+gU6RH/Zl/2WzIv2yk3 YAyz+k7LLCx6+sFnZUTqLNyrvWYI/kcl1Bl3VlgulnkTt9iH7z5fagLx1XmUqXmH/m2NvC me8zWEpT+KorPXCEHcz311bdiAdecRxAMkBFplcYS60KnzGOjnchQwEP8SOo86zZcaAJ07 FP6C8CjkaWYnFrXDrfyBc7LoQm7sFLnyMrwCUHVnYxjS6OQlXWkdelSKoXiHvGJ3HjVrN6 BdmwVr4BBlHuVzbVrfaBjeMypgKwmQ7VI+Gm8v6Rqj8Iklaw/MTvz0gtL6bFKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdMG7b7PhKK2Q0PzHZ13GmPU4b5Kjvaua6aeFwkjMg8=; b=uZcfJKzR8oRlA/nC4KK+LuSimcM3TQJjLTDBkuXritpuq4bAHDw4uC20Ex13r2bPKVcrnU Ax/8eNzLZxvcYJDKjo2F5fjh2l6REYRcr6omhf7PBvGvshbH11vNq+VEg9IZNMyW6L1dQd cdkwUn0LbYm3Ath1E7aYaCO+/hDC3/+yAme2pcp2DWpNY1rxFz8f031V7U+WHc0FWUlKHI 7T0Kh/b5OgEJdPGtU2SVWRFBVM/wyU2Xd9g2K7w3kkpatpygMVlaltE8UWZ6VFdQRMnW0M 4z/bWgJBClZUANiSvPk3+dvOP6trnHZ9zjENYOc8KEf2IkjgnFu6Ouoe4eeLSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322588; a=rsa-sha256; cv=none; b=tV+Oc7ewy6K5hr+gj29uvrKTzgu6c2I40x9shWQayfP3ngYCfviMYGizNs6Fh/KncIL7bN DkyQWOqy8O6O4r+zfgpjS0Biwk4AsPp1Hf5F/wwBX67bOxEFfzw4qSz1dycQOsiri2id5Q sFD6D0BybPbNgVGjifsSlwMkZgW0c6hAX8VJUSc+KrwXoxnKhpigiBV1BVZcI6UnJyA1U0 XipXZs7aWwo7CXLMxCpED3bnIXThCdbxqeyNyOaI4j9GQOZWj9qoRC873UovFPN9rClEPK dMsP6Oub4xk84jQdFxLMsDxwJYm8Xcxvq++lFLHyn7x5w4lAtVihe8wK5iDosg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxmr27xHzY4x; Mon, 13 Feb 2023 21:09: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 31DL9mL2056386; Mon, 13 Feb 2023 21:09:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9mYe056385; Mon, 13 Feb 2023 21:09:48 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:48 GMT Message-Id: <202302132109.31DL9mYe056385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 83276e1f952d - main - linuxkpi: Add `i2c_adapter_quirks` support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83276e1f952d720c23092ea17e95c03fef8476b7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=83276e1f952d720c23092ea17e95c03fef8476b7 commit 83276e1f952d720c23092ea17e95c03fef8476b7 Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-08 17:57:32 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:31 +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 --- 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 72ad37919d7f..253482b52550 100644 --- a/sys/compat/linuxkpi/common/src/linux_i2c.c +++ b/sys/compat/linuxkpi/common/src/linux_i2c.c @@ -167,6 +167,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) { @@ -177,6 +287,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 Mon Feb 13 21:09:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxms6S5hz3q5bW; Mon, 13 Feb 2023 21:09: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 4PFxms42VWz4S7s; Mon, 13 Feb 2023 21:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTDeemukeZNPP/9q7aqIgxy9xXrcD+jecxQSmEV3WZ8=; b=DJ79t8ZM3uof7uorIfyY18jFL3DESx0v+dIyxJkrj9+AKYxAH9hEx56i6Sb/TZIXrvsEjp pfch2fnRds+f++0PxEgOSee1vfVqBRBHxEcAkR/gZXor8pxz3+jy+lxJxt4apA7oYOCqo6 w/gu690v707natwzGSIK42Oc71Bb38J9AILftA3hb5uKYL+axYLuxu2Mvke5/g3Y2n4sPt wFrUD0UqWPpFlwxYPWLIiuV29rTLx0mx/sg29O79Spm+YLAyfX6UIwm+WWY7A6vQHdJ9np Jzx/FeIJKSqKz5ALAX1Rnb3D6pSIowOTRWeFmytOGyLOG+l7HXksv3yMyAiNlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTDeemukeZNPP/9q7aqIgxy9xXrcD+jecxQSmEV3WZ8=; b=vbqwfq8gw9TLjxuEwCuQA4e9tSkVvsrSASJbwXNuitwjeJtkdCEU1r5Hfr4JnMZI5/ANRU jexrpwOfIEHYCMFCwiBg6TeIzTQymlZYeVc10beqyLSOh+TIkn/HKe/06FZaputS/v6vLi Ulyln1N87pawvMbV48s7PLaLb3BNOIClU61EoBDxoQJtyuDFO69XiwBVVTFpt+fmFf/iXt FKr4CI/mXH0KZ4jk9bvwkLOi7RJYGoW8znLyf1xdVv05K3oJA22nXUTbr2vG5yfbJ53pyl k6pjFfb4kMjowdSrK9p0qEVxqncRvIZrZujmrTcnnUGpsZdkficx5YK6EcW/bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322589; a=rsa-sha256; cv=none; b=Z4KmDC9Z16A616uvu30GKRwEWdEtvJ2FAMzxmdRlCk6bk4PJ20csLcLH7ErQQOkCZ0TmAX 1SewAiMYoHYKpzqC07MpLaqQhDC/wEm2Homo8CFedFX+KCg7rKMBswpUuy08RWn+RrOfCT okAaGiCPeUJNItv/Qgh9N/Ddricckw5VKKIQhbEzo0grgP7PlmBtV/JM7NBeYp7fwS85x5 ENXfn3QORjjY7tFtrsUwPG5R4ILtvmTNmUeizi71OuL7Yzjab4eYxB4q27BedQzaKOZWQu Y70HZiBpuAhZvrFGkiiYxSXOJwXwQwZ/XG+OwLgwRPVGbLFN8Y6y5Ql3AE99fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxms35GrzXbg; Mon, 13 Feb 2023 21:09: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 31DL9n7a056417; Mon, 13 Feb 2023 21:09:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9nqG056416; Mon, 13 Feb 2023 21:09:49 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:49 GMT Message-Id: <202302132109.31DL9nqG056416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: bf6f66508139 - main - linuxkpi: Define `FIELD_FIT()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: bf6f6650813959ecf3469854ad266c5a5590c754 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bf6f6650813959ecf3469854ad266c5a5590c754 commit bf6f6650813959ecf3469854ad266c5a5590c754 Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-08 23:38:22 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:31 +0000 linuxkpi: Define `FIELD_FIT()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38536 --- 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 Mon Feb 13 21:09:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmt5wR6z3q5QG; Mon, 13 Feb 2023 21:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFxmt516Nz4S5h; Mon, 13 Feb 2023 21:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=48B6aaTTUob2cE8D4TFnDBwZnvy3PlPiJ6eO8wvATyI=; b=okcT2lojVt8IxbSj/PSEPuENeErxir0vvL9DNdFNH5bw0KZL2/InCQZ4xQxYgsGm50dMbl c60GnI19aBdYYQC5KX6xop9xY4ZyhuIfDnsBFdbbgcxiuM43FpnNrazDtCecvyVS9SRXLP aVJzyfVZR75TavcYvyiJOjbSmqEJmodCeJWPbqZhBhzh7e8btJBFhUJEbVJFw0H1STxwm/ Xv5grmlY6MtjbYG2sIKsMWQOU0jk1m5fMc/SKTG3IiXuckzRS+3//KlVEP7R5eaQQAo0v2 +B59/XvAqjRbglu/cvZ1rZkol7Zi5wkjyrEusmNRFHzBRmpzKDMh2Fz22WYxDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=48B6aaTTUob2cE8D4TFnDBwZnvy3PlPiJ6eO8wvATyI=; b=YDMXVS4q07DKFuIVgwib0Jo1B1eWFXHKXT7MuJVBuujpkA5ddxaZxeDwqa8YMZn9u/4LzI KN1DoOow8d2enJD3+KQIXv3E/yvudGVX45VljrWnAyExTsDxY+be6k1z96PbhPEDmH7gPC y0W6rNXunTeQ6LH7UwubGEIne8riT9vFOgCOv8ZvujyhCsXDrxdH48v+88cRyH3vL2BJeP iq6qQJCCUxsZl7snWbMkD7jgzRha11sE+naVxNje4Ac8zsNEbgp+JlZBoWrJ0Q0LRPRlwK i//qjRnUZjbq155flr+Jx4Mj+tiee6MACeZ8UFM5smxfPHuoJT0S7KSXwPcy/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322590; a=rsa-sha256; cv=none; b=Skn7RF8pDHl+rO3lCsW2U5nj/Jfy1KOZPZhqRklR8RVTE0CZw5WHk6RNpY2LyES6achxv+ 3cHtLWtH42CN1i7hXKFXNt5vyxQGrXGYg8vsU/2cplMGG6n2P06u62n2NUbNcf+1zF0juC wuXen031fw/W2yC7U+auK5BhmZYsAfHxmDjm2BiG0dUaWO8IPuWaNvyMb23yaVWAOTOGxQ PnVI7OHtuA8F9tCmDqhwXRnj6MDf8L39jYVWvQOwEY+yELWuNnYe62Y6yTlEX8UvTEV1GQ JCOKvUGLRSpg7Z7RZz1SR00BuY+BWK45xtAN9wP4w6y0eSXqwn1SJCnYX5fxXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxmt45hFzXbh; Mon, 13 Feb 2023 21:09: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 31DL9o1R056446; Mon, 13 Feb 2023 21:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9oPs056445; Mon, 13 Feb 2023 21:09:50 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:50 GMT Message-Id: <202302132109.31DL9oPs056445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 54606590dffc - main - linuxkpi: Move definition of `struct list_head` to List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 54606590dffcd23136af1c26da38206f4d3a6269 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=54606590dffcd23136af1c26da38206f4d3a6269 commit 54606590dffcd23136af1c26da38206f4d3a6269 Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-09 12:11:34 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:31 +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 --- 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 Mon Feb 13 21:09:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmv6Rfbz3q5WY; Mon, 13 Feb 2023 21:09: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 4PFxmv606Kz4S3y; Mon, 13 Feb 2023 21:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JLFWGCk5Nm5+xZFs7vvnRfqm5ikrTyaFerUXajbi3EM=; b=Xdh3OPX2VE1dmpEdxEQthfGbD1Efe89R2D6283/8jhipm5K0YO907Zzqu1JyvWH+T7KE6L +Nxqy1eBt0JlFIM+8JblOH7Dbllj0ReLRdcy3OiB1hCLaDFPWCz21lhZRAk4zXbgqhR3xg LcYa3qEdTz+Z1xA/D56jFMpGZ7OAtE0PjFTTgNnaP1dGOaVmvynryzkp3oOQkxFoDyF1BN 2aqprtB7PCk0IUPnyZ4uQWgHdWC3YtXKWf8i8FxheSsN6OofcnAlehQHJ0Lz16CFFR3WTN hGdZQxbVe32kQBqryx5bYCv8QpaCPYKRtZoUOPigZgYHMiuH6bZXbQ30n8u29A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JLFWGCk5Nm5+xZFs7vvnRfqm5ikrTyaFerUXajbi3EM=; b=tgHuM3PngSL97D+koOAClh4n4Yx/pnkCOaYMRKIekafdP5i4vZHQNx+5BLyFYXxYY0VEQ6 wBElh5tcu4qRfcazS0g3dbRglbi9FmyONWR8IaNxTAjEompEj2u0Zs9bws7sYE09AuN09d UxBOnTxuas08s8VsOJMqyAsgGd+MTOkvH3HB7paNMI2Y92x/NO6yK2Q9Z/diBDxY9o9PLT Hz6rQo4JWoADYedtptMx1UBR+5330Nlz5z1NM/Aywd6jPNiar3GXfPK92u62hcOZ3XxP7i pYyf4lLCeE5PxiDj1CtU4rZ8Q1E8bSeFK6dBBpM5Mdck87jBCOSiDja2k4YthQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322591; a=rsa-sha256; cv=none; b=UpeBzCJIhk6F6pN0M7eZSK91ZDzXE7tOSOU+LxWlGn3b8CFgxiwL1BYTuceCs+DsFYYX8n 0RTRoQSK0k3xAZvbFoQGERPEQalXNMZSiyj4h10zn0nDWaFk7nnjFpcF0gGPm51KDV4Z5D 4qLIrCQF9Ua2AEGl7U0R/aMoKfACWB/cexFo1m6pi41LADZcyLE6nEZOYcQpvc7INIEGSJ ub8Ctt5m4phxq3efISsEm+Yw+6tqyBS9ZUU4FcAnGSARauRkR4nAN4fkl11OdxhX1j6rJ+ 5j8LiDYxTxhRdJbcMW/Zt0/cPJPb4Nsa6SGrYpyh3HQwf/EZjMj/yYfn+/FsvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxmv55fNzY2q; Mon, 13 Feb 2023 21:09: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 31DL9p72056475; Mon, 13 Feb 2023 21:09:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9pPT056474; Mon, 13 Feb 2023 21:09:51 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:51 GMT Message-Id: <202302132109.31DL9pPT056474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: b82bcfb66fa5 - main - linuxkpi: Define `lockdep_assert{,_once}()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b82bcfb66fa5ef30939f3f5169a07bf4bc139e71 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b82bcfb66fa5ef30939f3f5169a07bf4bc139e71 commit b82bcfb66fa5ef30939f3f5169a07bf4bc139e71 Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-09 22:04:26 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:32 +0000 linuxkpi: Define `lockdep_assert{,_once}()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38538 --- 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 1f68d6fbc22d..97991c4e598a 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 Mon Feb 13 21:09:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmx2DDqz3q5HJ; Mon, 13 Feb 2023 21:09: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 4PFxmw6pKZz4Ryj; Mon, 13 Feb 2023 21:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYnN95BO47KnbJjemA5OryE9SaiWUbcsGztdNYbErJA=; b=wNruXpX5i6ZcApD8eZry4L0O/hAn5nqcxY/u6wiTN8Av2w4s51plR7tSPfiWZp6nKed44a e8su3AJT5Hgam1HAxmZZjavp4ae61h/tCWJoOtv3rPlG0iAdbNJQNo3h3ffCovFJOeeovu 0+yrJtL2AQAjAvb493C2hPw04VhaPMut5ZFu2CZX4ZAFCVd3Hk/XYfc9KTNQj2TaQvpiGR PT2Ei17Q3q9LPymDJFWqGedMAGd/2PUZa89s0/LK5kv3BN3mBqwKH/EugVyOGZ1zSArtG5 bIUOnedgmbslzV0EcGJ3N7fYX5/5wZm/hrRORcFZ7W7eJfqs63d/w5VvEybxSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYnN95BO47KnbJjemA5OryE9SaiWUbcsGztdNYbErJA=; b=gVY27zBmz8IfFAKoF7QmJ3aLNdeRRqf05sAtWDxVa2b/zkA0gj7y1YvKALz4kKxTFdbj7e pRUGpsOXoKhVyWEFZ7CoZuA0on2JTfC9sM5Wwq+BWwUINTP++VICG27b/HXC4vYEp7W9S0 y1VMpUu5Z9SSNRu33QEiQsDu+Ug2CXoNrhctMQRXPha94MHouLKrrbnOgK1uICQdpvPLKr 1JRydBv3eZ8UeoMru/rgp7JrHTzOBeRNFOtdR/WRxwCa+6qXUiki41HRF9z9QBm4lPJW2k 1V+3rNhSrrAQMaPJX2cZRJJA8WISaLKz+ETD5i77qj2dqbo6ZwKbKu9qMqbzzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322593; a=rsa-sha256; cv=none; b=D2vGigE8PquCF5mEDNBh2NLh110RqYBV7iI0hpzHfKCrHHEpX43LvmRexVQzss2rqe3RRw K1mz5SP/C7+rJ2v8m/gi0WG9kYkxBIHKBhszsS/FTW9efCOsPhB/ptU+pBb5H21xweLtJB pewrZoAGUNJdqPFaGMjiSytMWkw1D7qJRBNnmArptu3L3nqEH8M8o9c1W5JmuXhfWZF4QY uZODhWtjLLEow9lW9ADDod2CC+QzjOTDAqCXxSdAN/UaCDv7bVWd64MLUA1yRDzROi5Jrf AmNambpjP7NcxQooh56NxERYncczeYVEJrdZICCTmMooGMfFvN+kNT/GYnvZ3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxmw5vJmzXYh; Mon, 13 Feb 2023 21:09: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 31DL9qGb056511; Mon, 13 Feb 2023 21:09:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9qIo056510; Mon, 13 Feb 2023 21:09:52 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:52 GMT Message-Id: <202302132109.31DL9qIo056510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 210e756d4b32 - main - linuxkpi: Define `IRQ_NOTCONNECTED` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 210e756d4b32f43e8cc5f748456158757892a46a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=210e756d4b32f43e8cc5f748456158757892a46a commit 210e756d4b32f43e8cc5f748456158757892a46a Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-10 10:26:17 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:32 +0000 linuxkpi: Define `IRQ_NOTCONNECTED` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38539 --- 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 f7915863525d..03fbcfa76245 100644 --- a/sys/compat/linuxkpi/common/include/linux/interrupt.h +++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h @@ -47,6 +47,8 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); #define IRQ_DISABLE_UNLAZY 0 +#define IRQ_NOTCONNECTED (1U << 31) + int lkpi_request_irq(struct device *, unsigned int, irq_handler_t, irq_handler_t, unsigned long, const char *, void *); int lkpi_enable_irq(unsigned int); From nobody Mon Feb 13 21:09:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmy1k8Lz3q5L0; Mon, 13 Feb 2023 21: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 4PFxmy0xvqz4SHV; Mon, 13 Feb 2023 21: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=1676322594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HNrkHyUkF+oXbO422ARz2/VhIN3hcix6CQqkTPBP4JQ=; b=FU0FIWJoEInaClv5dJBUd/9Ox36NIYTSM4K9aMUTuhOATb+PARqfqN0QGFf0ho7PaUYxxv bwwi9W6mljpmMTn7DzI/QypOPd8mk+Et/tKHcxB9+5vmIhMTf4M2Fhx8bqGSvnXRwCxFnb +714tTOHkAQLp4uDqRhNZJLimtUKMxhdBlXwqCBqcY+Jt2ZbvhFg++68BBc28zzM8Ywpo1 HaN05wabCF4fDFOQCtiSmRFUtflomEgEXAjasZ2GHZucMhdNz88sLhUnGZ8xT74m+htWv2 dd5ZeuE0vymKYXQ1MzcziPsrt/mp9+ESBQxd+hW5sgfoPtgjSGAMxRC4GxtL8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HNrkHyUkF+oXbO422ARz2/VhIN3hcix6CQqkTPBP4JQ=; b=T1d5WgBfOKD4DBm5a1lYMlqyNA4GJxKnLrwV9hJgZAft1CNwScI1poLwyKDYybr6OBXw5L G1jpB5L4fLwgkQwOgzD/yPFS8mD/aLWbJB+ecSCHTEo0NjDAA5YNZO6Hle8wsapfR+V6Z9 NS4C1Tunnr/Dy6P4CtgjGtj+zv2A0uXIG8JYYpGZmlCm1QB9iJHO11tlQtXldECyISOkCu /JoVhujVAdwjpZWE57z142WdgGS3pAYBLyOk0/J3w/01WMwRgsTXj7GfV38/dk1Vupdbau Ga7e1Otwou2YgA08MioPmu2/Vqdc/ZsRAh94jUR6+34ue0FD3Ae+un3cXSMh2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322594; a=rsa-sha256; cv=none; b=rvm5D9nOuqsArtDEvk8i3XKII7mlfg/O+egO3GZ7cO9zK+Ohu1MaxqOC4f+cOw1GBgKmyk TQKnTuc2EBRDxEH8YGMDgErnGeTCWLXQRgjCWj/HqzaZor0TmOteGOyQ/kfmPzLAnybrSN JL9owSJqRVwbRJt5XmIgTom66kHpXCDwpxUVspY4NlLL/ChK++NNdZLAI5A1gySkx0YkSW /rWhZB9+s3KJGPru3UlIxEQOaISfnG8OeaP0yckNMilo2vziDYP1jV517W3NZgJk7OklpG 4uNTS3b0FarbjsxCm2za0Qo0B5TY00UQY/UUpBuK76RUSxiFa0jHMhFmkdkECw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxmx6rnCzYCr; Mon, 13 Feb 2023 21:09: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 31DL9rf0056540; Mon, 13 Feb 2023 21:09:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9rK8056539; Mon, 13 Feb 2023 21:09:53 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:53 GMT Message-Id: <202302132109.31DL9rK8056539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: d91cf060205c - main - linuxkpi: Add + include it from List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: d91cf060205cfe479675d7fb4ec95d2ed6a9b76c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d91cf060205cfe479675d7fb4ec95d2ed6a9b76c commit d91cf060205cfe479675d7fb4ec95d2ed6a9b76c Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-10 10:52:12 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:32 +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 --- 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 Mon Feb 13 21:09:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxmz2Gztz3q5by; Mon, 13 Feb 2023 21:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFxmz1qPpz4SR0; Mon, 13 Feb 2023 21:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=21sGiAk2Uj+jOHkd4QxZowlXlaDfOaWQJ60EXsAnJS0=; b=srZVzhles8MkhHxKUi9nnfMqjjdq1fgKm6vCBuEOWtcvSvh9B7AZc/xR1t5bE6VGIg6iZE mmjF9TELpBX3VFhwYsO3OVbTzVO/Lp6M+mR9s6Shp+uI1A5wIW4rM2K0sBe7/YmLm2QBbu 3JT/EyymnmqUkZlUXVBzYwVmk0TBSzERFPA7RLUzV3DXVpgaycvUB2s/NKRGr6FtqyUwtD LLsJ1sAQz7GSeQNWaaBozmri7NZ0msMgUaRZE9GRIurkRV10tYXzSlmrv5bhuwz/j8lpa+ vZIB5jKPwlT7sLBMq2pAUviihMj7gZuc3/hzDhghxKG1iASoHnkN33NqWxlukQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=21sGiAk2Uj+jOHkd4QxZowlXlaDfOaWQJ60EXsAnJS0=; b=U3He0FBVvUe6kGyZLFPmYz+b9wYSjw6xrvPVsS9bZNzpN057hbISaYWFXy1lxBox5IMBU5 Xd2f6PlE8CYlvhj6TkbXxCm3hSIt/vHx1OpJpHWkwaCqmNcvNmGWYOxJaXysMNcChjvk5e EdEAWjhvxaM4/YMGrYlJlKO51ljUoPEnUdYwtXQGf3BzRh8IAffnZF1iQZcxnHvicl6OZO nlPLPQdApnTYCe3ej9nnM0XSmNaSi80XTXKCL7vk9z1HGBJEM2g0QrBkM4YZIlnBzDZirO IYWHHmESQPkh/zM2oDqe1r787bORUrZDGF2J7f3fi1ki7QgkLWfzUKZTy/iz5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322595; a=rsa-sha256; cv=none; b=Z/QFy35Nm/oFttGvrGNJvPeB+Tzd4fIDNtCCzGeKRdmi40gxo1oGjTAFYJ7PcdYnP02PLv wM9YiL6vDoUltx7gMhE45+c4qAS8PKhLm3iLqULIOHKYFTID8KDMH7Z6j3mfMitE8xxvkP ZRsWoTDHL5XyhOMkC5qWX9TLYSYstpE5UWns8Ht6zj5C12EFCb2NAw6Jbm2cYkL8sDWDSf lr9+ZxAXS9t0zpJ9FNVEDEDQWiskb6Scih1vZpguDbJgJeISyg4e8WTRb7/874G0mOGPW6 J4+jQc47AoOfW5CJToWK7V9QLqQdHFPBNzBATmObsx6N9+DIiPN82NVSm0yyyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxmz0hQVzYCs; Mon, 13 Feb 2023 21:09: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 31DL9t7D056569; Mon, 13 Feb 2023 21:09:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9tT5056568; Mon, 13 Feb 2023 21:09:55 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:55 GMT Message-Id: <202302132109.31DL9tT5056568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: f3490083b731 - main - linuxkpi: Add `sg_alloc_table_from_pages_segment()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: f3490083b731700f2aa7c17ac6fe159826dc59a5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f3490083b731700f2aa7c17ac6fe159826dc59a5 commit f3490083b731700f2aa7c17ac6fe159826dc59a5 Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-10 15:37:31 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:32 +0000 linuxkpi: Add `sg_alloc_table_from_pages_segment()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38541 --- 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 Mon Feb 13 21:09:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxn055mCz3q5QW; Mon, 13 Feb 2023 21:09: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 4PFxn02cq3z4STX; Mon, 13 Feb 2023 21:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJ9mYL0gg+Td9no5K8/FI1Ai9k79JonRLUHI/nGiWOM=; b=B1GCn+pOhZzGUIPEPn92ZMNJI1uMZ6GmFbRaAUO2to6OE487sXfyt9be/bj2EwhSoJovRn z5+Sz+suMV+zEkuxqeojy7qrHj3zV+fYrQyGbN378Kb50LXUGJmN+hSrmvA85QK+XKH3oM acgMK4KiBbxszIbLR3pXV6P+9hDJh8+fkaarSXosF0a8KWHdcdTFIyXPT5Tff8/6sXGF+G hrk4EwQVC5sJzyBGUfxzRlCuUnsyCH8RnA+8Uhc1cDjqy+F7r0M79NhuywMcZ8cBw504gD 0h72uvxkpW10ThIf1v9M6msH26mvmdfqHU8UAj+YWCqCDPIsgcl6QbBko0GRnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJ9mYL0gg+Td9no5K8/FI1Ai9k79JonRLUHI/nGiWOM=; b=jRk6GFmKGR4xpGxxEC6SYWJA+pEHGaI4it3d5HDBEstClsP5lGKDJB3iu6XbCtjF+NujPv pAqsxXBxQ2IXRfRL6U5Osz8ccqqYPWWBJFOadkxIhy3AFn9X4HBef1Znl3IIiWtWT0DqGl KfEo2Hc1qI3TPOIyJqJEXmQqVOT4cyi3L8nSlRemKxML+n2ioksK40mggH6Txhl4q8uYVl oiYIrUaFjjmOCbW/6h11gn+xkBc4acK6Cmrn9DbaxLWlkwP+27twDI0DrAlQpnaoghnVOF 6pgt83OPPyCRWuW+8Zx8MPOkehcHzW4JmgSyVdJ0pMEhuUWOJdUzwwMsxls7zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322596; a=rsa-sha256; cv=none; b=qbJiGp1jLmGCqo67qzTC3+aNtpp5OVIK6CvQDutDsSm+YGQvGuAqpShF/465gWUvBf5KqN eqkO0DWGDoAirFlbiLpAvF1ul5zVUDD5nxXTyirZscu7qUyqzWI/HY8WXlUSOOLfJeH/ak 2KwO9RoqkblyT8AO2zzzNeZLQO8flzTfGH41MmzFjD8W1zWL94mW/JzIlsVwBZyXtSgXLg bHE1QF06htaHY2CQeu5tsXhq2EQaqvQcaVVj4mcF85GXAzRAG4HTlA6E8BRYEY2167quXq ke4hv+3usDfKvF52/kZLTtDjYbd4N/WDkXkFr8sRnav3dEQGMrcp/cpJ2J+KqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxn01hZzzXQ0; Mon, 13 Feb 2023 21:09: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 31DL9uPQ056598; Mon, 13 Feb 2023 21:09:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9uxk056597; Mon, 13 Feb 2023 21:09:56 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:56 GMT Message-Id: <202302132109.31DL9uxk056597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a27902c18388 - main - linuxkpi: Define `cpu_data(cpu)` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a27902c1838836b3fb00cd660ce37a4f20bd7991 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a27902c1838836b3fb00cd660ce37a4f20bd7991 commit a27902c1838836b3fb00cd660ce37a4f20bd7991 Author: Jean-SĂ©bastien PĂ©dron AuthorDate: 2023-02-10 15:38:43 +0000 Commit: Jean-SĂ©bastien PĂ©dron CommitDate: 2023-02-13 21:09:32 +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 --- 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 30cc094a5222..8a2473e82d66 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2745,6 +2745,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 * @@ -2767,7 +2768,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 Mon Feb 13 21:16:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFxwy4xp2z3q5qh; Mon, 13 Feb 2023 21:16: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 4PFxwy4S1cz4X3K; Mon, 13 Feb 2023 21:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676323010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXYi6NSX2I6F4wPKnIEEx3I/KV5QCxyKtAu5bzVmUPg=; b=I/Nwv23f1M65Edkc77P13kcxsM+2A1Y9TJqrMwDWyrDNRXjziH1lW7GsjpiBZbVpme9uFb Qkq8Ia7YNGFbvqzWbIep2UkkyQ2+lD64KsrcKUG+RZcuKnrbgVx1Wn/r5hWikGRYaoSLCF VGvUd/Xk3vVzF5wbA0zENAnY7EysQWAFbKPls1hUM1bOUgny+UfuqQvyMwHwLe0EXBDscz JDVEphTUOkS4wG6OhBL7c1tOrF4APXELmCXEWwqt21epZWvsDhz33oMiVhm9zzXbLOfBZx wct7eNF7bzgMDgqwgGZ4Zh7yShRDslZo6d1VwShpSfcLZcpPIcmZFIywvptl6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676323010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXYi6NSX2I6F4wPKnIEEx3I/KV5QCxyKtAu5bzVmUPg=; b=evIkRIn+ZCB0ABpa3NsMdUVZ/kmafY5/521AxnXPlhffkB541XFJaoekpLk7B4THgc4vhF bOzns3r+KAr3r2Rp63qgix2WualGlQtXdpVr4DH425FK8ol8AfPlzuheTThdZtGaKwGDpr 4REQicBG18JtVrRyApavOKm8OFdUSeeIGGq2/eye6KGMQqz2VCqwk+/Mu56g9JU+guJAGW WNIcyWzTrJK/k8xourpTd4CUwrgi7W5+GvB+7rL1PR/yzOby+HO4F5bEbm9z2OgmIle68x Pj12PNSjKsHTRniqk0TvoUKUOZFsx38QMWtJYZhB0wXK7jh1euVdVxfNGsB5sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676323010; a=rsa-sha256; cv=none; b=yqTIH3y+GP2cYS+ZM37KFKMU6+fb8LLHYZP/xMqEnyUGyCbTF6guebVyrzpa2n12mBh85N 8+0v9/b2lJCER+quSgF7/5KUi2tceEazTEH/mmwLetbxwy115mHv3XqEQ+Q+c8bkNPl3Rn vW4fhhVnGkdKh5LPao5YRdm4yLlgANrhYgCTw1H9i+SmnSgOR1eyuNyARW5R3TuFxPyDGk amxh8mPk8m143u13wzCTsm/awrl1bfU40tPLodAMy4TszoVFnKQ64bsB5x9ryZv9fV1LrC c89DZhP3ppDZ8gr8xBEZcp3+82NKDWbO/d9RN0eYGaCJzefS8Lxoa37C2ed5YQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFxwy3WWTzYDv; Mon, 13 Feb 2023 21:16: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 31DLGoxI070889; Mon, 13 Feb 2023 21:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DLGojF070888; Mon, 13 Feb 2023 21:16:50 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:16:50 GMT Message-Id: <202302132116.31DLGojF070888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3dfd18a769df - main - Remove support for the base/* toolchain ports. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3dfd18a769dfee663cd3d5e6eba05bfe8c1d0e2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3dfd18a769dfee663cd3d5e6eba05bfe8c1d0e2e commit 3dfd18a769dfee663cd3d5e6eba05bfe8c1d0e2e Author: John Baldwin AuthorDate: 2023-02-13 21:16:24 +0000 Commit: John Baldwin CommitDate: 2023-02-13 21:16:24 +0000 Remove support for the base/* toolchain ports. These ports have been removed so these knobs are no longer meaningful. This reverts commit 608289394f655d0635c71233248b734010fb4d2f. This reverts commit 39eb07f172921a581ee9b33ca2765905f4235202. Reviewed by: imp, bapt, emaste Differential Revision: https://reviews.freebsd.org/D38562 --- Makefile.inc1 | 2 -- ObsoleteFiles.inc | 4 ---- tools/build/mk/OptionalObsoleteFiles.inc | 4 +--- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index c6f0269f8885..3399e469ea02 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -67,8 +67,6 @@ TIME_ENV ?= time env .if defined(CROSS_TOOLCHAIN) .if exists(${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk) .include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" -.elif exists(/usr/share/toolchains/${CROSS_TOOLCHAIN}.mk) -.include "/usr/share/toolchains/${CROSS_TOOLCHAIN}.mk" .elif exists(${CROSS_TOOLCHAIN}) .include "${CROSS_TOOLCHAIN}" .else diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 59941a50b7d6..2f676ae41e14 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -6382,7 +6382,6 @@ OLD_FILES+=usr/share/man/man9/sglist_count_mb_ext_pgs.9.gz OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h # 20200606: retire binutils build infrastructure -.if !defined(WITH_PORT_BASE_BINUTILS) OLD_FILES+=usr/bin/as OLD_FILES+=usr/bin/ld.bfd OLD_FILES+=usr/share/man/man1/as.1.gz @@ -6391,7 +6390,6 @@ OLD_FILES+=usr/share/man/man7/as.7.gz OLD_FILES+=usr/share/man/man7/ld.7.gz OLD_FILES+=usr/share/man/man7/ldint.7.gz OLD_FILES+=usr/share/man/man7/binutils.7.gz -.endif OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.x OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.xbn OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.xc @@ -7191,12 +7189,10 @@ OLD_FILES+=usr/share/man/man4/bktr.4.gz OLD_FILES+=usr/share/man/man4/brooktree.4.gz # 20200229: GCC 4.2.1 removed -.if !defined(WITH_PORT_BASE_GCC) OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/bin/gcc OLD_FILES+=usr/share/man/man1/g++.1.gz OLD_FILES+=usr/share/man/man1/gcc.1.gz -.endif OLD_FILES+=usr/bin/gcpp OLD_FILES+=usr/bin/gperf OLD_FILES+=usr/include/c++/4.2/algorithm diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index a6b9532fa2f8..b0a425aad67d 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -201,12 +201,10 @@ OLD_FILES+=usr/share/man/man8/bhyveload.8.gz OLD_DIRS+=usr/share/examples/bhyve .endif -.if !defined(WITH_PORT_BASE_BINUTILS) .if ${MK_LLD_IS_LD} == no OLD_FILES+=usr/bin/ld OLD_FILES+=usr/share/man/man1/ld.1.gz .endif -.endif .if ${MK_BLACKLIST} == no OLD_FILES+=etc/blacklistd.conf @@ -2113,7 +2111,7 @@ OLD_FILES+=usr/share/man/man8/strfile.8.gz OLD_FILES+=usr/share/man/man8/unstr.8.gz .endif -.if ${MK_LLVM_COV} == no && !defined(WITH_PORT_BASE_GCC) +.if ${MK_LLVM_COV} == no OLD_FILES+=usr/bin/gcov OLD_FILES+=usr/share/man/man1/gcov.1.gz .endif From nobody Mon Feb 13 21:22:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFy321KhTz3q6Wy; Mon, 13 Feb 2023 21:22: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 4PFy320tHyz4Xpj; Mon, 13 Feb 2023 21:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676323326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GwjKY5CuSRy6PvzdKGYtQtWtoyjyruAQsmivA/Ia+RE=; b=o3NQmcbBnmxv3OsZLsu9d2wbsbqwOS+gTKO871Mzwi01i5o2As6iFrbkHzhLx4jIjQq/wy CLh7lLR238t7yz9MhSSFBrxqdkOoEaC92ajE6Z7vdmmpAmIccY1/7jIVyctcCRsnveSJCG V0o+FZ65BTGx5tmYhBAUOrqwf6wwNCLCfLVAM/BkrHq2+/H3GQpngNOBDnv/VkMSSuendO 4tYBeZgE5TbYDr3zSKnkNyHe6o9TcuUJlCNliI3b7/yW1+axRAlCJBPgVLCxnihCF6eRXb nPSLEZ8hW8nSj+Ns0IRKZmrukHs509rmpncxittEMaq9PBL3pDvYgQvZVyGBmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676323326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GwjKY5CuSRy6PvzdKGYtQtWtoyjyruAQsmivA/Ia+RE=; b=rgetSzb0zd43bmd5IvagDZFzP4U2Ihp0feRdZRZsJ7JgG0ev+Sy97Sp7mZOBPrraoyFcLW VYEoT/ZQZu4aMP+kdLs9WsyXRbEDo1hTezCaJ2Lni7ExJcwS701JM1vzyhqQDOUPyOeVdp VnELsGVyxBgFA7JzWlPIAdbbw+dqGmX4mMx0JdlDMbq3s2KncYol4jqwtRj2m0FgIFMEC/ SEmLmck2Bb0/cezlyV8Dv6xpjafgMPYLQIsbewa1oMnIyOZQy3//Dsh1d9LsJsxCFfCMK3 GT2bAl26jIOO1yI6J5Szgi8VCud/Szb8OW/b+nWpPCqkqCzz2HK9tV8Y9SYwlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676323326; a=rsa-sha256; cv=none; b=vRjupx1ToyT//Ve1ViC3JQEl3GX/lWGQx2o5t+rNQqtQn6Cv0Z3dHooSozaEHHtlLgAF6t T5V1Kw6mIs9kNiNnTgaWuVuRPWwOdfNlJwSUSBUX9hrOfCpfbpw7tX2196/jR3sGydsrmi jXxeSEcr2p20m9eGurp0kGKzH90BjUcTvM3Taq298dKj0ot6G64tiod1M5rrP/cNKPHRAN rut94xzts/PKoFn74yyWx+RFh7ZGdH6o7FOhjbD3bfeIScJd04QdlhatITFifEMk0JgrsY 3BVoG0PP9dY0nhwy5Dgzzr3349XAYG1mv6ZKecQkPJmTZOA0OStGCorv+ZY5Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFy3173TPzYgj; Mon, 13 Feb 2023 21:22: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 31DLM5nq083272; Mon, 13 Feb 2023 21:22:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DLM5qS083271; Mon, 13 Feb 2023 21:22:05 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:22:05 GMT Message-Id: <202302132122.31DLM5qS083271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 18bb97b76b26 - main - arm64 pmap: Fix a buffer overrun initializing per-superpage locks. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18bb97b76b269f38407b5c48d53ceaf6447450f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=18bb97b76b269f38407b5c48d53ceaf6447450f1 commit 18bb97b76b269f38407b5c48d53ceaf6447450f1 Author: John Baldwin AuthorDate: 2023-02-13 21:19:03 +0000 Commit: John Baldwin CommitDate: 2023-02-13 21:19:03 +0000 arm64 pmap: Fix a buffer overrun initializing per-superpage locks. pmap_init_pv_table makes a first pass over the memory segments to compute the amount of address space needed to allocate per-superpage locks. It then makes a second pass over each segment allocating domain-local memory to back the pages for the locks belonging to each segment. This second pass rounds each segment's allocation up to a page size since the domain-local allocation has to be a multiple of pages. However, the first pass was only doing a single round of the total page counts up at the end not accounting for the padding present in each segment. To fix, apply the rounding in each segment in the first pass instead of just at the end. While here, tidy the second pass a bit by trimming some not-quite-right logic copied from amd64. In particular, compute pages directly at the start of the loop iteration to more closely match the first loop. Then, drop an always-false condition as 'end' was computed as 'start + pages' where 'start == highest + 1'. Thus, the actual condition being tested was 'if (highest >= highest + 1 + pages)'. Finally, remove 'highest' entirely by keep the result of the 'pvd' increment in the existing loop. Reported by: CHERI (overflow) Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D38377 --- sys/arm64/arm64/pmap.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 7e2a423025ec..357584e22875 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1347,7 +1347,6 @@ pmap_init_pv_table(void) struct vm_phys_seg *seg, *next_seg; struct pmap_large_md_page *pvd; vm_size_t s; - long start, end, highest, pv_npg; int domain, i, j, pages; /* @@ -1360,14 +1359,13 @@ pmap_init_pv_table(void) /* * Calculate the size of the array. */ - pv_npg = 0; + s = 0; for (i = 0; i < vm_phys_nsegs; i++) { seg = &vm_phys_segs[i]; - pv_npg += pmap_l2_pindex(roundup2(seg->end, L2_SIZE)) - + pages = pmap_l2_pindex(roundup2(seg->end, L2_SIZE)) - pmap_l2_pindex(seg->start); + s += round_page(pages * sizeof(*pvd)); } - s = (vm_size_t)pv_npg * sizeof(struct pmap_large_md_page); - s = round_page(s); pv_table = (struct pmap_large_md_page *)kva_alloc(s); if (pv_table == NULL) panic("%s: kva_alloc failed\n", __func__); @@ -1376,23 +1374,14 @@ pmap_init_pv_table(void) * Iterate physical segments to allocate domain-local memory for PV * list headers. */ - highest = -1; - s = 0; + pvd = pv_table; for (i = 0; i < vm_phys_nsegs; i++) { seg = &vm_phys_segs[i]; - start = highest + 1; - end = start + pmap_l2_pindex(roundup2(seg->end, L2_SIZE)) - + pages = pmap_l2_pindex(roundup2(seg->end, L2_SIZE)) - pmap_l2_pindex(seg->start); domain = seg->domain; - if (highest >= end) - continue; - - pvd = &pv_table[start]; - - pages = end - start + 1; s = round_page(pages * sizeof(*pvd)); - highest = start + (s / sizeof(*pvd)) - 1; for (j = 0; j < s; j += PAGE_SIZE) { vm_page_t m = vm_page_alloc_noobj_domain(domain, From nobody Mon Feb 13 21:35:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFyLy12Jhz3qNbf; Mon, 13 Feb 2023 21:35: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 4PFyLy0CHbz4Ztj; Mon, 13 Feb 2023 21:35:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676324154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UgKTdeRSRA2/MUBPp6QadsTpTSkk2qQvxY7Uj5bEP88=; b=d8KCNI09zcfu4AWwoQe0hnAVYDGYhm67Xy28Nio+u2MO6G2r7FvEnHpkwaHJns/j4JQU9D Rk40cvH/AfpnRZw0fiwlRk/7xZ0oQEQ2hBqPvcBNdte3E/VevsVo1QylcELbDnxNatTPBP q2P4m+sEkeHoNRu0G8wH+2cQ942B1+xzctp4k0AObiACMT7blmmnbICrgm3PFgD0O0B+UM DXNc+GyeVMGdBSJS5yk2CCULhL/5rzGXlAMkpbd7qak150dwrGLeDALJ+99x/TqtGwnCZu yCtbhlT++td/C24026lIYU25qwzC6I3RsWrdn9I+2Hp9eHp7Au4Zc+aqoMh17A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676324154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UgKTdeRSRA2/MUBPp6QadsTpTSkk2qQvxY7Uj5bEP88=; b=M27Hd5Ui5OcuocNv6iOr4EtiwH5qMNBRJdI6kJYMwX7Bj1zRFMCasrLI9E5jBw0imwfRfr RxrYTpDlmURThXlOLbHxHzcGLcZglyooOA5O+mkx43CLlTgGqs2oUjcMGuZeJ8Z1s9tnMa 5aPJwrcoTaQ+VsHd6ekR0pGwEQvBwIiZEnXms1y1sG+DFB/w5cnR4frM0sTohorvayhHUa /exHjpbUmRhkvlxn6W+WTGbbwj78wiUIfIKPYeSUr6RJaDd5Rjj9UzgzsGdCYlSrj57la1 /7qjWsPGhjq7v2k7EDUNRP5VFIKy7HBy1ZUmZ9d8KDQpShToJ44Ipi8NA4e9AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676324154; a=rsa-sha256; cv=none; b=ZJmyNOYQZkpcIrWVFH37T/iqx3hrnpRRR3zJ6WeDogmW3F61dbT3VE75oHMeiJlL4K+EE1 StT4uJKeXccCZfAzCN1u+HoriD3+VakHZS2ykKkvO/xCC98n6XBQJkMciV/OW7GZxhI83A VVrSh1FrhJCu1cW8c2fZhQqc8TeBUDks//qdELXSos7oRhOKh2c29lFEq9CZlr+fiaU+HN zKvI1r+yTmYd+l1PC5LmDn+hu6YbLmBxL+u+HDOyeL98Ija+nMhj6BCJo9/zd8NEegr0J7 9HomxcMYx3jGWcW5+upvEHmsjPGgask1cWOYrGA5+hwhAoP8bi45F8HdE1UP6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFyLx6MwczZ2Y; Mon, 13 Feb 2023 21:35: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 31DLZrCb099034; Mon, 13 Feb 2023 21:35:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DLZruQ099033; Mon, 13 Feb 2023 21:35:53 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:35:53 GMT Message-Id: <202302132135.31DLZruQ099033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 775da7f8a924 - main - tcp: Remove a redundant net_epoch entry in tcp6_connect() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 775da7f8a9248d148ffd50635cf043c015146225 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=775da7f8a9248d148ffd50635cf043c015146225 commit 775da7f8a9248d148ffd50635cf043c015146225 Author: Mark Johnston AuthorDate: 2023-02-13 21:21:10 +0000 Commit: Mark Johnston CommitDate: 2023-02-13 21:35:47 +0000 tcp: Remove a redundant net_epoch entry in tcp6_connect() tcp6_connect() is always called in a net_epoch read section. Fixes: 3d76be28ec60 ("netinet6: require network epoch for in6_pcbconnect()") Reviewed by: tuexen, glebius Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38506 --- sys/netinet/tcp_usrreq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index c204fc356ed7..43f2fcfb097a 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1433,16 +1433,14 @@ static int tcp6_connect(struct tcpcb *tp, struct sockaddr_in6 *sin6, struct thread *td) { struct inpcb *inp = tptoinpcb(tp); - struct epoch_tracker et; int error; + NET_EPOCH_ASSERT(); INP_WLOCK_ASSERT(inp); - NET_EPOCH_ENTER(et); INP_HASH_WLOCK(&V_tcbinfo); error = in6_pcbconnect(inp, sin6, td->td_ucred, true); INP_HASH_WUNLOCK(&V_tcbinfo); - NET_EPOCH_EXIT(et); if (error != 0) return (error); From nobody Mon Feb 13 21:35:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFyLz1l0xz3qNhT; Mon, 13 Feb 2023 21:35: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 4PFyLz0wy5z4b60; Mon, 13 Feb 2023 21:35:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676324155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFmObU9peKW0K5XlHs2k5MFNzBV8uER0qyTDk1KowEY=; b=RApzXW6E1vaDORNH5NmLdvwteeiCAjEQk2/epudvh6lsq+jLNQ23giR0cZWH/IXwzpf5x4 3YIvAvnkAJPd3289r38xWyD1f35fDtcVpB0g+ruBgFms/grvKRfDTfQK4PhbBPtylhJ85J KGaghhJ+0/JJxXRtaa2U+XsmBG7cWZyGZ9nLA6OBDENjNYz+97dyU4YWCFpmMXPTurKbRV VKCacdc4u1PI2uZy+zn0+W1qesBe4zM0CU7ldx395fC9pX7xRv37N7SgeHewoKqRyNG42+ bFgg2pg1TSP85xNV4RiU/FSyWKSPvk60ON97OKkcTPfmj/IpRT+NljlERUpyEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676324155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFmObU9peKW0K5XlHs2k5MFNzBV8uER0qyTDk1KowEY=; b=o07Dptt8EaS69ehTrMBLe1SeLMJiOVF/UQaBfgznua+1EQAmAoS3WLLaZSeKPqp5D0S8cp uveGusiOqc+jj5OKED6Dcns/it2lpyWc54/An3hQXok3t00wvixoy1rAQJmKuYW5C7etPf 6P2iqynSyNLEBy5zWECJCfxVbqmFS3D9GOoBPvaDlDs78QdzNibasdcyhQ/IX+eWK70+v9 v+Ah4X1sfwivwtsNu3oQqW44NEHQVNcxV8jGGDbJVwvdyxWZnkb3EpUzKkMnUiFyTCEQ0G 5Fxv1JFPKCxIkeDZUwFc+17yhV2e5GOPPAfHGP4MpwjwsXNLNyBG4S3wdfugAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676324155; a=rsa-sha256; cv=none; b=v+F4gIIE2gZt3x063KXNSXi64+HUFsfsOBWFiIv5b4ZbReV97WFE8OK0BYTrFZWpSOM49X tMM/G1nDygf3QCnpaVwH5+5OkoB6q65Ms6JhvaGQ6oQNCwlU2bQG50NxFs9fAqTeo+s97R pFDhDGw+bN/ygIEPaE07WGR7UXRFC3rfxS47xxxvFkyFBd7fxJ9ueH/e1peqbb3KrMMz18 O0L7hhd3+Bm7qrsBd1eVpMgtd+Cs8r0MZLIBBW0EA99CckpAIyc0XU0OmofmulDql5rFoX TrmAgUtS98kQBDHT7jCXm2kHdkatfzp88T3FQKxBKUM9zP0NxmsU+7RnWKIm+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 4PFyLy71YjzYhc; Mon, 13 Feb 2023 21:35: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 31DLZsKH099061; Mon, 13 Feb 2023 21:35:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DLZsHj099060; Mon, 13 Feb 2023 21:35:54 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:35:54 GMT Message-Id: <202302132135.31DLZsHj099060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c7ea65ec69dd - main - inpcb: refcount_release() returns a bool List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7ea65ec69dde90253bd1872fecaeb7c07337f97 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c7ea65ec69dde90253bd1872fecaeb7c07337f97 commit c7ea65ec69dde90253bd1872fecaeb7c07337f97 Author: Mark Johnston AuthorDate: 2023-02-13 21:26:36 +0000 Commit: Mark Johnston CommitDate: 2023-02-13 21:35:47 +0000 inpcb: refcount_release() returns a bool No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. --- sys/netinet/in_pcb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 3369f16e15c7..ad889f29de55 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1728,7 +1728,7 @@ in_pcbrele_rlocked(struct inpcb *inp) INP_RLOCK_ASSERT(inp); - if (refcount_release(&inp->inp_refcount) == 0) + if (!refcount_release(&inp->inp_refcount)) return (false); MPASS(inp->inp_flags & INP_FREED); @@ -1745,7 +1745,7 @@ in_pcbrele_wlocked(struct inpcb *inp) INP_WLOCK_ASSERT(inp); - if (refcount_release(&inp->inp_refcount) == 0) + if (!refcount_release(&inp->inp_refcount)) return (false); MPASS(inp->inp_flags & INP_FREED); From nobody Mon Feb 13 21:35:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFyM02W8fz3qNv3; Mon, 13 Feb 2023 21:35: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 4PFyM01t3Sz4b3p; Mon, 13 Feb 2023 21:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676324156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wUbbXmC4xYvxePReXGPAvhg41YVp6reMe1CQjsxC6JU=; b=dsMxAFdSfHsNk9ghYotEIi0R9qKR+0DAb2oxphQEEIFxOfciDBQN+6Z4oxAuZw5h8yOsU7 Dnh7zR5KCesl76T/O7j+wBt9wyFNhpJo2p7dzajPSo7vg9Poknd5CoNykwCWoTS0lLIEXZ KoqVYUbIr5DjJdqrsbz89xOtrZko5g4EJq6dh1mwcTber1kr2HvWe17rF2tsfK9ox/01Za PorgatW90xqB8hEB7EiKRiymhMnZyCWFCj0+MbncEEGq4ICSJSCoqRrFXN97vjWiKo7Diq ECgOFqgbH9iXTJDIf3xcgWqEnu6DfFJSadRMP7wQClorb9ICNOxjRqhT8PLcJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676324156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wUbbXmC4xYvxePReXGPAvhg41YVp6reMe1CQjsxC6JU=; b=TQLdemTwlNVD8XtSjIDRF4g3p9+23a/3t1yTKwUcHzukKXPhYag/Jk7qO4DiPEm6shfepm XMNjV48Px3wqN1/HdIjMumRHjX3pbsnyyV7Drc6CK1H5MADkd5+h2qyjScQ/YAY8jemTFu LH+cawKIXd8YoEjH2RiIQMWqnwbcpiSMoEpwgkx/iUvWlBOUdDAPswS5wZXCyR72BaoBip 7HAVSiuZ+Kt6AC6m3583jT5WQEsaHs8IaihbnBHJR0YAVZhJdHLnKqGQF+5UJIRyHx1Nwm wehZASFuoJXxd7T/z7fHnRg/MemUNO9z/LVF2WxArTZIKYW3LoQxi2a4VtBn4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676324156; a=rsa-sha256; cv=none; b=TTDQbEsQ6HQD4eTJBqqmndqrRf3Goup5kRwJq4vTbdB/QPGag6uviVPHOpcNJoyZDUwzQ7 GAXHWXD3vdy8Rm3w9ThGlF/s71acLqSGa11y2T2SeZTes4R1jM8G8pZpl2nAn1xWukC0Np vV5bvrax9FuSh/EBuF2iMOdjBbIuWPQ97PK039RpTRczVnL4qRuRoUudzphUZaR9X1PwD9 AZqFkuq8HbivMmmz0k8cPaKCFW3aCXzgYzTQ6a6SWxwu+Xebdvn8JjuLSOSdkI6LyJq87x CPRyAAjnIdSoy6N7S/k4z9xj6TlU3jhjg0NeVtzdIPQbBc42h8ZBopXeBfL+Nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFyM00zLrzYlD; Mon, 13 Feb 2023 21:35: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 31DLZuDI099085; Mon, 13 Feb 2023 21:35:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DLZuMh099084; Mon, 13 Feb 2023 21:35:56 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:35:56 GMT Message-Id: <202302132135.31DLZuMh099084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d0991948182a - main - vm_fault: Fix a race in vm_fault_soft_fast() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0991948182a1a149ee84f1b9c4d3e30450c8f0b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d0991948182a1a149ee84f1b9c4d3e30450c8f0b commit d0991948182a1a149ee84f1b9c4d3e30450c8f0b Author: Mark Johnston AuthorDate: 2023-02-13 21:24:40 +0000 Commit: Mark Johnston CommitDate: 2023-02-13 21:35:47 +0000 vm_fault: Fix a race in vm_fault_soft_fast() When vm_fault_soft_fast() creates a mapping, it release the VM map lock before unbusying the top-level object. Without the map lock, however, nothing prevents the VM object from being deallocated while still busy. Fix the problem by unbusying the object before releasing the VM map lock. If vm_fault_soft_fast() fails to create a mapping, the VM map lock is not released, so those cases don't need to change. Reported by: syzkaller Reviewed by: kib (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38527 --- sys/vm/vm_fault.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 959e67b88a38..87c15e972279 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -338,20 +338,16 @@ vm_fault_soft_fast(struct faultstate *fs) #endif int psind; vm_offset_t vaddr; - enum fault_status res; MPASS(fs->vp == NULL); - res = FAULT_SUCCESS; vaddr = fs->vaddr; vm_object_busy(fs->first_object); m = vm_page_lookup(fs->first_object, fs->first_pindex); /* A busy page can be mapped for read|execute access. */ if (m == NULL || ((fs->prot & VM_PROT_WRITE) != 0 && - vm_page_busied(m)) || !vm_page_all_valid(m)) { - res = FAULT_FAILURE; - goto out; - } + vm_page_busied(m)) || !vm_page_all_valid(m)) + goto fail; m_map = m; psind = 0; #if VM_NRESERVLEVEL > 0 @@ -386,10 +382,8 @@ vm_fault_soft_fast(struct faultstate *fs) #endif if (pmap_enter(fs->map->pmap, vaddr, m_map, fs->prot, fs->fault_type | PMAP_ENTER_NOSLEEP | (fs->wired ? PMAP_ENTER_WIRED : 0), psind) != - KERN_SUCCESS) { - res = FAULT_FAILURE; - goto out; - } + KERN_SUCCESS) + goto fail; if (fs->m_hold != NULL) { (*fs->m_hold) = m; vm_page_wire(m); @@ -398,12 +392,13 @@ vm_fault_soft_fast(struct faultstate *fs) vm_fault_prefault(fs, vaddr, PFBAK, PFFOR, true); VM_OBJECT_RUNLOCK(fs->first_object); vm_fault_dirty(fs, m); + vm_object_unbusy(fs->first_object); vm_map_lookup_done(fs->map, fs->entry); curthread->td_ru.ru_minflt++; - -out: + return (FAULT_SUCCESS); +fail: vm_object_unbusy(fs->first_object); - return (res); + return (FAULT_FAILURE); } static void From nobody Mon Feb 13 22:31:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFzbH717Cz3qVhS; Mon, 13 Feb 2023 22:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFzbH6Z2Bz3F6B; Mon, 13 Feb 2023 22:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hm1VMOzPLKqQJAHbOuuNH59UB1ZbYqVewTCAVbVaL20=; b=r0AUooJpY8Ln1gY2B4hE+ty9dnxrtRnCRy7C89BcGpYhkzTk1tfK8JU3yZVGGMRJ1iqSzL Cp0m9JmpmebQa5tSnBN/oqoALMkU6yXX/6lOL0kKkKqh7kwGB7aMAFX+uKpxEguXCu7XB1 rSn1QikvTI4RRJI+pv+EISM22ETAzYbeADGqOLQeYYYXTCMcMfSFw1HJHLJN31SvYNCq/V 1DeNrKVPtymVkV7eljHon7NIKne3TZ/yAaAIfFRL5yo1eSTot0M5kCYBkKFYVvsgJHvs/q aRriXB+utkWP8eMh8BuheXPk78sC3nDlMJjmxsM3UIC3JVvRaXmVKsdzHEhTdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hm1VMOzPLKqQJAHbOuuNH59UB1ZbYqVewTCAVbVaL20=; b=MrT4kIOi6ZBM8Bt0wwfSqLWoagezXOkiicJs4zydUmQR1fA3yiWwLiD7m2/ihLvF8UnHaB XvJJLxAc5lb6liOXo7PsIyvOHXxwSyvlWQ+vmmo3n8foElAd8+TxQcuDo1d5QQJuvIty9a ECmNxluFGivofEyUmJkuFlpiykbTIDjGqEgLRjoKg8yjBwmD4feVf/N0GDYIYLnHquBjPD uJS+bxeuT/GOSN12eaYrbMbwk/exOVlNSPf3lThkPz1Qf/lBBvWmcsER6h99pZFzbhOEZK tXhv+no5HVDzp11X1h6NgYeyBZlkz+aSWcDMNtz0g6w+WCZIUiMfJSmHlmonSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676327499; a=rsa-sha256; cv=none; b=srYBvTensLovCPFiwki5IGUbeawyLQu1MRunnS9JKLG4sk9+FFNh0e0SdbxRnMaLi9sOjx +euQHCHgO/HJgpSJbKXza01H6avKPhdlpLOxdpk1jk4gXpC5/oy/jFdqdyfbHC8uTw3JNs rvPCbdObPbM//5T+95mSVJHMgs4anxN68MeOhOXfZikahfklNvlU9DtG7pwa2OSrmnBsvW soJj10kTOuvqW9B1IOXDgN268ECzJ35VHKdKSOJFmTp2X39kk+roJYmZYskMKaTZCEEr8N JmxJCB+aaQ5Qx5vJuB3Np+2gx/ZuCIZymz8R0p4QRc7XctZfFRFrWKno3M3cRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFzbH5chCzbjt; Mon, 13 Feb 2023 22:31: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 31DMVdMW080688; Mon, 13 Feb 2023 22:31:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DMVddp080687; Mon, 13 Feb 2023 22:31:39 GMT (envelope-from git) Date: Mon, 13 Feb 2023 22:31:39 GMT Message-Id: <202302132231.31DMVddp080687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 020e8a4d0609 - main - allocbuf(): convert direct panic() calls to KASSERT()s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 020e8a4d0609d56cb49a9f35258ff07815d5e478 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=020e8a4d0609d56cb49a9f35258ff07815d5e478 commit 020e8a4d0609d56cb49a9f35258ff07815d5e478 Author: Konstantin Belousov AuthorDate: 2023-02-11 18:03:22 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-13 22:28:42 +0000 allocbuf(): convert direct panic() calls to KASSERT()s Also do minor style adjustments. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38549 --- sys/kern/vfs_bio.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 3a5afec88a02..abc3eea9be4e 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -4363,8 +4363,9 @@ allocbuf(struct buf *bp, int size) if (bp->b_bcount == size) return (1); - if (bp->b_kvasize != 0 && bp->b_kvasize < size) - panic("allocbuf: buffer too small"); + KASSERT(bp->b_kvasize == 0 || bp->b_kvasize >= size, + ("allocbuf: buffer too small %p %#x %#x", + bp, bp->b_kvasize, size)); newbsize = roundup2(size, DEV_BSIZE); if ((bp->b_flags & B_VMIO) == 0) { @@ -4381,11 +4382,12 @@ allocbuf(struct buf *bp, int size) } else { int desiredpages; - desiredpages = (size == 0) ? 0 : + desiredpages = size == 0 ? 0 : num_pages((bp->b_offset & PAGE_MASK) + newbsize); - if (bp->b_flags & B_MALLOC) - panic("allocbuf: VMIO buffer can't be malloced"); + KASSERT((bp->b_flags & B_MALLOC) == 0, + ("allocbuf: VMIO buffer can't be malloced %p", bp)); + /* * Set B_CACHE initially if buffer is 0 length or will become * 0-length. From nobody Mon Feb 13 22:31:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFzbK0kTpz3qVnY; Mon, 13 Feb 2023 22:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PFzbK0HSQz3FJ4; Mon, 13 Feb 2023 22:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfPMFJ/flNYv5ELplkFlSQWCSHjcqqcF1vFeYRUgvX0=; b=n3FBqBz5J9IwiTggrlg5FpTCG3jBjFHllBZNx1rUVbfsCyqbZIK5i+5XNtRi2iLX03Br1a jBDtqlux2xW2zy3VCfgCiFWY2bnU/oIM1A/GiW3TmT05+8725Rg+ItjAUp0/cQY9Hz2nkN 7rq5CLGsidVI42Pntg9yo4h3qY64C0Lmd+TZSwe1S26BFV3MOJvKKjNxAZMUYfk0yXqhbm yBLYwR+i8poQrLktxDS01RYFwagROyBk1fDb4WMbVJmkrLblRCAPhzL6d96oR+GjXHThRl AhQpdyifIjzN9WGbzOobkVz9XqDwydKt19vqfSzHRrlzJEgpLi3j/tB/p9iUJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfPMFJ/flNYv5ELplkFlSQWCSHjcqqcF1vFeYRUgvX0=; b=Sv8K949umjTyiLFUXsYf2qqBH+w9dFth0yTZhLl04ravf/uomt2hfuqc+sL8N8I1zOh15t 1ozIcbMJSMrE4fGZDatY7qlHfLBuqPtT4BYVHhObrQ+JOAKCt/a5nZpvt2aoMdoOSWQEWG iYoHaWkakxyqNcxxf9auDciVJq+FsXEC3Fx3dvNU1HE7FfcQ4kuTujpFLzF2TwF0wFzBoh iUZ5TYLW+ZsEESYlEYQbRnW2GZBhQv1aqPLSDB6h17kDA8lT/ycpz+xNDZRlq3oVz8Lilg qjZbxaZp/1fs3u/CrbeSKYNcykjb/3ufAIQiO6W4rW695O7CJZ1/DE86oDWRtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676327501; a=rsa-sha256; cv=none; b=PYzUhXCltrI+xsACZWjP4ffk0y1l046Mruz8trIfj1UR8GIAapI5LqW5hxBUFT+cbVpnYB wX6orxKLY9CmMsLGHoNybXNG2BJCCv2germ5YKw5a9VV9cQjRHE9GappA7Q8vb7N3vc7kX iPG14TxMApxBW/KT0GtHWlS17Cr7aA6Oh95I3pd/NXT7iIs3gofHcY0RlhlwSLhogx6h3w NPeRXL83xKpmz4k7yzRjNsBqo2O91h0wOJhdxizsH70Ib/tWp8STb8ZW0bHOO6U6nMPZxM kTjaiNKj9zgKugdGsxP9ZrOLUXQmjbmLJgLxF/44LwW6DvF6u/BvJSGTe2kl6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFzbJ6VN9zbcs; Mon, 13 Feb 2023 22:31: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 31DMVefv080726; Mon, 13 Feb 2023 22:31:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DMVeKE080725; Mon, 13 Feb 2023 22:31:40 GMT (envelope-from git) Date: Mon, 13 Feb 2023 22:31:40 GMT Message-Id: <202302132231.31DMVeKE080725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e59180ea09a1 - main - msdosfs: correct handling of vnode pager size on file extension error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e59180ea09a1d1d1463f2a269e94efa0f0b677c5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e59180ea09a1d1d1463f2a269e94efa0f0b677c5 commit e59180ea09a1d1d1463f2a269e94efa0f0b677c5 Author: Konstantin Belousov AuthorDate: 2023-02-10 04:58:43 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-13 22:29:19 +0000 msdosfs: correct handling of vnode pager size on file extension error If extension fails, vnode pager recorded size might be left increased. Only update vnode pager when extension is past the point of no rollback. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38549 --- sys/fs/msdosfs/msdosfs_denode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 9a9916e39a67..6c38481681de 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -386,10 +386,8 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) return (EINVAL); } - if (dep->de_FileSize < length) { - vnode_pager_setsize(DETOV(dep), length); + if (dep->de_FileSize < length) return (deextend(dep, length, cred)); - } /* * If the desired length is 0 then remember the starting cluster of @@ -530,6 +528,7 @@ deextend(struct denode *dep, u_long length, struct ucred *cred) return (error); } } + vnode_pager_setsize(DETOV(dep), length); dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; return (deupdat(dep, !DOINGASYNC(DETOV(dep)))); From nobody Mon Feb 13 22:31:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFzbL1w0xz3qW1L; Mon, 13 Feb 2023 22:31: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 4PFzbL1FP6z3FQr; Mon, 13 Feb 2023 22:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MB8dE1Oye9/WMnST/bhHTkEEm/35sTGj4K4hb0/QWGk=; b=a/RjkBfrwc+nvQ7UbAvAvUB8ki9qDDm3joJZ8S49vHwexjyJEIXJhbvWjWZyo04pto3Z+m vOpdVdcGe5kQmenkT11/4rjOWpWdBd9e3hDBpxGLuRNjfhaXmhvSvJnQ4+ACUMwvtnoQ/M 1n61/g9K2trOBGn0tXT47RgoEA4MLCmpzAUrNNxxAXevEzZFtcfxuz0Nu+2+Xddq0ENsLI eO5ED+PnO52HyQaBE92n4N6NZX3piRsl6PVBckxae/k2FumC07hTFs4FVjlcWqTV5pe506 pLDWuAsaXcKt2mpsrYGy6eyFwXX8h8q68TVLKWduU4TdNUu5MZOtXQyHQzmX4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MB8dE1Oye9/WMnST/bhHTkEEm/35sTGj4K4hb0/QWGk=; b=X3TUuttKdvk/VaOJfLrFg/qxr0Hz+2TRPO5CfcCs/kSljSyKBOpgTYDFhHutl9MLovnJAk GfLnZJtG37/5T/0TfoSsfOwFvRWxHqjr5YvgM+Q7AJaglie+mbNGt+5seDJDkcT/suKM9l s+P3xV0bpK12RP/Pve0/JH4V7pyHhdk6GPiriV5iK0dZvvKacUj/nx5xan9zrgm2YaqcXU J2REyy2u8psODff+Ru/1+Ugf4Y5tc7oqbyYrm7nXtN+REugpxple8uT8T7qcQAkieJ4l+0 g5s6U/qR85LJVo5/TjDNp69y/grLTjZoq9ZEvFJejea6aLjZCtjXFxPPttwWFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676327502; a=rsa-sha256; cv=none; b=gnoWGzFIHmqeePwJbR7V17Bmkdi5hXbvC+sSl1uxrMQxNDViU7s7UbsldVgtO8kE/8SVt/ eOnS8PcZ8RZX3PTRESveosiemxhvXdvcMMfTNyhBo1pO2nrx+b+vY6qFAKr0XL3Nik3PBD w2a8/4W6yljpQjjQgNNGjc7gWm+mUJlGMZfK2wQ5jYMZrbyKCAu/W9Zha11ebF/GVPr3DK Y1iHJmUzrCsvVNrApBEo2Mj03Y1ThKw5xnH1+KjOaZ4DDZjA2XtPpnsT/bY4nwd8t6XJwj 0y+Zb/IVZseRj3BThoC5wCKihW+JlhB2PWNpvpAr5/lhaNECtMGFvGeF0+wHDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFzbL0KvxzbmP; Mon, 13 Feb 2023 22:31: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 31DMVfbp080751; Mon, 13 Feb 2023 22:31:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DMVfJn080750; Mon, 13 Feb 2023 22:31:41 GMT (envelope-from git) Date: Mon, 13 Feb 2023 22:31:41 GMT Message-Id: <202302132231.31DMVfJn080750@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 67dc1e7b0457 - main - msdosfs deextend(): memoize DETOV(dep) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67dc1e7b0457ec014a1291c5874decdefe7bffdd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=67dc1e7b0457ec014a1291c5874decdefe7bffdd commit 67dc1e7b0457ec014a1291c5874decdefe7bffdd Author: Konstantin Belousov AuthorDate: 2023-02-11 18:05:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-13 22:29:32 +0000 msdosfs deextend(): memoize DETOV(dep) Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38549 --- sys/fs/msdosfs/msdosfs_denode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 6c38481681de..0b4135d60784 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -496,13 +496,14 @@ int deextend(struct denode *dep, u_long length, struct ucred *cred) { struct msdosfsmount *pmp = dep->de_pmp; + struct vnode *vp = DETOV(dep); u_long count; int error; /* * The root of a DOS filesystem cannot be extended. */ - if ((DETOV(dep)->v_vflag & VV_ROOT) && !FAT32(pmp)) + if ((vp->v_vflag & VV_ROOT) != 0 && !FAT32(pmp)) return (EINVAL); /* @@ -528,10 +529,10 @@ deextend(struct denode *dep, u_long length, struct ucred *cred) return (error); } } - vnode_pager_setsize(DETOV(dep), length); + vnode_pager_setsize(vp, length); dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; - return (deupdat(dep, !DOINGASYNC(DETOV(dep)))); + return (deupdat(dep, !DOINGASYNC(vp))); } /* From nobody Mon Feb 13 22:31:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PFzbM36yJz3qVhj; Mon, 13 Feb 2023 22:31: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 4PFzbM264bz3FLW; Mon, 13 Feb 2023 22:31:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5izOZXZvgupkobSEM0ZQPZSA7fRnuIAPNEUzVDZhF+g=; b=lQUpfWaa2qxU33JF/tsWFl544yUtB4SutYoSuS9YAXhvjU45rGSU/a0AmgBObRMe50Gr8w n48TFbecUaPFzton3B7zFiP4kbh4Hu2uTSi+JWg290MrYdhfOonOHpGaJS7un0u33DfKxz 4t0i1q3u+fZB4z8YAyZz57KIXaCYz+/uBWs27t0lh+ozgLEV1QJ/VtVFlBm+0Gb8nyNPmD QayrO9YPZWmrEW0FuDOTf9d5B4kH1NcWmiz/joGICVUL0P33zQ6kymLt+9iLnTjOSj47A2 aPP9QQoo3AnB9ugliB2nGIhOu+fF0k1i2JoGoy3T1j3B2qsof96ya0QCpaYXTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5izOZXZvgupkobSEM0ZQPZSA7fRnuIAPNEUzVDZhF+g=; b=UYPx+65Hon5swND94eIUE5/jZge6u7nB0X+T+Iy0Hfzkak3YBlfxv+vExv1jT7lOWlTpra F8qKm4OA142ODAbyKKZ7lBL0SxNA9ZVWWkksxDfdgV/eVrK/9Yb4r/c8JglLd9ROMafCjf CM8ukNFAMUyU73TsCIvGZ9cGnScYokkz98e/6Zp4MI7XgHI+oX+7lXk9Whcw6YG+hPzYCe WI1QjiTlxelDmzlKnf8J5J2uPtpKPf/odG+TOeMmKl0OG7T0UaGiTfSUVjq3T5XNU05ALH SdDnPH45yuNDlm0ZIN1oop8LDYh3wy/e4FjArH/0BgN7UvYqhgwiS2EX/vyGMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676327503; a=rsa-sha256; cv=none; b=rMiOy0CP0AM+k9QKHLSKOs+j9nhq6r71e2/3nFkkm8Q2HPW6B+aEew3qS6BVjuM/pKOd8f +IHWcGeGgtyCP0c/PwRvjFXHY4lzSuHkNcy4ya2l4QaKkyP6DsgcnAFsBXd7E1cy00x24V qKG7yLw6l9lgzfO0I315jFAamyv6PQygb+l92v+FEch9wbpv9CYWPlyctpTAidfS37tej9 ZhVK4ESorAFr/FpI0pTVxAwxO2GdWFpAKKLIuwZZHMYaTABnofGNk5oPfJK4ilIMu4eqgd Sl5AdM6DXVBXkVbUhKWnUJ5DIgg4az0QLqbN2ObL4tyBxog7udPno9QjWIJwCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PFzbM1D9XzbgT; Mon, 13 Feb 2023 22:31: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 31DMVhjB080776; Mon, 13 Feb 2023 22:31:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DMVhCv080775; Mon, 13 Feb 2023 22:31:43 GMT (envelope-from git) Date: Mon, 13 Feb 2023 22:31:43 GMT Message-Id: <202302132231.31DMVhCv080775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0152d453a08f - main - msdosfs deextend: validate pages of the partial buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0152d453a08fa2bad694dc04a8184fce2b7faa10 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0152d453a08fa2bad694dc04a8184fce2b7faa10 commit 0152d453a08fa2bad694dc04a8184fce2b7faa10 Author: Konstantin Belousov AuthorDate: 2023-02-11 18:09:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-13 22:29:42 +0000 msdosfs deextend: validate pages of the partial buffer Suppose that the cluster size is larger than page size. If the buffer at the old EOF (before extending) was partial and dirty, it cannot be automatically neither written out nor validated by the buffer cache, since extending buffer adds invalid pages at the end. Correct the buffer state by calling vfs_bio_clrbuf() on it, to mark newly added and zeroed pages as valid. Note that UFS is immune to the problem because ffs_truncate() always allocate the block and buffer for the last byte of the file. PR: 269341 Reported by: asomers In collaboration with: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38549 --- sys/fs/msdosfs/msdosfs_denode.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 0b4135d60784..a82517acbdfe 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -497,6 +497,7 @@ deextend(struct denode *dep, u_long length, struct ucred *cred) { struct msdosfsmount *pmp = dep->de_pmp; struct vnode *vp = DETOV(dep); + struct buf *bp; u_long count; int error; @@ -523,16 +524,41 @@ deextend(struct denode *dep, u_long length, struct ucred *cred) if (count > pmp->pm_freeclustercount) return (ENOSPC); error = extendfile(dep, count, NULL, NULL, DE_CLEAR); - if (error) { - /* truncate the added clusters away again */ - (void) detrunc(dep, dep->de_FileSize, 0, cred); - return (error); - } + if (error != 0) + goto rewind; } + + /* + * For the case of cluster size larger than the page size, we + * need to ensure that the possibly dirty partial buffer at + * the old end of file is not filled with invalid pages by + * extension. Otherwise it has a contradictory state of + * B_CACHE | B_DELWRI but with invalid pages, and cannot be + * neither written out nor validated. + * + * Fix it by proactively clearing extended pages. + */ + error = bread(vp, de_cluster(pmp, dep->de_FileSize), pmp->pm_bpcluster, + NOCRED, &bp); + if (error != 0) + goto rewind; + vfs_bio_clrbuf(bp); + if (!DOINGASYNC(vp)) + (void)bwrite(bp); + else if (vm_page_count_severe() || buf_dirty_count_severe()) + bawrite(bp); + else + bdwrite(bp); + vnode_pager_setsize(vp, length); dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; return (deupdat(dep, !DOINGASYNC(vp))); + +rewind: + /* truncate the added clusters away again */ + (void)detrunc(dep, dep->de_FileSize, 0, cred); + return (error); } /* From nobody Mon Feb 13 23:08:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG0QJ24hFz3qZxm; Mon, 13 Feb 2023 23:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PG0QJ1pH6z3MWD; Mon, 13 Feb 2023 23:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676329736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aDQOwzopxhUx/62WlXytG1q8F7kJu3xI28rxZzSggk=; b=sNT14nYl2+JoVzscOZlbuqesmdFvls8ZL01MuZj6UP89SKqdk9/ugFqDLWKhLA9WUejryr b0pXBX5vjuIdR5jFTGBpzKfc6899HQ554I+Pr9y9AB9pDe5Kyudde7ZTdRFANOvPxx8Q5I AS2eaFngnfCqTsQHu4K8kzK8iZwy6cSG3PbPePxVSM0iDk3t2Or1CpLXYQz1pORtw+poXA UY/SCUJ6nD+eKX88y5qhcJgvM7kNwsfVf4kxVY+hepZc9Otkz1Gsf2ZDqm8XTF+6ELeggp 52B0odi0/IeXVWXv4JQ/R1Ym+0EIbQmaigpCDIBNLJJdymbu31YaCjdwoYA33A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676329736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aDQOwzopxhUx/62WlXytG1q8F7kJu3xI28rxZzSggk=; b=xp3ow6MDXWUyCo1X1dI8HtaC5nnoLs22PZ8iUq4RqXiDsnrQo56EH4hD9UAlp2TSR/ECwV fdpOaW22AroqgK7iXZyQRi52bhobqk0afX/hh3tANY2u+qry9Hm6jWyPt84J8LVuBOefv5 mWn2ibH7W2Iup6nocxwEC2Jyf3nRikJFYrlYfjUCaU+SJ3YX+GcNn0+klAoXnJZpymEN6p 6pe4XefD4p/9gvMnR7Qv0MeJUMBdTr0fp9WjlkWeEgXR9jm0RU3fGwJAoBuVX0XLhWQtPn zV0Sh/LxnXqK6DyOHgOU505nphXIEyQWkCl692ObmaIwy31540W+kKhVXNE4JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676329736; a=rsa-sha256; cv=none; b=wD9U5QxwGTe9X+1TVMpoXC0ET1nzpgL1aD7zPVfuf1cOiTcGN1z5y0v4STDqZ46W+sYblI eyK5rskt064zG7E0vACxXOhlX2zvS5N8Jppbacx4HFsKiCjffP+LvGWkXfCZ8OuUC/OdSD /sCjbCGztw+A5dNwkIECYCdZnV1fSuACe1GuAyJ7K9IBG4uunJrFBQeOCcjSXkGvCchngm RP6uGhITom/Jw97AoHVdxZqCOwOjIy/kAPne/YRVIdzm8Pv+2flotH3skO9NiEbLRV36fU 2IVWCxM+Co7lAiP0hREHdPo6x6vWifc05Mx5N3g/lufBtTyvNiunbdMT09cCzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PG0QJ0gWQzbpJ; Mon, 13 Feb 2023 23:08: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 31DN8upS029739; Mon, 13 Feb 2023 23:08:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DN8tMp029738; Mon, 13 Feb 2023 23:08:55 GMT (envelope-from git) Date: Mon, 13 Feb 2023 23:08:55 GMT Message-Id: <202302132308.31DN8tMp029738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 9d329bbc9aea - main - nfsd: Continue adding macros so nfsd can run in a vnet prison List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d329bbc9aea6b8f47df251072bc65403ac3e43e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=9d329bbc9aea6b8f47df251072bc65403ac3e43e commit 9d329bbc9aea6b8f47df251072bc65403ac3e43e Author: Rick Macklem AuthorDate: 2023-02-13 23:07:17 +0000 Commit: Rick Macklem CommitDate: 2023-02-13 23:07:17 +0000 nfsd: Continue adding macros so nfsd can run in a vnet prison Commit 7344856e3a6d added a lot of macros that will front end vnet macros so that nfsd(8) can run in vnet prison. This patch adds some more of them and also a lot of uses of nfsstatsv1_p instead of nfsstatsv1. nfsstatsv1_p points to nfsstatsv1 for prison0, but will point to a malloc'd structure for other prisons. It also puts nfsstatsv1_p in nfscommon.ko instead of nfsd.ko. MFC after: 3 months --- sys/fs/nfs/nfs_commonkrpc.c | 15 +- sys/fs/nfs/nfs_commonport.c | 305 ++++++++++++++++++++++------------------ sys/fs/nfsserver/nfs_nfsdport.c | 12 +- 3 files changed, 177 insertions(+), 155 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 9badd8be47d4..bf0a9e6e53ef 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -92,7 +92,6 @@ NFSSTATESPINLOCK; NFSREQSPINLOCK; NFSDLOCKMUTEX; NFSCLSTATEMUTEX; -extern struct nfsstatsv1 nfsstatsv1; extern struct nfsreqhead nfsd_reqq; extern int nfscl_ticks; extern void (*ncl_call_invalcaches)(struct vnode *); @@ -100,6 +99,8 @@ extern int nfs_numnfscbd; extern int nfscl_debuglevel; extern int nfsrv_lease; +NFSD_VNET_DECLARE(struct nfsstatsv1 *, nfsstatsv1_p); + SVCPOOL *nfscbd_pool; int nfs_bufpackets = 4; static int nfsrv_gsscallbackson = 0; @@ -782,7 +783,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, procnum = NFSV4PROC_COMPOUND; if (nmp != NULL) { - NFSINCRGLOBAL(nfsstatsv1.rpcrequests); + NFSINCRGLOBAL(nfsstatsv1_p->rpcrequests); /* Map the procnum to the old NFSv2 one, as required. */ if ((nd->nd_flag & ND_NFSV2) != 0) { @@ -917,13 +918,13 @@ tryagain: if (stat == RPC_SUCCESS) { error = 0; } else if (stat == RPC_TIMEDOUT) { - NFSINCRGLOBAL(nfsstatsv1.rpctimeouts); + NFSINCRGLOBAL(nfsstatsv1_p->rpctimeouts); error = ETIMEDOUT; } else if (stat == RPC_VERSMISMATCH) { - NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid); error = EOPNOTSUPP; } else if (stat == RPC_PROGVERSMISMATCH) { - NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid); error = EPROTONOSUPPORT; } else if (stat == RPC_CANTSEND || stat == RPC_CANTRECV || stat == RPC_SYSTEMERROR || stat == RPC_INTR) { @@ -957,11 +958,11 @@ tryagain: if (stat == RPC_INTR) error = EINTR; else { - NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid); error = ENXIO; } } else { - NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid); error = EACCES; } if (error) { diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index cb47922a34e0..e45f26d53799 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -61,7 +61,6 @@ extern struct nfssockreq nfsrv_nfsuserdsock; extern void (*nfsd_call_recall)(struct vnode *, int, struct ucred *, struct thread *); extern int nfsrv_useacl; -struct mount nfsv4root_mnt; int newnfs_numnfsd = 0; struct nfsstatsv1 nfsstatsv1; int nfs_numnfscbd = 0; @@ -76,6 +75,8 @@ vop_advlock_t *nfs_advlock_p = NULL; vop_reclaim_t *nfs_reclaim_p = NULL; uint32_t nfs_srvmaxio = NFS_SRVMAXIO; +NFSD_VNET_DEFINE(struct nfsstatsv1 *, nfsstatsv1_p); + int nfs_pnfsio(task_fn_t *, void *); static int nfs_realign_test; @@ -149,6 +150,7 @@ struct mtx nfs_clstate_mutex; /* local functions */ static int nfssvc_call(struct thread *, struct nfssvc_args *, struct ucred *); +static void nfs_clean(struct prison *); #ifdef __NO_STRICT_ALIGNMENT /* @@ -433,7 +435,9 @@ nfssvc_nfscommon(struct thread *td, struct nfssvc_args *uap) { int error; + NFSD_CURVNET_SET(NFSD_TD_TO_VNET(td)); error = nfssvc_call(td, uap, td->td_ucred); + NFSD_CURVNET_RESTORE(); NFSEXITCODE(error); return (error); } @@ -473,87 +477,87 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred) if ((uap->flag & NFSSVC_NEWSTRUCT) == 0) { /* Copy fields to the old ext_nfsstat structure. */ oldnfsstats.attrcache_hits = - nfsstatsv1.attrcache_hits; + nfsstatsv1_p->attrcache_hits; oldnfsstats.attrcache_misses = - nfsstatsv1.attrcache_misses; + nfsstatsv1_p->attrcache_misses; oldnfsstats.lookupcache_hits = - nfsstatsv1.lookupcache_hits; + nfsstatsv1_p->lookupcache_hits; oldnfsstats.lookupcache_misses = - nfsstatsv1.lookupcache_misses; + nfsstatsv1_p->lookupcache_misses; oldnfsstats.direofcache_hits = - nfsstatsv1.direofcache_hits; + nfsstatsv1_p->direofcache_hits; oldnfsstats.direofcache_misses = - nfsstatsv1.direofcache_misses; + nfsstatsv1_p->direofcache_misses; oldnfsstats.accesscache_hits = - nfsstatsv1.accesscache_hits; + nfsstatsv1_p->accesscache_hits; oldnfsstats.accesscache_misses = - nfsstatsv1.accesscache_misses; + nfsstatsv1_p->accesscache_misses; oldnfsstats.biocache_reads = - nfsstatsv1.biocache_reads; + nfsstatsv1_p->biocache_reads; oldnfsstats.read_bios = - nfsstatsv1.read_bios; + nfsstatsv1_p->read_bios; oldnfsstats.read_physios = - nfsstatsv1.read_physios; + nfsstatsv1_p->read_physios; oldnfsstats.biocache_writes = - nfsstatsv1.biocache_writes; + nfsstatsv1_p->biocache_writes; oldnfsstats.write_bios = - nfsstatsv1.write_bios; + nfsstatsv1_p->write_bios; oldnfsstats.write_physios = - nfsstatsv1.write_physios; + nfsstatsv1_p->write_physios; oldnfsstats.biocache_readlinks = - nfsstatsv1.biocache_readlinks; + nfsstatsv1_p->biocache_readlinks; oldnfsstats.readlink_bios = - nfsstatsv1.readlink_bios; + nfsstatsv1_p->readlink_bios; oldnfsstats.biocache_readdirs = - nfsstatsv1.biocache_readdirs; + nfsstatsv1_p->biocache_readdirs; oldnfsstats.readdir_bios = - nfsstatsv1.readdir_bios; + nfsstatsv1_p->readdir_bios; for (i = 0; i < NFSV4_NPROCS; i++) - oldnfsstats.rpccnt[i] = nfsstatsv1.rpccnt[i]; - oldnfsstats.rpcretries = nfsstatsv1.rpcretries; + oldnfsstats.rpccnt[i] = nfsstatsv1_p->rpccnt[i]; + oldnfsstats.rpcretries = nfsstatsv1_p->rpcretries; for (i = 0; i < NFSV4OP_NOPS; i++) oldnfsstats.srvrpccnt[i] = - nfsstatsv1.srvrpccnt[i]; + nfsstatsv1_p->srvrpccnt[i]; for (i = NFSV42_NOPS, j = NFSV4OP_NOPS; i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) oldnfsstats.srvrpccnt[j] = - nfsstatsv1.srvrpccnt[i]; + nfsstatsv1_p->srvrpccnt[i]; oldnfsstats.reserved_0 = 0; oldnfsstats.reserved_1 = 0; - oldnfsstats.rpcrequests = nfsstatsv1.rpcrequests; - oldnfsstats.rpctimeouts = nfsstatsv1.rpctimeouts; - oldnfsstats.rpcunexpected = nfsstatsv1.rpcunexpected; - oldnfsstats.rpcinvalid = nfsstatsv1.rpcinvalid; + oldnfsstats.rpcrequests = nfsstatsv1_p->rpcrequests; + oldnfsstats.rpctimeouts = nfsstatsv1_p->rpctimeouts; + oldnfsstats.rpcunexpected = nfsstatsv1_p->rpcunexpected; + oldnfsstats.rpcinvalid = nfsstatsv1_p->rpcinvalid; oldnfsstats.srvcache_inproghits = - nfsstatsv1.srvcache_inproghits; + nfsstatsv1_p->srvcache_inproghits; oldnfsstats.reserved_2 = 0; oldnfsstats.srvcache_nonidemdonehits = - nfsstatsv1.srvcache_nonidemdonehits; + nfsstatsv1_p->srvcache_nonidemdonehits; oldnfsstats.srvcache_misses = - nfsstatsv1.srvcache_misses; + nfsstatsv1_p->srvcache_misses; oldnfsstats.srvcache_tcppeak = - nfsstatsv1.srvcache_tcppeak; - oldnfsstats.srvcache_size = nfsstatsv1.srvcache_size; - oldnfsstats.srvclients = nfsstatsv1.srvclients; - oldnfsstats.srvopenowners = nfsstatsv1.srvopenowners; - oldnfsstats.srvopens = nfsstatsv1.srvopens; - oldnfsstats.srvlockowners = nfsstatsv1.srvlockowners; - oldnfsstats.srvlocks = nfsstatsv1.srvlocks; - oldnfsstats.srvdelegates = nfsstatsv1.srvdelegates; + nfsstatsv1_p->srvcache_tcppeak; + oldnfsstats.srvcache_size = nfsstatsv1_p->srvcache_size; + oldnfsstats.srvclients = nfsstatsv1_p->srvclients; + oldnfsstats.srvopenowners = nfsstatsv1_p->srvopenowners; + oldnfsstats.srvopens = nfsstatsv1_p->srvopens; + oldnfsstats.srvlockowners = nfsstatsv1_p->srvlockowners; + oldnfsstats.srvlocks = nfsstatsv1_p->srvlocks; + oldnfsstats.srvdelegates = nfsstatsv1_p->srvdelegates; for (i = 0; i < NFSV4OP_CBNOPS; i++) oldnfsstats.cbrpccnt[i] = - nfsstatsv1.cbrpccnt[i]; - oldnfsstats.clopenowners = nfsstatsv1.clopenowners; - oldnfsstats.clopens = nfsstatsv1.clopens; - oldnfsstats.cllockowners = nfsstatsv1.cllockowners; - oldnfsstats.cllocks = nfsstatsv1.cllocks; - oldnfsstats.cldelegates = nfsstatsv1.cldelegates; + nfsstatsv1_p->cbrpccnt[i]; + oldnfsstats.clopenowners = nfsstatsv1_p->clopenowners; + oldnfsstats.clopens = nfsstatsv1_p->clopens; + oldnfsstats.cllockowners = nfsstatsv1_p->cllockowners; + oldnfsstats.cllocks = nfsstatsv1_p->cllocks; + oldnfsstats.cldelegates = nfsstatsv1_p->cldelegates; oldnfsstats.cllocalopenowners = - nfsstatsv1.cllocalopenowners; - oldnfsstats.cllocalopens = nfsstatsv1.cllocalopens; + nfsstatsv1_p->cllocalopenowners; + oldnfsstats.cllocalopens = nfsstatsv1_p->cllocalopens; oldnfsstats.cllocallockowners = - nfsstatsv1.cllocallockowners; - oldnfsstats.cllocallocks = nfsstatsv1.cllocallocks; + nfsstatsv1_p->cllocallockowners; + oldnfsstats.cllocallocks = nfsstatsv1_p->cllocallocks; error = copyout(&oldnfsstats, uap->argp, sizeof (oldnfsstats)); } else { @@ -563,128 +567,128 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred) if (nfsstatver.vers == NFSSTATS_OV1) { /* Copy nfsstatsv1 to nfsstatsov1. */ nfsstatsov1.attrcache_hits = - nfsstatsv1.attrcache_hits; + nfsstatsv1_p->attrcache_hits; nfsstatsov1.attrcache_misses = - nfsstatsv1.attrcache_misses; + nfsstatsv1_p->attrcache_misses; nfsstatsov1.lookupcache_hits = - nfsstatsv1.lookupcache_hits; + nfsstatsv1_p->lookupcache_hits; nfsstatsov1.lookupcache_misses = - nfsstatsv1.lookupcache_misses; + nfsstatsv1_p->lookupcache_misses; nfsstatsov1.direofcache_hits = - nfsstatsv1.direofcache_hits; + nfsstatsv1_p->direofcache_hits; nfsstatsov1.direofcache_misses = - nfsstatsv1.direofcache_misses; + nfsstatsv1_p->direofcache_misses; nfsstatsov1.accesscache_hits = - nfsstatsv1.accesscache_hits; + nfsstatsv1_p->accesscache_hits; nfsstatsov1.accesscache_misses = - nfsstatsv1.accesscache_misses; + nfsstatsv1_p->accesscache_misses; nfsstatsov1.biocache_reads = - nfsstatsv1.biocache_reads; + nfsstatsv1_p->biocache_reads; nfsstatsov1.read_bios = - nfsstatsv1.read_bios; + nfsstatsv1_p->read_bios; nfsstatsov1.read_physios = - nfsstatsv1.read_physios; + nfsstatsv1_p->read_physios; nfsstatsov1.biocache_writes = - nfsstatsv1.biocache_writes; + nfsstatsv1_p->biocache_writes; nfsstatsov1.write_bios = - nfsstatsv1.write_bios; + nfsstatsv1_p->write_bios; nfsstatsov1.write_physios = - nfsstatsv1.write_physios; + nfsstatsv1_p->write_physios; nfsstatsov1.biocache_readlinks = - nfsstatsv1.biocache_readlinks; + nfsstatsv1_p->biocache_readlinks; nfsstatsov1.readlink_bios = - nfsstatsv1.readlink_bios; + nfsstatsv1_p->readlink_bios; nfsstatsov1.biocache_readdirs = - nfsstatsv1.biocache_readdirs; + nfsstatsv1_p->biocache_readdirs; nfsstatsov1.readdir_bios = - nfsstatsv1.readdir_bios; + nfsstatsv1_p->readdir_bios; for (i = 0; i < NFSV42_OLDNPROCS; i++) nfsstatsov1.rpccnt[i] = - nfsstatsv1.rpccnt[i]; + nfsstatsv1_p->rpccnt[i]; nfsstatsov1.rpcretries = - nfsstatsv1.rpcretries; + nfsstatsv1_p->rpcretries; for (i = 0; i < NFSV42_PURENOPS; i++) nfsstatsov1.srvrpccnt[i] = - nfsstatsv1.srvrpccnt[i]; + nfsstatsv1_p->srvrpccnt[i]; for (i = NFSV42_NOPS, j = NFSV42_PURENOPS; i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) nfsstatsov1.srvrpccnt[j] = - nfsstatsv1.srvrpccnt[i]; + nfsstatsv1_p->srvrpccnt[i]; nfsstatsov1.reserved_0 = 0; nfsstatsov1.reserved_1 = 0; nfsstatsov1.rpcrequests = - nfsstatsv1.rpcrequests; + nfsstatsv1_p->rpcrequests; nfsstatsov1.rpctimeouts = - nfsstatsv1.rpctimeouts; + nfsstatsv1_p->rpctimeouts; nfsstatsov1.rpcunexpected = - nfsstatsv1.rpcunexpected; + nfsstatsv1_p->rpcunexpected; nfsstatsov1.rpcinvalid = - nfsstatsv1.rpcinvalid; + nfsstatsv1_p->rpcinvalid; nfsstatsov1.srvcache_inproghits = - nfsstatsv1.srvcache_inproghits; + nfsstatsv1_p->srvcache_inproghits; nfsstatsov1.reserved_2 = 0; nfsstatsov1.srvcache_nonidemdonehits = - nfsstatsv1.srvcache_nonidemdonehits; + nfsstatsv1_p->srvcache_nonidemdonehits; nfsstatsov1.srvcache_misses = - nfsstatsv1.srvcache_misses; + nfsstatsv1_p->srvcache_misses; nfsstatsov1.srvcache_tcppeak = - nfsstatsv1.srvcache_tcppeak; + nfsstatsv1_p->srvcache_tcppeak; nfsstatsov1.srvcache_size = - nfsstatsv1.srvcache_size; + nfsstatsv1_p->srvcache_size; nfsstatsov1.srvclients = - nfsstatsv1.srvclients; + nfsstatsv1_p->srvclients; nfsstatsov1.srvopenowners = - nfsstatsv1.srvopenowners; + nfsstatsv1_p->srvopenowners; nfsstatsov1.srvopens = - nfsstatsv1.srvopens; + nfsstatsv1_p->srvopens; nfsstatsov1.srvlockowners = - nfsstatsv1.srvlockowners; + nfsstatsv1_p->srvlockowners; nfsstatsov1.srvlocks = - nfsstatsv1.srvlocks; + nfsstatsv1_p->srvlocks; nfsstatsov1.srvdelegates = - nfsstatsv1.srvdelegates; + nfsstatsv1_p->srvdelegates; for (i = 0; i < NFSV42_CBNOPS; i++) nfsstatsov1.cbrpccnt[i] = - nfsstatsv1.cbrpccnt[i]; + nfsstatsv1_p->cbrpccnt[i]; nfsstatsov1.clopenowners = - nfsstatsv1.clopenowners; + nfsstatsv1_p->clopenowners; nfsstatsov1.clopens = - nfsstatsv1.clopens; + nfsstatsv1_p->clopens; nfsstatsov1.cllockowners = - nfsstatsv1.cllockowners; + nfsstatsv1_p->cllockowners; nfsstatsov1.cllocks = - nfsstatsv1.cllocks; + nfsstatsv1_p->cllocks; nfsstatsov1.cldelegates = - nfsstatsv1.cldelegates; + nfsstatsv1_p->cldelegates; nfsstatsov1.cllocalopenowners = - nfsstatsv1.cllocalopenowners; + nfsstatsv1_p->cllocalopenowners; nfsstatsov1.cllocalopens = - nfsstatsv1.cllocalopens; + nfsstatsv1_p->cllocalopens; nfsstatsov1.cllocallockowners = - nfsstatsv1.cllocallockowners; + nfsstatsv1_p->cllocallockowners; nfsstatsov1.cllocallocks = - nfsstatsv1.cllocallocks; + nfsstatsv1_p->cllocallocks; nfsstatsov1.srvstartcnt = - nfsstatsv1.srvstartcnt; + nfsstatsv1_p->srvstartcnt; nfsstatsov1.srvdonecnt = - nfsstatsv1.srvdonecnt; + nfsstatsv1_p->srvdonecnt; for (i = NFSV42_NOPS, j = NFSV42_PURENOPS; i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) { nfsstatsov1.srvbytes[j] = - nfsstatsv1.srvbytes[i]; + nfsstatsv1_p->srvbytes[i]; nfsstatsov1.srvops[j] = - nfsstatsv1.srvops[i]; + nfsstatsv1_p->srvops[i]; nfsstatsov1.srvduration[j] = - nfsstatsv1.srvduration[i]; + nfsstatsv1_p->srvduration[i]; } nfsstatsov1.busyfrom = - nfsstatsv1.busyfrom; + nfsstatsv1_p->busyfrom; nfsstatsov1.busyfrom = - nfsstatsv1.busyfrom; + nfsstatsv1_p->busyfrom; error = copyout(&nfsstatsov1, uap->argp, sizeof(nfsstatsov1)); } else if (nfsstatver.vers != NFSSTATS_V1) @@ -696,41 +700,41 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred) } if (error == 0) { if ((uap->flag & NFSSVC_ZEROCLTSTATS) != 0) { - nfsstatsv1.attrcache_hits = 0; - nfsstatsv1.attrcache_misses = 0; - nfsstatsv1.lookupcache_hits = 0; - nfsstatsv1.lookupcache_misses = 0; - nfsstatsv1.direofcache_hits = 0; - nfsstatsv1.direofcache_misses = 0; - nfsstatsv1.accesscache_hits = 0; - nfsstatsv1.accesscache_misses = 0; - nfsstatsv1.biocache_reads = 0; - nfsstatsv1.read_bios = 0; - nfsstatsv1.read_physios = 0; - nfsstatsv1.biocache_writes = 0; - nfsstatsv1.write_bios = 0; - nfsstatsv1.write_physios = 0; - nfsstatsv1.biocache_readlinks = 0; - nfsstatsv1.readlink_bios = 0; - nfsstatsv1.biocache_readdirs = 0; - nfsstatsv1.readdir_bios = 0; - nfsstatsv1.rpcretries = 0; - nfsstatsv1.rpcrequests = 0; - nfsstatsv1.rpctimeouts = 0; - nfsstatsv1.rpcunexpected = 0; - nfsstatsv1.rpcinvalid = 0; - bzero(nfsstatsv1.rpccnt, - sizeof(nfsstatsv1.rpccnt)); + nfsstatsv1_p->attrcache_hits = 0; + nfsstatsv1_p->attrcache_misses = 0; + nfsstatsv1_p->lookupcache_hits = 0; + nfsstatsv1_p->lookupcache_misses = 0; + nfsstatsv1_p->direofcache_hits = 0; + nfsstatsv1_p->direofcache_misses = 0; + nfsstatsv1_p->accesscache_hits = 0; + nfsstatsv1_p->accesscache_misses = 0; + nfsstatsv1_p->biocache_reads = 0; + nfsstatsv1_p->read_bios = 0; + nfsstatsv1_p->read_physios = 0; + nfsstatsv1_p->biocache_writes = 0; + nfsstatsv1_p->write_bios = 0; + nfsstatsv1_p->write_physios = 0; + nfsstatsv1_p->biocache_readlinks = 0; + nfsstatsv1_p->readlink_bios = 0; + nfsstatsv1_p->biocache_readdirs = 0; + nfsstatsv1_p->readdir_bios = 0; + nfsstatsv1_p->rpcretries = 0; + nfsstatsv1_p->rpcrequests = 0; + nfsstatsv1_p->rpctimeouts = 0; + nfsstatsv1_p->rpcunexpected = 0; + nfsstatsv1_p->rpcinvalid = 0; + bzero(nfsstatsv1_p->rpccnt, + sizeof(nfsstatsv1_p->rpccnt)); } if ((uap->flag & NFSSVC_ZEROSRVSTATS) != 0) { - nfsstatsv1.srvcache_inproghits = 0; - nfsstatsv1.srvcache_nonidemdonehits = 0; - nfsstatsv1.srvcache_misses = 0; - nfsstatsv1.srvcache_tcppeak = 0; - bzero(nfsstatsv1.srvrpccnt, - sizeof(nfsstatsv1.srvrpccnt)); - bzero(nfsstatsv1.cbrpccnt, - sizeof(nfsstatsv1.cbrpccnt)); + nfsstatsv1_p->srvcache_inproghits = 0; + nfsstatsv1_p->srvcache_nonidemdonehits = 0; + nfsstatsv1_p->srvcache_misses = 0; + nfsstatsv1_p->srvcache_tcppeak = 0; + bzero(nfsstatsv1_p->srvrpccnt, + sizeof(nfsstatsv1_p->srvrpccnt)); + bzero(nfsstatsv1_p->cbrpccnt, + sizeof(nfsstatsv1_p->cbrpccnt)); } } goto out; @@ -848,6 +852,34 @@ nfs_pnfsio(task_fn_t *func, void *context) return (ret); } +static void +nfs_clean(struct prison *pr) +{ + + NFSD_CURVNET_SET(pr->pr_vnet); + if (pr != &prison0) + free(NFSD_VNET(nfsstatsv1_p), M_TEMP); + /* Clean out the name<-->id cache. */ + nfsrv_cleanusergroup(); + NFSD_CURVNET_RESTORE(); +} + +/* + * Initialize everything that needs to be initialized for a vnet. + */ +static void +nfs_vnetinit(const void *unused __unused) +{ + + if (curthread->td_ucred->cr_prison == &prison0) + NFSD_VNET(nfsstatsv1_p) = &nfsstatsv1; + else + NFSD_VNET(nfsstatsv1_p) = malloc(sizeof(struct nfsstatsv1), + M_TEMP, M_WAITOK | M_ZERO); +} +SYSINIT(nfs_vnetinit, SI_SUB_VNET_DONE, SI_ORDER_ANY, + nfs_vnetinit, NULL); + extern int (*nfsd_call_nfscommon)(struct thread *, struct nfssvc_args *); /* @@ -885,8 +917,7 @@ nfscommon_modevent(module_t mod, int type, void *data) } nfsd_call_nfscommon = NULL; - /* Clean out the name<-->id cache. */ - nfsrv_cleanusergroup(); + nfs_clean(&prison0); /* and get rid of the mutexes */ mtx_destroy(&nfs_nameid_mutex); mtx_destroy(&newnfsd_mtx); diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index bcc49f8bcac3..633d31ea6511 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -61,7 +61,6 @@ extern u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1; extern int nfsrv_useacl; extern int newnfs_numnfsd; extern int nfsrv_sessionhashsize; -extern struct nfsstatsv1 nfsstatsv1; extern struct nfslayouthash *nfslayouthash; extern int nfsrv_layouthashsize; extern struct mtx nfsrv_dslock_mtx; @@ -79,6 +78,7 @@ NFSD_VNET_DECLARE(struct nfsclienthashhead *, nfsclienthash); NFSD_VNET_DECLARE(struct nfslockhashhead *, nfslockhash); NFSD_VNET_DECLARE(struct nfssessionhash *, nfssessionhash); NFSD_VNET_DECLARE(struct nfsv4lock, nfsd_suspend_lock); +NFSD_VNET_DECLARE(struct nfsstatsv1 *, nfsstatsv1_p); NFSDLOCKMUTEX; NFSSTATESPINLOCK; @@ -102,7 +102,6 @@ NFSD_VNET_DEFINE(struct nfsrchash_bucket *, nfsrcahash_table); NFSD_VNET_DEFINE(struct nfsrvfh, nfs_rootfh); NFSD_VNET_DEFINE(int, nfs_rootfhset) = 0; NFSD_VNET_DEFINE(struct callout, nfsd_callout); -NFSD_VNET_DEFINE(struct nfsstatsv1 *, nfsstatsv1_p); NFSD_VNET_DEFINE_STATIC(struct mount *, nfsv4root_mnt); NFSD_VNET_DEFINE_STATIC(struct vfsoptlist, nfsv4root_opt); NFSD_VNET_DEFINE_STATIC(struct vfsoptlist, nfsv4root_newopt); @@ -3535,13 +3534,6 @@ nfsd_mntinit(void) nfsrvd_init(0); NFSD_UNLOCK(); - if (curthread->td_ucred->cr_prison == &prison0) - NFSD_VNET(nfsstatsv1_p) = &nfsstatsv1; - else - NFSD_VNET(nfsstatsv1_p) = malloc(sizeof(struct nfsstatsv1), - M_TEMP, M_WAITOK | M_ZERO); - nfsstatsv1_p->srvcache_tcppeak = 0; - nfsstatsv1_p->srvcache_size = 0; NFSD_VNET(nfsv4root_mnt) = malloc(sizeof(struct mount), M_TEMP, M_WAITOK | M_ZERO); NFSD_VNET(nfsv4root_mnt)->mnt_flag = (MNT_RDONLY | MNT_EXPORTED); @@ -7167,8 +7159,6 @@ nfsrv_cleanup(struct prison *pr) free(NFSD_VNET(nfssessionhash), M_NFSDSESSION); free(NFSD_VNET(nfsv4root_mnt), M_TEMP); NFSD_VNET(nfsv4root_mnt) = NULL; - if (pr != &prison0) - free(NFSD_VNET(nfsstatsv1_p), M_TEMP); NFSD_CURVNET_RESTORE(); } From nobody Mon Feb 13 23:16:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG0bL27cWz3qc0s; Mon, 13 Feb 2023 23:16: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 4PG0bL1dNhz3NfF; Mon, 13 Feb 2023 23:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676330206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djBRDtvGi3aFzzIVqrA4pb3qh7862twW+41qc9KrDms=; b=STwJAFO9vRTlfmNLwJZYjYJimpnuGWptP8NbKfK8v5G8jPq7gWOXcfdgwOSpPxoKhbBYO5 l0WR7qRj5qUXHe4SqvjzSrwnP+GVpMIOb6zmPMI0PZYzT3BytUzE1TB6X0/6FgoxQIoJ/m VCT0grSQ6Lzc2sjj8p9kCK4EoUD+1GlST+U5hYxB/RByJuyYB1QJIQX7PsaqhJgNs5iQU0 /DjiVS6Ag0hS9/Z451A8C4ZVq770dgViF4RwXzZSiPHXuNgo/9+G1pj2A8SO1T/ceexBTu QB8qrPg6UvoN4QZkG3eoCjT5qDw/Dlpu2KDHhxoY1kCZEEFyWqAj2O0DkrcwnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676330206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djBRDtvGi3aFzzIVqrA4pb3qh7862twW+41qc9KrDms=; b=sgtNYqfMlQnhLnfVzY6Q/u2GLeJ9M+bp3T8h6JmAXMV15F0LMB55jEXtZvqttmNSa1aE99 wfZy5MJH0YkcgLYp1KAZgTem0ztVP9a/zqZOOjrQW+XZ4HJG0NEK43QkoBTbIeTiQGjR4D yk+TatUUrKugT3R0lxd0h+xOWC3hGCe1t0FwqslqC8EcXVafwTSk31X4rs4cF95lKFAuzo ddhr0mqKqa934E/CXm3lMsIARHa+Fd766VINqM5cQ2g5D0lDUa0KNc2r2aRF+WVc1jRlhu KzuipqUOmn781Fw6ui6uVhou0lOn/RiuVWgYjDnoW8rWvV8LdBL0Scn26PGwTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676330206; a=rsa-sha256; cv=none; b=IS+zajM0QU1TcH90s8VPHo/JDDRSK1Fbf05NK24DKFSCYTmuL8uGBl8RjMra6IVvM+PH7u GIY+JrBkWfTuMfVWzfIP7Vi5QZQHUNAloazv9KVaqJfH33AIpkrovxK5fZUwnA2pDptr6Q JLOVPg/hu+7dP0TH+V26eFyMkiVg8tgElIYgeINagq0vmekFi/TSFgQawIbpQZClTqzUAc PLZIQILjV2D6h5GPJRQ5pWjU915nLAmDedWC0AZuL31siUXmu3dCbFycUq1tvXg2AkUHDh SwVbXt/qkjhpQr84qZ3npz1+RdsuI55SepbXYpl+Lq6M7F/oB4adQ+bki8XDWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PG0bL0h1CzcZ5; Mon, 13 Feb 2023 23:16: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 31DNGjWv044321; Mon, 13 Feb 2023 23:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DNGjis044320; Mon, 13 Feb 2023 23:16:45 GMT (envelope-from git) Date: Mon, 13 Feb 2023 23:16:45 GMT Message-Id: <202302132316.31DNGjis044320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 889f07460151 - main - tmpfs_access(): style fixes and remove redundand assertions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 889f07460151ad20d3171cb37c608aaee112e408 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=889f07460151ad20d3171cb37c608aaee112e408 commit 889f07460151ad20d3171cb37c608aaee112e408 Author: Konstantin Belousov AuthorDate: 2023-02-12 22:15:00 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-13 23:16:38 +0000 tmpfs_access(): style fixes and remove redundand assertions Note that MPASS(VOP_ISLOCKED(vp)) is simply broken. Reviewed by: markj, mjg Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38557 --- sys/fs/tmpfs/tmpfs_vnops.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 28de8c989487..c7371de28896 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -379,20 +379,17 @@ int tmpfs_access(struct vop_access_args *v) { struct vnode *vp = v->a_vp; - accmode_t accmode = v->a_accmode; struct ucred *cred = v->a_cred; + struct tmpfs_node *node = VP_TO_TMPFS_NODE(vp); mode_t all_x = S_IXUSR | S_IXGRP | S_IXOTH; + accmode_t accmode = v->a_accmode; int error; - struct tmpfs_node *node; - - MPASS(VOP_ISLOCKED(vp)); - - node = VP_TO_TMPFS_NODE(vp); /* * Common case path lookup. */ - if (__predict_true(accmode == VEXEC && (node->tn_mode & all_x) == all_x)) + if (__predict_true(accmode == VEXEC && + (node->tn_mode & all_x) == all_x)) return (0); switch (vp->v_type) { @@ -401,7 +398,8 @@ tmpfs_access(struct vop_access_args *v) case VLNK: /* FALLTHROUGH */ case VREG: - if (accmode & VWRITE && vp->v_mount->mnt_flag & MNT_RDONLY) { + if ((accmode & VWRITE) != 0 && + (vp->v_mount->mnt_flag & MNT_RDONLY) != 0) { error = EROFS; goto out; } @@ -421,7 +419,7 @@ tmpfs_access(struct vop_access_args *v) goto out; } - if (accmode & VWRITE && node->tn_flags & IMMUTABLE) { + if ((accmode & VWRITE) != 0 && (node->tn_flags & IMMUTABLE) != 0) { error = EPERM; goto out; } @@ -430,8 +428,6 @@ tmpfs_access(struct vop_access_args *v) accmode, cred); out: - MPASS(VOP_ISLOCKED(vp)); - return (error); } @@ -1157,7 +1153,7 @@ tmpfs_rename(struct vop_rename_args *v) TMPFS_UNLOCK(tmp); error = EINVAL; if (newname != NULL) - free(newname, M_TMPFSNAME); + free(newname, M_TMPFSNAME); goto out_locked; } parent = n->tn_dir.tn_parent; From nobody Mon Feb 13 23:16:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG0bM335Kz3qc2y; Mon, 13 Feb 2023 23: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 4PG0bM2Yggz3NLB; Mon, 13 Feb 2023 23: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=1676330207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ft0PIZgDcluwyvuDk2FzTIcALGKw3YpnMXKH9x9hkY=; b=KpdpxabK5LYqg//O4cmsMyhs7b/nYpmdo8NyEYLRHQ2mSTBHkKQgg8WyCbtrq+3Dr3dUx6 hfymwQBJFsZiDrOtiV6sokydYe57c16Y7sjvrcOmHB68l0PGNzI0tvXNC8TIQqqYrUUWoO 0CNbnpUogTFQyrKJWOwfRGehfoFtasWApmTAaNNtyluFgvotHqbo0gmL/4X3JXw8OSJH1N g2VogIWoYCC1MKHdFketTYB6wLkDdNMLryJi+uygNa5yGSa/Y0QQA5qwIhlqfP//i00vra f+y5+EvlUvCTWPQV+5RWN2W5s+v5ThivDFNHe93PGKxtrDs1HPJCpuheH01AkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676330207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ft0PIZgDcluwyvuDk2FzTIcALGKw3YpnMXKH9x9hkY=; b=sqiH3QyX3rNabDqL/GcGwmeb5GcgKt2G0MWZIemJFSiXbVpvoDYr40rX7BqFCq3Mr47ckJ KfmEkxrxRaXUzbxF/OMu390FYT0wWj7FuYTa6ekN0PWk1LBzfzbCd4cIG6wUhEN456TjW8 y6aDuJGUg+Dlr1weMS+eFk7nhDipb3mFkfKAKscpwHuHLzEYgRfhRWcWxh2ay/0Cr7xT6U l0SSBh7zIhrxLfP2etWiAp+XP8Qqtbyf9qGknIWr1eEeYzCfO0I/7z9yVtXl4b8qv7K6VF 4vYiSW18pGyjzm+R7ifMkdnlcGrTYnnlYWXpKUe0QATFRBnuxxO+QH4WX1iekQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676330207; a=rsa-sha256; cv=none; b=WHjtbhPMfnjz4mmh6W0YP/FltXddVpLWaXDBUyTATnUGulAyrBmPzF1apbUE2hDBkMHhgV kPLGQUf4vyiBy3zT8BhQPvL3Pb3Dxqw8OWQiSyA1fvByEhOuikJPo6rjidV4tmf5MJoBfP gDs9o6aYmAJoczrDS7x7bwbRt5BY9znYtxNWCmN0fM8W+ts51oTnoyrLtbG7WEmEU9ytvD +2lK0hPIM2riiIlnToCVn7iN7o1d7/ZzKx8CZSAzP+zuNdeAngaOw7plSNKFSfEghBHDOK +bNtriQVKyQlKv6jkC82NUOzQ8ujVLG9YEWK3KXwPZor9sOsERAwoHMhphFpzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PG0bM1NQLzcRF; Mon, 13 Feb 2023 23: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 31DNGlZe044347; Mon, 13 Feb 2023 23: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 31DNGlMm044346; Mon, 13 Feb 2023 23:16:47 GMT (envelope-from git) Date: Mon, 13 Feb 2023 23:16:47 GMT Message-Id: <202302132316.31DNGlMm044346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: adc3506d56d7 - main - Extract tmpfs-specific part of tmpfs_access() into a helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: adc3506d56d76981a0e251080b186c26edb843b4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=adc3506d56d76981a0e251080b186c26edb843b4 commit adc3506d56d76981a0e251080b186c26edb843b4 Author: Konstantin Belousov AuthorDate: 2023-02-12 22:25:25 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-13 23:16:38 +0000 Extract tmpfs-specific part of tmpfs_access() into a helper The helper tmpfs_access_locked() requires either the vnode or node locked for consistency of the access check, unlike the pure vnode op. Reviewed by: markj, mjg Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38557 --- sys/fs/tmpfs/tmpfs_vnops.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index c7371de28896..cd460636b647 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -375,6 +375,23 @@ tmpfs_fplookup_vexec(struct vop_fplookup_vexec_args *v) return (vaccess_vexec_smr(mode, node->tn_uid, node->tn_gid, cred)); } +static int +tmpfs_access_locked(struct vnode *vp, struct tmpfs_node *node, + accmode_t accmode, struct ucred *cred) +{ +#ifdef DEBUG_VFS_LOCKS + if (!mtx_owned(TMPFS_NODE_MTX(node))) { + ASSERT_VOP_LOCKED(vp, + "tmpfs_access_locked needs locked vnode or node"); + } +#endif + + if ((accmode & VWRITE) != 0 && (node->tn_flags & IMMUTABLE) != 0) + return (EPERM); + return (vaccess(vp->v_type, node->tn_mode, node->tn_uid, node->tn_gid, + accmode, cred)); +} + int tmpfs_access(struct vop_access_args *v) { @@ -383,7 +400,6 @@ tmpfs_access(struct vop_access_args *v) struct tmpfs_node *node = VP_TO_TMPFS_NODE(vp); mode_t all_x = S_IXUSR | S_IXGRP | S_IXOTH; accmode_t accmode = v->a_accmode; - int error; /* * Common case path lookup. @@ -399,10 +415,8 @@ tmpfs_access(struct vop_access_args *v) /* FALLTHROUGH */ case VREG: if ((accmode & VWRITE) != 0 && - (vp->v_mount->mnt_flag & MNT_RDONLY) != 0) { - error = EROFS; - goto out; - } + (vp->v_mount->mnt_flag & MNT_RDONLY) != 0) + return (EROFS); break; case VBLK: @@ -415,20 +429,10 @@ tmpfs_access(struct vop_access_args *v) break; default: - error = EINVAL; - goto out; - } - - if ((accmode & VWRITE) != 0 && (node->tn_flags & IMMUTABLE) != 0) { - error = EPERM; - goto out; + return (EINVAL); } - error = vaccess(vp->v_type, node->tn_mode, node->tn_uid, node->tn_gid, - accmode, cred); - -out: - return (error); + return (tmpfs_access_locked(vp, node, accmode, cred)); } int From nobody Mon Feb 13 23:16:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG0bN5mLwz3qbx3; Mon, 13 Feb 2023 23:16: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 4PG0bN39w4z3NLZ; Mon, 13 Feb 2023 23:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676330208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TDCone7YiXp56d9Y4k+rF4wpqJtgY/eBS3bkHmewim4=; b=wZda15rk23n2e5LtrZn1c3iZKgQ0I0nVGKiXFktuiLDhNQUnLOlG+BjWjx1AJbvdEMYMjO Wpec3gI9h5Yu8vfeFNkUJ4SdrHOQTEjxX+1SmyN7qCeiiFqN+Pa7n+/uNixMBDvXrKbl2k crGUIqQ2hKiOPjHvrzDWvFdu4LwP3XKMBfdbCoYQPLlYoCammUDeXcALTzGSS3SYhFCOvi gtAPQC0IpAKkJnoLEHlpvqSBcXTjx5CbCOCB4eYuuB7uZ1JGgUlmcVLCtq7nXgF/JPqmeg FUJUPXD7CDFRBLrUz9WUWK3jOwHJjooqIQmDJqI86p5xj7ybZG34FkjCQYrdag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676330208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TDCone7YiXp56d9Y4k+rF4wpqJtgY/eBS3bkHmewim4=; b=Sr7jDLmjrqmoNJ9tm4wYdw2KsKYHHsEN9k5YMApJAVfMltPOSN8XeZlY04UiAw3grcVVeb JkBzBx6SSU/ywV/ehtCyeoEZmJy4JwggFxIdEt7Tg9Jw4oourXkIViARiX/sJjTW3UJg3l YQ18Pnk/P8CM1gD1f4akxI0vLerMwzpJgdItmnB3zSGZCtaSILKMMula1d25AWoZUqCt6e tTkq6qF3yQxsGD+zIyLqk216mS3LYkOBRtqjCaupVpDSF1+Q6ko+66F7TZgYnUlEb2Za8c f0DLVoo0fi3yZr2QgV7w+yR/G1iLffGZX+Isr62hFmd1h8C6njEVMGD2efLDpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676330208; a=rsa-sha256; cv=none; b=RqkTCcE06LPf/DfTdN+tTWXfdtOTpf7NJwFd9RC81b4iBLDyYky67nMYP3LPIgn/GpVSWU vyj4LboWn3qivQkRjGxltTtNHHOfMQYijkAY1xh5u1dFkboM1qUDRQ5loJdLowKLRuGm80 AKWwwyZhZzpodq2cFcKZMcuPbY0brHN8veyyt9vN/cnJZBoTkFO8QrJDTkTnpmBz6aF4sC TDu7Zy3z4b7TpvixWtPPYQtHTyWEejEzmw/WUYGfJeQo21Q5a2EifM6ccMpyQxZz7DQU1t nYXMR9PL6+OLyf4+wNzmfi6a3dMFX9cFuTYg7e9lxdREtruwyqFv3XcQE8CVcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PG0bN25dVzbpl; Mon, 13 Feb 2023 23:16: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 31DNGms3044372; Mon, 13 Feb 2023 23:16:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DNGmZw044371; Mon, 13 Feb 2023 23:16:48 GMT (envelope-from git) Date: Mon, 13 Feb 2023 23:16:48 GMT Message-Id: <202302132316.31DNGmZw044371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3a3450eda6d4 - main - tmpfs_rename(): use tmpfs_access_locked instead of VOP_ACCESS() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a3450eda6d4616df51a30f84a872d9d43669d78 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3a3450eda6d4616df51a30f84a872d9d43669d78 commit 3a3450eda6d4616df51a30f84a872d9d43669d78 Author: Konstantin Belousov AuthorDate: 2023-02-12 23:20:25 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-13 23:16:38 +0000 tmpfs_rename(): use tmpfs_access_locked instead of VOP_ACCESS() Protect the call with the node lock. We cannot lock the fvp vnode sleepable there, because we already own other participating vnode's locks. Taking it without sleeping require unwinding the whole locking state in one more place. Note that the liveness of the node is guaranteed by the lock on the parent directory vnode. Reported and tested by: pho Fixes: cbac1f3464956185cf95955344b6009e2cc3ae40ESC Reviewed by: markj, mjg Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38557 --- sys/fs/tmpfs/tmpfs_vnops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index cd460636b647..b1d6bce6754f 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1129,7 +1129,10 @@ tmpfs_rename(struct vop_rename_args *v) if (de->td_node->tn_type == VDIR) { struct tmpfs_node *n; - error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, curthread); + TMPFS_NODE_LOCK(fnode); + error = tmpfs_access_locked(fvp, fnode, VWRITE, + tcnp->cn_cred); + TMPFS_NODE_UNLOCK(fnode); if (error) { if (newname != NULL) free(newname, M_TMPFSNAME); From nobody Mon Feb 13 23:44:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 Mon Feb 13 23:53:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG1Pr3N0jz3r9s5; Mon, 13 Feb 2023 23:53:36 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PG1Pr2t8Jz3jBs; Mon, 13 Feb 2023 23:53:36 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676332416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bYOgdFgZ1rNRyHxK4d512wex7KzTk1rFYdOHGwwnlMg=; b=BCGD3iF5jROlsxD6RwcaxfKce72klx8O2ec2cVJ47swoHZrYHEKuojI/zacUQNBNTM8A/V A3FRZjLx3Y1vcswkGa/oe3eQsq3/HwnfPKmFALmucEPYJm4K7NaU1OFvpMlT/+3m5llPov IH27XZ10W9hcT4K9avOCOUVhZqugO7Aq1YobE2lPyZpY2ivHQPFsmq/ZnocdypJSRi5jCF WRMj7+C5a6TbJM0snz3JqTT0D4+AbBDuEUgTgw0sfR0vstOwnEsWcb9E058UIM7MaYHtRc OqBKmTSL0OLxLugu0NEXUIyH001lIhL4Rl5j/zbMjTRhhTzIAYrj3xlvYuDdPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676332416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bYOgdFgZ1rNRyHxK4d512wex7KzTk1rFYdOHGwwnlMg=; b=ku6QMzgKcKWFIxM5A98u+bxLhI3fILMH/UIiODwb4O3febhN/onTWh+lYwDtOzTtH3IF8a NEVxxlI5oXpc8UV7t/IvL84o85wLKC7tZcbiaktnkmQiYMoF7AR9+WiXD19Sh9srE/EZZm Stx54p1EPOE82QNqvsnyaEfktNDp+GJFU359YWFUxaSaYeVmo1dKz20Q2/6fUuiBMSuSeG ctpuAQibQ1yJ5eiMxnpC0wlCdkVz5gEFw8h7peyHc6vlmPMFYX1Og4WpxQQf7bFlnAjUiG 5S5TqHtG7jlf9YJmLBhucKA4xz8j6tdr7fPewf5CgQuLr7O0cjsQKTwsWXF5OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676332416; a=rsa-sha256; cv=none; b=iD2YBtdiCoI0xVHP8QUyVad8U+8ZRaBlY/6kn0Gb53H0JAzq1qSlbEf4jlG5LANvujHT4g laEsznruNUSvm0yRU+rgwldn2DJUO8jOLtMEK3Npv2f6EJw4i4hZzwG9CxAuFCFho3RCNd QLo9TQkXXOztqQirOou8C7iYXcFHh4HIUqAMJmwDK2EEHG5lvMCPt3y1pZFbBjRsMoNYAa smRpEuPmgw3+FW/RjbCiU3dRnl/uXJFPgstOjs8hUFx6bI7HTNEYaiYPFbzdiVQgsmcn6R FiO57RRKU5JaxMYDLKtVLmQ3GyYgRvAZ3E4+jVIE2Soju8XoZ+5nNndQoapuog== Received: by freefall.freebsd.org (Postfix, from userid 1354) id 4380B1A273; Mon, 13 Feb 2023 23:53:36 +0000 (UTC) From: Jan Beich To: Mateusz Guzik Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 48bfd3597654 - main - Add nproc(1) In-Reply-To: <20230208202736.L7hpB%steffen__28609.3347867549$1675888077$gmane$org@sdaoden.eu> (Steffen Nurpmeso's message of "Wed, 08 Feb 2023 21:27:36 +0100") References: <202302081947.318Jlbt6052826@gitrepo.freebsd.org> <20230208202736.L7hpB%steffen__28609.3347867549$1675888077$gmane$org@sdaoden.eu> Date: Tue, 14 Feb 2023 00:53:31 +0100 Message-ID: <1qmt-6s1w-wny@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-ThisMailContainsUnwantedMimeParts: N Steffen Nurpmeso writes: > |+ if (all_flag) { > |+ cpus = sysconf(_SC_NPROCESSORS_ONLN); > > is not compatible -- note i like the FreeBSD way better, and maybe > someone should make a bug report even. > > #?0|kent:$ getconf -a|grep NPROC > _NPROCESSORS_CONF 8 > _NPROCESSORS_ONLN 4 See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330 $ cpuset -l 2-5 -- getconf -a | fgrep _NPROC _NPROCESSORS_CONF: 8 _NPROCESSORS_ONLN: 4 From nobody Mon Feb 13 23:58:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG1Wl3N25z3rB7F; Mon, 13 Feb 2023 23:58:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) (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 4PG1Wl0r15z3jWX; Mon, 13 Feb 2023 23:58:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-16aa71c1600so17112536fac.11; Mon, 13 Feb 2023 15:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tGUtzbNp9abcw3jzaGGBd0xO8nj7aYkX6iviXMVvqeE=; b=leQBOzx5GcYd8dvEvG3V2TVGS+YV1S3Q0+jI8NOA+P9GGPoWtLuIe1FOPUaoR5ZUx8 S/5OKtOaQHguG6WTVbOyV/gBdyGS/r/sj7DP1HmuOjfU1PmyDq5Hp1jd0neEFjOs1iH1 sT7VF+aiMobwQ869l5AxUo4BIterjZBF8+rkNxIZW5IVmfcLX73FKqvEXITRkZBBlwFZ M2PrTMYy+MAMvK7EmBKYNeyeFrAqrOu/VcNfTDxcsNwyI2Kh6Wv/VelpLsbyZjsNBQYl xd/4sqwuryIrWzIGmt0TOi2278Dzd4qNVup58ffNAAw1BXXnsVB8D3taYXYcpKG3YqUF DCBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tGUtzbNp9abcw3jzaGGBd0xO8nj7aYkX6iviXMVvqeE=; b=gUh8E4KUfnXI+Bnjfw9tT8n/HdHhRH1h0rnrArCd4VouhYgFzXlSZUHWUAvEUNcXse rfhclNAgVAO7cnXbCoTvm1bGqUcy5BRTMgyt9OQgRd19MVGDi8s/InNEp6LZsBRRKgoT p0REiPanHDl4tEYLwmV+mDaFvc5zqffjflLB4hbAkXMen669LUR9KmJLFpvKyh38O2Sq 2VlWnZwoA7ZLdoLAJYgGYtCPdvLTdTGDJhvLcXSOFAM0lCKG6xccgzxzOFC5Hh8WhUV/ pJzJwNDbNJppiJ9snhbcBIEVNzXftX11B0xtofzxGvatZ6IRC5HOudQmC6PG7E2XDU57 +O3g== X-Gm-Message-State: AO0yUKWnzrCOKAEnXyS3PmFq6R9XXr4WmCcY75golB2os3cJzoVSnz9/ 13ybbbERJoQjs4aTwPbFSOUcgimIsF8BgyZ0bt1ueiN8 X-Google-Smtp-Source: AK7set8VxrAhCaL+2EYd7OUkq7XpDAj3dXFVvnlBMDc2IKWHjSKkrb0J4Scpe8C47Gr5SzmEfV2asW54KF1HZbpKNXY= X-Received: by 2002:a05:6870:cf05:b0:16e:25e:f294 with SMTP id xf5-20020a056870cf0500b0016e025ef294mr390500oab.81.1676332721876; Mon, 13 Feb 2023 15:58:41 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:4381:0:b0:4b9:9c2d:ce62 with HTTP; Mon, 13 Feb 2023 15:58:41 -0800 (PST) In-Reply-To: <1qmt-6s1w-wny@FreeBSD.org> References: <202302081947.318Jlbt6052826@gitrepo.freebsd.org> <20230208202736.L7hpB%steffen__28609.3347867549$1675888077$gmane$org@sdaoden.eu> <1qmt-6s1w-wny@FreeBSD.org> From: Mateusz Guzik Date: Tue, 14 Feb 2023 00:58:41 +0100 Message-ID: Subject: Re: git: 48bfd3597654 - main - Add nproc(1) To: Jan Beich Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PG1Wl0r15z3jWX X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2/14/23, Jan Beich wrote: > Steffen Nurpmeso writes: > >> |+ if (all_flag) { >> |+ cpus = sysconf(_SC_NPROCESSORS_ONLN); >> >> is not compatible -- note i like the FreeBSD way better, and maybe >> someone should make a bug report even. >> >> #?0|kent:$ getconf -a|grep NPROC >> _NPROCESSORS_CONF 8 >> _NPROCESSORS_ONLN 4 > > See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330 > > $ cpuset -l 2-5 -- getconf -a | fgrep _NPROC > _NPROCESSORS_CONF: 8 > _NPROCESSORS_ONLN: 4 > As I mentioned previously in the thread, on linux these *don't* react to cpusets (or tasksets in linux parlance): $ getconf -a | grep _NPROC _NPROCESSORS_CONF 4 _NPROCESSORS_ONLN 4 $ taskset --cpu-list 0 getconf -a | grep _NPROC _NPROCESSORS_CONF 4 _NPROCESSORS_ONLN 4 consequently the patch proposed in the bz would introduce an incompatibility with linux -- Mateusz Guzik From nobody Tue Feb 14 00:21:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG2292cnfz3rD7J; Tue, 14 Feb 2023 00:21:37 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PG2292BSwz3lPH; Tue, 14 Feb 2023 00:21:37 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676334097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+x2UoDMvxSytTGfuvG6T5gVskPy7OJkjCAEldmPzyVg=; b=wmhKvfeEjOt5stPu3GNIkOTsuE3TlHLmrQ3Z3xMYa4e+DDfpb5RefFBQNhOrc+6d8JVWR8 M/WaMAb0f2WmTdyv1QeqbRzfyANHloGustVYIX0fJT6CuBBQZa2BiiRIT1iaQC6laenUIq Qp9k8hKBr4rT5sMGMiWGqcSK+hDb6QeFbfhI+sp67+PN6kz5E2W46VGFGmg1Zdo+lGI/Yd /nAiOrTmK3Ih7+BQKTgezchOqKY8bv1DDMRBvVHlFpTEbi3+Nq4NSR8VcWQtag2yml6s1S lik63akn1AE688zZPrDEVMqD2kovIzf5g1F+tXgEACGVhJFFKHzXqV3+gYdSpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676334097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+x2UoDMvxSytTGfuvG6T5gVskPy7OJkjCAEldmPzyVg=; b=oqQT3QGENCFoekyTnFiwkffIKUVgi+zIcJzvFOL0Z8Tb0S8lJEZYM/rB/w3qoj3daBX0sn WTq752OJVlCbkrMTB0vqL/bYAl6tdLzOxjS5Gd6EQV9QVAJRL0UWiSacO4ti4OYKJlS9SK pUc2C4jpd9mfxfebl4ZvVDdq5HXNW6qoWwiN4YkcnpsC24wE5DpnhxG3fvc7eonKy5V9XS O5zt5oZ0bs3OKx934L2wOA8lucMUia2TJILgl0EAkYsWPAs5cG9AjMwU5zYBcIsTEFwAxJ H89sNDnPQWCiy3RUcYbOO1rdPoORDkHwA+SAiXBp3NJ2JcI+m7vRMZU/WayVrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676334097; a=rsa-sha256; cv=none; b=dzxvKWy1cWIpP0gm2RJpIo+MDo5TmcugbYx6F8biWvhNWBhTLB+RRTY3iqba+sPOnI14we ipV5L8LEZiIwUBwCyLqKgwaL8L2YnVf+0zkem53Hhy2j1tyEkb0c05gttIN4cSXimTqWag 7SVW2xd2Y+i912EFKkBfpY2ubWJmH8Xtn1gV/99BmEuP9OWwxx7UYGrSUmS2TVcrHr3eWv nrIPcuTcHdj/Ik8bCoyst8xI4gddZRMRJeVo7S+ny3LgPqOhpEIX7gtIVRrmNDGHmtaE5N /BYinrdMjGHZqiMJHbHO40TsSJux3jSsgvKYWDgTmgdL/WJKIQBZg2N3LpqvfA== Received: by freefall.freebsd.org (Postfix, from userid 1354) id 2E1FC1A527; Tue, 14 Feb 2023 00:21:37 +0000 (UTC) From: Jan Beich To: Mateusz Guzik Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 48bfd3597654 - main - Add nproc(1) In-Reply-To: (Mateusz Guzik's message of "Tue, 14 Feb 2023 00:58:41 +0100") References: <202302081947.318Jlbt6052826@gitrepo.freebsd.org> <20230208202736.L7hpB%steffen__28609.3347867549$1675888077$gmane$org@sdaoden.eu> <1qmt-6s1w-wny@FreeBSD.org> Date: Tue, 14 Feb 2023 01:21:29 +0100 Message-ID: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-ThisMailContainsUnwantedMimeParts: N Mateusz Guzik writes: > On 2/14/23, Jan Beich wrote: > >> Steffen Nurpmeso writes: >> >>> |+ if (all_flag) { >>> |+ cpus = sysconf(_SC_NPROCESSORS_ONLN); >>> >>> is not compatible -- note i like the FreeBSD way better, and maybe >>> someone should make a bug report even. >>> >>> #?0|kent:$ getconf -a|grep NPROC >>> _NPROCESSORS_CONF 8 >>> _NPROCESSORS_ONLN 4 >> >> See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330 >> >> $ cpuset -l 2-5 -- getconf -a | fgrep _NPROC >> _NPROCESSORS_CONF: 8 >> _NPROCESSORS_ONLN: 4 >> > > As I mentioned previously in the thread, on linux these *don't* react > to cpusets (or tasksets in linux parlance): > > $ getconf -a | grep _NPROC > _NPROCESSORS_CONF 4 > _NPROCESSORS_ONLN 4 > $ taskset --cpu-list 0 getconf -a | grep _NPROC > _NPROCESSORS_CONF 4 > _NPROCESSORS_ONLN 4 > > consequently the patch proposed in the bz would introduce an > incompatibility with linux I've used kern.smp.cpus in old patches but found musl more practical. _SC_NPROCESSORS_ONLN is often used as a default number of jobs. glibc: - /sys/devices/system/cpu/online - /proc/stat - sched_getaffinity musl: - sched_getaffinity bionic: - /sys/devices/system/cpu/online - /proc/stat (Android < 7) From nobody Tue Feb 14 01:37:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG3jM67M0z3pttk; Tue, 14 Feb 2023 01:37: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 4PG3jM5jqgz3tXH; Tue, 14 Feb 2023 01:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676338631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LH3xPldjB4Dk6pqVqZfBcCuOPhfYbsbMUk2FjcO2mys=; b=qQD3ruNvIw8sNfynlVPxGscVeJ+EPSgFPZs/k+wgGPDakA/1QCeeg0KSoYnc6JKi4WHdPn wYBoxkf6F5JTCZ6JIM2oMHKZaXLqdIHcdj6fsAIeuh5+xNsvKteorWSWGUKlfJiafNTksk snAkQOO8nnJnQYWSO3imEPTmR417fZySFn23nu436q9ffM8wK7pkbi3X10unEG/XzdLIe3 ryq8H+EyLZPEKiu+mvZCEwG5jo2gBhIQue04UokBpVgFXOZ63qGREnxKyaOIzUs8J7B4aj dOa+MY8quU/A8QVKTuLMSUIHsF1HVgMyAHnIBSAEOcCrtHNDP8xd72XtVV4VQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676338631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LH3xPldjB4Dk6pqVqZfBcCuOPhfYbsbMUk2FjcO2mys=; b=mPqNFq3eXvpBOf6ZpeoEyKl8A2aPfJol5a46KCngxHs8tUI4U701MIVXyGbjuFEvrYXP5D YIRkb3gza9jsmN84qwa8OE49VQGbvYz5VPCaj0mQ9ea6615EzUWS4EDx6ffynvCEvElBDw TBlfAe8VkA5kCkRkxq24Vfe8n4eypv55GbLaqFw0ZHoROk7Qc8/f+M7+zGtILDWCWNxIqt AtBqSbanFPPd5S0VRXrRV2Hr3naQpB2BIkosDwxLil/7IT0xA6kT9CCdaZQ2dOlI/Nqbc5 IAdDp5zoNAcrleqV26aIYe6Z7IQlgVAN6H40mv4/diRk+r3fJ0wr9qENp64KWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676338631; a=rsa-sha256; cv=none; b=mIYBLReWYX7xNoACn67Mf6sDTQTo4Wov8NXQcxHxPxluLQDk3A/N52aSWtwuGocIw4G+zT JYFdtDpp1Q6lDdusZ2ka4tsmdRPJJ7b1TLs3wwpfHTloVSR6Wc3xkI5HMpM9iFpbK7L37h jNFrizId6QfCf3S/wg5VmbLKlTGhwsgjq1NXMniPcw77YiqSD+7JR5LulgtNAo4HlcxqSE MCuNS9B4I48geDPZumwAE90/SO8v/CjIb40d/dQizXM/IFgjdjTCgRtY4ss7xDjJIMu+Ax ix4k3HaQR4FtgaVPc6z//zIYd2rrz6e9ifKi1To3BUI6D6J2nz80LgiCxiCsrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PG3jM4mBLzgt0; Tue, 14 Feb 2023 01:37: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 31E1bB7b043659; Tue, 14 Feb 2023 01:37:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E1bBaD043658; Tue, 14 Feb 2023 01:37:11 GMT (envelope-from git) Date: Tue, 14 Feb 2023 01:37:11 GMT Message-Id: <202302140137.31E1bBaD043658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 8923de590543 - main - ice(4): Update to 1.37.7-k List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 8923de59054358980102ea5acda6c6dd58273957 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=8923de59054358980102ea5acda6c6dd58273957 commit 8923de59054358980102ea5acda6c6dd58273957 Author: Piotr Kubaj AuthorDate: 2023-02-14 01:29:44 +0000 Commit: Eric Joyner CommitDate: 2023-02-14 01:29:44 +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 --- 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 d8541b9de67a..ff5138104bf4 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -187,6 +187,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 058f4bfc2c21..02447db830dc 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -294,6 +294,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 70f4abed8122..444611c6cb58 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -42,48 +42,50 @@ dev/iicbus/ofw_iicbus.c optional iicbus aim dev/iicbus/ofw_iicbus_if.m 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) return status; *** 12047 LINES SKIPPED *** From nobody Tue Feb 14 02:57:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG5VX4jl8z3q4Q1 for ; Tue, 14 Feb 2023 02:57:56 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PG5VW6tcsz41YJ for ; Tue, 14 Feb 2023 02:57:55 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f46.google.com with SMTP id l37-20020a05600c1d2500b003dfe46a9801so10559388wms.0 for ; Mon, 13 Feb 2023 18:57:55 -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=M0ruyAMmLT2KInPireE0924m0m4Edb3qBuuo/t/xaIU=; b=t5ahocQ+F+SMGEn/TDWqWRlRXONBVLm0jDc2kM2b+acqchz1HEpqQwquWFoo9ypJoW fXUco29D1rg5lAxtff0zjcempj71Zr48Y6Pbux+W+PxdZnfd4eytpAJW3BeTH1gs3FgJ 62i/GfGXVc5XiFyqUytI+ZsyGwG0X5cWolKNptMrcx5uO/65Acuh3rdCz9H4sntrLMJl VYkJxbJ0WgIJ8ttVyEDNeWfwMFz77sYCyQlXCHwDIcMZvNIJhMNjizk6QrAbc8L0mM7H dW4pGmZUa/HLoRA4BjFsRtzYPUMm2GRy/7Bc7FSzJm4wztrKlSAMvZEv1c/+UnO7qRxO JcEQ== X-Gm-Message-State: AO0yUKViJWD9mev+JEE3Q8GBh8hjglbt2Z2ON5b5ln82EIeKf2JfxKxl HmUphV10xC7XP2Tk2ZrypU1+cA== X-Google-Smtp-Source: AK7set8xgnC5CjcCcj2+QrSa1zNn2YeP2zDnJ9pzqH/8xrN2VjNgjzEKxwSuW45b8X4B/QNXl9P0Qg== X-Received: by 2002:a05:600c:c0b:b0:3df:e1cc:94ff with SMTP id fm11-20020a05600c0c0b00b003dfe1cc94ffmr712120wmb.28.1676343474182; Mon, 13 Feb 2023 18:57:54 -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 w19-20020a05600c475300b003e11f280b8bsm13646098wmo.44.2023.02.13.18.57.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Feb 2023 18:57:53 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: f29942229d24 - main - Read the arm64 far early in el0 exceptions From: Jessica Clarke In-Reply-To: <0E3AAA1E-0B3E-4C4F-A425-CEE13BAE8723@freebsd.org> Date: Tue, 14 Feb 2023 02:57:53 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1F46E64A-2261-47B1-BA73-3649DB1E08CE@freebsd.org> References: <202302021648.312GmSXI049747@gitrepo.freebsd.org> <0E3AAA1E-0B3E-4C4F-A425-CEE13BAE8723@freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.46:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.46:from] X-Rspamd-Queue-Id: 4PG5VW6tcsz41YJ X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On 2 Feb 2023, at 21:00, Jessica Clarke wrote: >=20 > On 2 Feb 2023, at 16:48, Andrew Turner wrote: >>=20 >> The branch main has been updated by andrew: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df29942229d24ebb8b98f8c5d02f3c863= 2648007e >>=20 >> commit f29942229d24ebb8b98f8c5d02f3c8632648007e >> Author: Andrew Turner >> AuthorDate: 2023-01-25 17:47:39 +0000 >> Commit: Andrew Turner >> CommitDate: 2023-02-02 16:43:15 +0000 >>=20 >> Read the arm64 far early in el0 exceptions >>=20 >> When handling userspace exceptions on arm64 we need to dereference = the >> current thread pointer. If this is being promoted/demoted there is = a >> small window where it will cause another exception to be hit. As = this >> second exception will set the fault address register we will read = the >> incorrect value in the userspace exception handler. >>=20 >> Fix this be always reading the fault address before dereferencing = the >> current thread pointer. >>=20 >> Reported by: olivier@ >> Reviewed by: markj >> Sponsored by: Arm Ltd >> Differential Revision: https://reviews.freebsd.org/D38196 >> --- >> sys/arm64/arm64/exception.S | 15 +++++++++++++++ >> sys/arm64/arm64/trap.c | 26 +++++++------------------- >> 2 files changed, 22 insertions(+), 19 deletions(-) >>=20 >> diff --git a/sys/arm64/arm64/exception.S = b/sys/arm64/arm64/exception.S >> index 4a74358afeb9..55bac5e5228a 100644 >> --- a/sys/arm64/arm64/exception.S >> +++ b/sys/arm64/arm64/exception.S >> @@ -212,10 +212,25 @@ ENTRY(handle_el1h_irq) >> END(handle_el1h_irq) >>=20 >> ENTRY(handle_el0_sync) >> + /* >> + * Read the fault address early. The current thread structure = may >> + * be transiently unmapped if it is part of a memory range being >> + * promoted or demoted to/from a superpage. As this involves a >> + * break-before-make sequence there is a short period of time = where >> + * an access will raise an exception. If this happens the fault >> + * address will be changed to the kernel address so a later read = of >> + * far_el1 will give the wrong value. >> + * >> + * The earliest memory access that could trigger a fault is in a >> + * function called by the save_registers macro so this is the = latest >> + * we can read the userspace value. >> + */ >> + mrs x19, far_el1 >> save_registers 0 >> ldr x0, [x18, #PC_CURTHREAD] >> mov x1, sp >> str x1, [x0, #TD_FRAME] >> + mov x2, x19 >> bl do_el0_sync >> do_ast >> restore_registers 0 >> diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c >> index 4e54a06548cc..1b33d7aa60c4 100644 >> --- a/sys/arm64/arm64/trap.c >> +++ b/sys/arm64/arm64/trap.c >> @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); >>=20 >> /* Called from exception.S */ >> void do_el1h_sync(struct thread *, struct trapframe *); >=20 > This did not address my feedback regarding EL1 debug exceptions also > clobbering FAR. Ping, now after this has been MFC=E2=80=99ed without so much as a reply = to my feedback here nor on the Phabricator review. Jess >> -void do_el0_sync(struct thread *, struct trapframe *); >> +void do_el0_sync(struct thread *, struct trapframe *, uint64_t far); >> void do_el0_error(struct trapframe *); >> void do_serror(struct trapframe *); >> void unhandled_exception(struct trapframe *); >> @@ -559,11 +559,11 @@ do_el1h_sync(struct thread *td, struct = trapframe *frame) >> } >>=20 >> void >> -do_el0_sync(struct thread *td, struct trapframe *frame) >> +do_el0_sync(struct thread *td, struct trapframe *frame, uint64_t = far) >> { >> pcpu_bp_harden bp_harden; >> uint32_t exception; >> - uint64_t esr, far; >> + uint64_t esr; >> int dfsc; >>=20 >> /* Check we have a sane environment when entering from userland = */ >> @@ -573,27 +573,15 @@ do_el0_sync(struct thread *td, struct trapframe = *frame) >>=20 >> esr =3D frame->tf_esr; >> exception =3D ESR_ELx_EXCEPTION(esr); >> - switch (exception) { >> - case EXCP_INSN_ABORT_L: >> - far =3D READ_SPECIALREG(far_el1); >> - >> + if (exception =3D=3D EXCP_INSN_ABORT_L && far > = VM_MAXUSER_ADDRESS) { >> /* >> * Userspace may be trying to train the branch predictor = to >> * attack the kernel. If we are on a CPU affected by = this >> * call the handler to clear the branch predictor state. >> */ >> - if (far > VM_MAXUSER_ADDRESS) { >> - bp_harden =3D PCPU_GET(bp_harden); >> - if (bp_harden !=3D NULL) >> - bp_harden(); >> - } >> - break; >> - case EXCP_UNKNOWN: >> - case EXCP_DATA_ABORT_L: >> - case EXCP_DATA_ABORT: >> - case EXCP_WATCHPT_EL0: >> - far =3D READ_SPECIALREG(far_el1); >> - break; >> + bp_harden =3D PCPU_GET(bp_harden); >> + if (bp_harden !=3D NULL) >> + bp_harden(); >> } >> intr_enable(); From nobody Tue Feb 14 03:18:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PG5y85rzQz3q6YB; Tue, 14 Feb 2023 03:18:24 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) (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 4PG5y82Rx9z438t; Tue, 14 Feb 2023 03:18:24 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-15ff0a1f735so17588558fac.5; Mon, 13 Feb 2023 19:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yjQRWCYAjbGrggh+wPiUwt+LWiuDYBWSsKPLjgQTk/I=; b=GxfDHZvNJBBVbskLfU7JybTZhL5UKmGudJRGUkkcwZW2zhLL5BtSCuAcqTRaJVgW7H BrN4Y04vZl8R00kbM4YUYhDwkab+L/3oWp46qZR2S+BJL+Y3nBeIREbtoR2GNKezSEiy TC1qP6S0vyUTaF9nL9gtmLElti3DgwVDBSEvAOq1NeGNPT9WUsHnKSZg7aNhE6yqyw+U QBbtHgEkUbifYcI99qkk0YY1ENI3n/LHBv+OSIlvb0PnilTWvMYWRkcHLjyki5zsFEde /YNNIN+F5xs9OLNopRvGZWmya690c4jhvx7bB64PAA42SqHhpPuNHnrySxW7dewJmbPa gimw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yjQRWCYAjbGrggh+wPiUwt+LWiuDYBWSsKPLjgQTk/I=; b=Mz7Iqs4Mn+dYpj0tUs4jpHE0q8Jvasznk+kylSZx8dUyqkm+unDLJHDRSrkBODTbZI dYACKsDzdguAko3W7tW3jf5wV013DOTUiN9pyucuPejLRII6CrFB/xT3g6IC7RBdxkEW S0NFNT85WdtkSayVhaVNV+41+cGwstzknxdAOJqrafK8yR7Mv6d/PZTSxN2mqvlN9qiS +SnqTd1LrfZh3KXc0TCL7NMWaUOmXaK8gKACuJeEEWYYPOKoT6eOOcl8r8OVRKHBbAQy OuJTMJ4egSu9v7d8B17GYX3ygIRnjoifmqZ47ybMRTGLEQUCRyNbL0dBbZJHZLN0EQRQ 9yZg== X-Gm-Message-State: AO0yUKVvgia1xSgeBlq8VkjtbifTsFUd4XmPZN0JTAQiZjJxhCz2far2 xSEJvXpjxiG7T/QX0ZmGs4wc4Y+NV4Ev1dV387t/W05F X-Google-Smtp-Source: AK7set99I8Yk6TpUelIQJi3hxgyCauBMmtTMdtTbfzbuMVLCjZpm9XnuBZSczbGtEuhWmyVZS7x56bl+TJCegAUMR58= X-Received: by 2002:a05:6870:13d0:b0:16e:25e:f294 with SMTP id 16-20020a05687013d000b0016e025ef294mr29914oat.81.1676344702099; Mon, 13 Feb 2023 19:18:22 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:4381:0:b0:4b9:9c2d:ce62 with HTTP; Mon, 13 Feb 2023 19:18:21 -0800 (PST) In-Reply-To: References: <202302081947.318Jlbt6052826@gitrepo.freebsd.org> <20230208202736.L7hpB%steffen__28609.3347867549$1675888077$gmane$org@sdaoden.eu> <1qmt-6s1w-wny@FreeBSD.org> From: Mateusz Guzik Date: Tue, 14 Feb 2023 04:18:21 +0100 Message-ID: Subject: Re: git: 48bfd3597654 - main - Add nproc(1) To: Jan Beich Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PG5y82Rx9z438t X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2/14/23, Jan Beich wrote: > Mateusz Guzik writes: > >> On 2/14/23, Jan Beich wrote: >> >>> Steffen Nurpmeso writes: >>> >>>> |+ if (all_flag) { >>>> |+ cpus = sysconf(_SC_NPROCESSORS_ONLN); >>>> >>>> is not compatible -- note i like the FreeBSD way better, and maybe >>>> someone should make a bug report even. >>>> >>>> #?0|kent:$ getconf -a|grep NPROC >>>> _NPROCESSORS_CONF 8 >>>> _NPROCESSORS_ONLN 4 >>> >>> See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330 >>> >>> $ cpuset -l 2-5 -- getconf -a | fgrep _NPROC >>> _NPROCESSORS_CONF: 8 >>> _NPROCESSORS_ONLN: 4 >>> >> >> As I mentioned previously in the thread, on linux these *don't* react >> to cpusets (or tasksets in linux parlance): >> >> $ getconf -a | grep _NPROC >> _NPROCESSORS_CONF 4 >> _NPROCESSORS_ONLN 4 >> $ taskset --cpu-list 0 getconf -a | grep _NPROC >> _NPROCESSORS_CONF 4 >> _NPROCESSORS_ONLN 4 >> >> consequently the patch proposed in the bz would introduce an >> incompatibility with linux > > I've used kern.smp.cpus in old patches but found musl more practical. > _SC_NPROCESSORS_ONLN is often used as a default number of jobs. > _SC_NPROCESSORS_ONLN is expected by real consumers to *not* be affected by cpuset et al. See below for musl. > glibc: > - /sys/devices/system/cpu/online > - /proc/stat Neither of these are affected by taskset/cpuset. > - sched_getaffinity where is this used? > > musl: > - sched_getaffinity > >From the commit I don't think the choice was thought out whatsoever. https://git.musl-libc.org/cgit/musl/commit/?id=9a7fac7934975338449b63eb4d0409b472251dfa the code went from returning -1 to glibc-incompatible taskset-affected count, and there are people complaining it breaks compat: https://marc.info/?l=musl&w=2&r=1&s=_SC_NPROCESSORS_ONLN&q=b > bionic: > - /sys/devices/system/cpu/online > - /proc/stat (Android < 7) > Neither of these are affected by taskset/cpuset. All in all, the *current* state is broadly linux+glibc-compatible. The one incompatibility concerns disabled HT, which on linux still reports those cpu threads, while they are completely absent from the count on freebsd. This is not taskset/cpuset-related. -- Mateusz Guzik From nobody Tue Feb 14 07:29:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGCWR6BVyz3rKw3; Tue, 14 Feb 2023 07:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGCWR5ZGsz4Nn5; Tue, 14 Feb 2023 07:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RAa1FQLLHSBkmZU9LwKFewX6VLz8/SH3oxDymoGJvA=; b=duCNgI78vKsBloZGc8Tv+WCmcdrkpcAnzzzOz5O/yBO+dA0GNIW52jI76tKW+JFfnCAWpf XiVWunzF5wkHcG04oh82BsYrjq+mD3ZHOS8cB5yr2dbMTUAOGnc87x7dCyjU2NOyNElubu +6hhshdtc91Rl73unissSMNxLsn8YGW/lE9dPWcG4DF2mzcnzoqCrGIbCyeFoAfwp7l7eF fpc95t0Uov9Y5nWRDBAeGrS7FWd7n+8bG7PHDK4NK98NChQ8XGqsGEJjfmIKsaOupgA2W3 1/QVslHoIi+XExqfbdG13LqRG124H6rkS0aczal4lYlnpo7Km9t/z5Qzq2ziHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RAa1FQLLHSBkmZU9LwKFewX6VLz8/SH3oxDymoGJvA=; b=s6t6ft6iM+xEJoYw8Fjqe9Y+/LON/3hJpnAzJ7++wy86Szd3zAKNQCwjUevYPJEEo8Tqff DW/SshknKx9CgjAbhLln3pKXJCHA/HvGTRxeRCKSA7QORFMn2pDCOCd7anDpgYoXJGOfnp f/Mip4eOqBrXg5TAMbblH+T3SfCQ3tqbBBPc7akzPTYDhJ8CgRpsYAQ75A2cI8593MV0DF knPyKerT99uMVtlW8Ji36mERSzLJVXn8OAGJpKCJ+qUYD8Bp6OcHTz5a7/qKrGuv7h+A36 WiviWpPhwFzMJ0k3UNC05ANuR7/xdj5x/MzKNN2psDi1zu44HKISR+qd3kaHLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676359747; a=rsa-sha256; cv=none; b=VV9X3hhFRu8cM+HzH8yV8NNwFFilVNQOhi1yLC2WKS3At8j/z8LsGd4iAcDcW2gt7ehTg8 RuNZKbwa1izkAegzzxZUNdn6/hmVUJIlktkbVz2CvmpV2u7SobYeNUMJ58eNGANJqr17Bz K+B+E2bDhILpm9jpdwQZqA1s/mOIu9rF0eSdU0cl9ZHhHEykqQWTGBl3PLdbEdkUKEUIi/ e8UdWRhExq4NXCvxzo/4tXS8I2xdE2/owwwxP7Tjb3mJwr9TBeaU+vfojp/tNI/aaTIkom fFk2mA/OGN4+0RV7VVftZMXGyvCuZMzXi86jgN7iDSPaos5eopp0PCDXUmBiJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGCWR4dTpzqlM; Tue, 14 Feb 2023 07:29: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 31E7T7XZ043940; Tue, 14 Feb 2023 07:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E7T7HB043939; Tue, 14 Feb 2023 07:29:07 GMT (envelope-from git) Date: Tue, 14 Feb 2023 07:29:07 GMT Message-Id: <202302140729.31E7T7HB043939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 1231f047c3ed - main - bhyve: add helper struct for acpi device handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1231f047c3ed46ca6041df62f2b71f6e879bbb40 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=1231f047c3ed46ca6041df62f2b71f6e879bbb40 commit 1231f047c3ed46ca6041df62f2b71f6e879bbb40 Author: Corvin Köhne AuthorDate: 2021-10-07 13:54:46 +0000 Commit: Corvin Köhne CommitDate: 2023-02-14 07:28:17 +0000 bhyve: add helper struct for acpi device handling To simplify the handling of different acpi devices like qemu fwcfg or a tpm, add a helper struct. It will handle the reporting of acpi resources. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38327 --- usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/acpi_device.c | 92 ++++++++++++++++++++++++++++++++++++++++++++ usr.sbin/bhyve/acpi_device.h | 31 +++++++++++++++ 3 files changed, 124 insertions(+) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index a456d507a071..bf0a17edc59e 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -15,6 +15,7 @@ MAN= bhyve.8 bhyve_config.5 BHYVE_SYSDIR?=${SRCTOP} SRCS= \ + acpi_device.c \ atkbdc.c \ acpi.c \ audio.c \ diff --git a/usr.sbin/bhyve/acpi_device.c b/usr.sbin/bhyve/acpi_device.c new file mode 100644 index 000000000000..66d50de814fd --- /dev/null +++ b/usr.sbin/bhyve/acpi_device.c @@ -0,0 +1,92 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG + * Author: Corvin Köhne + */ + +#include +#include + +#include + +#include +#include +#include + +#include "acpi.h" +#include "acpi_device.h" + +/** + * List entry to enumerate all resources used by an ACPI device. + * + * @param chain Used to chain multiple elements together. + * @param type Type of the ACPI resource. + * @param data Data of the ACPI resource. + */ +struct acpi_resource_list_entry { + SLIST_ENTRY(acpi_resource_list_entry) chain; + UINT32 type; + ACPI_RESOURCE_DATA data; +}; + +/** + * Holds information about an ACPI device. + * + * @param vm_ctx VM context the ACPI device was created in. + * @param name Name of the ACPI device. + * @param hid Hardware ID of the ACPI device. + * @param crs Current resources used by the ACPI device. + */ +struct acpi_device { + struct vmctx *vm_ctx; + const char *name; + const char *hid; + SLIST_HEAD(acpi_resource_list, acpi_resource_list_entry) crs; +}; + +int +acpi_device_create(struct acpi_device **const new_dev, + struct vmctx *const vm_ctx, const char *const name, const char *const hid) +{ + if (new_dev == NULL || vm_ctx == NULL || name == NULL || hid == NULL) { + return (EINVAL); + } + + struct acpi_device *const dev = calloc(1, sizeof(*dev)); + if (dev == NULL) { + return (ENOMEM); + } + + dev->vm_ctx = vm_ctx; + dev->name = strdup(name); + dev->hid = strdup(hid); + SLIST_INIT(&dev->crs); + if (dev->name == NULL || dev->hid == NULL) { + acpi_device_destroy(dev); + return (ENOMEM); + } + + *new_dev = dev; + + return (0); +} + +void +acpi_device_destroy(struct acpi_device *const dev) +{ + if (dev == NULL) { + return; + } + + struct acpi_resource_list_entry *res; + while (!SLIST_EMPTY(&dev->crs)) { + res = SLIST_FIRST(&dev->crs); + SLIST_REMOVE_HEAD(&dev->crs, chain); + free(res); + } + + free(__DECONST(void *, dev->hid)); + free(__DECONST(void *, dev->name)); + free(dev); +} diff --git a/usr.sbin/bhyve/acpi_device.h b/usr.sbin/bhyve/acpi_device.h new file mode 100644 index 000000000000..1728acd4cdcd --- /dev/null +++ b/usr.sbin/bhyve/acpi_device.h @@ -0,0 +1,31 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG + * Author: Corvin Köhne + */ + +#pragma once + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#include +#pragma GCC diagnostic pop + +struct vmctx; + +struct acpi_device; + +/** + * Creates an ACPI device. + * + * @param[out] new_dev Returns the newly create ACPI device. + * @param[in] vm_ctx VM context the ACPI device is created in. + * @param[in] name Name of the ACPI device. Should always be a NULL + * terminated string. + * @param[in] hid Hardware ID of the ACPI device. Should always be a NULL + * terminated string. + */ +int acpi_device_create(struct acpi_device **const new_dev, + struct vmctx *const vm_ctx, const char *const name, const char *const hid); +void acpi_device_destroy(struct acpi_device *const dev); From nobody Tue Feb 14 07:29:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGCWT11Q1z3rLC4; Tue, 14 Feb 2023 07:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGCWS6q2vz4NWM; Tue, 14 Feb 2023 07:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xobRijXbgXnAlxqj3wYckmTL4lS1veJs5u7w1eZkxZI=; b=AyqRuAJx0Vsy98pP0XP/zQDD9kYBc9mBW+ta2sfOLPyjSzIui4qvODV3NjsbQl2SkYA5fy PSZkahWJrpmi+RVs38ohb437ljQsrrjnRJSU5GP3obnojJSXocO4apx73PYLdxEGy20zx1 B8aUO6Omx1V7kIT6cu2SzoFKuuAyYyWF3ggkQI7SDcIPxlYxVDqJ6skWaEQ0CmEWLT84sm oIlhcYGXXmGyySTgBOwCCokRTXmn+yYNUOVopwJbVROsHCyJY7IP+1xnZ14+KdkGrFeTJG imYcRxW4nXoGDhdFLmRqttFlupZzZwa8HLe8NzIGet5mw7W8cUbMvG42g9tNoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xobRijXbgXnAlxqj3wYckmTL4lS1veJs5u7w1eZkxZI=; b=LDYNCob8ojxsI6k2dQi3D8MIrU5LnPDndiy/pb/qxrLw9q/EwuhMXmHkdghXJw8LM/ZMwq hfRMqlo/LB07ZphS3UZk3a6pPwFiWgj9qOLS0WBF95yLITiGoE4VlDfeGpYJTi1gXls1FT XRfHrflLHMnXKaGVrv2uVWl7TIXzsGvojY88/6dA5bkwB3PTLZH27K9+ige+6N06UIkwZl mH6MtU2bAyosZVzae5Z8biAOuYQ0HcU76rzfSSz31o1fam7fNRMZRXBSOi2NKJVh9qwqn4 60T7zX6EwSjYY5HgXxNTylejm/1EEXY+jzaNZxNpVyg47HaYknfNBjSdp673TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676359749; a=rsa-sha256; cv=none; b=XKvndGRnXYDvbuAdE379dqfKiiTlgkGsABUdUlxCjiWB1kZJMBctMS7y8BHnfBDWbbOTCN 1hivf+PKMDKzp0nR91CNfVKySr5l7MMUXrMq3A6WFm9GGQB2IU6zXps4NtFbS8aYXmmHW3 OmcNJ/gMo+CdiTIsTO23hWthYSCTZTgxN5v+I0TeyS0jSbAjsyH1DOHosLR+LOKK0JJpNF oNA97sCSzpBUvdx8oQMvth75sQN3dlhPyeP+n9QVuUW1x6aMdA9bZaDjgLkRGvwMCfTsDT /KS6SM0f1poZDe5dGVLjVltLwSwJljWYHD+eHW6cwnbVDCOBGiy2L81P8jLN9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGCWS5RmFzqql; Tue, 14 Feb 2023 07:29: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 31E7T8L1043976; Tue, 14 Feb 2023 07:29:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E7T8wM043975; Tue, 14 Feb 2023 07:29:08 GMT (envelope-from git) Date: Tue, 14 Feb 2023 07:29:08 GMT Message-Id: <202302140729.31E7T8wM043975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 13a1df5b85e9 - main - bhyve: add helper func to add acpi resources List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13a1df5b85e992570f45248bfe9d581dc182b755 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=13a1df5b85e992570f45248bfe9d581dc182b755 commit 13a1df5b85e992570f45248bfe9d581dc182b755 Author: Corvin Köhne AuthorDate: 2021-10-07 13:57:01 +0000 Commit: Corvin Köhne CommitDate: 2023-02-14 07:28:21 +0000 bhyve: add helper func to add acpi resources These helper function can be used to assign acpi resources to an acpi_device. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38328 --- usr.sbin/bhyve/acpi_device.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ usr.sbin/bhyve/acpi_device.h | 5 +++++ 2 files changed, 50 insertions(+) diff --git a/usr.sbin/bhyve/acpi_device.c b/usr.sbin/bhyve/acpi_device.c index 66d50de814fd..402e32faa93a 100644 --- a/usr.sbin/bhyve/acpi_device.c +++ b/usr.sbin/bhyve/acpi_device.c @@ -90,3 +90,48 @@ acpi_device_destroy(struct acpi_device *const dev) free(__DECONST(void *, dev->name)); free(dev); } + +int +acpi_device_add_res_fixed_ioport(struct acpi_device *const dev, + const UINT16 port, const UINT8 length) +{ + if (dev == NULL) { + return (EINVAL); + } + + struct acpi_resource_list_entry *const res = calloc(1, sizeof(*res)); + if (res == NULL) { + return (ENOMEM); + } + + res->type = ACPI_RESOURCE_TYPE_FIXED_IO; + res->data.FixedIo.Address = port; + res->data.FixedIo.AddressLength = length; + + SLIST_INSERT_HEAD(&dev->crs, res, chain); + + return (0); +} + +int +acpi_device_add_res_fixed_memory32(struct acpi_device *const dev, + const UINT8 write_protected, const UINT32 address, const UINT32 length) +{ + if (dev == NULL) { + return (EINVAL); + } + + struct acpi_resource_list_entry *const res = calloc(1, sizeof(*res)); + if (res == NULL) { + return (ENOMEM); + } + + res->type = ACPI_RESOURCE_TYPE_FIXED_MEMORY32; + res->data.FixedMemory32.WriteProtect = write_protected; + res->data.FixedMemory32.Address = address; + res->data.FixedMemory32.AddressLength = length; + + SLIST_INSERT_HEAD(&dev->crs, res, chain); + + return (0); +} diff --git a/usr.sbin/bhyve/acpi_device.h b/usr.sbin/bhyve/acpi_device.h index 1728acd4cdcd..d9618d7e0a43 100644 --- a/usr.sbin/bhyve/acpi_device.h +++ b/usr.sbin/bhyve/acpi_device.h @@ -29,3 +29,8 @@ struct acpi_device; int acpi_device_create(struct acpi_device **const new_dev, struct vmctx *const vm_ctx, const char *const name, const char *const hid); void acpi_device_destroy(struct acpi_device *const dev); + +int acpi_device_add_res_fixed_ioport(struct acpi_device *const dev, + const UINT16 port, UINT8 length); +int acpi_device_add_res_fixed_memory32(struct acpi_device *const dev, + const UINT8 write_protected, const UINT32 address, const UINT32 length); From nobody Tue Feb 14 07:29:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGCWV0zbyz3rL98; Tue, 14 Feb 2023 07:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGCWV0Vjlz4Nsp; Tue, 14 Feb 2023 07:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GcTw/GNEQ9aKIV2764G3P9CBnRfaEb7QG6RHQh6dkvg=; b=eM3T3uSCSgdyfBZlrV1Dv14BBgXUNlW7gkakHNi0Aj/pSckFPSqwUnyc/b4Vz6eXFFlQIt hVjVYPYMdgT43rp2uA7nA94c3RB+Ek96R48kNTwXXOceC1US0muy2yqjzis73pDFP3+Lhj Zj8G+jQjzoBi/DHGuwnlURf9GFuX2ECBkLyHSR27A5RMou0n95Hn+gZm6MwKfGDRc/gZyD bspT9fT5597hn5jeifrsRGDYt0JVqziCGqejXCCGbw6//08Q9TVf4WoBFc1WwNwOxuS5Bl Ag5n+CCt7AEm49jodZd2AB/ux+iFv9oABN9UvL8Fabs42Uhxes7rtEEGO9LDgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GcTw/GNEQ9aKIV2764G3P9CBnRfaEb7QG6RHQh6dkvg=; b=andpN7ttDdgsroGjqRAbR4vSr8wQM9ew0s+jEg/2wwutFyZlp5FZwoFukHquTXAWDIKJN2 4ke3t/WXtAYM8RtT5Bn92ZPyqBmY5bFoC1TA1sj4Y66mpKRT/34S5g61hMIsKCJ2HC+6y1 ub8vHXPhAFZw5a4oBjcOjKU8Jt4zIvsFTAmcQjaknyPNKw6BYLGVS6y67aG/Dq8363MYsU jLUJIlDxTUkMa2R285fbuz0Gt/S09qgqyuNBEy8GnuUgNvkRwBTDm8BatxjxkgpAHk5wzt DHe9YLSVacTPKT33Y8SK+ii32i0kzZcQqoBVTJBUi9wkAlMZnQxWyKTfQZQPMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676359750; a=rsa-sha256; cv=none; b=H4nqFZ5EW2ebaVT6QVkOxnEje/+AY7lSH+wrDqI8MRPOrs3fWyP374pkRQJg949tKH6Iet rZDAdcpxzycW4mezQL2tnU2PdgEXHdLz4nk2X87ejmmFVCBHaF0/eBLbmOkeILhec4FOrU FIw0RUoqezGjfk+X214hE77RNTe0e4uuD2qdg/KM4anZnPfWe2ReWmE45yoD373zDgaccx zfN5wCeGFU3QmLWJYYb7RP2HU5ZfEnpU3S8H9YahLJlK0bU15VHUQeEqhhDM+Shk1SFV54 GeH5RYzMF/Nx5LICyDH94Lbr69h1/UeCWb+3a+HE5UhfVmSg/S/Zn8Dk9o5VZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGCWT6Qjmzr2M; Tue, 14 Feb 2023 07:29: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 31E7T9Gn044008; Tue, 14 Feb 2023 07:29:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E7T9Z5044007; Tue, 14 Feb 2023 07:29:09 GMT (envelope-from git) Date: Tue, 14 Feb 2023 07:29:09 GMT Message-Id: <202302140729.31E7T9Z5044007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 682a522d6122 - main - bhyve: add helper func to write a dsdt entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 682a522d61223920f23a202aa57901f38bdfd8dd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=682a522d61223920f23a202aa57901f38bdfd8dd commit 682a522d61223920f23a202aa57901f38bdfd8dd Author: Corvin Köhne AuthorDate: 2021-10-07 13:58:27 +0000 Commit: Corvin Köhne CommitDate: 2023-02-14 07:28:27 +0000 bhyve: add helper func to write a dsdt entry The guest will check the dsdt to detect acpi devices. Therefore, add a helper function to create such a dsdt entry for an acpi device. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38329 --- usr.sbin/bhyve/acpi_device.c | 46 ++++++++++++++++++++++++++++++++++++++++++++ usr.sbin/bhyve/acpi_device.h | 2 ++ 2 files changed, 48 insertions(+) diff --git a/usr.sbin/bhyve/acpi_device.c b/usr.sbin/bhyve/acpi_device.c index 402e32faa93a..10259006c619 100644 --- a/usr.sbin/bhyve/acpi_device.c +++ b/usr.sbin/bhyve/acpi_device.c @@ -10,6 +10,7 @@ #include +#include #include #include #include @@ -135,3 +136,48 @@ acpi_device_add_res_fixed_memory32(struct acpi_device *const dev, return (0); } + +static void +acpi_device_write_dsdt_crs(const struct acpi_device *const dev) +{ + const struct acpi_resource_list_entry *res; + SLIST_FOREACH(res, &dev->crs, chain) { + switch (res->type) { + case ACPI_RESOURCE_TYPE_FIXED_IO: + dsdt_fixed_ioport(res->data.FixedIo.Address, + res->data.FixedIo.AddressLength); + break; + case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: + dsdt_fixed_mem32(res->data.FixedMemory32.Address, + res->data.FixedMemory32.AddressLength); + break; + default: + assert(0); + break; + } + } +} + +void +acpi_device_write_dsdt(const struct acpi_device *const dev) +{ + if (dev == NULL) { + return; + } + + dsdt_line(""); + dsdt_line(" Scope (\\_SB)"); + dsdt_line(" {"); + dsdt_line(" Device (%s)", dev->name); + dsdt_line(" {"); + dsdt_line(" Name (_HID, \"%s\")", dev->hid); + dsdt_line(" Name (_STA, 0x0F)"); + dsdt_line(" Name (_CRS, ResourceTemplate ()"); + dsdt_line(" {"); + dsdt_indent(4); + acpi_device_write_dsdt_crs(dev); + dsdt_unindent(4); + dsdt_line(" })"); + dsdt_line(" }"); + dsdt_line(" }"); +} diff --git a/usr.sbin/bhyve/acpi_device.h b/usr.sbin/bhyve/acpi_device.h index d9618d7e0a43..5fb3ea18e481 100644 --- a/usr.sbin/bhyve/acpi_device.h +++ b/usr.sbin/bhyve/acpi_device.h @@ -34,3 +34,5 @@ int acpi_device_add_res_fixed_ioport(struct acpi_device *const dev, const UINT16 port, UINT8 length); int acpi_device_add_res_fixed_memory32(struct acpi_device *const dev, const UINT8 write_protected, const UINT32 address, const UINT32 length); + +void acpi_device_write_dsdt(const struct acpi_device *const dev); From nobody Tue Feb 14 07:29:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGCWW1xqmz3rLGT; Tue, 14 Feb 2023 07:29: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 4PGCWW1Wcdz4P2K; Tue, 14 Feb 2023 07:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X76R6DzsUWcTUm5nSr10CPAtMzGmKxBod6vxTHkxC1M=; b=IS0ubexkMazLsqTnOOiVbnL1it1d1rwPCbaElMurRBW52mWf084C2pJBXeLs9g4W89Ac9o jPwFheQTXaB8bXLP+eRmnjWekpx+e6YrGmCz+KAoHpbl4wpy8Ur3ACDNdcXM/LNXTYgHz2 pWo4Ata2FBpKQWPjpB5j0NqstSDq7PuG0xNnocLiqpmmvq3JJvNHSo6zwyNbjh5vhxHTuS 911AQ9sMIMRxX50uFquc1O2Aw1qwzxLbdyTxMyiy/5wb30k9lZSN7p4Bexx6Z99o1ciAv7 ozWuo/qIRDwM/3JqMDcx3sJRDt7j62MDXY5fkR0MWVH1Nq7BpA9edSsMiMh6RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X76R6DzsUWcTUm5nSr10CPAtMzGmKxBod6vxTHkxC1M=; b=yRYDrVPDPe/VabaTuImCHI7wLBYcB4vqakkuNEgB6utk0reDb9pLLeDp4RGmlefwHMHv1k JFfE6efXAwjtvQi3pODhOvDZEQHaiZnj9evsaQIEEePVeAJZ2BJ7bfB3WDP122LUIHaeRV 6qg2v2g0ZWG6ZvORKbAMDhI3ma1RANsA/Gadw4KiuFaKlwj1FRv30YYZZMQQ3QnVq2n0o+ DtKgTUDTpdU4r64cvYl6PPZ9/8u/IjhRYxYHGRNzHYlvl/bg1ASA9vLUpCsbxmUk2IRiYt bNVxneZKCrrHfME8EdJIjWLrlGpKd7n0N9M4XptRhS/FL+YW6YT7bZJQZCF18A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676359751; a=rsa-sha256; cv=none; b=fPcNCSdM6br7JUKIDYx/fd7BanXO+EKJDReLft07Qm3e4q+N6vlwXG6LGGXMxkRWdapC4y U1tOuLrTWLYJWblVxeACTyGkKZi7WU76x3z0sbP/Al1R2yJT1xudZqxQJYoeqmNg6ZTZ1F bPLX1zhnc9qQC6wkaxCpFdMFwO5QC1VlmpX5DcD+aiw4G5hlfWixTiophRE4kUvE6dkqxM uX6uKTcQbtu7nxEGMQDhjx5tEKxWiJyj7MFSF89z9pI+/6k1iGyYMGp8cHvpsWzXmPTyaR 85kABasMFSzpalkd5LsaAwjTHhCNRtyxISYFtmPx4JwAxyGxJuf7IZeLFkzM5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGCWW0Fv0zqnW; Tue, 14 Feb 2023 07:29: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 31E7TAbK044037; Tue, 14 Feb 2023 07:29:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E7TAJj044036; Tue, 14 Feb 2023 07:29:10 GMT (envelope-from git) Date: Tue, 14 Feb 2023 07:29:10 GMT Message-Id: <202302140729.31E7TAJj044036@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: fbd045021d9f - main - bhyve: maintain a list of acpi devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbd045021d9ffdae5e5bb20e1d1890fd4b46498e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=fbd045021d9ffdae5e5bb20e1d1890fd4b46498e commit fbd045021d9ffdae5e5bb20e1d1890fd4b46498e Author: Corvin Köhne AuthorDate: 2021-10-07 14:14:31 +0000 Commit: Corvin Köhne CommitDate: 2023-02-14 07:28:31 +0000 bhyve: maintain a list of acpi devices The list is used to generate the dsdt entry for every acpi device. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D3830 --- usr.sbin/bhyve/acpi.c | 29 +++++++++++++++++++++++++++++ usr.sbin/bhyve/acpi.h | 3 +++ usr.sbin/bhyve/acpi_device.c | 6 ++++++ 3 files changed, 38 insertions(+) diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c index bdb0e97076ad..84a54cc485c5 100644 --- a/usr.sbin/bhyve/acpi.c +++ b/usr.sbin/bhyve/acpi.c @@ -106,6 +106,30 @@ struct basl_fio { #define EFFLUSH(x) \ if (fflush(x) != 0) goto err_exit; +/* + * A list for additional ACPI devices like a TPM. + */ +struct acpi_device_list_entry { + SLIST_ENTRY(acpi_device_list_entry) chain; + const struct acpi_device *dev; +}; +static SLIST_HEAD(acpi_device_list, + acpi_device_list_entry) acpi_devices = SLIST_HEAD_INITIALIZER(acpi_devices); + +int +acpi_tables_add_device(const struct acpi_device *const dev) +{ + struct acpi_device_list_entry *const entry = calloc(1, sizeof(*entry)); + if (entry == NULL) { + return (ENOMEM); + } + + entry->dev = dev; + SLIST_INSERT_HEAD(&acpi_devices, entry, chain); + + return (0); +} + /* * Helper routines for writing to the DSDT from other modules. */ @@ -219,6 +243,11 @@ basl_fwrite_dsdt(FILE *fp) vmgenc_write_dsdt(); + const struct acpi_device_list_entry *entry; + SLIST_FOREACH(entry, &acpi_devices, chain) { + acpi_device_write_dsdt(entry->dev); + } + dsdt_line("}"); if (dsdt_error != 0) diff --git a/usr.sbin/bhyve/acpi.h b/usr.sbin/bhyve/acpi.h index 50e5337f332a..98479913732c 100644 --- a/usr.sbin/bhyve/acpi.h +++ b/usr.sbin/bhyve/acpi.h @@ -31,6 +31,8 @@ #ifndef _ACPI_H_ #define _ACPI_H_ +#include "acpi_device.h" + #define SCI_INT 9 #define SMI_CMD 0xb2 @@ -55,6 +57,7 @@ struct vmctx; int acpi_build(struct vmctx *ctx, int ncpu); void acpi_raise_gpe(struct vmctx *ctx, unsigned bit); +int acpi_tables_add_device(const struct acpi_device *const dev); void dsdt_line(const char *fmt, ...); void dsdt_fixed_ioport(uint16_t iobase, uint16_t length); void dsdt_fixed_irq(uint8_t irq); diff --git a/usr.sbin/bhyve/acpi_device.c b/usr.sbin/bhyve/acpi_device.c index 10259006c619..047d411deec2 100644 --- a/usr.sbin/bhyve/acpi_device.c +++ b/usr.sbin/bhyve/acpi_device.c @@ -68,6 +68,12 @@ acpi_device_create(struct acpi_device **const new_dev, return (ENOMEM); } + const int error = acpi_tables_add_device(dev); + if (error) { + acpi_device_destroy(dev); + return (error); + } + *new_dev = dev; return (0); From nobody Tue Feb 14 07:29:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGCWX4XhNz3rLB6; Tue, 14 Feb 2023 07:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGCWX2F5Wz4P2Y; Tue, 14 Feb 2023 07:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpkmOcBFHwXrtAI2yCvsSW9fh6G6yytzHM/jvb/0zT0=; b=eaviiDCdQu33dBHAG/I3RopGN5wEzNpRFBwHT0Mt9DXxOHkHpxR23MbjFAaww9LhEHEL5y QZNOmwUKLPZDel91aBoqIHl/SfEOMxTwoy0FQmg5iBpCPBZ+h9Nqfb7vRFQ9CAA+NO3zod mDw1R/xqMX6Ssp18ntVd7yu+f/LjK80Bn8xdWWsmzookz9bL+YeHYL/vaFl4DCztrFMCJo PYXq9yWkJnMdxh9bNa2l2zq3TfjPvSeC0d9r8tWhxecoixATHc1CCDywhLlW7u+yoy+qEL ebcJGVReNNDHem4H3mIgwoxPEsQeB2sFWnrgYIn5iofWdmLizbTGWTt0gCXzXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpkmOcBFHwXrtAI2yCvsSW9fh6G6yytzHM/jvb/0zT0=; b=h9GuA+6n6SeyfA/sMtQe6Z3EDWDSbVJ7SYl68YjPZe/qFaGw81S4vjt8mB1DJGViH7dH6E wY4sPMZsg2RM8M906TidrtONAhIDCnLEpFBR8uutjiJIuweGitHp9HS209FP6Ov6ah4EY3 WzAU9doXIB40uksv/GZXjeSbkPynf1e0SCjE4tE7ZNGPJzUoSuViYJBE5kdHe6dYT6otzY V65PaUusl5rkXrebB+RiCttWJKcz9sGjXI5VzBTj4RDYDEtT12nhVm2Icz000sb/W0/6Q9 ZBcE6LQt+amMNyFyQTQ9xc1gSuMkb8s7XZT+qJzjzqId2L8MwoyasTCy1HO2QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676359752; a=rsa-sha256; cv=none; b=ImkrTiSVXtKGtV4iiE6CE0q79akhIn3xzOm50nPGCYV5bPJHAqShyZBXGm51zJCHXmQu/7 Ppanyu32wmdYa9eljT4CdzvpAXrqElEN/xa/Q0JGJBJVkZlizn4z6PK59Z/BiANbYaoChy UTUqC/PUVQi71G9kRN19awCTO17Y07cCCgOlwAY2F6fv5Eg3m9Z2XlHchJeY60URaMqMmn tI1qCnLFaoLIRoEBIoqJ+5HEK8zPS1cy2iS3e0lC8JUqkM//FSpqtSha8/PjEnl50jHp3D kBR4ff1Qn8wuSiXI/ZZBHind30lE1S2zj2AJi4phYK8fyXL6oK4gH1DtPgGI9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGCWX1D6PzqSP; Tue, 14 Feb 2023 07:29: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 31E7TCVG044068; Tue, 14 Feb 2023 07:29:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E7TCwW044067; Tue, 14 Feb 2023 07:29:12 GMT (envelope-from git) Date: Tue, 14 Feb 2023 07:29:12 GMT Message-Id: <202302140729.31E7TCwW044067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 9b99de77f160 - main - bhyve: add basic qemu fwcfg implementation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b99de77f16029dd55326e0210072b14ec1ad960 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=9b99de77f16029dd55326e0210072b14ec1ad960 commit 9b99de77f16029dd55326e0210072b14ec1ad960 Author: Corvin Köhne AuthorDate: 2021-08-11 07:58:15 +0000 Commit: Corvin Köhne CommitDate: 2023-02-14 07:28:37 +0000 bhyve: add basic qemu fwcfg implementation qemu's fwcfg and bhyve's fwctl are both used to configure ovmf. qemu's fwcfg is much more powerfull than bhyve's fwctl. For that reason, add support for qemu's fwcfg. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38331 --- usr.sbin/bhyve/qemu_fwcfg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++ usr.sbin/bhyve/qemu_fwcfg.h | 12 +++++ 2 files changed, 126 insertions(+) diff --git a/usr.sbin/bhyve/qemu_fwcfg.c b/usr.sbin/bhyve/qemu_fwcfg.c new file mode 100644 index 000000000000..5d3070abf285 --- /dev/null +++ b/usr.sbin/bhyve/qemu_fwcfg.c @@ -0,0 +1,114 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG + * Author: Corvin Köhne + */ + +#include + +#include + +#include +#include +#include +#include + +#include "acpi_device.h" +#include "inout.h" +#include "qemu_fwcfg.h" + +#define QEMU_FWCFG_ACPI_DEVICE_NAME "FWCF" +#define QEMU_FWCFG_ACPI_HARDWARE_ID "QEMU0002" + +#define QEMU_FWCFG_SELECTOR_PORT_NUMBER 0x510 +#define QEMU_FWCFG_SELECTOR_PORT_SIZE 1 +#define QEMU_FWCFG_SELECTOR_PORT_FLAGS IOPORT_F_INOUT +#define QEMU_FWCFG_DATA_PORT_NUMBER 0x511 +#define QEMU_FWCFG_DATA_PORT_SIZE 1 +#define QEMU_FWCFG_DATA_PORT_FLAGS \ + IOPORT_F_INOUT /* QEMU v2.4+ ignores writes */ + +struct qemu_fwcfg_softc { + struct acpi_device *acpi_dev; +}; + +static struct qemu_fwcfg_softc fwcfg_sc; + +static int +qemu_fwcfg_selector_port_handler(struct vmctx *const ctx __unused, const int in, + const int port __unused, const int bytes, uint32_t *const eax, + void *const arg __unused) +{ + return (0); +} + +static int +qemu_fwcfg_data_port_handler(struct vmctx *const ctx __unused, const int in, + const int port __unused, const int bytes, uint32_t *const eax, + void *const arg __unused) +{ + return (0); +} + +static int +qemu_fwcfg_register_port(const char *const name, const int port, const int size, + const int flags, const inout_func_t handler) +{ + struct inout_port iop; + + bzero(&iop, sizeof(iop)); + iop.name = name; + iop.port = port; + iop.size = size; + iop.flags = flags; + iop.handler = handler; + + return (register_inout(&iop)); +} + +int +qemu_fwcfg_init(struct vmctx *const ctx) +{ + int error; + + error = acpi_device_create(&fwcfg_sc.acpi_dev, ctx, + QEMU_FWCFG_ACPI_DEVICE_NAME, QEMU_FWCFG_ACPI_HARDWARE_ID); + if (error) { + warnx("%s: failed to create ACPI device for QEMU FwCfg", + __func__); + goto done; + } + + error = acpi_device_add_res_fixed_ioport(fwcfg_sc.acpi_dev, + QEMU_FWCFG_SELECTOR_PORT_NUMBER, 2); + if (error) { + warnx("%s: failed to add fixed IO port for QEMU FwCfg", + __func__); + goto done; + } + + /* add handlers for fwcfg ports */ + if ((error = qemu_fwcfg_register_port("qemu_fwcfg_selector", + QEMU_FWCFG_SELECTOR_PORT_NUMBER, QEMU_FWCFG_SELECTOR_PORT_SIZE, + QEMU_FWCFG_SELECTOR_PORT_FLAGS, + qemu_fwcfg_selector_port_handler)) != 0) { + warnx("%s: Unable to register qemu fwcfg selector port 0x%x", + __func__, QEMU_FWCFG_SELECTOR_PORT_NUMBER); + goto done; + } + if ((error = qemu_fwcfg_register_port("qemu_fwcfg_data", + QEMU_FWCFG_DATA_PORT_NUMBER, QEMU_FWCFG_DATA_PORT_SIZE, + QEMU_FWCFG_DATA_PORT_FLAGS, qemu_fwcfg_data_port_handler)) != 0) { + warnx("%s: Unable to register qemu fwcfg data port 0x%x", + __func__, QEMU_FWCFG_DATA_PORT_NUMBER); + goto done; + } + +done: + if (error) { + acpi_device_destroy(fwcfg_sc.acpi_dev); + } + + return (error); +} diff --git a/usr.sbin/bhyve/qemu_fwcfg.h b/usr.sbin/bhyve/qemu_fwcfg.h new file mode 100644 index 000000000000..26c4db0ff71e --- /dev/null +++ b/usr.sbin/bhyve/qemu_fwcfg.h @@ -0,0 +1,12 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG + * Author: Corvin Köhne + */ + +#pragma once + +#include + +int qemu_fwcfg_init(struct vmctx *const ctx); From nobody Tue Feb 14 07:29:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGCWY40Lkz3rLK4; Tue, 14 Feb 2023 07:29: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 4PGCWY36yBz4P0d; Tue, 14 Feb 2023 07:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAmb7RUF3PhoaaNF6H33XfxjjbRB9gBlTaKZ6asf4UU=; b=W61Np3WMqxaLztf/ElH2/cTz+eD21tfClSZQ4GihYuZQuZKQ077TBmsT/Bh2smFm/hHuw3 /6XQE8Qk2iMH5MpXYkSjxd+yNManUcW3+z/zRG8PpEPb1NDFH/GBHF0HsJCbDOnb73Pyv0 SbOXweWYD81dOpPZAF1S8oPznZvs29bgfIXrDRmuTZDBvcTVUgCyx72MDeBURn4txBUgFM 6WA3PTeRgY03xWcozP8R8kNH9plUBmp+jhGbC67upjhYVzH0AgYRmvz0sCEcToSv4c7wcd GezdE5MEpc6ijSMvDzoXq26Z3OpCpcViSTh3Mbnq0j30sfAK4QZgCvt9cU+RMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAmb7RUF3PhoaaNF6H33XfxjjbRB9gBlTaKZ6asf4UU=; b=JZWzWUO/cCiKAcwCYeoCFxwu5gpHN4SdHV3tEbtfJ7HGoIyIj0qbkkFEsGfUN96cwyKOzQ 3l5O8Fseud72nSsqaWGZRBR1PWSMbr3z5cSxSWym8zIfGCE/Wt8oer1FxBQLXcQAmSIJBJ VIKcTKjT5tRTdFcqo9vIgC9kvb10moZ2s9+SwRHkWtBKfSxmwj50oK1PTp8ZvZ5giDinmB wL6+04Jx9bPxbW8A+qv/rDtBPv2dem6d82BVs/Lc2RC0QrsDHB9Mj5gDI5zGkTO25EVXtd dauB/SA8aW+Zhsc+MDfrlTgOIZG0OzPGt4nwyEb+mSRp7euKZ1ScgYNZDycDEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676359753; a=rsa-sha256; cv=none; b=gQM/632o6Y7a8WRM5Yk7E81EGrlhhKyk7HK11CI41/SlvBVDGW1awsPJ9XVQg4hlbV69+2 7fib/LEdy4CwLIpBuVBLbblLn2WqhLGofnS1Ykt16xfEpeixjFoS0PhiOQtwoe2Aoye/h3 MKkykgPBUsD8oDVmbzQCzP/a5cCuGaGPajrDd+enJWGWJbxLI8ShOHI7C0+zZBBz3mYg6F TnsHHCU46zmy2CGy1bzbML4kiMe5veCRR4Q2Ed0K1dFFv2I+GqJAHvlLXYoU8xm+j+vTj+ KM75vC8/3quI6S9MQZSVtSjY3qz8LhktWMhUR9Da8u2Ld/RiEIfyh4Mc4+Zmhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGCWY299czqnX; Tue, 14 Feb 2023 07:29: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 31E7TDDB044097; Tue, 14 Feb 2023 07:29:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E7TDtA044096; Tue, 14 Feb 2023 07:29:13 GMT (envelope-from git) Date: Tue, 14 Feb 2023 07:29:13 GMT Message-Id: <202302140729.31E7TDtA044096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 151d8131a817 - main - bhyve: add emulation for the qemu fwcfg selector port List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 151d8131a817e7a6a629e9bb7fde4d7a158e5211 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=151d8131a817e7a6a629e9bb7fde4d7a158e5211 commit 151d8131a817e7a6a629e9bb7fde4d7a158e5211 Author: Corvin Köhne AuthorDate: 2021-08-11 07:59:16 +0000 Commit: Corvin Köhne CommitDate: 2023-02-14 07:28:43 +0000 bhyve: add emulation for the qemu fwcfg selector port The selector port is used to select the desired fwcfg item. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38332 --- usr.sbin/bhyve/qemu_fwcfg.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/usr.sbin/bhyve/qemu_fwcfg.c b/usr.sbin/bhyve/qemu_fwcfg.c index 5d3070abf285..dec3fa83c493 100644 --- a/usr.sbin/bhyve/qemu_fwcfg.c +++ b/usr.sbin/bhyve/qemu_fwcfg.c @@ -29,8 +29,33 @@ #define QEMU_FWCFG_DATA_PORT_FLAGS \ IOPORT_F_INOUT /* QEMU v2.4+ ignores writes */ +#define QEMU_FWCFG_ARCHITECTURE_MASK 0x0001 +#define QEMU_FWCFG_INDEX_MASK 0x3FFF + +#define QEMU_FWCFG_SELECT_READ 0 +#define QEMU_FWCFG_SELECT_WRITE 1 + +#define QEMU_FWCFG_ARCHITECTURE_GENERIC 0 +#define QEMU_FWCFG_ARCHITECTURE_SPECIFIC 1 + +#pragma pack(1) + +union qemu_fwcfg_selector { + struct { + uint16_t index : 14; + uint16_t writeable : 1; + uint16_t architecture : 1; + }; + uint16_t bits; +}; + +#pragma pack() + struct qemu_fwcfg_softc { struct acpi_device *acpi_dev; + + uint32_t data_offset; + union qemu_fwcfg_selector selector; }; static struct qemu_fwcfg_softc fwcfg_sc; @@ -40,6 +65,20 @@ qemu_fwcfg_selector_port_handler(struct vmctx *const ctx __unused, const int in, const int port __unused, const int bytes, uint32_t *const eax, void *const arg __unused) { + if (bytes != sizeof(uint16_t)) { + warnx("%s: invalid size (%d) of IO port access", __func__, + bytes); + return (-1); + } + + if (in) { + *eax = htole16(fwcfg_sc.selector.bits); + return (0); + } + + fwcfg_sc.data_offset = 0; + fwcfg_sc.selector.bits = le16toh(*eax); + return (0); } From nobody Tue Feb 14 07:29:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGCWZ4slmz3rL8D; Tue, 14 Feb 2023 07:29: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 4PGCWZ45JPz4PBJ; Tue, 14 Feb 2023 07:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=majAo9FNHCGpUDPQgNCAgQVWKqHm+VxY+YOIXayr+h4=; b=i+m1QiTtJP3nnNVX1YAgxQSMg1fNS5aWY7LFRvcTkD03YqQJuo2hp0AL7j+F7GT3rzmswz 1lhtb/pIwZi/mMZTN+H/zrpE9pmsXU3WFalCHvcQULsNQJWyWOeVjtHBYiCTSFEj7Y5NPG l9umYwhNvmESIyi57b+2oGd435aRb4DMllKW6jgQI6kBqAGE6bCObRt4/clN0bXq/x/U2R 5bUGpYlm8uQHezZJUGZOewq5JxCbvuqYyeKSmTOOIJHn4QTiS4jtEZQAJuBebJHGzBJxxP szfqBHyMwBiHXrX9eqKOo04QAxb7ZGw2p8DGxDAZqdMAUFc8tGyheRuYbidQNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676359754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=majAo9FNHCGpUDPQgNCAgQVWKqHm+VxY+YOIXayr+h4=; b=hewU5TXREVloGdSSDKsE+xFSh3auggZmnriQ9G1B+tu1+vfomsJ1mM+5vJ++rnxgcQkdjO 8mM96cn0siItjYkbwyhKB6XWC8CN2lIxAQX+5KTKLQbRqKZWzI8d7EhDz58D1JycmPdSYN +OcFW1irqUk1EbmWANrvcv75bC5hwTpw50pkTN2/0yNYsx/j/P+6SZi2Jb83/lHv7XR+Hr BuiLHUSxzdTcc9lAggdkmTHMt7cXoBMwD5T/3S6rvoyPFkgaSw8DFH2trw9WNiVJfVV0Tm lJhSG/uYTF/eIaXbVMHLIY1L1bLlkTo/s0vxp1n9vGdi+1wlWIgwV3nXZCrliQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676359754; a=rsa-sha256; cv=none; b=soaHdX0qMy+a89E4rWAYmfsZ9oLb5/Lz01M3eOf/2mgd7/8s4rMJrGtIjLds7LvAHX+fqU 8/jNlUKn+gz3kSFG7yFW+XSdr3SDSoE3C4mvjo1iUl+u3A9c8eRQv63musqVzWvOmDL+Td MpyoHyzUPO+tcbpTsNLNtNA0Z7DkTZZCnIon5k8Q4rIkrTHuYsajkKJO+tG7zftZyvzY7A vn9p8m233tTZ2gPAi8lLw2nmNSdtiGLoV8QRcy3G94Q1pZYWxk1hYqTG1XZ1In1h+sOvJT 5y//nGG5k+fBe01cfEiwsqosZPNQOEGKrInrKIKr42YD2bBgcOQBE02268vvYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGCWZ38XwzqnY; Tue, 14 Feb 2023 07:29: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 31E7TE3N044135; Tue, 14 Feb 2023 07:29:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E7TEUv044134; Tue, 14 Feb 2023 07:29:14 GMT (envelope-from git) Date: Tue, 14 Feb 2023 07:29:14 GMT Message-Id: <202302140729.31E7TEUv044134@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: b11081dca76b - main - bhyve: add emulation for qemu's fwcfg data port List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b11081dca76b8e283495632b86b41539ee013857 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=b11081dca76b8e283495632b86b41539ee013857 commit b11081dca76b8e283495632b86b41539ee013857 Author: Corvin Köhne AuthorDate: 2021-08-11 08:00:34 +0000 Commit: Corvin Köhne CommitDate: 2023-02-14 07:28:49 +0000 bhyve: add emulation for qemu's fwcfg data port The data port returns the data of the fwcfg item. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38333 --- usr.sbin/bhyve/qemu_fwcfg.c | 40 ++++++++++++++++++++++++++++++++++++++++ usr.sbin/bhyve/qemu_fwcfg.h | 8 ++++++++ 2 files changed, 48 insertions(+) diff --git a/usr.sbin/bhyve/qemu_fwcfg.c b/usr.sbin/bhyve/qemu_fwcfg.c index dec3fa83c493..13e21daca7ff 100644 --- a/usr.sbin/bhyve/qemu_fwcfg.c +++ b/usr.sbin/bhyve/qemu_fwcfg.c @@ -56,6 +56,8 @@ struct qemu_fwcfg_softc { uint32_t data_offset; union qemu_fwcfg_selector selector; + struct qemu_fwcfg_item items[QEMU_FWCFG_MAX_ARCHS] + [QEMU_FWCFG_MAX_ENTRIES]; }; static struct qemu_fwcfg_softc fwcfg_sc; @@ -87,6 +89,44 @@ qemu_fwcfg_data_port_handler(struct vmctx *const ctx __unused, const int in, const int port __unused, const int bytes, uint32_t *const eax, void *const arg __unused) { + if (bytes != sizeof(uint8_t)) { + warnx("%s: invalid size (%d) of IO port access", __func__, + bytes); + return (-1); + } + + if (!in) { + warnx("%s: Writes to qemu fwcfg data port aren't allowed", + __func__); + return (-1); + } + + /* get fwcfg item */ + struct qemu_fwcfg_item *const item = + &fwcfg_sc.items[fwcfg_sc.selector.architecture] + [fwcfg_sc.selector.index]; + if (item->data == NULL) { + warnx( + "%s: qemu fwcfg item doesn't exist (architecture %s index 0x%x)", + __func__, + fwcfg_sc.selector.architecture ? "specific" : "generic", + fwcfg_sc.selector.index); + *eax = 0x00; + return (0); + } else if (fwcfg_sc.data_offset >= item->size) { + warnx( + "%s: qemu fwcfg item read exceeds size (architecture %s index 0x%x size 0x%x offset 0x%x)", + __func__, + fwcfg_sc.selector.architecture ? "specific" : "generic", + fwcfg_sc.selector.index, item->size, fwcfg_sc.data_offset); + *eax = 0x00; + return (0); + } + + /* return item data */ + *eax = item->data[fwcfg_sc.data_offset]; + fwcfg_sc.data_offset++; + return (0); } diff --git a/usr.sbin/bhyve/qemu_fwcfg.h b/usr.sbin/bhyve/qemu_fwcfg.h index 26c4db0ff71e..58ef5ed3c6bf 100644 --- a/usr.sbin/bhyve/qemu_fwcfg.h +++ b/usr.sbin/bhyve/qemu_fwcfg.h @@ -9,4 +9,12 @@ #include +#define QEMU_FWCFG_MAX_ARCHS 0x2 +#define QEMU_FWCFG_MAX_ENTRIES 0x4000 + +struct qemu_fwcfg_item { + uint32_t size; + uint8_t *data; +}; + int qemu_fwcfg_init(struct vmctx *const ctx); From nobody Tue Feb 14 08:45:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGFCX6k3nz3rQk6; Tue, 14 Feb 2023 08:45: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 4PGFCX6DQVz3K7m; Tue, 14 Feb 2023 08:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676364328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DvzWf02z2h1sCQ9goDklyMfoucqG/Xvg2r45IVmbTs=; b=jqaFrkKA5jlgjWjRNqY+Rx3u6rwZa4kDr82ic20X7r7xDdkktt9UuwZrGP1x8rhdGZ90Sd Diwy0+JPh/C7r/qa0CId95/1oAc22B+lgCGEFMRKyV/OAAvEg0hrBuFOQJg0RajOCMPQiR 6Dy4xlNiPZqh8BYRsM/c9LlCNIcx3VXyOnQPrl+050NUD52/U5rw4n5hxANV7DpmnhbY6Q 8KB6rAL2lDalEu/bxtEGduBAxlg7fUPG6DhZKGtcl3RwvxmO+2q/TAkB3bV2yG7XV60MsG A69vmn04Vgh6nCO9Sd0++wSg71Eoq3pXHxbfmO1AAYf6tMnGsbeM1DjiLQkNsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676364328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DvzWf02z2h1sCQ9goDklyMfoucqG/Xvg2r45IVmbTs=; b=N19z+SLNIfjIT0rlxoNFElCG0IpvrNsTQZ6oi1W42ApnQ0DxGUtmV7grVcIBmGSd6P6hhZ +0T7OWuNkcQtxDkgMREnjWNoJrE0W5lTOopjqsbkUzAYD4WBV3ztfYNgALZ0hwZjWkRVG5 g64NXU24OmPrAumQEUd+bH6eEPwMhUhX6mF0TlizD7XpR1F3JqkqOPMZH7evj5GsLahKaT r77JQEov2/P2t9SbxyNZQBNQOK+2ZFzE5s2cQHFzxE4MWFGEeR6Lw9ffEssvzGIUz792mS U+XUL1pT0tW8Nx9jjTGfQzIdfv4bwSL1ahpbYXQcBenVB0KtPWGlXm83kZKIow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676364328; a=rsa-sha256; cv=none; b=yGzabuAPJkF7LDbDxkHYdUrrHXVYos8EyHMvtvW0NaWN8QKJ4oSMB+QT1Hx4SDtXvkJgB7 mVZCG0lbGRso3paphjAex7GXMwO5ycVCrsCCef+Y0YP3VEirhqJL9FB8mWX9jEUyCHzuZ8 ZzWKvDB+aB8Z0vsZXvqNTCU/IKcVWddDFJNkj1m38T2OHkDVEWrxhMT8HX7fYlqrFPsIp0 s31fWkrtvZVvpL+ZXMuH09T66UcjDolMdRn7BI8CCpfNqv8cun0G5qPbo0H7rV8CwX9eIZ 6WZOsEQCatWE3yP3chPwvrdC66Hmwshp95F1U9gfslFNA+D6ePK3XzpLSofLRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGFCX5Gfgzsc6; Tue, 14 Feb 2023 08:45: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 31E8jSSL057363; Tue, 14 Feb 2023 08:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31E8jSsw057362; Tue, 14 Feb 2023 08:45:28 GMT (envelope-from git) Date: Tue, 14 Feb 2023 08:45:28 GMT Message-Id: <202302140845.31E8jSsw057362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 3f1f48f1d95a - main - stress2: Add a regression test for D38549 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f1f48f1d95a4923a557e34acc047a3ef8630532 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=3f1f48f1d95a4923a557e34acc047a3ef8630532 commit 3f1f48f1d95a4923a557e34acc047a3ef8630532 Author: Peter Holm AuthorDate: 2023-02-14 08:44:58 +0000 Commit: Peter Holm CommitDate: 2023-02-14 08:44:58 +0000 stress2: Add a regression test for D38549 --- tools/test/stress2/misc/msdos18.sh | 250 +++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) diff --git a/tools/test/stress2/misc/msdos18.sh b/tools/test/stress2/misc/msdos18.sh new file mode 100755 index 000000000000..faeed9dca944 --- /dev/null +++ b/tools/test/stress2/misc/msdos18.sh @@ -0,0 +1,250 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Peter Holm +# +# 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. +# + +# D38549: msdosfs deextend: validate pages of the partial buffer + +# https://people.freebsd.org/~pho/stress/log/log0420.txt + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +set -eu +prog=$(basename "$0" .sh) +mkdir -p $mntpoint +mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint +[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 1g -u $mdstart +newfs_msdos /dev/md$mdstart > /dev/null 2>&1 +mount -t msdosfs /dev/md$mdstart $mntpoint +mount | grep $mntpoint +set +e + +odir=`pwd` + +cd /tmp +sed '1,/^EOF/d' < $odir/$0 > $prog.c +cc -o $prog -Wall -O0 $prog.c -pthread || exit 1 +rm -f $prog.c +cd $mntpoint + +in=inputFile +out=outputFile + +/tmp/$prog $in $out 12345 +ls -al + +cd $odir +umount $mntpoint +mdconfig -d -u $mdstart +rm -f /tmp/$prog +exit +EOF +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int fd, port; +volatile int go; +char *inputFile; +char *outputFile; + +#define FSIZE 936374 +char buf[FSIZE]; + +static void +reader(void) { + struct sockaddr_in inetaddr, inetpeer; + socklen_t len; + int on, n, tcpsock, msgsock; + + on = 1; + if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) + err(1, "socket(), %s:%d", __FILE__, __LINE__); + + if (setsockopt(tcpsock, + SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0) + err(1, "setsockopt(), %s:%d", __FILE__, __LINE__); + + inetaddr.sin_family = AF_INET; + inetaddr.sin_addr.s_addr = INADDR_ANY; + inetaddr.sin_port = htons(port); + inetaddr.sin_len = sizeof(inetaddr); + + if (bind(tcpsock, + (struct sockaddr *)&inetaddr, sizeof (inetaddr)) < 0) + err(1, "bind(), %s:%d", __FILE__, __LINE__); + + if (listen(tcpsock, 5) < 0) + err(1, "listen(), %s:%d", __FILE__, __LINE__); + + len = sizeof(inetpeer); + if ((msgsock = accept(tcpsock, + (struct sockaddr *)&inetpeer, &len)) < 0) + err(1, "accept(), %s:%d", __FILE__, __LINE__); + + if ((fd = open(outputFile, O_RDWR | O_CREAT | O_TRUNC, 0640)) == -1) + err(1, "open(%s)", outputFile); + + usleep(arc4random() % 1000); + for (;;) { + if ((n = read(msgsock, buf, FSIZE)) < 0) + err(1, "read(), %s:%d", __FILE__, __LINE__); + if (n == 0) + break; + + } + close(msgsock); + close(tcpsock); + close(fd); + return; +} + +static void * +thr(void *data __unused) +{ + pthread_set_name_np(pthread_self(), __func__); + go = 1; + while (go == 1) { + ftruncate(fd, FSIZE / 2); + ftruncate(fd, FSIZE); + } + + return (NULL); +} + +static void +writer(void) { + struct hostent *hostent; + struct sockaddr_in inetaddr; + pthread_t tid; + off_t off = 0; + size_t size; + int i, on, r, tcpsock; + + on = 1; + for (i = 1; i < 5; i++) { + if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) + err(1, "socket(), %s:%d", __FILE__, __LINE__); + + if (setsockopt(tcpsock, + SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0) + err(1, "setsockopt(), %s:%d", __FILE__, __LINE__); + + size = getpagesize(); + if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size, + sizeof(size)) < 0) + err(1, "setsockopt(SO_SNDBUF), %s:%d", + __FILE__, __LINE__); + + hostent = gethostbyname ("localhost"); + memcpy (&inetaddr.sin_addr.s_addr, hostent->h_addr, + sizeof (struct in_addr)); + + inetaddr.sin_family = AF_INET; + inetaddr.sin_port = htons(port); + inetaddr.sin_len = sizeof(inetaddr); + + r = connect(tcpsock, (struct sockaddr *) &inetaddr, + sizeof(inetaddr)); + if (r == 0) + break; + sleep(1); + close(tcpsock); + } + if (r < 0) + err(1, "connect(), %s:%d", __FILE__, __LINE__); + + if ((fd = open(inputFile, O_RDWR | O_CREAT | O_TRUNC, 0640)) == -1) + err(1, "open(%s)", inputFile); + + if (write(fd, buf, sizeof(buf)) != sizeof(buf)) + err(1, "write()"); + + r = pthread_create(&tid, NULL, thr, NULL); + if (r) + errc(1, r, "pthread_create"); + + usleep(5000); + if (sendfile(fd, tcpsock, 0, FSIZE, NULL, &off, 0) == -1) + err(1, "sendfile"); + + usleep(arc4random() % 20000); + go = 0; + if ((r = pthread_join(tid, NULL)) != 0) + errc(1, r, "pthread_join"); + + _exit(0); +} + +int +main(int argc, char **argv) +{ + pid_t pid; + time_t start; + + if (argc != 4) { + fprintf(stderr, "Usage: %s 0) { + reader(); + kill(pid, SIGINT); + if (waitpid(pid, NULL, 0) != pid) + err(1, "waitpid()"); + } else + err(1, "fork(), %s:%d", __FILE__, __LINE__); + } + + return (0); +} From nobody Tue Feb 14 10:48:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGHxx4DHyz3rXW6; Tue, 14 Feb 2023 10:48: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 4PGHxx3N3Bz3m8T; Tue, 14 Feb 2023 10:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676371733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4zuM5bVKwR0j1nv7LXdmRc4Fl1r+qmtGgmYQyx2xBA=; b=pLHSySifKEm19i4wOnnWH0pgZp4pTv4Asnuej2tcMUgonIK/e35KwuCgrba9/kHYp1wtWX F36Bko5rGQW8t0WJ15c+NouSu/8NBdqWe9jZlXww+q6Gos8k8NSC0TYalC9qy1OjxzIaR/ 2ThiKEwNtslIh1ITKChukVqv+6YFAEo+Bezc89XjVi24Kb0DOGl/2IioxOITd9oimCo+Fp S25J4IltpfwpmoV0nA50rhBVuvp1RBV1mPFcxOOCxRmDWCt6JeTGLlTtx8KciZyYAJqy0h PTXgFXRqEGYMditJqmnHti3exyt35Mz6Vjyvm/jdQlE2VVPzvJ9+Q+WTc381iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676371733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4zuM5bVKwR0j1nv7LXdmRc4Fl1r+qmtGgmYQyx2xBA=; b=Vt9COqgoy0wn0NULliGnrZhvIbl8HWGZ6hWMnfMzXZt45+3i85QOi+kHWZlEP1wf3ZmMSk aRZqqtt8v1Wnyot39Qq06TxaeLxNrJtUtsAxxg5dKHsC4BecfiKlh7DfJ85HDJxlhbMdYj wGY8NISj0SlII4tzbs0Fb20GNYvJUk554voIYypn/hkHXk074UHN8QRQlwnoUoSMlEjYSL GoqdPFrw9cUb+18AIIwIVCBDCC5EkK5n00X9ZqhRhpfWtWhXJD675u/aAW92oA9L800gdu ZxR1zHYVZBR1KlTl6jp6+XQR8zTBfVWaj++kUnfbCeNLyZ7roP5MaGye5Wnbsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676371733; a=rsa-sha256; cv=none; b=IGzzZPTD0mjjCnszbL1WkaBxcuTuuSpGsB8armA+J6JM+pT0mmgoP331Cn8NIOkLGQGJSU V07cj8iqivFBKXuv9vvpXpEaymfym3Npa9RZcQ88fXoXDeutxOrxC41EWB3OoGtoHlAD7u dcpZRBGCnsMOOxqhdnfYCKPe6etuTDDN80A+8lg/xwGHLR5Ts/X7z+Xw4n4qUe+EeBnxrB xpGUhyP0aTlNOEaiVK3RpNtMVA6aA0QAWyLikkLbuKOW1W811vVmAGiJk5xnG4VndxxxrI B8zmBMZ3CZ6/9CzjFW2IUGH45QGpZ1G9l+qgNgXlAoGCtkK2kCK+3NN8N1TfUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGHxx2G84zwQT; Tue, 14 Feb 2023 10:48: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 31EAmr4F028791; Tue, 14 Feb 2023 10:48:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EAmr1L028790; Tue, 14 Feb 2023 10:48:53 GMT (envelope-from git) Date: Tue, 14 Feb 2023 10:48:53 GMT Message-Id: <202302141048.31EAmr1L028790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 31a252876889 - main - stress2: Add UFS+SU test scenario List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31a2528768894c46751974b7efbbfb3db0f01c5e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=31a2528768894c46751974b7efbbfb3db0f01c5e commit 31a2528768894c46751974b7efbbfb3db0f01c5e Author: Peter Holm AuthorDate: 2023-02-14 10:48:18 +0000 Commit: Peter Holm CommitDate: 2023-02-14 10:48:18 +0000 stress2: Add UFS+SU test scenario --- tools/test/stress2/misc/creat.sh | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/tools/test/stress2/misc/creat.sh b/tools/test/stress2/misc/creat.sh new file mode 100755 index 000000000000..45f6b0f87301 --- /dev/null +++ b/tools/test/stress2/misc/creat.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Peter Holm +# +# 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. +# + +# Demonstrate incorrect "out of inodes" message with SU enabled. +# No issue seen with SU+J + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +. ../default.cfg + +set -eu +prog=$(basename "$0" .sh) +log=/tmp/$prog.log +s=0 +mount | grep -q "on $mntpoint " && umount $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 100m -u $mdstart +[ $# -eq 1 ] && flags="$@" || flags="-Un" +echo "newfs $flags /dev/md$mdstart" +newfs $flags /dev/md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint +set +e + +ifree1=`df -i $mntpoint | tail -1 | awk '{print $7}'` +before=`df -i $mntpoint` +n=$(((ifree1 - 5) / 10)) +jot 10 | xargs -I% mkdir $mntpoint/% +start=`date +%s` +while [ $((`date +%s` - start)) -lt 60 ]; do + for j in `jot 10`; do + ( + jot $n | xargs -P0 -I% touch $mntpoint/$j/% + jot $n | xargs -P0 -I% rm $mntpoint/$j/% + ) & + done + wait +done 2>&1 | tee $log | head -5 +[ -s $log ] && s=3 +jot 10 | xargs -I% rmdir $mntpoint/% +umount $mntpoint; mount /dev/md$mdstart $mntpoint + +ifree2=`df -i $mntpoint | tail -1 | awk '{print $7}'` +after=`df -i $mntpoint | tail -1` +if [ $ifree1 -ne $ifree2 ]; then + echo "$before" + echo "$after" + s=1 + ls -alsrt $mntpoint | head -20 +fi + +umount $mntpoint +fsck -fy /dev/md$mdstart > $log 2>&1 +grep -Eq "WAS MODIFIED" $log && { s=2; cat $log; } + +mdconfig -d -u $mdstart +rm -f $log +exit $s From nobody Tue Feb 14 12:32:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 13:15:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGMCb3rMVz3rxFJ; Tue, 14 Feb 2023 13:15: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 4PGMCb3LkWz3yDq; Tue, 14 Feb 2023 13:15:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676380555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RAa4I7a3tcfBbaVqKeQCO9E3+Kd/1eEPcYeqvsIcqa0=; b=tXFzSVDPcjfT7h2cJIgRzKTpksRBGkZbsLeh2Sel2zlOOtEQI2mQwjWXqaXblbhL8hz4H7 0ZZeJDELp/6LCMXmS2nYMl43Faxj14SMR+JxIhBTQhxYjzrLrfkR4qZmf8dDIMcKGHDNLv KG2bgMe6MqpTVzFEWqgJt4OvMRnFBLlBAXmPvPjcNLktzq0NZsCDKrX2zVlNk+SfNULFKd 50hy2KWRsur9hv2IOMKvaB7GwdqOmZpHh8M1S9FO6x8cD6AQ94aOY1DEQCVF0WfbFSZaTj edsOCT1P8TeExcHVxzieHu/3BRf/iCRyqRpfT2UuSRZgyRklEvUKTbaxJbQ0Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676380555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RAa4I7a3tcfBbaVqKeQCO9E3+Kd/1eEPcYeqvsIcqa0=; b=TyZs2xZydEqIhEgVeSxEQx9L3b+DHLYme7Ti19dyD9fTjICynwKuOmqwMcqudTucWHZtYq VocM36UqntwSnRWMqMbYBMpBArpuD8D7RsrmZlbBYStw8qey9/dU0TfsKMxwqTsUzbCTrA xlmImJbrvI5gzOFaoaRWZKnTrdb/L1fw9jN+NBhAI8FLRHehgnBIExwMm8PEpi6jwjuu7H sgPk34o/8PFQQaim0gfyzjmS4KG/Vnt3qjCOu04Gn0WXFF7af1XaMbNJzf1frV12GM+1Jz JlA72HBbfkrBCuPlJtjn9lleGAIYqVAgXUGCBA1ugo/ckr7VT/tk1MCXcVE3KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676380555; a=rsa-sha256; cv=none; b=yEx1JP/xIrsAHqqLtQgvb9u0UkkYbqyRjgNdv6B++U8/09lBREtOy3Y0FX6mygPT9Z/CmB cApmsgLA1+pImERmObGgg5wETuZxYNxL0LMl4oOYg+Xif+9XUPmkTFyZh5FwDSyBPBGaJc jixUw8H5IHh8RUDQ4SMzHLilcaVW6heNZ8DN+eDNM2lo0NaP+QxhAzpeVrjpTh+LrqTKRU 2QvJl+V2p3qzb3UUpeELfVo5byBPMenUZZpFE0MAdZhBsBOG5U7NkIaibv7sd5MN2bafXA 9233FzrXSpopUJZ7ssx2UjhfdEapP4BAELeN+fGYekJzIUx9WHk+B5bKsP017g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGMCb2NpFz10G3; Tue, 14 Feb 2023 13:15: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 31EDFtZI044356; Tue, 14 Feb 2023 13:15:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EDFtSA044355; Tue, 14 Feb 2023 13:15:55 GMT (envelope-from git) Date: Tue, 14 Feb 2023 13:15:55 GMT Message-Id: <202302141315.31EDFtSA044355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: b4eab621f246 - main - kbdcontrol.c: make pre-Unicode compatibility conditional List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4eab621f2462574d1836c199dc84c5bdb4f60f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=b4eab621f2462574d1836c199dc84c5bdb4f60f7 commit b4eab621f2462574d1836c199dc84c5bdb4f60f7 Author: Stefan EĂźer AuthorDate: 2023-02-14 12:27:27 +0000 Commit: Stefan EĂźer CommitDate: 2023-02-14 12:27:27 +0000 kbdcontrol.c: make pre-Unicode compatibility conditional Support for the full range of Unicode character codes has been added to the main keymap back in 2009, with compatibility shims added in 2011 (to support an older kbdcontrol command on a new kernel during an upgrade from FreeBSD-8 to FreeBSD-9). Unicode support for accented characters that are reached via dead key combinations has been added just recently, again with compatibility shims to allow all combinations of old/new kernel and old/new kbdcontrol command to load and display the keymaps including the dead key table. (But full Unicode in the dead key table requires both a new kernel and kbdcontrol command.) This commit makes the compatibility shims depend on the respective compatibility ioctls (OGIO_KEYMAP, OPIO_KEYMAP, OGIO_DEADKEYMAP, and OPIO_DEADKEYMAP) being defined in sys/kbio.h. This is true for all of them in 13-STABLE, none in 12-STABLE (as of now), and will become optional due to a follow-up commit to sys/kbio.h in -CURRENT. This commit is the only part of review D38465 that should be merged back to 12-STABLE and 13-STABLE. MFC after: 1 month --- usr.sbin/kbdcontrol/kbdcontrol.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c index 725d62a7bfe6..44f34f9a4f3a 100644 --- a/usr.sbin/kbdcontrol/kbdcontrol.c +++ b/usr.sbin/kbdcontrol/kbdcontrol.c @@ -818,6 +818,7 @@ add_keymap_path(const char *path) STAILQ_INSERT_TAIL(&pathlist, pe, next); } +#ifdef OPIO_DEADKEYMAP static void to_old_accentmap(accentmap_t *from, oaccentmap_t *to) { @@ -832,13 +833,16 @@ to_old_accentmap(accentmap_t *from, oaccentmap_t *to) } } } +#endif /* OPIO_DEADKEYMAP */ static void load_keymap(char *opt, int dumponly) { keymap_t keymap; accentmap_t accentmap; +#ifdef OPIO_DEADKEYMAP oaccentmap_t oaccentmap; +#endif /* OPIO_DEADKEYMAP */ struct pathent *pe; FILE *file; int j; @@ -898,8 +902,11 @@ load_keymap(char *opt, int dumponly) } if ((accentmap.n_accs > 0) && (ioctl(0, PIO_DEADKEYMAP, &accentmap) < 0)) { +#ifdef OPIO_DEADKEYMAP to_old_accentmap(&accentmap, &oaccentmap); - if (ioctl(0, OPIO_DEADKEYMAP, &oaccentmap) < 0) { + if (ioctl(0, OPIO_DEADKEYMAP, &oaccentmap) < 0) +#endif /* OGIO_DEADKEYMAP */ + { warn("setting accentmap"); fclose(file); return; @@ -907,6 +914,7 @@ load_keymap(char *opt, int dumponly) } } +#ifdef OPIO_DEADKEYMAP static void to_new_accentmap(oaccentmap_t *from, accentmap_t *to) { @@ -921,21 +929,26 @@ to_new_accentmap(oaccentmap_t *from, accentmap_t *to) } } } +#endif /* OPIO_DEADKEYMAP */ static void print_keymap(void) { keymap_t keymap; accentmap_t accentmap; +#ifdef OGIO_DEADKEYMAP oaccentmap_t oaccentmap; +#endif /* OPIO_DEADKEYMAP */ int i; if (ioctl(0, GIO_KEYMAP, &keymap) < 0) err(1, "getting keymap"); if (ioctl(0, GIO_DEADKEYMAP, &accentmap) < 0) { +#ifdef OGIO_DEADKEYMAP if (ioctl(0, OGIO_DEADKEYMAP, &oaccentmap) == 0) to_new_accentmap(&oaccentmap, &accentmap); else +#endif /* OGIO_DEADKEYMAP */ memset(&accentmap, 0, sizeof(accentmap)); } printf( From nobody Tue Feb 14 13:15:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGMCc4ryfz3rxHd; Tue, 14 Feb 2023 13:15: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 4PGMCc499Wz3xvN; Tue, 14 Feb 2023 13:15:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676380556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I7zRGlGVf83PPQf6lwDP1uDAIVKzkW6B7wrxHqNfV7g=; b=Yd4zRh7Tqw//sgOFsoKI7a02cPCQEyuvUAzMV7twaAvqmDHJNp++u6FcVaaLFps04GGd82 Z8UlgzigMhhsPceqU3Gq5t/uML/CNfhhsgtBLaiQ1MBlTNzviRAZfPYRMWxoORQSb+K34t sA3QoROfhfS4BHQEKsYV31SarMkJAllg7Gibn4tV7U/Q7bmazvLOcCkI/4Q7cfZd6LwRgy R0y+6Aj3dP4dxKRtg1JD3U9LZVSe5RdXF3PoKGN+6sf3jnA45DSi43ZegvyrvfT780dafR W2w/UW0ilynnUKSKC+xqcncb+W+G8zarzm/jwnyrszjV4TYe/FmJtTUhww1Hnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676380556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I7zRGlGVf83PPQf6lwDP1uDAIVKzkW6B7wrxHqNfV7g=; b=IJ5jNmFGnEdTimaJ00CVVZ+H+NPvfJYy0H6RLfEtpLJNYdsfPHaoz4HeJYxVqAQDmZhxAt pj52a/Q2pmIEdRlMu9mcCUcxUiD1nb0zrPN472VNI9PXvSRjCUPnjNwmr7/3GEH4wdmGnz Jp4VHoXx95EIdClMURX76hjQ18Hp3X6A/aHwz6NqpRHWBOWM8vM18/Sy4KgS6z8OpEK4Af TlzXLYDyTZMaPNWhVesGfueTPkRJKoayWDPBo6y5CWf40nk9MntoSkqbyLCsGcFtBPfAAj upf+FeSeX5RxkzEMvLzyTpRz90NNoQ9fAyqzArjk6Q5D1pgwZTr1vne5jsvkDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676380556; a=rsa-sha256; cv=none; b=XHZRgKywZc0zPRcTVckmuY2BDIuR4MUBByrHyNN9XGgnaKLayq938yTGEECSrF/GnMmx/j mekwfWCCtwt+4K3gyLLIKDJWDNAa+TERl9Pt7qUgBcaTJgAxnVj8nnUUIkq3jT4OnzllaS VC/dNEVLnlYYkAdRnievmI01pMZ5KtOdwr5vRTdMOACWyFp/SovuZfxkeHK4s3v/7prrep Q9JeQMKGQw84ibasS9NXlHBOuL6S6mwWYVpP1Hg65OtRKSMbk3H2r9mEecLjrcXm0drppS FPVqMdx9ehL2pCZed4jhsT9HnpQKN0xrfkP8Sd3YmLoJCZXz2jp5eTIwgiec/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 4PGMCc3368z10Tn; Tue, 14 Feb 2023 13:15: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 31EDFux4044385; Tue, 14 Feb 2023 13:15:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EDFu9Q044384; Tue, 14 Feb 2023 13:15:56 GMT (envelope-from git) Date: Tue, 14 Feb 2023 13:15:56 GMT Message-Id: <202302141315.31EDFu9Q044384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: c2bb66023fe3 - main - kbdcontrol: enable pre-Unicode dead key table compatibility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2bb66023fe3e3617f56302b6960f59545a5535c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=c2bb66023fe3e3617f56302b6960f59545a5535c commit c2bb66023fe3e3617f56302b6960f59545a5535c Author: Stefan EĂźer AuthorDate: 2023-02-14 12:49:06 +0000 Commit: Stefan EĂźer CommitDate: 2023-02-14 12:49:06 +0000 kbdcontrol: enable pre-Unicode dead key table compatibility The definition of pre-Unicode keymap ioctls will be made optional and dependent on COMPAT_FREEBSD13 in a follow-up commit to 14-CURRENT. While we generally provide ABI compatibility for older binaries on a new kernel, but not functionally extended userland programs on an old kernel, it has been specifically requested to preserve ABI compatibility for the kbdcontrol program for both these cases. Passing the kernel configuration option COMPAT_FREEBSD13 to the build of kbdcontrol will make ioctls visible to the build that are normally hidden, but required to implement compatibility with kernels that only support 8 bit characters in dead key maps. This commit is not to be merged to any previous FreeBSD version and it shall be reverted as soon as this type of ABI compatibility is no longer deemed necessary (probably before 14-STABLE is branched). This commit is a part of review D38465 and split off to allow it to be reverted using the commit ID. --- usr.sbin/kbdcontrol/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/kbdcontrol/Makefile b/usr.sbin/kbdcontrol/Makefile index 960671a40fe7..d2107fb86290 100644 --- a/usr.sbin/kbdcontrol/Makefile +++ b/usr.sbin/kbdcontrol/Makefile @@ -9,4 +9,7 @@ SRCS= kbdcontrol.c lex.l WARNS?= 4 CFLAGS+= -I${.CURDIR} +# temporarily added for pre-Unicode accent key API/ABI compatibility +CFLAGS+= -DCOMPAT_FREEBSD13 + .include From nobody Tue Feb 14 13:15:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGMCd56tfz3rwwQ; Tue, 14 Feb 2023 13:15: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 4PGMCd4sQYz3xvy; Tue, 14 Feb 2023 13:15:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676380557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3aCZMU9T+BYhzDVSuY/MjCXrpBbOfiQwpnubJDC0gK8=; b=tqPitdBbknykG8uuwsNaNfdqZ11ZY5URicApG+vecn5i0okknbqb1/CyKrTVgpmdPQceRh b6VXVKtzS8Ygk/OD3abmoyxW+LmvFUYgpZ9AI/Q43/pd6SVr4F02+TIla22gQQAPhVYP9v cQYMF/LucQMJN7UhtVxBip1FjqH4jdBD2MkHyVNkW7IaA1Rr2P89Br/63LA3lpBFSsaTOa qXC1X7Tsft9R5/kiq1YvM/E3nLdyOEb4OYaY1/8UIEieiXqzj/lYO3oVe1eUudU1/sIh/Y DGdVQSNoeySWYYemxYyVBcnLUOAqaUvzFdkvpSvT44eJMPqZycH0CdebGbDd8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676380557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3aCZMU9T+BYhzDVSuY/MjCXrpBbOfiQwpnubJDC0gK8=; b=xxoyxC9dheGkyxn9npRYodoTkXIpWwtHqHPmgxovvIueWkPp4GeXZaQyWlaeTb2z2GnNWd Kt/H2Kv9bgWNJVkCeNRUb/4hrDLrURDGVnfAd8kYglzegHB/rDLFt//VdHhE+CsuLXlu21 kaUAmf9eGB4qX1CAjoD1gnGTxAwWwNo9cs0ktR9Jb9Y1XCmjYE/N+rjezA+zygtRKfd3dw PBoSgL7xkiD3ZhmP1Bviu7Y+wbF5Oor8os7mRpD1KUlSHVHCNhY6rsUw/8Bbq1XFA71TVC tFzFo31OXTbk12TjJqBfK71E5ATAz0tf4f0C0a/5sFyAXLscK5BXVVwpu/1xfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676380557; a=rsa-sha256; cv=none; b=aNAD4DuoW08HtGP1HYyw8fhKa7WPzjx0YlXBqDEjoUoDcgXWjI6a41ABTZxzUEzUGbZiFy /nRr6dAWJtkd4z77Gp0dQUWxMN5Q98Z83RwaWdWmFbHLB29fk9ADBd5iZtoTXXIxpYkdxz 5Xa0Oznidisl4KRjg7LJI/JOfjeVhtZwsw+8b3EJQ5a9IUlmfAXV8Za168pvqf+z720hi7 ylG2too0UAEJAOiLB6Jyq8lnTtl7A7Guj6k7WKkny1QWQOIdN8UVGcy8ZwPXafubaGIgz3 W84oLbrgB9wu/OAgUzKQObKfIY21o5CdsEa1dMTekxc/7Ep3Mp18YrFPMFQXPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGMCd3vhjz10rJ; Tue, 14 Feb 2023 13:15: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 31EDFvHW044414; Tue, 14 Feb 2023 13:15:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EDFvN2044413; Tue, 14 Feb 2023 13:15:57 GMT (envelope-from git) Date: Tue, 14 Feb 2023 13:15:57 GMT Message-Id: <202302141315.31EDFvN2044413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: f20058955c9d - main - sys/kbio.h: make pre-unicode keymap support optional List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f20058955c9d1041a5a09cd02a27babda7e34dc8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=f20058955c9d1041a5a09cd02a27babda7e34dc8 commit f20058955c9d1041a5a09cd02a27babda7e34dc8 Author: Stefan EĂźer AuthorDate: 2023-02-14 13:03:28 +0000 Commit: Stefan EĂźer CommitDate: 2023-02-14 13:03:28 +0000 sys/kbio.h: make pre-unicode keymap support optional FreeBSD-9 had introduced support for the full set of Unicode characters to the parsing and processing of keymap character tables. This support has been extended to cover the table for accented characters that are reached via dead key combinations in FreeBSD-13.2. New ioctls have been introduced to support both the pre-Unicode and the Unicode formats and keyboard drivers have been extended to support those ioctls. This commit makes the ABI compatibility functions in the kernel optional and dependent on COMPAT_FREEBSD13 in -CURRENT. The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has been made ABI compatible with old kernels to allow a new world to be run on an old kernel (that does not have full Unicode support for keymaps). This commit is not to merged back to 12-STABLE or 13-STABLE. It is part of review D38465, which has been split into 3 separate commits due to different MFC and life-time requirements of either commit. Approved by: imp Differential Revision: https://reviews.freebsd.org/D38465 --- sys/dev/adb/adb_kbd.c | 4 +++- sys/dev/atkbdc/atkbd.c | 4 +++- sys/dev/gpio/gpiokeys.c | 9 ++++++--- sys/dev/hid/hkbd.c | 9 ++++++--- sys/dev/hyperv/input/hv_kbd.c | 4 +++- sys/dev/kbd/kbd.c | 27 ++++++++++++++++++++++----- sys/dev/kbdmux/kbdmux.c | 6 ++++-- sys/dev/syscons/syscons.c | 6 ++++-- sys/dev/usb/input/ukbd.c | 9 ++++++--- sys/dev/vkbd/vkbd.c | 4 +++- sys/dev/vt/vt_core.c | 4 +++- sys/sys/kbio.h | 16 ++++++++-------- 12 files changed, 71 insertions(+), 31 deletions(-) diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c index 86d3865473bb..614d89c30447 100644 --- a/sys/dev/adb/adb_kbd.c +++ b/sys/dev/adb/adb_kbd.c @@ -795,10 +795,12 @@ static int akbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t data) break; case PIO_KEYMAP: - case OPIO_KEYMAP: case PIO_KEYMAPENT: case PIO_DEADKEYMAP: +#ifdef COMPAT_FREEBSD13 + case OPIO_KEYMAP: case OPIO_DEADKEYMAP: +#endif /* COMPAT_FREEBSD13 */ default: return (genkbd_commonioctl(kbd, cmd, data)); } diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index 08266cf4bf51..0c6dadca43aa 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -1088,10 +1088,12 @@ atkbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) return error; case PIO_KEYMAP: /* set keyboard translation table */ - case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case PIO_KEYMAPENT: /* set keyboard translation table entry */ case PIO_DEADKEYMAP: /* set accent key translation table */ +äifdef COMPAT_FREEBSD13 + case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ +#endif /* COMPAT_FREEBSD13 */ state->ks_accents = 0; /* FALLTHROUGH */ default: diff --git a/sys/dev/gpio/gpiokeys.c b/sys/dev/gpio/gpiokeys.c index 655fd2f4e154..86f684535be9 100644 --- a/sys/dev/gpio/gpiokeys.c +++ b/sys/dev/gpio/gpiokeys.c @@ -894,12 +894,15 @@ gpiokeys_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg) return (gpiokeys_set_typematic(kbd, *(int *)arg)); case PIO_KEYMAP: /* set keyboard translation table */ - case OPIO_KEYMAP: /* set keyboard translation table - * (compat) */ case PIO_KEYMAPENT: /* set keyboard translation table * entry */ case PIO_DEADKEYMAP: /* set accent key translation table */ - case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ +#ifdef COMPAT_FREEBSD13 + case OPIO_KEYMAP: /* set keyboard translation table + * (compat) */ + case OPIO_DEADKEYMAP: /* set accent key translation table + * (compat) */ +#endif /* COMPAT_FREEBSD13 */ sc->sc_accents = 0; /* FALLTHROUGH */ default: diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index a938ae70787b..e233ccd5b6dd 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -1635,12 +1635,15 @@ hkbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg) return (hkbd_set_typematic(kbd, *(int *)arg)); case PIO_KEYMAP: /* set keyboard translation table */ - case OPIO_KEYMAP: /* set keyboard translation table - * (compat) */ case PIO_KEYMAPENT: /* set keyboard translation table * entry */ case PIO_DEADKEYMAP: /* set accent key translation table */ - case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ +#ifdef COMPAT_FREEBSD13 + case OPIO_KEYMAP: /* set keyboard translation table + * (compat) */ + case OPIO_DEADKEYMAP: /* set accent key translation table + * (compat) */ +#endif /* COMPAT_FREEBSD13 */ sc->sc_accents = 0; /* FALLTHROUGH */ default: diff --git a/sys/dev/hyperv/input/hv_kbd.c b/sys/dev/hyperv/input/hv_kbd.c index 2e313b06ca7e..721178a9f3f2 100644 --- a/sys/dev/hyperv/input/hv_kbd.c +++ b/sys/dev/hyperv/input/hv_kbd.c @@ -663,10 +663,12 @@ hvkbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg) KBD_LED_VAL(kbd) = *(int *)arg; break; case PIO_KEYMAP: /* set keyboard translation table */ - case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case PIO_KEYMAPENT: /* set keyboard translation table entry */ case PIO_DEADKEYMAP: /* set accent key translation table */ +#ifdef COMPAT_FREEBSD13 + case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ +#endif /* COMPAT_FREEBSD13 */ sc->sc_accents = 0; /* FALLTHROUGH */ default: diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c index 41d6fd5666d8..205d76639e0f 100644 --- a/sys/dev/kbd/kbd.c +++ b/sys/dev/kbd/kbd.c @@ -789,13 +789,16 @@ int genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) { keymap_t *mapp; - okeymap_t *omapp; accentmap_t *accentmapp; - oaccentmap_t *oaccentmapp; keyarg_t *keyp; fkeyarg_t *fkeyp; - int i, j; int error; + int i; +#ifdef COMPAT_FREEBSD13 + int j; + okeymap_t *omapp; + oaccentmap_t *oaccentmapp; +#endif /* COMPAT_FREEBSD13 */ GIANT_REQUIRED; switch (cmd) { @@ -824,6 +827,7 @@ genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) error = copyout(kbd->kb_keymap, *(void **)arg, sizeof(keymap_t)); return (error); +#ifdef COMPAT_FREEBSD13 case OGIO_KEYMAP: /* get keyboard translation table (compat) */ mapp = kbd->kb_keymap; omapp = (okeymap_t *)arg; @@ -836,10 +840,14 @@ genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) omapp->key[i].flgs = mapp->key[i].flgs; } break; +#endif /* COMPAT_FREEBSD13 */ case PIO_KEYMAP: /* set keyboard translation table */ +#ifdef COMPAT_FREEBSD13 case OPIO_KEYMAP: /* set keyboard translation table (compat) */ +#endif /* COMPAT_FREEBSD13 */ #ifndef KBD_DISABLE_KEYMAP_LOAD mapp = malloc(sizeof *mapp, M_TEMP, M_WAITOK); +#ifdef COMPAT_FREEBSD13 if (cmd == OPIO_KEYMAP) { omapp = (okeymap_t *)arg; mapp->n_keys = omapp->n_keys; @@ -850,7 +858,9 @@ genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) mapp->key[i].spcl = omapp->key[i].spcl; mapp->key[i].flgs = omapp->key[i].flgs; } - } else { + } else +#endif /* COMPAT_FREEBSD13 */ + { error = copyin(*(void **)arg, mapp, sizeof *mapp); if (error != 0) { free(mapp, M_TEMP); @@ -904,6 +914,7 @@ genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) sizeof(accentmap_t)); return (error); break; +#ifdef COMPAT_FREEBSD13 case OGIO_DEADKEYMAP: /* get accent key translation table (compat) */ accentmapp = kbd->kb_accentmap; oaccentmapp = (oaccentmap_t *)arg; @@ -919,11 +930,15 @@ genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) } } break; +#endif /* COMPAT_FREEBSD13 */ case PIO_DEADKEYMAP: /* set accent key translation table */ +#ifdef COMPAT_FREEBSD13 case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ +#endif /* COMPAT_FREEBSD13 */ #ifndef KBD_DISABLE_KEYMAP_LOAD accentmapp = malloc(sizeof(*accentmapp), M_TEMP, M_WAITOK); +#ifdef COMPAT_FREEBSD13 if (cmd == OPIO_DEADKEYMAP) { oaccentmapp = (oaccentmap_t *)arg; accentmapp->n_accs = oaccentmapp->n_accs; @@ -937,7 +952,9 @@ genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) oaccentmapp->acc[i].accchar; } } - } else { + } else +#endif /* COMPAT_FREEBSD13 */ + { error = copyin(*(void **)arg, accentmapp, sizeof(*accentmapp)); if (error != 0) { free(accentmapp, M_TEMP); diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index 1545022bec2a..2590eb5e69c1 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -1240,12 +1240,14 @@ kbdmux_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) break; case PIO_KEYMAP: /* set keyboard translation table */ - case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case PIO_KEYMAPENT: /* set keyboard translation table entry */ case PIO_DEADKEYMAP: /* set accent key translation table */ +#ifdef COMPAT_FREEBSD13 + case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ KBDMUX_LOCK(state); - state->ks_accents = 0; + state->ks_accents = 0; +#endif /* COMPAT_FREEBSD13 */ /* perform command on all slave keyboards */ SLIST_FOREACH(k, &state->ks_kbds, next) diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index c456be43d8a4..defd0b8380bb 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -1594,12 +1594,14 @@ sctty_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) case GIO_KEYMAP: /* get keyboard translation table */ case PIO_KEYMAP: /* set keyboard translation table */ - case OGIO_KEYMAP: /* get keyboard translation table (compat) */ - case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case GIO_DEADKEYMAP: /* get accent key translation table */ case PIO_DEADKEYMAP: /* set accent key translation table */ +#ifdef COMPAT_FREEBSD13 + case OGIO_KEYMAP: /* get keyboard translation table (compat) */ + case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case OGIO_DEADKEYMAP: /* get accent key translation table (compat) */ case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ +#endif /* COMPAT_FREEBSD13 */ case GETFKEY: /* get function key string */ case SETFKEY: /* set function key string */ error = kbdd_ioctl(sc->kbd, cmd, data); diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index e4ee63f59720..97d649ca13ac 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -1857,12 +1857,15 @@ ukbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg) return (ukbd_set_typematic(kbd, *(int *)arg)); case PIO_KEYMAP: /* set keyboard translation table */ - case OPIO_KEYMAP: /* set keyboard translation table - * (compat) */ case PIO_KEYMAPENT: /* set keyboard translation table * entry */ case PIO_DEADKEYMAP: /* set accent key translation table */ - case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ +#ifdef COMPAT_FREEBSD13 + case OPIO_KEYMAP: /* set keyboard translation table + * (compat) */ + case OPIO_DEADKEYMAP: /* set accent key translation table + * (compat) */ +#endif /* COMPAT_FREEBSD13 */ sc->sc_accents = 0; /* FALLTHROUGH */ default: diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c index 27cf4549f3db..19f52a591126 100644 --- a/sys/dev/vkbd/vkbd.c +++ b/sys/dev/vkbd/vkbd.c @@ -1204,10 +1204,12 @@ vkbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) break; case PIO_KEYMAP: /* set keyboard translation table */ - case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case PIO_KEYMAPENT: /* set keyboard translation table entry */ case PIO_DEADKEYMAP: /* set accent key translation table */ +#ifdef COMPAT_FREEBSD13 + case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ +#endif /* COMPAT_FREEBSD13 */ state->ks_accents = 0; /* FALLTHROUGH */ diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index a47343340b0a..267dd7bf2489 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -2403,9 +2403,11 @@ skip_thunk: case GIO_KEYMAP: case PIO_KEYMAP: case GIO_DEADKEYMAP: - case OGIO_DEADKEYMAP: case PIO_DEADKEYMAP: +#ifdef COMPAT_FREEBSD13 + case OGIO_DEADKEYMAP: case OPIO_DEADKEYMAP: +#endif /* COMPAT_FREEBSD13 */ case GETFKEY: case SETFKEY: case KDGKBINFO: diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h index a129556d1ada..80a58bf8e51e 100644 --- a/sys/sys/kbio.h +++ b/sys/sys/kbio.h @@ -120,7 +120,7 @@ struct keymap { }; typedef struct keymap keymap_t; -#ifdef _KERNEL +#ifdef COMPAT_FREEBSD13 struct okeyent_t { u_char map[NUM_STATES]; u_char spcl; @@ -132,7 +132,7 @@ struct okeymap { struct okeyent_t key[NUM_KEYS]; }; typedef struct okeymap okeymap_t; -#endif /* _KERNEL */ +#endif /* COMPAT_FREEBSD13 */ #endif /* !_KEYMAP_DECLARED */ @@ -209,7 +209,7 @@ struct accentmap { }; typedef struct accentmap accentmap_t; -//#ifdef _KERNEL +#ifdef COMPAT_FREEBSD13 struct oacc_t { u_char accchar; u_char map[NUM_ACCENTCHARS][2]; @@ -220,7 +220,7 @@ struct oaccentmap { struct oacc_t acc[NUM_DEADKEYS]; }; typedef struct oaccentmap oaccentmap_t; -//#endif /* _KERNEL */ +#endif /* COMPAT_FREEBSD13 */ struct keyarg { u_short keynum; @@ -250,17 +250,17 @@ typedef struct fkeyarg fkeyarg_t; /* XXX: Should have keymap_t as an argument, but that's too big for ioctl()! */ #define GIO_KEYMAP _IO('k', 6) #define PIO_KEYMAP _IO('k', 7) -#ifdef _KERNEL +#ifdef COMPAT_FREEBSD13 #define OGIO_KEYMAP _IOR('k', 6, okeymap_t) #define OPIO_KEYMAP _IOW('k', 7, okeymap_t) -#endif /* _KERNEL */ +#endif /* COMPAT_FREEBSD13 */ /* XXX: Should have accentmap_t as an argument, but that's too big for ioctl()! */ #define GIO_DEADKEYMAP _IO('k', 8) #define PIO_DEADKEYMAP _IO('k', 9) -//#ifdef _KERNEL +#ifdef COMPAT_FREEBSD13 #define OGIO_DEADKEYMAP _IOR('k', 8, oaccentmap_t) #define OPIO_DEADKEYMAP _IOW('k', 9, oaccentmap_t) -//#endif /* _KERNEL */ +#endif /* COMPAT_FREEBSD13 */ #define GIO_KEYMAPENT _IOWR('k', 10, keyarg_t) #define PIO_KEYMAPENT _IOW('k', 11, keyarg_t) From nobody Tue Feb 14 14:05:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGNK624b4z3s0Qh for ; Tue, 14 Feb 2023 14:05:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGNK554Lcz43dV for ; Tue, 14 Feb 2023 14:05:45 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f51.google.com with SMTP id o36so11073123wms.1 for ; Tue, 14 Feb 2023 06:05:45 -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=JuRBBPorVxzfcN7bRZgwpy2670Opi3SdqqDa/qyboXM=; b=1IuOT4J64/gbx0M95Miy2/HJRQUGkHH/F/awXZM3RLBmqFhwBXBd07jxo7wvkHNGnZ li3vHExrch4VdYrJ3VdM8l5OQ8kltzve4VV+NV4wkd+69UUJgJNVWIx1Ow8iOZfdedUB 5XjvsjLnymuT3rzSu+4t3vyuRTYBDiTio9uKCs8PO9ID/syLH7kjcAqbtD9lF/zLcINZ +4FdImIfpoeMZKna9FrAGHHhUFAsKjScukUODCgQFE/uQXlp/YpFVtYGhjGghOVt/EtQ gAlAeFE41Nbl5oDWa9cLXmJgPBdloejTzj2xFrxo1v3VeMaRGCxARgJ2M7AePyKhcgBQ Vm5w== X-Gm-Message-State: AO0yUKV8FoqSMYKhiAxaJ49F/Rh5wnVdSzPLu17iUsPbcnp3WZMlcevn S305FHPsvd2i5NNSwsvdhevbOA== X-Google-Smtp-Source: AK7set8p5CKX8CxOAycDdDKRpO1ubebyldjO6jFfMWJPgIKyOiGD0o9hOBofad1+vRtRTzyz33Otcw== X-Received: by 2002:a05:600c:13c3:b0:3dc:557f:6126 with SMTP id e3-20020a05600c13c300b003dc557f6126mr2079360wmg.4.1676383529518; Tue, 14 Feb 2023 06:05:29 -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 c129-20020a1c3587000000b003dc1a525f22sm18118756wma.25.2023.02.14.06.05.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2023 06:05:29 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: c2bb66023fe3 - main - kbdcontrol: enable pre-Unicode dead key table compatibility From: Jessica Clarke In-Reply-To: <202302141315.31EDFu9Q044384@gitrepo.freebsd.org> Date: Tue, 14 Feb 2023 14:05:28 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202302141315.31EDFu9Q044384@gitrepo.freebsd.org> To: =?utf-8?Q?Stefan_E=C3=9Fer?= X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4PGNK554Lcz43dV 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 14 Feb 2023, at 13:15, Stefan E=C3=9Fer wrote: >=20 > The branch main has been updated by se: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc2bb66023fe3e3617f56302b6960f595= 45a5535c >=20 > commit c2bb66023fe3e3617f56302b6960f59545a5535c > Author: Stefan E=C3=9Fer > AuthorDate: 2023-02-14 12:49:06 +0000 > Commit: Stefan E=C3=9Fer > CommitDate: 2023-02-14 12:49:06 +0000 >=20 > kbdcontrol: enable pre-Unicode dead key table compatibility >=20 > The definition of pre-Unicode keymap ioctls will be made optional = and > dependent on COMPAT_FREEBSD13 in a follow-up commit to 14-CURRENT. >=20 > While we generally provide ABI compatibility for older binaries on > a new kernel, but not functionally extended userland programs on an > old kernel, it has been specifically requested to preserve ABI > compatibility for the kbdcontrol program for both these cases. >=20 > Passing the kernel configuration option COMPAT_FREEBSD13 to the = build > of kbdcontrol will make ioctls visible to the build that are = normally > hidden, but required to implement compatibility with kernels that = only > support 8 bit characters in dead key maps. >=20 > This commit is not to be merged to any previous FreeBSD version and > it shall be reverted as soon as this type of ABI compatibility is = no > longer deemed necessary (probably before 14-STABLE is branched). >=20 > This commit is a part of review D38465 and split off to allow it to = be > reverted using the commit ID. > --- > usr.sbin/kbdcontrol/Makefile | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/usr.sbin/kbdcontrol/Makefile = b/usr.sbin/kbdcontrol/Makefile > index 960671a40fe7..d2107fb86290 100644 > --- a/usr.sbin/kbdcontrol/Makefile > +++ b/usr.sbin/kbdcontrol/Makefile > @@ -9,4 +9,7 @@ SRCS=3D kbdcontrol.c lex.l > WARNS?=3D 4 > CFLAGS+=3D -I${.CURDIR} >=20 > +# temporarily added for pre-Unicode accent key API/ABI compatibility > +CFLAGS+=3D -DCOMPAT_FREEBSD13 This doesn=E2=80=99t seem right... COMPAT_FREEBSD* is for kernel not = userspace. Normally this would be a _WANT_FOO. Jess > + > .include From nobody Tue Feb 14 14:47:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPDv4LJ2z3s2h9; Tue, 14 Feb 2023 14:47: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 4PGPDv3t8Mz46WF; Tue, 14 Feb 2023 14:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YwqDDWv34hj2gn7UahkSHVp8UBy8Nnp3TboNIx71PaU=; b=SRmXTyfpBHRx2orYbiuPUeYn23DiHXHckkyC2r6QgyEA0qG+c3d6xbtmwMMZYI7ntEwXCb F0mGnMUqFxn5KdfaDNI95ZRwYR1z2ejy9YXjgzc+9WV217XFMngJXpgHeT2jZfepK8+WOT X/5sxXQkR8NvsVOnDPfiSEanVfoToLakZq9llngWZpNt6Mi0ECnyTwCMPI3frQthxw75pS 4gG1hNHfgYd4+6QUr+axz4kyJY05q1nIzOrdVfLZr+2Ui/uTdi3syVhN1Y5sZHbw1ECnIV 2xieD6EldzyZTySMcU+RoDtlpj3UZZQXwmpCh/NNEACHQC+uKz2ERIIUsrklPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YwqDDWv34hj2gn7UahkSHVp8UBy8Nnp3TboNIx71PaU=; b=CN+qXIbCcth5r4oZ5ntgsUV9iVUQ8CxdRsUDttnlCL19iDFL4trfOQfzo+hLfJxlb4386U phW1BssV0oE2rXoACrFxd709ipgRNTT79D+UKgI0cS3omL+gNeRPd1UDu5ycIOHaGKadOU aVTgJIc/F642r2nGpCZ7LgYf0FnPpTRDWkik5P6c1fCG8Y5NC3U0SnhewcI3V/JAXomw+f opcA2VncPoDtn/wJ2YYVS7rHWssycAG0QBQckQWdvwqtpztXBbK7LLuJYaHMxe/xWxOrhL n8CWN20PsMsRR6Aciuoz9J94g1fl1TgqUarQT4fyOb8cfsdKpl7HwWiPhqZn6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386031; a=rsa-sha256; cv=none; b=XemhqcpyoS63carxXLqQGLGmWzcD+Yb9TNBKTOqauRwNMffzbS/wxrApcRZY5r5kihqH0y K+qcOGkeQWScFxriysIv1943uUOm2u/T6+TiCGngTvXisKD2ElwTGfaKgtQkaJAzI8hUwZ +xu34o7wozL6Oj2JUyuKqNosZc3KFQjO8EUC/RXc1Tl09VQBl77TJZYlsobd31+e1pj6vs 2SsQ27vgCEXngYKz4CH/8M4gMLGgpR9JsRJ+PqFFM3edEZDBQkeG+cZq/YE202YV6Ns1Jp 93Ai4eWVo6jLhzuFSxO50sw54VOjSBo3Nm0ppqrgCDXIzkV7RZ7TuYrpHyHCIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPDv2x8zz12j2; Tue, 14 Feb 2023 14:47: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 31EElBKE072246; Tue, 14 Feb 2023 14:47:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElB3t072245; Tue, 14 Feb 2023 14:47:11 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:11 GMT Message-Id: <202302141447.31EElB3t072245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 81e7a8005521 - main - linux(4): Cleanup unneeded includes from linux_util.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81e7a800552196a65c9c8b3fef82c2ef6c8058ff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=81e7a800552196a65c9c8b3fef82c2ef6c8058ff commit 81e7a800552196a65c9c8b3fef82c2ef6c8058ff Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:30 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:30 +0000 linux(4): Cleanup unneeded includes from linux_util.h MFC after: 2 weeks --- sys/compat/linux/linux_util.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index 6f7b55be8123..b12b3034ab49 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -38,11 +38,7 @@ #include #include -#include -#include #include -#include -#include #include MALLOC_DECLARE(M_LINUX); From nobody Tue Feb 14 14:47:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPDx21dBz3s2f7; Tue, 14 Feb 2023 14:47: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 4PGPDw4pm0z466p; Tue, 14 Feb 2023 14:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfFVJihFgCgxPVpncexryzxCldGjQ8ePpfOpNRaGd/0=; b=aF2xXWkdMcduDVNGvQi8WcRX6GiAHissJiT5A2Z0tfN3vERIBVDBKrybe66mS8mviQAzVf lkeIABK2ByZ80YXY3ZRbosW30mPTlAigxByDqQ+qYtusFLLMI2/ZKLa8b3O57oh8aVMFH4 zo2II/o6MRsFH5zuQfmQv5khYK6waJKgqr/5imjElM0XgvS5HVTL3548FwWvMpWPMn59uC 3WiptsdArBkJpCVAF8mgC8E1Yen5WA0VJMxazzniWAB0lAWxSbIcwf5mpACAFBG7SbjW4n YXugxDJkTNB4spLl4xY9RYesrHZ1BPh+PcnXzYBhOJ96t0/Rt+Wqd+/pFX1ZDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfFVJihFgCgxPVpncexryzxCldGjQ8ePpfOpNRaGd/0=; b=W9UUk8soHyJmKeETzOHZZZcEZEHylEgJgQhpnGXNp51kZCqVGTU7yM63gI7ZdO0zIjTYdD JlTMh1vkuuvXyiT+4nbN7v/favzsIQ2RSsEhPvBVaP9UedTu/EKi2b2YPYxIVxbFJnRqce r7RtE4RWRJ5jSYcQAvmhcB5zoZg+3acAxq7zewe7v5XNC4Z9KOOGfCvHqjSmvUlikm35GA EbsGYrFzS9k2o9rAFSAjtbYCF5PMR2yJQOlv082a39SAl1kdOkSXi5tCPMbh3JlzIsDDWa 5tUfLWupylfkiuoFoaSeQnEFPBdnNj3p1ZUdc3ONiLEk1Y/og7IT/njSUjmtCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386032; a=rsa-sha256; cv=none; b=k1O4DO0Ko8IoS9EEIajhQjQMPXjBsh4gUb7ro0sRe+lZDGcVy14OOPTFQgkWxzpkzhT+T+ 87cRFGS4Bs5ho1DLSa25GAS9qlLSEV2V23cwfZpd5zSfLZuwE2jWCswMYMbf6ODptMfS7F OQ/LBMpzb/lgcjCTz7S6JObo5SaYNoIBS/LP62Jz4HbBZuwjpCNkMWCgEGxJATqg24AkD6 sU0Rpq93G0HfK9/+rUV21lWKOWBasKmWF6L/RhO+z2vflTv8PCckoLfYVsCltgImV0DLtk SX2YHpmLQSyV7i0kQcfwrn65enJwnt7fKOsVhA/Xn0bo997ypEcomrD/V1LFSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPDw3s0hz12j3; Tue, 14 Feb 2023 14:47: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 31EElCmY072277; Tue, 14 Feb 2023 14:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElCof072276; Tue, 14 Feb 2023 14:47:12 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:12 GMT Message-Id: <202302141447.31EElCof072276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 31e938c531dc - main - linux(4): Cleanup vm includes from linux_util.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31e938c531dcbb708dbcd0e1d0a4ea80dcc82300 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=31e938c531dcbb708dbcd0e1d0a4ea80dcc82300 commit 31e938c531dcbb708dbcd0e1d0a4ea80dcc82300 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:30 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:30 +0000 linux(4): Cleanup vm includes from linux_util.h Include vm headers directly where they needed. The linux_util.h included in a most source files of the Linuxulator, avoid collecting a rarely used includes here. MFC after: 2 weeks --- sys/amd64/linux/linux_machdep.c | 1 + sys/arm64/linux/linux_machdep.c | 2 ++ sys/compat/linux/linux_misc.c | 1 + sys/compat/linux/linux_util.h | 2 -- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index 1c042424f3ea..ed905518fdf4 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 0bfe51f7da1e..4b12476f7865 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 98bbe4b4cbb9..96670ef9ca39 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index b12b3034ab49..b89fd61de19a 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -36,8 +36,6 @@ #ifndef _LINUX_UTIL_H_ #define _LINUX_UTIL_H_ -#include -#include #include #include From nobody Tue Feb 14 14:47:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPDy1Sp2z3s2lx; Tue, 14 Feb 2023 14:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGPDx5prBz469B; Tue, 14 Feb 2023 14:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0cJJqSexu1nqVhrt+NCLXRPo856RuEikbNrKym9881I=; b=i71CpxBAO8gCZvcNHpf4Pf4FsX8TRbXqUsH45npUEXqeiV8RPfBLMTNlDXMpfO+TO+s0hr fPd/6FKaY+ZDOtY8vpVMdRoF46nlC6dpSNAQzfoFDWEQC9c4K/wfVTlrvb3H7Sr6iCYThz lyBZrFYsu3idP9U6rgYf/+qNSCoz9zdrM/2O1QigBl3dECzbkPy8B8ODLat+bKqltPckma m2lNpsRysi+NHyZ7jR9ZUiPs7ot0QYChs62dlf/dNknKQt9ScdnNcSp6/juy/D2uI4kn0W t/+n+1I62bdN1hNUYT4VTQzAw68PxzhBfPaicKVRPk4rl7m/Mm/8VC6IJ8vn/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0cJJqSexu1nqVhrt+NCLXRPo856RuEikbNrKym9881I=; b=dts0ad3SQe497kVk4crDtP5rCcWJygRRKolwYolm2yG3763uRPlLSjELVieSt0JUWPIH96 O2kSqXJjAGP1zefCjYdpoGUiqIMN8VbQFXauHuk0YEAdq94YKfluwVtDiMXuG/XGD0Oivg uMdG1iFMx3UD2YhARhzfXlgqy4UG5bCuMHtwVKgntm+d4RW65PfQsLCnJXtXbqoF5fuDVR 6p2S/dxiv5tYHklA4f05nh26rgcSe+msvyjsvE0CR2kHz7e05obPnYtlXlYR9GIwoUPqi1 KgPsCCGGytOGnjZ1i23c0ZGonf5fp4y5vPD3BvHq9DEc3SwaOJeI+TEGQJ2kpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386033; a=rsa-sha256; cv=none; b=nnRSCpzmzgJ+QO6VWda8t6foZG0UYVZf/by+zqBjHU2WQswwJwaWOV6KNJ6nFjtkcdQBtA 3O1zXWMqUJACGJuGiEabac9kTJRTQnq6k4e6lvA44gvCH/zP+fVBmkGRR0jqynjLq43uHm XlbqS7Gj9blv2/LVZQxjAPUORt945Uva+zuxhIz2mr8e5HTW5XybkT4139lMnunejSibEz urO1awB7ObSyva16VO9MJE/+ox90XtuDY5l1xd2SvfOvQPQpMvYjbywFG7h1dQTyJT19CP nPBxiNxn3x6nzLGZbF5IsWDyR8l/BlvMoDDicPRd8TlmuHGsGNUr9jHIHsKBmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPDx4jkBz12mf; Tue, 14 Feb 2023 14:47: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 31EElDl5072301; Tue, 14 Feb 2023 14:47:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElDGU072300; Tue, 14 Feb 2023 14:47:13 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:13 GMT Message-Id: <202302141447.31EElDGU072300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 513eb69edf38 - main - linux(4): Cleanup sys/sysent.h from linux_util List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 513eb69edf382923bff1b09edda64010d89f74bd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=513eb69edf382923bff1b09edda64010d89f74bd commit 513eb69edf382923bff1b09edda64010d89f74bd Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:31 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:31 +0000 linux(4): Cleanup sys/sysent.h from linux_util Include sys/sysent.h directly where it needed. The linux_util.h included in a most source files of the Linuxulator, avoid collecting a rarely used includes here. MFC after: 2 weeks --- sys/compat/linux/linux_futex.c | 1 + sys/compat/linux/linux_ipc.c | 1 + sys/compat/linux/linux_misc.c | 1 + sys/compat/linux/linux_util.h | 1 - 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 7d75889d2dce..aed6bbf94cee 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef COMPAT_LINUX32 diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index 5f0c22b49e58..a72b0a9709b5 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef COMPAT_LINUX32 #include diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 96670ef9ca39..b20a1b3597e5 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index b89fd61de19a..b00a9036d367 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -36,7 +36,6 @@ #ifndef _LINUX_UTIL_H_ #define _LINUX_UTIL_H_ -#include #include MALLOC_DECLARE(M_LINUX); From nobody Tue Feb 14 14:47:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPDz6tw0z3s2fD; Tue, 14 Feb 2023 14:47: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 4PGPDy6bLMz46Wf; Tue, 14 Feb 2023 14:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=714ZdwtQw10an8zJ4d+FFomhHbButLd2Hwtemd/AxTI=; b=TpsFELdPoVaCyrV8XVxRdLfEbAly+rdEguNgKTa4YwUEnF0PBoDvazYUW65HglLMvc/c+p tplRxVZTnj47y/VPvJ1xVbOXCZMrWMn9byW5pKogDiyHzoHvwo6P1JAWGThmEumCaaoeju w5AL0VlLBaiG1QcJFfd4azczQQMAHhFuGyKBlNakgEwLf4seBa19/umIFtiJ7c/1+WmJzk ykfTLKMxLD5vErlIlEK0hVGFpQd/Qwlr1KQAhOTVP0BHciqZYs7DK+a2K/XvujHdXtzSKJ 9RAxm8hseBa7xV3/fbOR9pbYqsZcDT7sJFEOODXkcYsN5GkUzYHOkdTW3QKXug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=714ZdwtQw10an8zJ4d+FFomhHbButLd2Hwtemd/AxTI=; b=dDcDWr7+F4v0SigTWi9AClnWc9GeIGAaG7yKThpbCBEqFF5uQBqrDJmECux0294rNYvl+w 10J739xJrvOHJSv2lxSpHoZLKkivTQsmnbDbHwIIIaJMyQXa78DumilWXtaTLR//MSAPhL uaGcrnrmveqhIAQ2PuZzha+NyQeP7f6bDbt3KM/MiHtDnAv6qoFHUKy7qSekcMZYVxJ8Nx vNi8TV/eYH/CoDhAld3coE6I3GItuzQ/l96VQ4VOfTFiVblQDcPmxY2dRKfxMB2TQgKR2Q idG0xx1h8CJ8PPgEbgb6fbq3PCMi31sfaGXMyqgtvki3EeGh1bgSKFEMoEMo6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386034; a=rsa-sha256; cv=none; b=xgP4BrlasPUhUYZ7RqtHrkCPy2UlxaVuFwcpjU2Ra2/bpSVKmxYyGvvLg8TZdnSvGdu2J8 5GGnkMb5FTZXwrclk0w6ty2k7lHHecaaEA9ceAdtb3lRnnq12SiFWzEYhXmQhn0n74uf5u PZJ//hAWJpZ9hjEXOPTaxmeVOTaNPPxPFjX+Aka1CpvgM1SXVXGzEj4bsvw8gghwVoaapa GACqCuFHb/R6dbIGWMLgqmgEYKHRhYv5/kjoerA2mnsK0U1VtnPLHIG+0P6BCyvo3N7/R9 WYucNQgUVdnX4N5Qv+bfczgRCO5D5QX1ATYcOCUCa0TxVv0BsKoGNT5i4Vh1lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPDy5fwnz12mg; Tue, 14 Feb 2023 14:47: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 31EElEfI072332; Tue, 14 Feb 2023 14:47:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElEQI072331; Tue, 14 Feb 2023 14:47:14 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:14 GMT Message-Id: <202302141447.31EElEQI072331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 007986714c78 - main - linux(4): Cleanup sys/queue.h from linux.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 007986714c78c8e087038fb05442f17da1171bfa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=007986714c78c8e087038fb05442f17da1171bfa commit 007986714c78c8e087038fb05442f17da1171bfa Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:31 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:31 +0000 linux(4): Cleanup sys/queue.h from linux.h Leftover after converting futexes to the umtx API. NFC after: 2 weeks --- sys/compat/linux/linux.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 40e563014fde..cd7e8cd6b3e0 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -28,8 +28,6 @@ #ifndef _LINUX_MI_H_ #define _LINUX_MI_H_ -#include - /* * Private Brandinfo flags */ From nobody Tue Feb 14 14:47:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF03tXwz3s2SQ; Tue, 14 Feb 2023 14:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGPF003FNz46M3; Tue, 14 Feb 2023 14:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TsIdZUdq7hFWUytKAdeMWGy4JYJaIGDD0jUQ7Le8jjc=; b=L8dGXpzC/Y0Qki/kTXyF9To3G3Rx8x+NSQU+6ggHNxZGL5i/AQL8ODG0DooKUX8vQmyEQY 2j8TRcPpVsDXdkTNWFlruo8Olu+Fk/9JDVH3YMlmOhTsxVtTIy1G1Zsrzl39OYdfcVUMs2 kiiuJbAlt5L8rzt8ruAneUmXeqt+MujNMm4nEQe1UcIXlL/rHLCoJ0yeqm8v7SQrLzY/kG jF2VkOGCGVnAsCSs8At8M9hw1EwyMH1eCTqNxEdhUW8MSaKqZsRkrpfXgAHqkx6MRG4CjN jMBRmqKQwmfECRucPCVIdr4u4vixhLssv24CebNkxA/bgrVPuk6nSatAwBV5Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TsIdZUdq7hFWUytKAdeMWGy4JYJaIGDD0jUQ7Le8jjc=; b=ESzcoA1RM55A9RqWF1zvKmUR95ujh+OB2qR58RkaWXsfHV2Jtgua0brCqCc5pIXA6CfTC4 18iY2Uz9pv+eGpjqGDV4srcS6eRyWMPFW1aNoTXgNZKI5Cx9mDb8rYXsPlJexVPhl9achi u7+AvoKodS6Y2IlefJTfpLQszX63H4n9HNNS/p+5y8e4DdxKog7Ytc/qqIynZRkW/MZ5L/ VKMhxAh300wlrXdl3nS0J26tPkAcCUAA89L6Kl17DrraKUGtXpyFBei+mausWXEUrf+5Ra xLETMdi0j+J8b420mO6o8j7rjHmWKdJNG2K+Ybd9jatIpDviXoQAuOccFNSc4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386036; a=rsa-sha256; cv=none; b=xs66v0ymiuKne5pFBt9JV2oXTED5GrmpNtN2+s1VI6crMPibG3xY7XGgvyVrszrVzAjSjK VxoYEV9CN80A8SOP4LSHNdHNnZFGLY6bEvCyguJGPI9Tcc2AXmbVzN0sDIXSrCaRJKpLa9 Ky6FXwDcLdptrRA0xiM0Vkl5v/5EKmPUDP1xbjtPIBtD/L99FDQu5yflAZN/ZkGT2KQ6gv 5+0dgESNWb6qlnHMFOqiGr31TkIsKkER7Jg6YA9plShGZVqadhUqKNqkPL+m3KaHhVYAIW jipOfzQ+D0cDJc/ezn0h0KQXClUh1jRYll3aAKkESo+5PICHXmAXHWuXr/MvuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPDz6Gkwz12kR; Tue, 14 Feb 2023 14:47: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 31EElFvO072357; Tue, 14 Feb 2023 14:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElFOE072356; Tue, 14 Feb 2023 14:47:15 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:15 GMT Message-Id: <202302141447.31EElFOE072356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 86f9efef2c44 - main - linux(4): Cleanup abi_compat.h include from linux_timer.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86f9efef2c44f6be007cbc9ab383ee6a277d5880 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=86f9efef2c44f6be007cbc9ab383ee6a277d5880 commit 86f9efef2c44f6be007cbc9ab383ee6a277d5880 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:31 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:31 +0000 linux(4): Cleanup abi_compat.h include from linux_timer.h Leftover after timespec copyin/copyout routines was implemented. MFC after: 2 weeks --- sys/compat/linux/linux_timer.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/compat/linux/linux_timer.h b/sys/compat/linux/linux_timer.h index b9f877cc83a4..a01411cec847 100644 --- a/sys/compat/linux/linux_timer.h +++ b/sys/compat/linux/linux_timer.h @@ -33,8 +33,6 @@ #ifndef _LINUX_TIMER_H #define _LINUX_TIMER_H -#include - #ifndef __LINUX_ARCH_SIGEV_PREAMBLE_SIZE #define __LINUX_ARCH_SIGEV_PREAMBLE_SIZE \ (sizeof(l_int) * 2 + sizeof(l_sigval_t)) From nobody Tue Feb 14 14:47:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF13fD4z3s2fL; Tue, 14 Feb 2023 14:47: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 4PGPF10kfNz46cH; Tue, 14 Feb 2023 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjMq309bp9NpfOw0oSm/rHlF2rPDGkeZqjb1/NeH6H0=; b=CosEZjtdX9R0RkAwSRP+dDYTx4ZfoMr7i4POC9MCx+Uo1cE7tDSw4W+dCZ1kECrvZC6BSc cS6G5fOzHcDJR08M2MRLZJlNf+rKRYRjaeU2MWy2ABd1M/R5LFkvOgIaR4prMrpaDb4GD3 I8diibX6Yv4w+ni61D1MYBEdkvFD9as+lT9yxh0TJNo7TozskBvaTuC4aPjK/nIHDxSAnI Ohiqy5SlUKy1fGo1rdAocXyWLmoP5znljrKCR5oh2w7XbEFevjMOWuw8KlzkX1W6uWwON1 EEtryVtTCGNcGj4afPnZzoFwTig+l57DZV2T+zdYZNpTniPcpTGN0cWSfSIQ2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjMq309bp9NpfOw0oSm/rHlF2rPDGkeZqjb1/NeH6H0=; b=adQZPSRANvNi05Ey+xsG3Qoy3sOmkq7nSSB8NyTbkIz5qTWrqsp23YuBhtStZr2bfqPxv2 jV3e3z9QP2I7ARWwjtybWPyUhYh2mtzV4/mKIbUTFvg3KBpIcatb3EoqG6JxTggEzeptUs v8tsAk6aMAiCqs2rCVd2J1X2RA7TIIvR70+i9R3sI5PQwTZNQ8AYdntQIKRUgk9nj7KlAu 10jugXYf1G6zXtqv1C/2TJItfNY9GIE8wcb1LOWDE7R9fm5YfqV08lH0nz7V/4bR8TwX7a JZdC16SfjyuHfwWWzLssHXuwxNNk66if0ZCwkwQqKuzLESe4Q1z2gyttwJsnrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386037; a=rsa-sha256; cv=none; b=PQmTdedT5Zj3GUEgEe9CtNx6VTIH3zZdRIcQ3LiTaR7cp2jm22wmDtlMEKiqgdPO+LWfs7 drm0wRsBN2+wIpIQFU7b9WatXUPbtApzNzqkSx898JH3IG6bIqqgWa0fX0MKrZKtz/YIfm zmnEdn7kl4EfpIDhldWNjzCNf7PrI0QxKnVAfvRrY+zLSq9yOIOE0TLwWLyNDw2vOx7b1l zVzl6yj4kIKkjBm5EXVItple8JMNlXtyOZvnpvbE/huccXA5uxJ/QlvvtuqTDGscfHaIjY nqvyoMSvws0RtnwHEOKeYIzxhATH1/9l7Z+gg/JM9VR4NycrPL287svtGOOb/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 4PGPF06xnzz12kS; Tue, 14 Feb 2023 14:47: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 31EElGpT072381; Tue, 14 Feb 2023 14:47:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElGMl072380; Tue, 14 Feb 2023 14:47:16 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:16 GMT Message-Id: <202302141447.31EElGMl072380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 50c85a32d9c6 - main - linux(4): Move uselib() to i386 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50c85a32d9c667779494850b6238b8d7ec13da75 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=50c85a32d9c667779494850b6238b8d7ec13da75 commit 50c85a32d9c667779494850b6238b8d7ec13da75 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:31 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:31 +0000 linux(4): Move uselib() to i386 This obsolete system call is not supported by glibc. In ancient libc versions (before glibc 2.0), uselib() was used to load the shared libraries with names found in an array of names in the binary. On Linux, since 3.15, this system call is available only when the kernel is configured with the CONFIG_USELIB option. It doesn't look like anyone needs this syscall for others Linuxulators, so move it to the corresponding MD Linuxulator. MFC after: 2 weeks --- sys/compat/linux/linux_misc.c | 264 ----------------------------------------- sys/i386/linux/linux_machdep.c | 260 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 260 insertions(+), 264 deletions(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index b20a1b3597e5..4dba124a918f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -35,9 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if defined(__i386__) -#include -#endif #include #include #include @@ -48,13 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -77,12 +72,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include #include -#include -#include #include #ifdef COMPAT_LINUX32 @@ -251,261 +242,6 @@ linux_brk(struct thread *td, struct linux_brk_args *args) return (0); } -#if defined(__i386__) -/* XXX: what about amd64/linux32? */ - -int -linux_uselib(struct thread *td, struct linux_uselib_args *args) -{ - struct nameidata ni; - struct vnode *vp; - struct exec *a_out; - vm_map_t map; - vm_map_entry_t entry; - struct vattr attr; - vm_offset_t vmaddr; - unsigned long file_offset; - unsigned long bss_size; - char *library; - ssize_t aresid; - int error; - bool locked, opened, textset; - - a_out = NULL; - vp = NULL; - locked = false; - textset = false; - opened = false; - - if (!LUSECONVPATH(td)) { - NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, - UIO_USERSPACE, args->library); - error = namei(&ni); - } else { - LCONVPATHEXIST(args->library, &library); - NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, - UIO_SYSSPACE, library); - error = namei(&ni); - LFREEPATH(library); - } - if (error) - goto cleanup; - - vp = ni.ni_vp; - NDFREE_PNBUF(&ni); - - /* - * From here on down, we have a locked vnode that must be unlocked. - * XXX: The code below largely duplicates exec_check_permissions(). - */ - locked = true; - - /* Executable? */ - error = VOP_GETATTR(vp, &attr, td->td_ucred); - if (error) - goto cleanup; - - if ((vp->v_mount->mnt_flag & MNT_NOEXEC) || - ((attr.va_mode & 0111) == 0) || (attr.va_type != VREG)) { - /* EACCESS is what exec(2) returns. */ - error = ENOEXEC; - goto cleanup; - } - - /* Sensible size? */ - if (attr.va_size == 0) { - error = ENOEXEC; - goto cleanup; - } - - /* Can we access it? */ - error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td); - if (error) - goto cleanup; - - /* - * XXX: This should use vn_open() so that it is properly authorized, - * and to reduce code redundancy all over the place here. - * XXX: Not really, it duplicates far more of exec_check_permissions() - * than vn_open(). - */ -#ifdef MAC - error = mac_vnode_check_open(td->td_ucred, vp, VREAD); - if (error) - goto cleanup; -#endif - error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL); - if (error) - goto cleanup; - opened = true; - - /* Pull in executable header into exec_map */ - error = vm_mmap(exec_map, (vm_offset_t *)&a_out, PAGE_SIZE, - VM_PROT_READ, VM_PROT_READ, 0, OBJT_VNODE, vp, 0); - if (error) - goto cleanup; - - /* Is it a Linux binary ? */ - if (((a_out->a_magic >> 16) & 0xff) != 0x64) { - error = ENOEXEC; - goto cleanup; - } - - /* - * While we are here, we should REALLY do some more checks - */ - - /* Set file/virtual offset based on a.out variant. */ - switch ((int)(a_out->a_magic & 0xffff)) { - case 0413: /* ZMAGIC */ - file_offset = 1024; - break; - case 0314: /* QMAGIC */ - file_offset = 0; - break; - default: - error = ENOEXEC; - goto cleanup; - } - - bss_size = round_page(a_out->a_bss); - - /* Check various fields in header for validity/bounds. */ - if (a_out->a_text & PAGE_MASK || a_out->a_data & PAGE_MASK) { - error = ENOEXEC; - goto cleanup; - } - - /* text + data can't exceed file size */ - if (a_out->a_data + a_out->a_text > attr.va_size) { - error = EFAULT; - goto cleanup; - } - - /* - * text/data/bss must not exceed limits - * XXX - this is not complete. it should check current usage PLUS - * the resources needed by this library. - */ - PROC_LOCK(td->td_proc); - if (a_out->a_text > maxtsiz || - a_out->a_data + bss_size > lim_cur_proc(td->td_proc, RLIMIT_DATA) || - racct_set(td->td_proc, RACCT_DATA, a_out->a_data + - bss_size) != 0) { - PROC_UNLOCK(td->td_proc); - error = ENOMEM; - goto cleanup; - } - PROC_UNLOCK(td->td_proc); - - /* - * Prevent more writers. - */ - error = VOP_SET_TEXT(vp); - if (error != 0) - goto cleanup; - textset = true; - - /* - * Lock no longer needed - */ - locked = false; - VOP_UNLOCK(vp); - - /* - * Check if file_offset page aligned. Currently we cannot handle - * misalinged file offsets, and so we read in the entire image - * (what a waste). - */ - if (file_offset & PAGE_MASK) { - /* Map text+data read/write/execute */ - - /* a_entry is the load address and is page aligned */ - vmaddr = trunc_page(a_out->a_entry); - - /* get anon user mapping, read+write+execute */ - error = vm_map_find(&td->td_proc->p_vmspace->vm_map, NULL, 0, - &vmaddr, a_out->a_text + a_out->a_data, 0, VMFS_NO_SPACE, - VM_PROT_ALL, VM_PROT_ALL, 0); - if (error) - goto cleanup; - - error = vn_rdwr(UIO_READ, vp, (void *)vmaddr, file_offset, - a_out->a_text + a_out->a_data, UIO_USERSPACE, 0, - td->td_ucred, NOCRED, &aresid, td); - if (error != 0) - goto cleanup; - if (aresid != 0) { - error = ENOEXEC; - goto cleanup; - } - } else { - /* - * for QMAGIC, a_entry is 20 bytes beyond the load address - * to skip the executable header - */ - vmaddr = trunc_page(a_out->a_entry); - - /* - * Map it all into the process's space as a single - * copy-on-write "data" segment. - */ - map = &td->td_proc->p_vmspace->vm_map; - error = vm_mmap(map, &vmaddr, - a_out->a_text + a_out->a_data, VM_PROT_ALL, VM_PROT_ALL, - MAP_PRIVATE | MAP_FIXED, OBJT_VNODE, vp, file_offset); - if (error) - goto cleanup; - vm_map_lock(map); - if (!vm_map_lookup_entry(map, vmaddr, &entry)) { - vm_map_unlock(map); - error = EDOOFUS; - goto cleanup; - } - entry->eflags |= MAP_ENTRY_VN_EXEC; - vm_map_unlock(map); - textset = false; - } - - if (bss_size != 0) { - /* Calculate BSS start address */ - vmaddr = trunc_page(a_out->a_entry) + a_out->a_text + - a_out->a_data; - - /* allocate some 'anon' space */ - error = vm_map_find(&td->td_proc->p_vmspace->vm_map, NULL, 0, - &vmaddr, bss_size, 0, VMFS_NO_SPACE, VM_PROT_ALL, - VM_PROT_ALL, 0); - if (error) - goto cleanup; - } - -cleanup: - if (opened) { - if (locked) - VOP_UNLOCK(vp); - locked = false; - VOP_CLOSE(vp, FREAD, td->td_ucred, td); - } - if (textset) { - if (!locked) { - locked = true; - VOP_LOCK(vp, LK_SHARED | LK_RETRY); - } - VOP_UNSET_TEXT_CHECKED(vp); - } - if (locked) - VOP_UNLOCK(vp); - - /* Release the temporary mapping. */ - if (a_out) - kmap_free_wakeup(exec_map, (vm_offset_t)a_out, PAGE_SIZE); - - return (error); -} - -#endif /* __i386__ */ - #ifdef LINUX_LEGACY_SYSCALLS int linux_select(struct thread *td, struct linux_select_args *args) diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index fb42c3e9df84..148258ac049c 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -31,15 +31,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include #include +#include #include #include #include +#include #include #include #include @@ -49,8 +52,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include +#include + #include #include #include @@ -58,7 +65,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include +#include #include @@ -701,3 +711,253 @@ bsd_to_linux_regset(const struct reg *b_reg, l_regset->esp = b_reg->r_esp; l_regset->ss = b_reg->r_ss; } + +int +linux_uselib(struct thread *td, struct linux_uselib_args *args) +{ + struct nameidata ni; + struct vnode *vp; + struct exec *a_out; + vm_map_t map; + vm_map_entry_t entry; + struct vattr attr; + vm_offset_t vmaddr; + unsigned long file_offset; + unsigned long bss_size; + char *library; + ssize_t aresid; + int error; + bool locked, opened, textset; + + a_out = NULL; + vp = NULL; + locked = false; + textset = false; + opened = false; + + if (!LUSECONVPATH(td)) { + NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, args->library); + error = namei(&ni); + } else { + LCONVPATHEXIST(args->library, &library); + NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_SYSSPACE, library); + error = namei(&ni); + LFREEPATH(library); + } + if (error) + goto cleanup; + + vp = ni.ni_vp; + NDFREE_PNBUF(&ni); + + /* + * From here on down, we have a locked vnode that must be unlocked. + * XXX: The code below largely duplicates exec_check_permissions(). + */ + locked = true; + + /* Executable? */ + error = VOP_GETATTR(vp, &attr, td->td_ucred); + if (error) + goto cleanup; + + if ((vp->v_mount->mnt_flag & MNT_NOEXEC) || + ((attr.va_mode & 0111) == 0) || (attr.va_type != VREG)) { + /* EACCESS is what exec(2) returns. */ + error = ENOEXEC; + goto cleanup; + } + + /* Sensible size? */ + if (attr.va_size == 0) { + error = ENOEXEC; + goto cleanup; + } + + /* Can we access it? */ + error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td); + if (error) + goto cleanup; + + /* + * XXX: This should use vn_open() so that it is properly authorized, + * and to reduce code redundancy all over the place here. + * XXX: Not really, it duplicates far more of exec_check_permissions() + * than vn_open(). + */ +#ifdef MAC + error = mac_vnode_check_open(td->td_ucred, vp, VREAD); + if (error) + goto cleanup; +#endif + error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL); + if (error) + goto cleanup; + opened = true; + + /* Pull in executable header into exec_map */ + error = vm_mmap(exec_map, (vm_offset_t *)&a_out, PAGE_SIZE, + VM_PROT_READ, VM_PROT_READ, 0, OBJT_VNODE, vp, 0); + if (error) + goto cleanup; + + /* Is it a Linux binary ? */ + if (((a_out->a_magic >> 16) & 0xff) != 0x64) { + error = ENOEXEC; + goto cleanup; + } + + /* + * While we are here, we should REALLY do some more checks + */ + + /* Set file/virtual offset based on a.out variant. */ + switch ((int)(a_out->a_magic & 0xffff)) { + case 0413: /* ZMAGIC */ + file_offset = 1024; + break; + case 0314: /* QMAGIC */ + file_offset = 0; + break; + default: + error = ENOEXEC; + goto cleanup; + } + + bss_size = round_page(a_out->a_bss); + + /* Check various fields in header for validity/bounds. */ + if (a_out->a_text & PAGE_MASK || a_out->a_data & PAGE_MASK) { + error = ENOEXEC; + goto cleanup; + } + + /* text + data can't exceed file size */ + if (a_out->a_data + a_out->a_text > attr.va_size) { + error = EFAULT; + goto cleanup; + } + + /* + * text/data/bss must not exceed limits + * XXX - this is not complete. it should check current usage PLUS + * the resources needed by this library. + */ + PROC_LOCK(td->td_proc); + if (a_out->a_text > maxtsiz || + a_out->a_data + bss_size > lim_cur_proc(td->td_proc, RLIMIT_DATA) || + racct_set(td->td_proc, RACCT_DATA, a_out->a_data + + bss_size) != 0) { + PROC_UNLOCK(td->td_proc); + error = ENOMEM; + goto cleanup; + } + PROC_UNLOCK(td->td_proc); + + /* + * Prevent more writers. + */ + error = VOP_SET_TEXT(vp); + if (error != 0) + goto cleanup; + textset = true; + + /* + * Lock no longer needed + */ + locked = false; + VOP_UNLOCK(vp); + + /* + * Check if file_offset page aligned. Currently we cannot handle + * misalinged file offsets, and so we read in the entire image + * (what a waste). + */ + if (file_offset & PAGE_MASK) { + /* Map text+data read/write/execute */ + + /* a_entry is the load address and is page aligned */ + vmaddr = trunc_page(a_out->a_entry); + + /* get anon user mapping, read+write+execute */ + error = vm_map_find(&td->td_proc->p_vmspace->vm_map, NULL, 0, + &vmaddr, a_out->a_text + a_out->a_data, 0, VMFS_NO_SPACE, + VM_PROT_ALL, VM_PROT_ALL, 0); + if (error) + goto cleanup; + + error = vn_rdwr(UIO_READ, vp, (void *)vmaddr, file_offset, + a_out->a_text + a_out->a_data, UIO_USERSPACE, 0, + td->td_ucred, NOCRED, &aresid, td); + if (error != 0) + goto cleanup; + if (aresid != 0) { + error = ENOEXEC; + goto cleanup; + } + } else { + /* + * for QMAGIC, a_entry is 20 bytes beyond the load address + * to skip the executable header + */ + vmaddr = trunc_page(a_out->a_entry); + + /* + * Map it all into the process's space as a single + * copy-on-write "data" segment. + */ + map = &td->td_proc->p_vmspace->vm_map; + error = vm_mmap(map, &vmaddr, + a_out->a_text + a_out->a_data, VM_PROT_ALL, VM_PROT_ALL, + MAP_PRIVATE | MAP_FIXED, OBJT_VNODE, vp, file_offset); + if (error) + goto cleanup; + vm_map_lock(map); + if (!vm_map_lookup_entry(map, vmaddr, &entry)) { + vm_map_unlock(map); + error = EDOOFUS; + goto cleanup; + } + entry->eflags |= MAP_ENTRY_VN_EXEC; + vm_map_unlock(map); + textset = false; + } + + if (bss_size != 0) { + /* Calculate BSS start address */ + vmaddr = trunc_page(a_out->a_entry) + a_out->a_text + + a_out->a_data; + + /* allocate some 'anon' space */ + error = vm_map_find(&td->td_proc->p_vmspace->vm_map, NULL, 0, + &vmaddr, bss_size, 0, VMFS_NO_SPACE, VM_PROT_ALL, + VM_PROT_ALL, 0); + if (error) + goto cleanup; + } + +cleanup: + if (opened) { + if (locked) + VOP_UNLOCK(vp); + locked = false; + VOP_CLOSE(vp, FREAD, td->td_ucred, td); + } + if (textset) { + if (!locked) { + locked = true; + VOP_LOCK(vp, LK_SHARED | LK_RETRY); + } + VOP_UNSET_TEXT_CHECKED(vp); + } + if (locked) + VOP_UNLOCK(vp); + + /* Release the temporary mapping. */ + if (a_out) + kmap_free_wakeup(exec_map, (vm_offset_t)a_out, PAGE_SIZE); + + return (error); +} From nobody Tue Feb 14 14:47:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF24ystz3s2ST; Tue, 14 Feb 2023 14:47: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 4PGPF21T6Vz46fX; Tue, 14 Feb 2023 14:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BPMT8ZtLBqYIrIQcbVN43qnVWEiEA+8V6DkmOTnpFQ=; b=AvBRYJb5e60NOjwrTA28XggCJnRyu7deCVxqktN8sMgI7PGq+T3d3Ch55y4Fpm9kBrFv1S 43zUHiIehVsjj9NQbfgJo0knBxcRt4sukjaxCIDvY3gdP4Z/nrCKnwLhQ57avck7iSG8vX A4wa0RhLthfAXwFrGo1zYCE5O8X7mkroyBbnH+N286Lft20/KNAOsaqySVqF3WV7vz9H7/ ukeYN9gIQ85NSxASWMlRvN7qERpWNDL8DlnA6b15fRkDq99bL15NdZ6wYTFa+BCRcHI6va XB4uP/cNmQG/gZ+4I0URS5t/PMOezpcGFnkoApzLiZwaNbWkxOeK+aCNySGItQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BPMT8ZtLBqYIrIQcbVN43qnVWEiEA+8V6DkmOTnpFQ=; b=FxTuX2lk+2F85mLU7sgjPKrmYA7nr/5cHnQNCzeD6cKFq+2sEX5JGsMVMkm19LT0JBrlZy kb5FiavGmzXPV9kzbWi2oaXtEMpEN7eZ2YW6YgLah20Mncv6vEcavWJPpmQBH6CwhnGVpw xyKH3PgjML7FBTKLNpQgA60N/qunkeo3sFut1+jWWP/qNpLg2ybtE38o8kXOuL6JFcoTg4 wC7ZPEGinJrKlKKWMTNgQORNf42VHOjqsedRqagS7PnTqKhXP9jBC1xQjwHXHwtZe4mKzZ NeTy6bd6ULDyeFXm7IIZpmEay0rRhW/Ieoeq4J9OBJ77pqcxyq2TjyztqrSRuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386038; a=rsa-sha256; cv=none; b=WmtbfNgQVHfhQRRtPJlREP0HtE7puu7ucYBoNhrF2exNM+6pdR2KrUXBpabCnEicy1us9V cEMNnub11n+9jbQO6QZWgMK/8jWvjfuN54or6WV7PhpA01fiicqo2MUgmR5h3Ou2eA63zV H+WDHb5bYw4hjPNNjTG8kXbyXhLUYc4WYIs6GlHK3uqqSx1EvJTJYVU+Zl7iJZuXzdUbM0 n5oMNPGkxldaIMt7Fl59ElkEZ5j8rrU0pF658OGIwLz7trZF1LbDmBb+EXraewcXjcgjax Y1IU0JQbf2aAKDO6pzn03og7wf2Ver1eMRaYfDPWpUWP/MrK4vAlEyxPVXoNSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPF20b40z12QV; Tue, 14 Feb 2023 14:47: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 31EElHAV072411; Tue, 14 Feb 2023 14:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElHUn072410; Tue, 14 Feb 2023 14:47:17 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:17 GMT Message-Id: <202302141447.31EElHUn072410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: acbbd5c03933 - main - linux(4): Cleanup sys/uio.h where linux_uitl.h is included List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acbbd5c0393345f13aa4b902e2c1ac83b7e39b59 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=acbbd5c0393345f13aa4b902e2c1ac83b7e39b59 commit acbbd5c0393345f13aa4b902e2c1ac83b7e39b59 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:31 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:31 +0000 linux(4): Cleanup sys/uio.h where linux_uitl.h is included MFC after: 2 weeks --- sys/compat/linux/linux_ioctl.c | 1 - sys/compat/linux/linux_misc.c | 1 - sys/compat/linux/linux_socket.c | 1 - 3 files changed, 3 deletions(-) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index a9d39ef18429..18f911de29a4 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 4dba124a918f..562b2f3170a7 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 4bf528943d4f..d0648f88d549 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From nobody Tue Feb 14 14:47:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF34jppz3s2fS; Tue, 14 Feb 2023 14:47: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 4PGPF329RXz46VW; Tue, 14 Feb 2023 14:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QzWarjUAqZIr/Hj3LVVbbwbhUB+izzcq4+zbAgYf7eg=; b=GQNFzzNKqcGse137vRe4U6p/kpRPMFniiF7ix1S8N58+fZxTCJarzRqr1wLScR+8LvL97+ Nx/RjmcHnCgStMlPLTN53NP2mehzHEpYT27qZ+b8yzSJRIu5jniFseFGh6Bt/vv0tT2N5R EOIOWgY2gThwDkE0qIDkaY85pfNnV32Ghhqfl5+Xv9aI3HQ3ZHuNIvyfL8GW5AaXyUK3vj ssW7b8Sdh6J0TiG7mEBDII6yX5d62nVru0AQD3ypMlPxyzdoBKPv1iEKxbe9aVxt9Zg2u8 XKztKg2cte1k0p3aGed6+ciSGFp8k95PkkzQ7FmZBOQwMdyolyOaoLjrIZ+bZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QzWarjUAqZIr/Hj3LVVbbwbhUB+izzcq4+zbAgYf7eg=; b=Ck06AJjXCYArilsmwojvnesnQVZgQWeAogWPn9dhfiuVKCoUTkqKqvAauUR5fGZWM04QME +Boqsdr+ieDJaXos9qmzcZEoaeC9d2wpJ+n9V0e9ZI/RNkzet1EgYYBJU3z13xtmWtOLDn KKiyDfASBPJnui5O07Z6Og2ZbltK0b7dvsmf5e8i1iMpYP0o25nx8bFy1hVfgZW5D4jYxL 4gdD0vGusHcYNfjICfQHFfuC2qkawHpqdLd2MkKvrFjnJ4BwJOS9Yp1xIggGbGTJhN2TMm OL2Sq8Kk+Dg8WlsMr6mTv1/Op3fxZACzcLucP8aujISgDc8jdsveEOIdKv2kHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386039; a=rsa-sha256; cv=none; b=IE5DtlyXDm5lkcqmNWj9V7BDIAcWdbHhW8LNFqHhqUl/73Uq3cfOKtuleZSRzsQyt3HbyE tChTe7jW8XYHkVG3n7UgHqYgT7cqt5CAUJ2iHPZoIQkq9QecwT0cLn1fZppmrj7C/7l7oi 0d7IYYVfw2AG8Tg6yXq/+JRXbtycA6XPSq5vdvsFpF2VoWTOVHUi/s/j0q9EO+PmltsbOS 2MXJb1HUPdSDRcbr72e77pbPSzKJZ7ecE+b2R1aubwJSeD5/dDqnZ6pu7NigcY/5VpLPbO /AG0tc2ePFCgWPpwh9a2zGcRrEc2bSEIXkQBsSeRdJ7yt2sQAPQVORV3Lg7y4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPF31Gytz12mh; Tue, 14 Feb 2023 14:47: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 31EElJ52072435; Tue, 14 Feb 2023 14:47:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElJkP072434; Tue, 14 Feb 2023 14:47:19 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:19 GMT Message-Id: <202302141447.31EElJkP072434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 32fdc75fe727 - main - linux(4): Move use_real_names knob to the linux.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32fdc75fe7276083d446964055b0de0e29970b7c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=32fdc75fe7276083d446964055b0de0e29970b7c commit 32fdc75fe7276083d446964055b0de0e29970b7c Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:32 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:32 +0000 linux(4): Move use_real_names knob to the linux.c MI linux.[c|h] are the module independent in terms of the Linux emulation layer (ie, intended for both ISA - 32 & 64 bit), analogue of MD linux.h. There must be a code here that cannot be placed into the corresponding by common sense MI source and header files, i.e., code is machine independent, but ISA dependent. For the use_real_names knob, the code must be placed into the linux_socket.[c|h], however linux_socket is ISA dependent. MFC after: 2 weeks --- sys/compat/linux/linux.c | 12 ++++++++++++ sys/compat/linux/linux.h | 10 ++++++++++ sys/compat/linux/linux_util.c | 15 --------------- sys/compat/linux/linux_util.h | 9 --------- 4 files changed, 22 insertions(+), 24 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 1a0459fd3f7b..2208d6cb1b6d 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -59,6 +59,11 @@ __FBSDID("$FreeBSD$"); CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); +static bool use_real_ifnames = false; +SYSCTL_BOOL(_compat_linux, OID_AUTO, use_real_ifnames, CTLFLAG_RWTUN, + &use_real_ifnames, 0, + "Use FreeBSD interface names instead of generating ethN aliases"); + static int bsd_to_linux_sigtbl[LINUX_SIGTBLSZ] = { LINUX_SIGHUP, /* SIGHUP */ LINUX_SIGINT, /* SIGINT */ @@ -723,3 +728,10 @@ bsd_to_linux_poll_events(short bev, short *lev) *lev = bits; } + +bool +linux_use_real_ifname(const struct ifnet *ifp) +{ + + return (use_real_ifnames || !IFP_IS_ETH(ifp)); +} diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index cd7e8cd6b3e0..055d8e3b9cf6 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -284,6 +284,16 @@ struct l_statx { ktrstruct("l_sigset_t", (s), l) #endif +/* + * Criteria for interface name translation + */ +#define IFP_IS_ETH(ifp) ((ifp)->if_type == IFT_ETHER) +#define IFP_IS_LOOP(ifp) ((ifp)->if_type == IFT_LOOP) + +struct ifnet; + +bool linux_use_real_ifname(const struct ifnet *); + void linux_netlink_register(void); void linux_netlink_deregister(void); diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 4fa460078597..2656bab92171 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -50,10 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include @@ -86,11 +82,6 @@ SYSCTL_STRING(_compat_linux, OID_AUTO, emul_path, CTLFLAG_RWTUN, linux_emul_path, sizeof(linux_emul_path), "Linux runtime environment path"); -static bool use_real_ifnames = false; -SYSCTL_BOOL(_compat_linux, OID_AUTO, use_real_ifnames, CTLFLAG_RWTUN, - &use_real_ifnames, 0, - "Use FreeBSD interface names instead of generating ethN aliases"); - /* * Search an alternate path before passing pathname arguments on to * system calls. Useful for keeping a separate 'emulation tree'. @@ -324,9 +315,3 @@ linux_device_unregister_handler(struct linux_device_handler *d) return (EINVAL); } - -bool -linux_use_real_ifname(const struct ifnet *ifp) -{ - return (use_real_ifnames || !IFP_IS_ETH(ifp)); -} diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index b00a9036d367..37445ad0af27 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -113,15 +113,6 @@ int linux_vn_get_major_minor(const struct vnode *vn, int *major, int *minor); char *linux_get_char_devices(void); void linux_free_get_char_devices(char *string); -/* - * Criteria for interface name translation - */ -#define IFP_IS_ETH(ifp) ((ifp)->if_type == IFT_ETHER) -#define IFP_IS_LOOP(ifp) ((ifp)->if_type == IFT_LOOP) - -struct ifnet; -bool linux_use_real_ifname(const struct ifnet *ifp); - #if defined(KTR) #define KTR_LINUX KTR_SUBSYS From nobody Tue Feb 14 14:47:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF442dlz3s2hK; Tue, 14 Feb 2023 14:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGPF437dNz46g3; Tue, 14 Feb 2023 14:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4N0Hqd/oPbrzj4YjGamTmty7j+0uza4RbpUaRsnh/fk=; b=bCfuRll3jVLeeKPUgIvyvKPCnSfdpZ1qYXxmHDEfFmW1vE+2Uxz63N+RgFdhkKUk5ckm8l fKcKkOPUNB58SQA5QMeyfCSYYaHwv/2k2im2pxoQ5MReihHJnaK8Hf0smoa9iFHRHVLXxY /0NvNdDNuxnA4+8OJK3c+V9M2HJJVTQd4fmcjy3KbFZg938hzXHkalLQfg745MAmjSl04Z ny2DmMA7FtiPPk7t5Te+qaNHTP+aPVQepddnk5J95h8TQ/qLz2xUH3PEth11vcNhgUIRvA 5tGzIRvBfP8H4bFRa/wf5LFADoHb5SV6EMBRogrIe5dktqRw1mt1u0Gr1yqEFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4N0Hqd/oPbrzj4YjGamTmty7j+0uza4RbpUaRsnh/fk=; b=SaUBbAfuhQdM5+O3PbaXqunlqx7JVANQYsFuvx2Ey67GH8EXqg7BgVSCWuBErvZrBJPVM0 qWNoO88DWaWIXYSwwu5sJ0vrU7kIQmbRk/Qx+AaHYy5fqKapXz+MCiQGKjW+ws3PV+oDXl E81sR9N6FucbW4/4SM6e1F0U0LLoFYtw6bNN/J1TrkUccZwmhUzH/OCWE90G/ZjtAW0vD9 ln9vOLQuVA4msDyg6cj3d3nOmV2LB9POpZ+jozJnrOE3xygpm/lvZ8Hj+kfnTKnvTJdbmv kzWglaBo6oqBcPcoEoN95zjQ/3FjVeL4a6ZuMvzu0CsGgjNQ9m5PFM6Pc/jMNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386040; a=rsa-sha256; cv=none; b=pIoXJp7/GXCQQLKD2qVxb7iIkZv7rVn8I/RrgJDSfK1cZ9wqn+v7xozLtkC9SzRVqGCZr+ dbVH6F8u+wuYpbZFNwr9H1SJY1yr29hxOirt1YbqMu3MFh0AomgC4kkNTlNaTtl2tfL5tF 2bF0aR+C2yifH99hdjkT54G1RCp8CYLCvyCMMhPw2a3a6dKkjCDSaZFeZoHG6MiCExzpEY IgoNhiM9QqjtUb9UfcP4oZYZwThjWMIElf1Epme5t9xHbddtO9UkQnqA+iUohYeE1fS/i6 HMqfaA5HjyaGIGc38WmnzJfLKeaxot+m4hbRbjbOzuuz686Eiwy/Pewbtj8NKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPF42Bzyz12j4; Tue, 14 Feb 2023 14:47: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 31EElKIp072460; Tue, 14 Feb 2023 14:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElKTm072459; Tue, 14 Feb 2023 14:47:20 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:20 GMT Message-Id: <202302141447.31EElKTm072459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 77f66834b059 - main - linux(4): Fix brackets of local include opt_inet6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77f66834b059ae8327b731a19794788eed59178c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=77f66834b059ae8327b731a19794788eed59178c commit 77f66834b059ae8327b731a19794788eed59178c Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:32 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:32 +0000 linux(4): Fix brackets of local include opt_inet6 MFC after: 2 weeks --- sys/compat/linux/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 2208d6cb1b6d..3aa34a21e0c5 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -26,7 +26,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "opt_inet6.h" #include #include From nobody Tue Feb 14 14:47:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF547Hyz3s2fb; Tue, 14 Feb 2023 14:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGPF53h6Gz46df; Tue, 14 Feb 2023 14:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ieUmYZ5ow8KBlml2NEfiV/+AuNCwZLKc7pG+D3svLAU=; b=OYzIn+4c3sCMwAIRZFC4jVXyGEOS/dLJKuI4uNc7u5OPLeNy7BSogongAgQ1xY6sSNb3uy aDut4ru4oYwq8Y5WlMGJ0lEtMmxt6E7OIaopgPwVII890h0XjetUUolGq/LdwnX0oVqg4H IIdI6hzVGyhOF0stC/YLoXqUoOuHDua4cQ78ThconCa07uBmhaPvkrv06pt3LG/y+rwDtB wcu2JTJ5AQRoFXc9JMrBVCXbwvG8lptoRfPVgbKEkdCMmKftTq17kYsRAWiwHuWjHWL0cW pOSWJCPCa9AL/jWjDZl5CJlwWhFA8MNewzx2+qRXgu6cxgxQIdKc/zes0ZXkwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ieUmYZ5ow8KBlml2NEfiV/+AuNCwZLKc7pG+D3svLAU=; b=X7OsjsfclnUx27aR+6wiSnDtmYVxTwboyfdCLn/WF524WY/6h+TvQmrO7gWxADQSTY46U/ mztR5c645aOE/xGqYQAXRKkUFJcdP9/M31Z1zm5Aw7F5ZzopY5uNkDrOnMcHbDdh7t2/fe UBgJuhq39VNuZuO7AY2IXMahylM2gHPE4yagEtVaYfNUDXfv6huPWG2fNKJBQJjdALGxTF l5S/YQ9ciTeviryFgSr6eLlpXyQSj3VtqTfDrSQy2COZpd3tQpehsfUkv7YORslTGyp2Rj p+7cy+FlNxj3rRWGLwGiF6M0ILZQ2Ns+jFn5Dg+jim7sFU8i5Bcj9UmAnXOxzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386041; a=rsa-sha256; cv=none; b=rMQ3HpwzF4zJNMbNseifnUn1J4Mddi/6aY9uWEKc7cF0m481ebP5cYgaOH6kWfjDJjknEn H3gZpzHIzhJ50UZ2lcwyre95XaRKKEwY8ETS1s2rbHx3DMktm8omJrUElFSdVW45YYHpF+ RScAHR+PvWrrvggczFCRN30WSIBK8aXgxamwI7tFC9QzrNSIE3u1IEBRbL+PorvlhKmbaA x0jXIDP2b9rmJaP/12Onq6GFiZDOMNA7oDAbIcaGb0e9fJBwlN3M2pSW6WOKjjiGEnuls0 FHgHq0xYHwOUP2kEjXzIObFRhxJW06VD5Dih3W2IdD2/wn64OMBvrALPkxiEOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPF52nq7z12yY; Tue, 14 Feb 2023 14:47: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 31EElL6V072485; Tue, 14 Feb 2023 14:47:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElL68072484; Tue, 14 Feb 2023 14:47:21 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:21 GMT Message-Id: <202302141447.31EElL68072484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: e2028292e54a - main - linux(4): Cleanup sys/sysctl.h from linux_misc.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2028292e54a4541d1e80159c78516a0b3332e0c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=e2028292e54a4541d1e80159c78516a0b3332e0c commit e2028292e54a4541d1e80159c78516a0b3332e0c Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:32 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:32 +0000 linux(4): Cleanup sys/sysctl.h from linux_misc.h Leftover after c5156c77 (r374538). MFC after: 2 weeks --- sys/compat/linux/linux_misc.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index 7a8073539e87..96fcfcbf52b9 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -31,8 +31,6 @@ #ifndef _LINUX_MISC_H_ #define _LINUX_MISC_H_ -#include - #define LINUX_MAX_PID_NS_LEVEL 32 /* bits per mask */ From nobody Tue Feb 14 14:47:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF65CR8z3s2fg; Tue, 14 Feb 2023 14:47: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 4PGPF64WmBz46sm; Tue, 14 Feb 2023 14:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7pwmuKJbkve4mE/P1l4YMpvDMzvlesT969GP8ZwO+Mw=; b=QkkYAtY/uQhK/vqmwh3FPhIaPUpg1fdjPKucC+aguyClqbUNZMiTWRzXnZbzKMkBxc72KG I82duUh7/oVuU2fHgiajHTZ1vkTmfxzoZLJHvFHBN8zDmWLLnqvI13rTPVldeZtqQNskJl kf3PFOkDWtBJYb0URsGDBwq0fR+GEGBxPf21FgohtJV+dPCpAXxaM0maXjd/WoRZDMIjuA 2rMS59o7yDJ24O2MOw+uk9L/5xJ28QhRADmH1JW7pX/aSTbrLbm7o3mab8HTpMZ+GB5DOF RhzS5UidObFeOH6uN4nrW1SsZUyJEzSzdN1UlG54WREomHgEzG60DMS4r7OfMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7pwmuKJbkve4mE/P1l4YMpvDMzvlesT969GP8ZwO+Mw=; b=uFDoU1GAp56r6CdmVqRRFnnesWOrn+qNZlcmPjr2dSnXw5lk2cI6G91lGvccNw/rU5/9Ru 4IMWd1St1xsoVkpKrASfZqtmhvCt7YUee0vH5JSTprD0tuTvCqR6oMEjJ+DO+3Cm22VGKz NCdmbUo4lHUIGUsRUy9aXLNkENrBZVdH6ImyAuv9LLUw08cM0mJbnIwfczDZMHaEZJpXlF fprFQPqg5hI7GcfuriNqoZmxUFvYIST97Wc0e+K7SPzmteRdCU5/PMri2foCTQSUU3ia+7 jSra2igBUCgvFkS4eao4UZu1f+YRvKNkj2tBE5NLyw5kFOHABaoPpFpmYHgy5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386042; a=rsa-sha256; cv=none; b=kEKgilfeNPAE3h+U+MvI8LEnRaAnEUzwksTzIkNR8ZXJDOBplIeqHy1a/iXK6m0xQKSb09 w7JApZ9ga+2I7NoXJsc+tyTxafleuUqLzj7n2JXus8umW2F4KHRbdvF961QKMLrQRq2gIq WUI1O8Np2Ui90BuNEvdFtqSepHimGw+Ui88T3VZ7WhQ/HbmjIpG8CalQCHnf23dCg3JT7A iqgs1jnym2xbbFML70BX5jbft+EctugQXJLmsZjX6lA2WSebUTYEEhIoHzx4dKc8h2SU1k 7F2zBII9TcbTmgudJSsmW+nYhfaaUwRbPwppBGDTGbV4PurWbotZcO0RPyIOsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPF63dZDz12yZ; Tue, 14 Feb 2023 14:47: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 31EElM4o072509; Tue, 14 Feb 2023 14:47:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElMhW072508; Tue, 14 Feb 2023 14:47:22 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:22 GMT Message-Id: <202302141447.31EElMhW072508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: d8e53d94fae9 - main - linux(4): Cleanup includes under compat/linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8e53d94fae90cf3c83db5af0eaba0be0f55e00a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d8e53d94fae90cf3c83db5af0eaba0be0f55e00a commit d8e53d94fae90cf3c83db5af0eaba0be0f55e00a Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:32 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:32 +0000 linux(4): Cleanup includes under compat/linux Cleanup unneeded includes, sort the rest according to style(9). No functional changes. MFC after: 2 weeks --- sys/compat/linux/linux.c | 1 - sys/compat/linux/linux_common.c | 4 ---- sys/compat/linux/linux_dummy.c | 3 +-- sys/compat/linux/linux_emul.c | 4 +--- sys/compat/linux/linux_errno.c | 2 +- sys/compat/linux/linux_event.c | 18 +++++++----------- sys/compat/linux/linux_file.c | 7 ------- sys/compat/linux/linux_fork.c | 3 --- sys/compat/linux/linux_futex.c | 3 ++- sys/compat/linux/linux_getcwd.c | 6 ++---- sys/compat/linux/linux_ioctl.c | 22 +++++----------------- sys/compat/linux/linux_ipc.c | 7 +++---- sys/compat/linux/linux_mib.c | 8 ++------ sys/compat/linux/linux_misc.c | 10 ---------- sys/compat/linux/linux_mmap.c | 3 +-- sys/compat/linux/linux_netlink.c | 6 +++++- sys/compat/linux/linux_signal.c | 3 +-- sys/compat/linux/linux_socket.c | 12 ++---------- sys/compat/linux/linux_stats.c | 11 +++-------- sys/compat/linux/linux_sysctl.c | 5 +---- sys/compat/linux/linux_time.c | 12 ++---------- sys/compat/linux/linux_timer.c | 4 +--- sys/compat/linux/linux_uid16.c | 5 +---- sys/compat/linux/linux_util.c | 5 ----- sys/compat/linux/linux_vdso.c | 6 ++---- 25 files changed, 43 insertions(+), 127 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 3aa34a21e0c5..4e435081b3b6 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include -#include #include #include #include diff --git a/sys/compat/linux/linux_common.c b/sys/compat/linux/linux_common.c index 9762f16fd747..338b1a0b6989 100644 --- a/sys/compat/linux/linux_common.c +++ b/sys/compat/linux/linux_common.c @@ -28,17 +28,13 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include #include #include #include -#include -#include #include #include diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index 6bfeeaf5c298..45b0db6d6dde 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -29,9 +29,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include #include /* diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index 08510fc29a3f..afe25f2cf035 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -32,17 +32,15 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include #include #include #include -#include #include #include +#include #include #include diff --git a/sys/compat/linux/linux_errno.c b/sys/compat/linux/linux_errno.c index 69880db86319..a8a259fda15a 100644 --- a/sys/compat/linux/linux_errno.c +++ b/sys/compat/linux/linux_errno.c @@ -4,8 +4,8 @@ __FBSDID("$FreeBSD$"); #include -#include #include +#include #include #include diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c index fc27996580c2..a3b54e6aac60 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -30,21 +30,17 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include -#include -#include -#include #include #include -#include -#include +#include +#include +#include #include #include #include -#include -#include +#include +#include +#include #include #include #include @@ -52,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #ifdef COMPAT_LINUX32 #include diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 29a0afaeedda..db4b1151bc60 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -31,25 +31,18 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include #include #include -#include #include -#include -#include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index 6918868b2c50..7e9aaff7c990 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -32,8 +32,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include #include #include @@ -45,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index aed6bbf94cee..af16ecfe53fe 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -30,15 +30,16 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include +#include #include #include #include #include #include +#include #include #ifdef COMPAT_LINUX32 diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c index 304a72d06588..1c893737f8a6 100644 --- a/sys/compat/linux/linux_getcwd.c +++ b/sys/compat/linux/linux_getcwd.c @@ -39,10 +39,9 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include #include +#include +#include #ifdef COMPAT_LINUX32 #include @@ -52,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#include /* * Find pathname of process's current directory. diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 18f911de29a4..0020149c2c62 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -30,21 +30,12 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#ifdef COMPAT_LINUX32 -#include -#endif #include #include -#include -#include -#include #include -#include +#include +#include #include -#include -#include #include #include #include @@ -53,18 +44,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include #include #include -#include -#include #include +#include +#include #include -#include -#include -#include #include #include diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index a72b0a9709b5..0791e1ad2cbe 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -30,16 +30,15 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include -#include #include #include +#include #include #include #include +#include #include +#include #ifdef COMPAT_LINUX32 #include diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c index ed1bdc528278..1ff82fc79289 100644 --- a/sys/compat/linux/linux_mib.c +++ b/sys/compat/linux/linux_mib.c @@ -30,15 +30,11 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include -#include -#include +#include #include #include #include -#include +#include #include #include diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 562b2f3170a7..a4aa5903e3b9 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -33,16 +33,11 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include -#include #include #include -#include -#include -#include #include #include #include @@ -53,20 +48,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/sys/compat/linux/linux_mmap.c b/sys/compat/linux/linux_mmap.c index 4e53f3255b07..07df6f5fd43d 100644 --- a/sys/compat/linux/linux_mmap.c +++ b/sys/compat/linux/linux_mmap.c @@ -34,9 +34,8 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include -#include #include #include #include diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index 7744fee094e0..8a378d596187 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -27,13 +27,17 @@ #include __FBSDID("$FreeBSD$"); + #include "opt_inet.h" #include "opt_inet6.h" + #include +#include +#include #include #include #include -#include +#include #include #include diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 26da86eba9f7..4bff891d4206 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -32,13 +32,12 @@ __FBSDID("$FreeBSD$"); #include "opt_ktrace.h" #include -#include #include #include #include -#include #include #include +#include #include #include #ifdef KTRACE diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index d0648f88d549..ec741abe85de 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -32,23 +32,16 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include -#include -#include -#include #include -#include -#include #include #include -#include #include -#include #include +#include #include #include #include -#include -#include +#include #include #include @@ -57,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #ifdef INET6 diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 1049cb54748b..d00888e77e84 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -32,19 +32,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include +#include #include -#include -#include +#include +#include #include #include -#include #include #include -#include -#include #ifdef COMPAT_LINUX32 #include diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c index abf2c898902d..6c4d049821ec 100644 --- a/sys/compat/linux/linux_sysctl.c +++ b/sys/compat/linux/linux_sysctl.c @@ -30,15 +30,12 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include -#include -#include #include -#include #include +#include #ifdef COMPAT_LINUX32 #include diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c index c35d257cd78c..102dc4fff4bd 100644 --- a/sys/compat/linux/linux_time.c +++ b/sys/compat/linux/linux_time.c @@ -38,21 +38,13 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.14 2006/05/14 03:40:54 christos Exp #endif #include -#include -#include -#include #include -#include +#include #include +#include #include -#include -#include -#include #include -#include #include -#include -#include #ifdef COMPAT_LINUX32 #include diff --git a/sys/compat/linux/linux_timer.c b/sys/compat/linux/linux_timer.c index 4b888eac7718..5f0f5b28e624 100644 --- a/sys/compat/linux/linux_timer.c +++ b/sys/compat/linux/linux_timer.c @@ -31,12 +31,10 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include #include -#include #include -#include #ifdef COMPAT_LINUX32 #include diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 149d75459bc8..e6ad3fb967fb 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -29,18 +29,15 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include #include #include #include -#include #include #include -#include #ifdef COMPAT_LINUX32 #include diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 2656bab92171..6d82f87a3b31 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -40,14 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include -#include #include -#include -#include #include #include diff --git a/sys/compat/linux/linux_vdso.c b/sys/compat/linux/linux_vdso.c index b4093e64eb83..af6a199f1181 100644 --- a/sys/compat/linux/linux_vdso.c +++ b/sys/compat/linux/linux_vdso.c @@ -33,22 +33,20 @@ __FBSDID("$FreeBSD$"); #endif #include -#include #include #include -#include +#include #include #include -#include #include -#include #include #include #include #include #include #include +#include #include From nobody Tue Feb 14 14:47:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF76xlLz3s2vH; Tue, 14 Feb 2023 14:47: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 4PGPF75YLpz473X; Tue, 14 Feb 2023 14:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGkrLdHEzhtVBoJUvpLlYhSe0kqGizNHkvqF8UuGchE=; b=woIDgLZNmgBewBw4BjQ9u2oI2IJmyK2RSQLRy+7kd5O6d+6X/VNjQrHNS97DJFou0BXOuI +nb5xqIEHqrfLfBdHzhIysMPlwwEboBbCI4FDd1+KYuMxMRw+KlxYNMTgtQft55P7BgjCB +AQMpVh33KFPK1Oqf+HIrv6mckRoU0axazbURfoXxMaqfMIuIEYYZIP7G91Q9qp1kQ9QQe Y3zWiuQtp9e9quRFcdxHEMvGmGnad1PU6XAjk5YqZeSeZFMKT8e/hO7HrVie1tKaAPiE0O NOhugIY8whDk1mmoiQXXu6/maz73xcPYaKbiU0WzpbYp0ChlgW1Vz816rt1IlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGkrLdHEzhtVBoJUvpLlYhSe0kqGizNHkvqF8UuGchE=; b=xDsrYfz/U6qGZ9IEr+NoCTxWFKS0fJYKWEBscBfybFXUm2PET/8L5WaU/WYGbtBiwBdBuQ pzPlBR4RMfkM9vPnghdcvZFVLunz9aFor90SYhck5UdabJRVsqVI8T16PBTpBtZeqDMxhC fUteI77iG3zMXVK8uO6xoNT6HKh7cCEcNcSKZYUFgO7zUiVnrNbxxo4Gdv/xTI840YihAt azPPROep+ZxEe4cLZdgPpD3Qu8nkiUueMsOl8Iy6hk4Kq3SM0ItoC1Fg9ISk3HBR+FrG8k FsO+tNL2DmJJchoOLTJOZyUV4/9R4sHWu6r6amOGMZ9uOlmhXpzej1wV/7B57g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386043; a=rsa-sha256; cv=none; b=QKCi6Fg930RKFWiqZo/esu9s+u8RkT9NqHmXW1FESs6wBpFtdjVZa785xVQ7NTM/FKg8Nr YaIthJMuLwh5iQEWhYZhglHhGDoN73KNEeLr+ErBBLoYIhrxz+6Ml4n9fIYBHSv3V/Ppsv QJHucfDZ7pSNwYL3iNr+BYb6wIRSyLDZ5e8C6CFpIp7EPcbrJbRZ+C3OuPG6dE9iOrcXNN weGymGLkPA5c9NSROUVDcP8cg6XBDra0m9CKWFeTqw6VAea4U5jZWLugF0FtNz+1/NlRSo yt39tomgdhqmUSPM7cZ5YXorPpR+Gpste3hCbZexS8UVnitKgm2zClqkM74w/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 4PGPF74gSSz12kT; Tue, 14 Feb 2023 14:47: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 31EElNbV072539; Tue, 14 Feb 2023 14:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElNiB072538; Tue, 14 Feb 2023 14:47:23 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:23 GMT Message-Id: <202302141447.31EElNiB072538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: f4a512a5f187 - main - linux(4): Cleanup includes under i386/linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4a512a5f187d9139c04111784fe811572bc0ed6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=f4a512a5f187d9139c04111784fe811572bc0ed6 commit f4a512a5f187d9139c04111784fe811572bc0ed6 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:32 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:32 +0000 linux(4): Cleanup includes under i386/linux Cleanup unneeded includes, sort the rest according to style(9). No functional changes. MFC after: 2 weeks --- sys/i386/linux/linux_copyout.c | 2 +- sys/i386/linux/linux_dummy_machdep.c | 3 +-- sys/i386/linux/linux_machdep.c | 17 ++++------------- sys/i386/linux/linux_sysvec.c | 10 +++------- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/sys/i386/linux/linux_copyout.c b/sys/i386/linux/linux_copyout.c index 3227d904a235..833d25b911c9 100644 --- a/sys/i386/linux/linux_copyout.c +++ b/sys/i386/linux/linux_copyout.c @@ -32,10 +32,10 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include + #include #include #include diff --git a/sys/i386/linux/linux_dummy_machdep.c b/sys/i386/linux/linux_dummy_machdep.c index 0e41a4b3fc56..7f29d2a6808c 100644 --- a/sys/i386/linux/linux_dummy_machdep.c +++ b/sys/i386/linux/linux_dummy_machdep.c @@ -31,9 +31,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include +#include #include #include diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index 148258ac049c..0d06218ddc62 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -29,11 +29,11 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_posix.h" + #include -#include #include #include -#include #include #include #include @@ -41,32 +41,26 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include -#include #include #include -#include -#include -#include #include -#include #include #include #include +#include /* needed for pcb definition in linux_set_thread_area */ #include #include #include #include #include -#include #include +#include #include #include @@ -82,9 +76,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* needed for pcb definition in linux_set_thread_area */ - -#include "opt_posix.h" struct l_descriptor { l_uint entry_number; diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index b16e32ac62f1..f0b979725741 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -32,31 +32,27 @@ __FBSDID("$FreeBSD$"); #define __ELF_WORD_SIZE 32 #include -#include #include #include #include #include #include #include +#include #include #include +#include #include #include -#include #include #include #include #include -#include -#include #include -#include +#include #include -#include #include -#include #include #include From nobody Tue Feb 14 14:47:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPF86z7nz3s2rr; Tue, 14 Feb 2023 14:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGPF86Mv0z46tg; Tue, 14 Feb 2023 14:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XXz2kSio7RTrjC/W8+jbkxL/yQHDsX6MWpJhM4AaJJ8=; b=Z0IOUU5l2IpS91uReLUqnrrl1BS1iJgTKsAbm0BOeQsfo3y1Byo0D+IQrvYHSWP4O53RiU PNmLGY+QYpn5CMI1y/gbq3aXHfc9X4XkqQrYYa0llILkJVtBROzg3JmQ3ralPHL38O2KVM urQCuVDExkByD8H0pUe4wamR7k/9KrzhI7O85XHRrJGeuvXd7P5KzKOgX0idBgdgRLlBef 1vgmK+RC8o6hblQ3tqhHLUU4TFYiwpUqQUxUAuaXb2PJ2AmhArew/LglqiuubjXBduCS5P I703qzWdgTHzkFEo4rpZt+SssD/tMkgSwC/DNHqpMFNSZJmNCL8M4wJfUwU1tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XXz2kSio7RTrjC/W8+jbkxL/yQHDsX6MWpJhM4AaJJ8=; b=xCgMyrZ5Dg7KQSwWwfFeEXVnnh66dXcloLbSvQT/2L5lcsDOnhaN8ACVt+hDLvVDISOjbP iyQHbzvIDdT3iLOHkonasSuklg7ItzKkaBR4kr6KfOMG7u6jEvXGdrJE/BVXl9NGeInP5n w0UfmDRCek2elskj26xessFirw5lPPfZrCKXoGjCjR0AAcA+00Hqiz4Q5GEtdl5vTctckk vhEs15KGZS+ihiUbLJylrby51qrDV1ffZzkHZX7N8i79UtQU1Zj+NBsXUocYiUc0zZIOnv bpgd0J+XLJoHF+TVcNW+QLNUUxtz/YOJKcwiLN9chnWbT0sTmEvj3gDzZEEgQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386044; a=rsa-sha256; cv=none; b=KGJjKKqnAnjuA72R13SOm77Q3WOHrTgWeey7MfmPzUFPUOn7gKgyZHHj9qmeMNxaE8EmXP 3199OhkA1RAgcmQikODn0/Fakt2iUDryLK14Kp0OoeHf5303xiDBrjIGrl5eUL1iApl2BW SltWVpQ2pxQOWOReGb939w/vQJowe/Y21aH/IVor2TeGxqZ8a2cy/2EEkIrIbKgiq1MoWh i2I0wrcMTINkcO1iimRuJCbVK45GTk++rdWQFvesohR3OnuqPJ49rELDIzYayNvDf2Pr5y iqnVfK1PuwXy7BaPE06FylGwp7MglMKac+ndmA+oUbTxA2WBAR0MjsGEi2/+gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPF85TK6z12SX; Tue, 14 Feb 2023 14:47: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 31EElOHp072564; Tue, 14 Feb 2023 14:47:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElOSk072563; Tue, 14 Feb 2023 14:47:24 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:24 GMT Message-Id: <202302141447.31EElOSk072563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 2456a4592932 - main - linux(4): Cleanup includes under amd64/linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2456a45929328ce73a40ef6577600b0f1e2cced6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=2456a45929328ce73a40ef6577600b0f1e2cced6 commit 2456a45929328ce73a40ef6577600b0f1e2cced6 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:32 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:32 +0000 linux(4): Cleanup includes under amd64/linux Cleanup unneeded includes, sort the rest according to style(9). No functional changes. MFC after: 2 weeks --- sys/amd64/linux/linux_dummy_machdep.c | 3 +-- sys/amd64/linux/linux_genassym.c | 2 +- sys/amd64/linux/linux_machdep.c | 21 +-------------------- sys/amd64/linux/linux_sysvec.c | 12 +----------- sys/amd64/linux32/linux32_dummy_machdep.c | 3 +-- sys/amd64/linux32/linux32_genassym.c | 2 +- sys/amd64/linux32/linux32_machdep.c | 11 ----------- sys/amd64/linux32/linux32_sysvec.c | 11 +---------- 8 files changed, 7 insertions(+), 58 deletions(-) diff --git a/sys/amd64/linux/linux_dummy_machdep.c b/sys/amd64/linux/linux_dummy_machdep.c index 3ce407af291c..ed148a5a6500 100644 --- a/sys/amd64/linux/linux_dummy_machdep.c +++ b/sys/amd64/linux/linux_dummy_machdep.c @@ -30,9 +30,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include +#include #include #include diff --git a/sys/amd64/linux/linux_genassym.c b/sys/amd64/linux/linux_genassym.c index 14880afcc89b..70e1ae91eab9 100644 --- a/sys/amd64/linux/linux_genassym.c +++ b/sys/amd64/linux/linux_genassym.c @@ -2,8 +2,8 @@ __FBSDID("$FreeBSD$"); #include -#include #include +#include #include #include diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index ed905518fdf4..6c96dd496fdc 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -33,15 +33,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include #include #include #include @@ -49,15 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include -#include -#include -#include -#include -#include #include @@ -85,13 +70,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include -#include #include #include -#include #include #define LINUX_ARCH_AMD64 0xc000003e diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index ed62b2313cba..6d4deb06dc00 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$"); #define __ELF_WORD_SIZE 64 #include -#include #include -#include #include #include #include @@ -49,23 +47,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include -#include -#include -#include -#include #include -#include +#include #include -#include #include -#include #include #include diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c index f3bd8717524a..bc7a3c0aa69b 100644 --- a/sys/amd64/linux32/linux32_dummy_machdep.c +++ b/sys/amd64/linux32/linux32_dummy_machdep.c @@ -31,9 +31,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include +#include #include #include diff --git a/sys/amd64/linux32/linux32_genassym.c b/sys/amd64/linux32/linux32_genassym.c index 4a87b5a423bc..323634b3001d 100644 --- a/sys/amd64/linux32/linux32_genassym.c +++ b/sys/amd64/linux32/linux32_genassym.c @@ -2,9 +2,9 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include #include #include diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 5599cbff2525..0bd398042c3f 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -34,27 +34,16 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include -#include #include -#include #include #include #include -#include #include #include #include #include -#include -#include #include -#include -#include -#include -#include #include #include diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 88720ac7199b..d398a463b8c2 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #define __ELF_WORD_SIZE 32 #include -#include #include #include #include @@ -53,23 +52,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include -#include -#include -#include -#include #include -#include +#include #include -#include #include -#include #include #include From nobody Tue Feb 14 14:47:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPFB0h3mz3s2Py; Tue, 14 Feb 2023 14:47:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGPFB06X4z477L; Tue, 14 Feb 2023 14:47:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgvt6nBUNZ/ihtKv6So83YKoNk4D/C2ZR4TtQVPLG6A=; b=ykBok7fg4eUBWN2bLOnRv2JsrVOyhdvwjaKirgepo8EJZTyzVCQ6wSneMna7ko1YluDTL/ sF19fnnbgBNrKYKnmugNK6piC5z8hMI9QLro0BYynMez/nZIA7EsCR1dmBj6uvL7yNhc4u giKlYOHlqW8A1YjjzttsI/lPTBhBy+3yAP4rq0uVuSu/9tp22lbGdjzMMEyAm9JQJfBsr8 fLFZFo/3UorSHi1Q04fOLP1Zljydiqf5R2sST4fokOTpz3sNYxUY1mpzlRNq/IbQDlIv70 UidlPGzoqvtQlBaLrIFrXwMzO+/Ruq0DTZyqGA2BrkaALT2eqyTkfQVE70uq1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgvt6nBUNZ/ihtKv6So83YKoNk4D/C2ZR4TtQVPLG6A=; b=XlXvSpA6W4/NW5Ic2Y2wX7+cdv5atCnvhs6rq+U1dWsc3OLPDRmqBy18VIkupE/mv89x1J aZxwJSVie86mbVVoXuGq5bhGV0QrBz7GucbhSpxZvJjQ0mwxFkgCIPbTSc1GY8ckYM1gsg TReWiqRe1cWdNPtBThOoTOA8I7iYbE0JY768us2/mGeAXyZrgAt9exe1kHsMEQB7cXpjR0 WWkcwJJDqPbp+hHizadXpcFD5TavRFZ7HFlfL+EMUlCNRoWDITjSC6vamoLsoc5jhAEk14 ZL/mcCaiF03VBzA4MYKkMIGUTk8BeOG1Q55C0P99AQ0knDqH9gSq7fuCTDMyaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386046; a=rsa-sha256; cv=none; b=h3sviU7l+tHSFxzttDD3j86ecl9p1oXT14MYvYDt7F6OZew8DqUaRj1YFR2dNVvwnhvpQD rnHLZcc32bbmvfMRgsPclyuOKqL+aR3F33xYmHISnY8uWzTmEDNRu9ccHUx5quqNoV1xdi Vk7ySUIvktWvcelLY13eWUF5Mfp8KkQUKqG8giXI24IkXg4JX0uxnIBHFzMvToN+VLgyLP N5pzlHuA7qkqxFGeYgyhRP91pHfkmoz7IAK36fhupk+eAUcdxnLtmjopCTb6MWZZY+4EQP vEvjjADddTBGbqqH4k7QGxTjrgc4W5eiOF59OZ1KPKEVblblt/LBK1W6v7q4dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPF96Kp6z12vx; Tue, 14 Feb 2023 14:47: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 31EElP5X072588; Tue, 14 Feb 2023 14:47:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElPg0072587; Tue, 14 Feb 2023 14:47:25 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:25 GMT Message-Id: <202302141447.31EElPg0072587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 496a9a4f6071 - main - linux(4): Cleanup includes under x86/linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 496a9a4f60716b3ba236c3f20639da03fefe3a3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=496a9a4f60716b3ba236c3f20639da03fefe3a3f commit 496a9a4f60716b3ba236c3f20639da03fefe3a3f Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:33 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:33 +0000 linux(4): Cleanup includes under x86/linux Cleanup unneeded includes, sort the rest according to style(9). No functional changes. MFC after: 2 weeks --- sys/x86/linux/linux_dummy_x86.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/x86/linux/linux_dummy_x86.c b/sys/x86/linux/linux_dummy_x86.c index 54799c1f0df2..92905600742e 100644 --- a/sys/x86/linux/linux_dummy_x86.c +++ b/sys/x86/linux/linux_dummy_x86.c @@ -30,9 +30,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include +#include #ifdef COMPAT_LINUX32 #include From nobody Tue Feb 14 14:47:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPFC5Hh3z3s2MZ; Tue, 14 Feb 2023 14:47: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 4PGPFC1R15z47G2; Tue, 14 Feb 2023 14:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aYiAlIlJ9c0778SySCyEgth1Zn4va2tM1WhkrpqsCxM=; b=VnFl/dWag6N/IwhEJDsiWsSo3eFkNNSCTscW0TPUbFMRBflaedzKFIDwjqPKk9qbmdlScd mVhmd1EAgzo/amgIHgIfkhKDocu0OMsl13BpQkFfbEbvyqybXQpiT4eTjjbUNmGoFj82yD yG8Ufk3B8aGE047ZbidSfWmHJRjGQLz5dGL15Oz4DOXdIGZrbzsaU/h9vcUQ6LKLw4xv0x hPV7UtXs+GPfoBN9idV+Ra6G1g1Q0jSEj9cFQBbYBNJkqDfRkOY9fevoQHqzbtwqoe0bUB xNw57Liec6XdJIuh+DQ3y1Y9dublj6BoCaBUNIYJYk76OJfSgP1Rqj3XcUo+nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aYiAlIlJ9c0778SySCyEgth1Zn4va2tM1WhkrpqsCxM=; b=UzzuTMelIFBYNtRcHK5n4cLreYM49DKdv9PpPnBHdD0yQwk3rnZYYLdpnBvbGK8wsQP0RH /XXJZblgU1e9PHBVZzQ7Bs2eoLLFVJ9AxmXm2S+izEE+XIXxacq4RwlN7i9XbRdtdVCrfU OShCQEaLgSm6lDdy5FyXFoF7VoM9z3PwevxqUlXxLdscyV8baSmOH7kNVornVbTZLSDfG4 0EwPfX40keMmpV6HE3sCCGn7kGoPFSpyh4g3MOvqy2RhtaafZj7lwqXvZW1ET2bGe9CLGB xGn2UNW3gc2BfwGEZ667l5HoJml/OaStN7FtLi6B4Gso+eio+DvHcVOQzis9xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386047; a=rsa-sha256; cv=none; b=G3FkTwwWq1ObBUE5QGuDUHLOenVvj0wHxmfGpIhbhPXydDAahmCMSEShPYP/9sA0fJxsWm s0c8mCoNxJQOuS4r8bJ1PceCMHKU4W9aLyFyWSgZhnZPdbMfbWvjmTCSOAO3LkOPVxceqO iZ7JS3tMWjFk71qUycJjSGtBoipegFJZtAQehPAx69sFdHawIQOqTXUEpIzji2tc1scN6+ kxI22RbX356uYLTn75/BDJ/LwUu1eqrtpw18JmiSnSami/hHPre/5AKBdaPnWZSqiss4TT fzRdgXiEJi+ExeN2ZIvLtVq++4gzBFQD+VQxZWWtkh0A+ygZI6GeD83BJWijMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPFC0Xvlz12QW; Tue, 14 Feb 2023 14:47: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 31EElQZW072614; Tue, 14 Feb 2023 14:47:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElQ0Y072613; Tue, 14 Feb 2023 14:47:26 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:26 GMT Message-Id: <202302141447.31EElQ0Y072613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 55d3e181fc10 - main - linux(4): Cleanup includes under arm64/linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55d3e181fc10edb4810f33009b65342c3e23dd88 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=55d3e181fc10edb4810f33009b65342c3e23dd88 commit 55d3e181fc10edb4810f33009b65342c3e23dd88 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:33 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:33 +0000 linux(4): Cleanup includes under arm64/linux Cleanup unneeded includes, sort the rest according to style(9). No functional changes. MFC after: 2 weeks --- sys/arm64/linux/linux_dummy_machdep.c | 3 +-- sys/arm64/linux/linux_sysvec.c | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/arm64/linux/linux_dummy_machdep.c b/sys/arm64/linux/linux_dummy_machdep.c index 40cab9baad10..571b9f0b2a4f 100644 --- a/sys/arm64/linux/linux_dummy_machdep.c +++ b/sys/arm64/linux/linux_dummy_machdep.c @@ -30,9 +30,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include +#include #include #include diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 48b4305c5fe4..19fef57e78e4 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -32,8 +32,6 @@ __FBSDID("$FreeBSD$"); #define __ELF_WORD_SIZE 64 #include -#include -#include #include #include #include @@ -45,18 +43,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include #include +#include #include -#include -#include #include -#include #include #include From nobody Tue Feb 14 14:47:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPFD3YTHz3s2s4; Tue, 14 Feb 2023 14:47: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 4PGPFD2nZhz47DK; Tue, 14 Feb 2023 14:47:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCBtfTS52gM+Le5cSi6Q8OwWmBXPEQ2O+uk6zkvNbe8=; b=K2hi+/mrVJqeiWCsEwl6f8uAD3EdG23xBq5gSjCkvRTQWsB5/Jb4X+mKtdVbCfWDi6/3O/ Tjrhgd0wNU+dBsJeXi0+Apge66R12BgLcuigUSeI5ncMQOGbKsAS2Wgj43RR9wcR+VqDOE jlFnd3FzM18jUIGWFhbRkMFzZRoZZBpwO4Ztiag+W9rhhSn9Xl97puJ885p3OFljCVxZuD w8WO1gPKjki6UuhxoOntrtpCPF/yS1RTr6VtGwzvQTi7LokcUFKuoyoZC6jX/kcoAZtuwQ 1qxSi5RvFe1tMkjUFjZRuh2gcY8Y6tcjXmWm/tcJnoVOWwTHA9rEhJU7Jolt/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCBtfTS52gM+Le5cSi6Q8OwWmBXPEQ2O+uk6zkvNbe8=; b=uZ7o24wFgtHeYK5ivqMS/MZX/149J/D4C4VnzD+vCjr8U3qI9DCDl6n/FsYMinHUwZad5K DX7GRMrb/PzLtJhX2oJkMwvTQ3lXmlunaoaMSHGX7rqiFugnFGnUUoZqvH6w4VMCOsYHSQ e1luyMqRt9LreXLGNDAPKVJTcf97WZIUzdSLWCjwKVX53nIuIqbknmhREcCprJ2hFNIW77 My2LsKr+8QizPK3qS50awoa5PDvmQH1njs8zQCQNbrT3d4cbeu/1q3+8QPHzpRaPTfy3Sl X9H0ccaLFAUgLaGly6OwiOlnL2u/WOd3iDPYBTyFY3SattZZThDrcJqxeILFmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386048; a=rsa-sha256; cv=none; b=l2yqtfu5u1w2hTvcDa+Odcaakd/DwvjXub9khTJe5bq1CQUWv0B0CNfYtYcYzDk0Z7rhmv pqm4Dx95jPPYg/G3iVN/IIjKrJiOuR5eW3Uh+SnPUyo1XGWiBRbEDC5y6BDOYLeax8enFt XrEtYtUJmfk1vRu2IN/d32U6hg69IUwMTIetwptTmzf16LPmv3elX0oXQd4KokPjHRbUB7 bhed03lDdlSXcW0jxJjj8Sj8zunriD8LOxNhXDZoGxz4zPXaljU12pEUmkOf5PyD5gpqVx MXMPj7aRE1VlAlJT78QWG7LC8EYPfOgtJlQEV3iSrHLz5GgLDftEBmiLHKLT3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPFD1n8Nz12yb; Tue, 14 Feb 2023 14:47: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 31EElSFN072643; Tue, 14 Feb 2023 14:47:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElS41072642; Tue, 14 Feb 2023 14:47:28 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:28 GMT Message-Id: <202302141447.31EElS41072642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: c8a79231a5a7 - main - linux(4): Rename linux_timer.h to linux_time.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8a79231a5a74fc4263ec3d18c6519a974efb529 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c8a79231a5a74fc4263ec3d18c6519a974efb529 commit c8a79231a5a74fc4263ec3d18c6519a974efb529 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:33 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:33 +0000 linux(4): Rename linux_timer.h to linux_time.h To avoid confusing people, rename linux_timer.h to linux_time.h, as linux_timer.c is the implementation of timer syscalls only, while linux_time.c contains implementation of all stuff declared in linux_time.h. MFC after: 2 weeks --- lib/libsysdecode/linux.c | 2 +- lib/libsysdecode/mklinuxtables | 6 +++--- sys/amd64/linux/linux_vdso_gtod.c | 2 +- sys/amd64/linux32/linux32_vdso_gtod.c | 2 +- sys/arm64/linux/linux_vdso_gtod.c | 2 +- sys/compat/linux/linux_event.c | 2 +- sys/compat/linux/linux_futex.c | 2 +- sys/compat/linux/linux_ioctl.c | 2 +- sys/compat/linux/linux_ipc.c | 2 +- sys/compat/linux/linux_misc.c | 2 +- sys/compat/linux/linux_signal.c | 2 +- sys/compat/linux/linux_socket.c | 2 +- sys/compat/linux/linux_time.c | 2 +- sys/compat/linux/{linux_timer.h => linux_time.h} | 6 +++--- sys/compat/linux/linux_timer.c | 2 +- sys/i386/linux/linux_vdso_gtod.c | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/libsysdecode/linux.c b/lib/libsysdecode/linux.c index 76065ddf404e..4b6aab478a33 100644 --- a/lib/libsysdecode/linux.c +++ b/lib/libsysdecode/linux.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #define X(a,b) { a, #b }, #define XEND { 0, NULL } diff --git a/lib/libsysdecode/mklinuxtables b/lib/libsysdecode/mklinuxtables index bcd6ddb5f618..eebdadd03613 100644 --- a/lib/libsysdecode/mklinuxtables +++ b/lib/libsysdecode/mklinuxtables @@ -89,9 +89,9 @@ cat <<_EOF_ _EOF_ gen_table "atflags" "LINUX_AT_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_file.h" -gen_table "clockids" "LINUX_CLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_timer.h" -gen_table "clockflags" "LINUX_TIMER_[A-Z_]+[[:space:]]+0x[0-9]+" "compat/linux/linux_timer.h" -gen_table "clockcpuids" "LINUX_CPUCLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_timer.h" "_MASK|_MAX" +gen_table "clockids" "LINUX_CLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_time.h" +gen_table "clockflags" "LINUX_TIMER_[A-Z_]+[[:space:]]+0x[0-9]+" "compat/linux/linux_time.h" +gen_table "clockcpuids" "LINUX_CPUCLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_time.h" "_MASK|_MAX" gen_table "openflags" "LINUX_O_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_file.h" "O_RDONLY|O_RDWR|O_WRONLY|O_ACCMODE" gen_table "sigprocmaskhow" "LINUX_SIG_[A-Z]+[[:space:]]+[0-9]+" "compat/linux/linux.h" diff --git a/sys/amd64/linux/linux_vdso_gtod.c b/sys/amd64/linux/linux_vdso_gtod.c index 3d18b551e6fb..95e0ae145fa6 100644 --- a/sys/amd64/linux/linux_vdso_gtod.c +++ b/sys/amd64/linux/linux_vdso_gtod.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include /* The kernel fixup this at vDSO install */ uintptr_t *kern_timekeep_base = NULL; diff --git a/sys/amd64/linux32/linux32_vdso_gtod.c b/sys/amd64/linux32/linux32_vdso_gtod.c index 4f9892af3fa5..075b6f3af7f4 100644 --- a/sys/amd64/linux32/linux32_vdso_gtod.c +++ b/sys/amd64/linux32/linux32_vdso_gtod.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include /* The kernel fixup this at vDSO install */ uintptr_t *kern_timekeep_base = NULL; diff --git a/sys/arm64/linux/linux_vdso_gtod.c b/sys/arm64/linux/linux_vdso_gtod.c index 6fdff8335f5d..ff6fe56adbdf 100644 --- a/sys/arm64/linux/linux_vdso_gtod.c +++ b/sys/arm64/linux/linux_vdso_gtod.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include /* The kernel fixup this at vDSO install */ uintptr_t *kern_timekeep_base = NULL; diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c index a3b54e6aac60..e3f55f0a5c50 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include typedef uint64_t epoll_udata_t; diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index af16ecfe53fe..74f89e3d49fb 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #define FUTEX_SHARED 0x8 /* shared futex */ diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 0020149c2c62..2cb0e9ead23f 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index 0791e1ad2cbe..94c645adc099 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include -#include +#include #include /* diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index a4aa5903e3b9..bc62c6b24d2c 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 4bff891d4206..5a3cb97c385f 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include -#include +#include #include #include #include diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index ec741abe85de..a3a8cc6733c1 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #define SECURITY_CONTEXT_STRING "unconfined" diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c index 102dc4fff4bd..1a9f6cca22e0 100644 --- a/sys/compat/linux/linux_time.c +++ b/sys/compat/linux/linux_time.c @@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.14 2006/05/14 03:40:54 christos Exp #include #include -#include +#include #include /* DTrace init */ diff --git a/sys/compat/linux/linux_timer.h b/sys/compat/linux/linux_time.h similarity index 98% rename from sys/compat/linux/linux_timer.h rename to sys/compat/linux/linux_time.h index a01411cec847..55a3cd44cafa 100644 --- a/sys/compat/linux/linux_timer.h +++ b/sys/compat/linux/linux_time.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _LINUX_TIMER_H -#define _LINUX_TIMER_H +#ifndef _LINUX_TIME_H +#define _LINUX_TIME_H #ifndef __LINUX_ARCH_SIGEV_PREAMBLE_SIZE #define __LINUX_ARCH_SIGEV_PREAMBLE_SIZE \ @@ -141,4 +141,4 @@ int linux_to_native_itimerspec64(struct itimerspec *, int linux_to_native_timerflags(int *, int); -#endif /* _LINUX_TIMER_H */ +#endif /* _LINUX_TIME_H */ diff --git a/sys/compat/linux/linux_timer.c b/sys/compat/linux/linux_timer.c index 5f0f5b28e624..e2cef8347c22 100644 --- a/sys/compat/linux/linux_timer.c +++ b/sys/compat/linux/linux_timer.c @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif -#include +#include static int linux_convert_l_sigevent(struct l_sigevent *l_sig, struct sigevent *sig) diff --git a/sys/i386/linux/linux_vdso_gtod.c b/sys/i386/linux/linux_vdso_gtod.c index 20f754bfaa17..f4f7472ce9d0 100644 --- a/sys/i386/linux/linux_vdso_gtod.c +++ b/sys/i386/linux/linux_vdso_gtod.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include /* The kernel fixup this at vDSO install */ uintptr_t *kern_timekeep_base = NULL; From nobody Tue Feb 14 14:47:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPFF4Rjkz3s2mf; Tue, 14 Feb 2023 14:47: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 4PGPFF3wkqz47K6; Tue, 14 Feb 2023 14:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aWo//HHezWoxv2BmNj1DZUvQrQY90IoLD3qAfLemV30=; b=Hy47Rl555eHe2+TfiXNQiLgTDlGrL0sqxv180hGkh/OmUNDVOERDVlAqWsB2mNaB/IL1EN aDmiAfPUhez8tuegLWLbLHr+86C3w6bsmQsRJ7s6eBiJhoF4FZNuDdiVdxwLRmD9qWRUNA 9P56RpxI/LrKQdedfLRUhE+LsaewwTPt4Ea0jYprY+DOvIrI8b/2CTCKwetFIAVs77Bzju 1sg5bYP71mtcBk6I6UkII4Ni+CBFAGH+cihEbaeXQSvsH4Xvy6SjdAVtmOA5+VoCm8vwZU 93qTIRC7j8wifqNosSaxaL70z7eht9nZr8du0vpnCFd5jwGpPBtm9pOsi1iRBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676386049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aWo//HHezWoxv2BmNj1DZUvQrQY90IoLD3qAfLemV30=; b=MfMyndWVmADm0uqXyGF0WIqnsY8mbWTKSFOQWVP0kAGo+f2EQezAME8qQks7QGr97cK8Nl NZBH6JespUALdeE7xjeTxeT2/KQvJkP9/kG9ofsvPXJezrptqiiEyzTUxyyIPBUXqZvDpp e4E5VUvc5Drr6TTxaTgUtpOfBaDBZbAE6SNZiM/cDdVqlZbPht2Hup3R7QtIYPWphhjrsP h3JqIsmBo8YIPinQxNT1mfyZYfvF7iA287jhbWnNAOcl7OrPbULqYRvKTjJI3D+6MJv3pb w2xIpXIGrwUCgp7PFnfBgBRNbuQOPpvZ08mQJaCZ0yc7Vdqu8mUPOECBaIIIYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676386049; a=rsa-sha256; cv=none; b=UTpmMtr6c+3miPzJ14IAtDg/Iz874F1qc7OMbUjQ8QCo8rioENnBGAi9pW9rfN+If2HMtm JUSeAN9I/JSoZ5nXcBg6MB4sMhExZvkSflfqv4aWfMpW0INzfF5DHnZBzhjm56ldnf6KtT NIdQJwZ1RN72ZspgKYXAzSAmoW5qSzLN/VpPOiLWkCE0cIJ4hzzs2NhzuVtDbNc3v6lkg1 ppVso8RoKH7jnkgQjzCpdkrb0vT+c7rwwZzK87WxKwwZh5Cb8IqQAvXDleBKp0NR2XflWR czr0psr9TQd/qTwpEXFzjJYX+iIGD5SIf9Tx4zXm51fOvxKuIzWpr591kpEsWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPFF2slbz12kV; Tue, 14 Feb 2023 14:47: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 31EElTZV072675; Tue, 14 Feb 2023 14:47:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EElTtQ072674; Tue, 14 Feb 2023 14:47:29 GMT (envelope-from git) Date: Tue, 14 Feb 2023 14:47:29 GMT Message-Id: <202302141447.31EElTtQ072674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 825fbd087e61 - main - linux(4): Trim unused opt_usb.h from modules Makefiles List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 825fbd087e6150eaf601612a5e7468ddc808e004 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=825fbd087e6150eaf601612a5e7468ddc808e004 commit 825fbd087e6150eaf601612a5e7468ddc808e004 Author: Dmitry Chagin AuthorDate: 2023-02-14 14:46:33 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-14 14:46:33 +0000 linux(4): Trim unused opt_usb.h from modules Makefiles MFC after: 2 weeks --- sys/modules/linux/Makefile | 1 - sys/modules/linux64/Makefile | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index b3d662740df9..be2c60a42847 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -37,7 +37,6 @@ SRCS= linux${SFX}_dummy_machdep.c \ opt_inet6.h \ opt_ktrace.h \ opt_posix.h \ - opt_usb.h \ bus_if.h \ device_if.h \ vnode_if.h diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index 7f264471bcd8..4fe9ccd576c1 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -32,7 +32,6 @@ SRCS= linux_dummy_machdep.c \ opt_ktrace.h \ opt_inet6.h \ opt_posix.h \ - opt_usb.h \ bus_if.h \ device_if.h \ vnode_if.h \ From nobody Tue Feb 14 15:14:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGPrL3Wscz3s3qw; Tue, 14 Feb 2023 15:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGPrL2x1rz4Hry; Tue, 14 Feb 2023 15:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676387666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uVZPBJkDiGW9eqYRgTN6Vnrk6h4wORKuZnAJhvuutF0=; b=QPpEORiHlfWZw2WkjQqmXBDu4Dq0fPvARXDgPQ4NdJupsuQ8RhwuZI5AakN6dwSUoTeGRv fL1F9xYRHxARyVL9PrV0Zqif9ybzmn6dIHdgFAw5BOI5DdSeh7THiOpHbgNOLO/rY2R03R /yPh6AfZ5jOrwL8+/GpSKBcry5MF7T7BB+U2Qn8j4o/5f4rS9ZgPVJi89kZKM+CwelbkWG tdShodyUSJhfBYqrHvgK+Utm8CPMrSU4Jh4WzQi2aKPEJzX4mmJ/z0I39XEKUlW1tV1XX9 +sgkcfiowEMRAdbibMRSmB+jvLxpzQtjBqUogEZzmIzhBfvxlX2Xsp/JrV9tZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676387666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uVZPBJkDiGW9eqYRgTN6Vnrk6h4wORKuZnAJhvuutF0=; b=w0PiZjN/eJnjaKNBeLv57sXy65HWvrqSMOTDuV45c/T3OW3Y38PiNMwzM+ur1Ee4YW6DUs W0VIvQ71+hR0Zbp97nBXaeQQ8MrqF28+SWH0F8uFhkrD8C1Lp5VZ4BqLUAshwqB7FAODsr zgabz8D/kSM1mI3d5yd/mQVKcTvYVWax8aFZk8IsI4mKjktPPGNWjbFz/mhFVFZOp1TTRq xw2F66LxR3ipdOzjsj4s7r1s8ZcBuBGasv65/hN4sdij2nisZoHtOJC7Tan78/JH8xkUOt FnMk4VB8xPKJ/1UVGI8gEdjrDSBqV0Bay4ZVsgeQ3aLCjjx7FEG2/6VWGnf+Cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676387666; a=rsa-sha256; cv=none; b=bWfHWRhCbFL+WfoisxDfh52avSeHl3qSjQrahI9iQzHUiOhc00xpo4vuSuOpuCRdEEW52Z RdkM//+nmf38DyhhUG3hFh3y99Tw+gE8zXrt004FE0khnsi48ZOHgj1C+msYnyJx4/5iyF 3en+XS7l4T3hDrSnr9evjWwGX60KSmsyi9mYX79edWioCaPzYfOto2nxf8wBKCoLcOLggw 2n8TXP3Hgeleuec/j+bJR36Fbi88r1mhhAUqLZiJKV0kE3s1ho4KlOd1iT4Gu345ODRzYJ znvkUp5lTGlRTi8ch3Z/X9JEBPy+OYAyUmhwgGMjxjE4iZTrzKah/eMrOxYfKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGPrL1zMBz13Lc; Tue, 14 Feb 2023 15:14: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 31EFEQqW015475; Tue, 14 Feb 2023 15:14:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFEQan015474; Tue, 14 Feb 2023 15:14:26 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:14:26 GMT Message-Id: <202302141514.31EFEQan015474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 636b19ead43a - main - tcp: Disallow re-connection of a connected socket List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 636b19ead43a722d8434776e0bd185bfc97819b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=636b19ead43a722d8434776e0bd185bfc97819b6 commit 636b19ead43a722d8434776e0bd185bfc97819b6 Author: Mark Johnston AuthorDate: 2023-02-14 14:27:47 +0000 Commit: Mark Johnston CommitDate: 2023-02-14 15:07:19 +0000 tcp: Disallow re-connection of a connected socket soconnectat() tries to ensure that one cannot connect a connected socket. However, the check is racy and does not really prevent two threads from attempting to connect the same TCP socket. Modify tcp_connect() and tcp6_connect() to perform the check again, this time synchronized by the inpcb lock, under which we call soisconnecting(). Reported by: syzkaller Reviewed by: glebius MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D38507 --- sys/kern/uipc_socket.c | 4 ++++ sys/netinet/tcp_usrreq.c | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 9b7f63a81617..1d2b06311c8c 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1345,10 +1345,14 @@ soconnectat(int fd, struct socket *so, struct sockaddr *nam, struct thread *td) int error; CURVNET_SET(so->so_vnet); + /* * If protocol is connection-based, can only connect once. * Otherwise, if connected, try to disconnect first. This allows * user to disconnect by connecting to, e.g., a null address. + * + * Note, this check is racy and may need to be re-evaluated at the + * protocol layer. */ if (so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING) && ((so->so_proto->pr_flags & PR_CONNREQUIRED) || diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 43f2fcfb097a..5c98e969c5ce 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1401,6 +1401,10 @@ tcp_connect(struct tcpcb *tp, struct sockaddr_in *sin, struct thread *td) NET_EPOCH_ASSERT(); INP_WLOCK_ASSERT(inp); + if (__predict_false((so->so_state & + (SS_ISCONNECTING | SS_ISCONNECTED)) != 0)) + return (EISCONN); + INP_HASH_WLOCK(&V_tcbinfo); error = in_pcbconnect(inp, sin, td->td_ucred, true); INP_HASH_WUNLOCK(&V_tcbinfo); @@ -1433,11 +1437,16 @@ static int tcp6_connect(struct tcpcb *tp, struct sockaddr_in6 *sin6, struct thread *td) { struct inpcb *inp = tptoinpcb(tp); + struct socket *so = tptosocket(tp); int error; NET_EPOCH_ASSERT(); INP_WLOCK_ASSERT(inp); + if (__predict_false((so->so_state & + (SS_ISCONNECTING | SS_ISCONNECTED)) != 0)) + return (EISCONN); + INP_HASH_WLOCK(&V_tcbinfo); error = in6_pcbconnect(inp, sin6, td->td_ucred, true); INP_HASH_WUNLOCK(&V_tcbinfo); @@ -1449,7 +1458,7 @@ tcp6_connect(struct tcpcb *tp, struct sockaddr_in6 *sin6, struct thread *td) (TCP_MAXWIN << tp->request_r_scale) < sb_max) tp->request_r_scale++; - soisconnecting(inp->inp_socket); + soisconnecting(so); TCPSTAT_INC(tcps_connattempt); tcp_state_change(tp, TCPS_SYN_SENT); tp->iss = tcp_new_isn(&inp->inp_inc); From nobody Tue Feb 14 15:21:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQ0Z2W3Nz3s4Jk; Tue, 14 Feb 2023 15:21:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGQ0Z250lz4Jts; Tue, 14 Feb 2023 15:21:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AET0b9l2fWyVObEZ22K8orUAaFZBd9a1FAyxfcXy3FQ=; b=qasyNLenxOwOTi3PriAwqwEkdEoV4LkNUMnRsdFMHMu3sjM3JMLqW9846/Ozz5ePbus2ls 4MRLk4pdXSvIsqFRS2/AWbC0Cq283ptJhD6pOotTG6FKhWvt+ri4gr13l4jF11WfKTNcw9 r3+pnBKHhTCiTBRLjGOZOlKz2p1658WMyqbTky8DS8PNyaiT6wJNc23q/HvnSeM0egrmtJ EVkfHLXG2UuizKgAFSikPaHB/CgRn9j3B7PF0U2Qrxlavou7Znpaz4W7OYQe5daDWEuUwD pyDVRyvECCyMoYYIaSYeuKGtndG2+zgYG4+BKyGCyK89U7o2rcNG7ldjsWNT7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AET0b9l2fWyVObEZ22K8orUAaFZBd9a1FAyxfcXy3FQ=; b=vilpFv/B3Zoj0W1jNEsSRrdKRcxA2fAQClX9/LYghIz+A4db1XtC6fXRqEDqPwfr8hJmFY S6g7dW7RCMQ2XOyu/F4i3utBh4qaA2RDTUIJmGVEtolIMpbC6X6bfW67udAFjvYXCA7Rl3 uG2HCLobqFwSNUtJHzbK1f7MebuhXjFaoeUaD3ARCuBk1n3twlmo4KTyVm0ojgH8lN4XRL anWVI4ZuCO0+5XHNxaKyTUnlQ1sJREES+cZWUVWkToDiuUd+trrS6z4Sw6w3g3eUvHm2bg vO94E6kJjdrS+kem8c1aHOPJeJ/M0IJU919GkoSAZVeWHtZ5fHnYhfyxd5UvlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388094; a=rsa-sha256; cv=none; b=gLrMhBU90vJzwAqo7Beiq9jm0ORwrGh5E3UICzwpZXiXDr0s1iHKCGAXTSy4tc+xS6cxQT Hyp5h/4ETqoD/wub59MYqCFMGPJPqHNqDfrJcZq7K+QRFCE+JKm12BioVhsIv3fq6CqegX bQeZvPhTPE7rroyGPkjUyQiXFiFZxU76w3uX5/PvMqc5xzHFDHBJBALyrmfh7f+Gm+FAfa 7i8WPD06eiLURd9zJoNakl5o8JsjOxguRXIx7k0m9TmWBZOnfMM6Os+a6vx9o3hHDusk4R cP+ZljEkGLqIYg3TK2D/KxubXPoEBJgZ277lOzZAHNooEHKEwrp5Cex4zs8JSQ== Received: from gonegalt.net (ip-74-83-251-177.dynamic.fuse.net [74.83.251.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhibbits) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PGQ0Y6l9HzgBJ; Tue, 14 Feb 2023 15:21:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Date: Tue, 14 Feb 2023 10:21:32 -0500 From: Justin Hibbits To: Stefan =?UTF-8?B?RcOfZXI=?= Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: f20058955c9d - main - sys/kbio.h: make pre-unicode keymap support optional Message-ID: <20230214102005.08621765@gonegalt.net> In-Reply-To: <202302141315.31EDFvN2044413@gitrepo.freebsd.org> References: <202302141315.31EDFvN2044413@gitrepo.freebsd.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; powerpc64le-unknown-linux-gnu) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Tue, 14 Feb 2023 13:15:57 GMT Stefan E=C3=9Fer wrote: > The branch main has been updated by se: >=20 > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Df20058955c9d1041a5a09cd02a27bab= da7e34dc8 >=20 > commit f20058955c9d1041a5a09cd02a27babda7e34dc8 > Author: Stefan E=C3=9Fer > AuthorDate: 2023-02-14 13:03:28 +0000 > Commit: Stefan E=C3=9Fer > CommitDate: 2023-02-14 13:03:28 +0000 >=20 > sys/kbio.h: make pre-unicode keymap support optional > =20 > FreeBSD-9 had introduced support for the full set of Unicode > characters to the parsing and processing of keymap character > tables.=20 > This support has been extended to cover the table for accented > characters that are reached via dead key combinations in > FreeBSD-13.2.=20 > New ioctls have been introduced to support both the pre-Unicode > and the Unicode formats and keyboard drivers have been extended to > support those ioctls. > =20 > This commit makes the ABI compatibility functions in the kernel > optional and dependent on COMPAT_FREEBSD13 in -CURRENT. > =20 > The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has > been made ABI compatible with old kernels to allow a new world to > be run on an old kernel (that does not have full Unicode support for > keymaps). > =20 > This commit is not to merged back to 12-STABLE or 13-STABLE. It is > part of review D38465, which has been split into 3 separate > commits due to different MFC and life-time requirements of either > commit.=20 > Approved by: imp > Differential Revision: https://reviews.freebsd.org/D38465 > --- > sys/dev/adb/adb_kbd.c | 4 +++- > sys/dev/atkbdc/atkbd.c | 4 +++- > sys/dev/gpio/gpiokeys.c | 9 ++++++--- > sys/dev/hid/hkbd.c | 9 ++++++--- > sys/dev/hyperv/input/hv_kbd.c | 4 +++- > sys/dev/kbd/kbd.c | 27 ++++++++++++++++++++++----- > sys/dev/kbdmux/kbdmux.c | 6 ++++-- > sys/dev/syscons/syscons.c | 6 ++++-- > sys/dev/usb/input/ukbd.c | 9 ++++++--- > sys/dev/vkbd/vkbd.c | 4 +++- > sys/dev/vt/vt_core.c | 4 +++- > sys/sys/kbio.h | 16 ++++++++-------- > 12 files changed, 71 insertions(+), 31 deletions(-) >=20 > diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c > index 86d3865473bb..614d89c30447 100644 > --- a/sys/dev/adb/adb_kbd.c > +++ b/sys/dev/adb/adb_kbd.c > @@ -795,10 +795,12 @@ static int akbd_ioctl(keyboard_t *kbd, u_long > cmd, caddr_t data) break; > =20 > case PIO_KEYMAP: > - case OPIO_KEYMAP: > case PIO_KEYMAPENT: > case PIO_DEADKEYMAP: > +#ifdef COMPAT_FREEBSD13 > + case OPIO_KEYMAP: > case OPIO_DEADKEYMAP: > +#endif /* COMPAT_FREEBSD13 */ > default: > return (genkbd_commonioctl(kbd, cmd, data)); > } > diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c > index 08266cf4bf51..0c6dadca43aa 100644 > --- a/sys/dev/atkbdc/atkbd.c > +++ b/sys/dev/atkbdc/atkbd.c > @@ -1088,10 +1088,12 @@ atkbd_ioctl(keyboard_t *kbd, u_long cmd, > caddr_t arg) return error; > =20 > case PIO_KEYMAP: /* set keyboard translation table */ > - case OPIO_KEYMAP: /* set keyboard translation table > (compat) */ case PIO_KEYMAPENT: /* set keyboard translation > table entry */ case PIO_DEADKEYMAP: /* set accent key > translation table */ +=C3=A4ifdef COMPAT_FREEBSD13 Looks like a unicode character slipped in here. - Justin From nobody Tue Feb 14 15:36:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKW60j3z3s50r; Tue, 14 Feb 2023 15:36: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 4PGQKW4Xppz4L05; Tue, 14 Feb 2023 15:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1g2Izz3yCTk/lO3HBUr6PBr4odP7x69hAp8HTkDawJ0=; b=s/TthmHD2K4kAh0pImahw2soTBSNOoFZsutz8MrWK982GxVxRnuooqBnolY66yEsyIrmnv YNDjzWXF7+283rB4Wrthn59b4H/wlqV30WFrZBFtQhuwUnL13Uy1qCEZCpU9gw8mGj6gU0 gH+M9moUXIo+ri99vRkZUvktBFoh824LytwXcw7eYVJ5ouS51tbY/0NmVRqfwmKaZY9Kgi yqoNFlqQrZz4d6h7ed1mkQtfGjRKNJzaRQrbGggIwiLaUyggOMBxr4xzpQlGJNz6cdwWBr g84k8xiEWAcWlJk9r1tI/N5U900SHyc0rsg0cCGh54tRN5um/7QgqHsZczq7Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1g2Izz3yCTk/lO3HBUr6PBr4odP7x69hAp8HTkDawJ0=; b=DV+N8LVvtJ+VcAlBiZdq9SvWJr6tRIE7FyobGuw98+E7uvMciAO7GzSDgc8YIoe0pxNHIq iro3WuPmWE5WC3aEZBFo2dTkCvTMNyI0USD7LMGVewai+Ue53vaTn+6jA0vyRjNTxQYAw9 SSIvCiT8PRO4bKGZuihjzcH73dro3wxVWqxY+9I/WDpUuxliRv/ODXwSz/5TVTYb5fUpoC AvqtQcfTQ7xaTk2C+zAc91S9c/UvpRzD1duueMH9FArcrf93rm/NTYnTie9N/AlLwyjEcs yG1M2zU5ZWN+awmsmgfiFvIGA9Wkjl1Pp75SKKgRbG4jxg4smm4eseQJku0UkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388975; a=rsa-sha256; cv=none; b=qBTGD0ExQ5qgzIbZNowXGKe2CueVAAtHeXfkP4PedcU62bFINc+f57pOyQVqS5D6qCZdRK vNG3nxwPPhMQwQ4NUBdmYdxoeZAUSojB1yYG0rgIIuSdNuPrfVcljk/RxRnAyCgGFcxQS3 CCpcI2hbFz/6L4IcNooTMY9MfLnabOz12oneIEYErLBnP9XGR0Dja6VTSuUjenvV4yMBm3 E4OLJiHyGJQY4RetF0aBhCS2cUNfEJgEY82DjBuj6b7vkGPfFFWlgYrATKa9QepdKFAswG snISApheOMARSimGWOdhdqwRZMxoxsD27YXop/czPzb6rec3gUF13iQPwU7agg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKW3b3rz148j; Tue, 14 Feb 2023 15:36: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 31EFaFv5043630; Tue, 14 Feb 2023 15:36:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaFvX043629; Tue, 14 Feb 2023 15:36:15 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:15 GMT Message-Id: <202302141536.31EFaFvX043629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: b29549c7f939 - main - etherswitch: Fix leftovers from IfAPI conversion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b29549c7f939ec93cae1bac115b0010e07538573 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=b29549c7f939ec93cae1bac115b0010e07538573 commit b29549c7f939ec93cae1bac115b0010e07538573 Author: Justin Hibbits AuthorDate: 2023-02-10 14:57:29 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:18 +0000 etherswitch: Fix leftovers from IfAPI conversion Sponsored by: Juniper Networks, Inc. --- sys/dev/etherswitch/ar40xx/ar40xx_phy.c | 8 ++++---- sys/dev/etherswitch/e6000sw/e6060sw.c | 4 ++-- sys/dev/etherswitch/felix/felix.c | 4 ++-- sys/dev/etherswitch/infineon/adm6996fc.c | 4 ++-- sys/dev/etherswitch/micrel/ksz8995ma.c | 4 ++-- sys/dev/etherswitch/mtkswitch/mtkswitch.c | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c index 581eead59bfd..03dad3a8fc04 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c @@ -162,10 +162,10 @@ static int ar40xx_ifmedia_upd(if_t ifp) { struct ar40xx_softc *sc = if_getsoftc(ifp); - struct mii_data *mii = ar40xx_phy_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + struct mii_data *mii = ar40xx_phy_miiforport(sc, if_getdunit(ifp)); AR40XX_DPRINTF(sc, AR40XX_DBG_PORT_STATUS, "%s: called, PHY %d\n", - __func__, ifp->if_dunit); /* XXX - DRVAPI */ + __func__, if_getdunit(ifp)); if (mii == NULL) return (ENXIO); @@ -177,10 +177,10 @@ static void ar40xx_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) { struct ar40xx_softc *sc = if_getsoftc(ifp); - struct mii_data *mii = ar40xx_phy_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + struct mii_data *mii = ar40xx_phy_miiforport(sc, if_getdunit(ifp)); AR40XX_DPRINTF(sc, AR40XX_DBG_PORT_STATUS, "%s: called, PHY %d\n", - __func__, ifp->if_dunit); /* XXX - DRVAPI */ + __func__, if_getdunit(ifp)); if (mii == NULL) return; diff --git a/sys/dev/etherswitch/e6000sw/e6060sw.c b/sys/dev/etherswitch/e6000sw/e6060sw.c index f21b7d2c24d0..8ebbb7e7016a 100644 --- a/sys/dev/etherswitch/e6000sw/e6060sw.c +++ b/sys/dev/etherswitch/e6000sw/e6060sw.c @@ -889,7 +889,7 @@ e6060sw_ifmedia_upd(if_t ifp) struct mii_data *mii; sc = if_getsoftc(ifp); - mii = e6060sw_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + mii = e6060sw_miiforport(sc, if_getdunit(ifp)); DPRINTF(sc->sc_dev, "%s\n", __func__); if (mii == NULL) @@ -905,7 +905,7 @@ e6060sw_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) struct mii_data *mii; sc = if_getsoftc(ifp); - mii = e6060sw_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + mii = e6060sw_miiforport(sc, if_getdunit(ifp)); DPRINTF(sc->sc_dev, "%s\n", __func__); diff --git a/sys/dev/etherswitch/felix/felix.c b/sys/dev/etherswitch/felix/felix.c index 5a08da8fb1ff..fe07cb834be3 100644 --- a/sys/dev/etherswitch/felix/felix.c +++ b/sys/dev/etherswitch/felix/felix.c @@ -970,7 +970,7 @@ felix_ifmedia_upd(if_t ifp) felix_softc_t sc; sc = if_getsoftc(ifp); - mii = felix_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + mii = felix_miiforport(sc, if_getdunit(ifp)); if (mii == NULL) return (ENXIO); @@ -985,7 +985,7 @@ felix_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) struct mii_data *mii; sc = if_getsoftc(ifp); - mii = felix_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + mii = felix_miiforport(sc, if_getdunit(ifp)); if (mii == NULL) return; diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c index 7b3c97a99303..e6345629bbc4 100644 --- a/sys/dev/etherswitch/infineon/adm6996fc.c +++ b/sys/dev/etherswitch/infineon/adm6996fc.c @@ -727,7 +727,7 @@ adm6996fc_ifmedia_upd(if_t ifp) struct mii_data *mii; sc = if_getsoftc(ifp); - mii = adm6996fc_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + mii = adm6996fc_miiforport(sc, if_getdunit(ifp)); DPRINTF(sc->sc_dev, "%s\n", __func__); if (mii == NULL) @@ -743,7 +743,7 @@ adm6996fc_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) struct mii_data *mii; sc = if_getsoftc(ifp); - mii = adm6996fc_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + mii = adm6996fc_miiforport(sc, if_getdunit(ifp)); DPRINTF(sc->sc_dev, "%s\n", __func__); diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c index 6b7bbb3da767..f4f6fa6a127a 100644 --- a/sys/dev/etherswitch/micrel/ksz8995ma.c +++ b/sys/dev/etherswitch/micrel/ksz8995ma.c @@ -777,7 +777,7 @@ ksz8995ma_ifmedia_upd(if_t ifp) struct mii_data *mii; sc = if_getsoftc(ifp); - mii = ksz8995ma_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + mii = ksz8995ma_miiforport(sc, if_getdunit(ifp)); DPRINTF(sc->sc_dev, "%s\n", __func__); if (mii == NULL) @@ -793,7 +793,7 @@ ksz8995ma_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) struct mii_data *mii; sc = if_getsoftc(ifp); - mii = ksz8995ma_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + mii = ksz8995ma_miiforport(sc, if_getdunit(ifp)); DPRINTF(sc->sc_dev, "%s\n", __func__); diff --git a/sys/dev/etherswitch/mtkswitch/mtkswitch.c b/sys/dev/etherswitch/mtkswitch/mtkswitch.c index c10c34c4c21c..d8a474e54c91 100644 --- a/sys/dev/etherswitch/mtkswitch/mtkswitch.c +++ b/sys/dev/etherswitch/mtkswitch/mtkswitch.c @@ -522,7 +522,7 @@ static int mtkswitch_ifmedia_upd(if_t ifp) { struct mtkswitch_softc *sc = if_getsoftc(ifp); - struct mii_data *mii = mtkswitch_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + struct mii_data *mii = mtkswitch_miiforport(sc, if_getdunit(ifp)); if (mii == NULL) return (ENXIO); @@ -534,7 +534,7 @@ static void mtkswitch_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) { struct mtkswitch_softc *sc = if_getsoftc(ifp); - struct mii_data *mii = mtkswitch_miiforport(sc, ifp->if_dunit); /* XXX - DRVAPI */ + struct mii_data *mii = mtkswitch_miiforport(sc, if_getdunit(ifp)); DPRINTF(sc->sc_dev, "%s\n", __func__); From nobody Tue Feb 14 15:36:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKX6Xs1z3s4w9; Tue, 14 Feb 2023 15:36: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 4PGQKX5bxYz4L2c; Tue, 14 Feb 2023 15:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1GO16mAO3OO9pqBI7R7KPwGIEUdBRl8880f5Tqcxv5E=; b=EoYIn4lRiJmAkFo+1WKSPInWtqOQSnLSiqO2S87f7ilTCwepudlar3IrjndSBlR24WDOKk xO6TBE5qFg1hOCjigeM78s1ZcW9ltNahKvylPXcInKJ7dIDi5pIaLJr59sJWiLCMeI37Km Y51exCt+au0alYagCthLgwfZnI0F3E84IZSrQJ+31AYwAdKvZixLmhQJ6qHBzxQvXEPNcl 0pyjzpbZJaCl3Ub5V5DVOxOyHwAMVVTg9JI+22yx6fdWBmiNPFN5QoP8PCkPtC/NPfkeip QjB5lZIa79MAaJ8BiDsX16QM1kVDOOv0ddUpFbk4N2tzkGWO/dOIIfe4OaSgpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1GO16mAO3OO9pqBI7R7KPwGIEUdBRl8880f5Tqcxv5E=; b=wuPXgkpdL7Cdr8LCn0u9/On1A1p5zZF6gDv0JTAdHJ9BAztm/dAxZgBvJmbSQawS76P1UI gjweeUTzK+orEQUu5K9FFpFdLJWe9pmiEBH3rBTSqobhz4fT2Qq2/RSHLdfGIn/h5qJKlr Y1o4HRdu8c6ZD84PKrTotVPbX5DRbDL0c/P8cs2XUVx5PSxpkkqk2JnD5f0jBZ7fe2ULAh bDTHqKEDN/ZSKr//sAKGVpQhmmRqc5oGLVL03Jx3qkiE99ZEe+15Un3V5Glbj0oezTUX+h xoR+I6Vy5seWHF3Vbk9lXuCYbNgAH1VIrHBPokrekkxqXDF85xShtVAjdk1cww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388976; a=rsa-sha256; cv=none; b=jEJmJ37QfmUdfva/TUFyBtgN4aARbzPALdX/nxhbMepY7wY1YZHH42AnGppWaQwXrsS0ZL FPwIUsFsaWOt3x9KGqINein4CQVdfyclby2bYKyu0TJVcFz4jFcCrOXJc72OlMzrApEzhz CeicIDDg11HZsAn5+Dc6nwrjBoIxL+QC5SxFqJsnY1LM3fxKgCQmRvE9QtwWzJ4Ne3mf0Z uhwSjZi4vHgLZUe8A0Mth5AOb9FKn2krGq0kVrQACuh7zFGpaJe9XEAlSNPsck+sUdxPTk 8N7bQeQb5vEqV2uHpfyjR34ylGUZzIu4f7pkDunbr8KSM23+eJuw5NlFHjQ2zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKX4X4Yz13Vd; Tue, 14 Feb 2023 15:36: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 31EFaG8G043654; Tue, 14 Feb 2023 15:36:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaGq5043653; Tue, 14 Feb 2023 15:36:16 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:16 GMT Message-Id: <202302141536.31EFaGq5043653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 4366ea339ddb - main - mlx4: Finish conversion to IfAPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4366ea339ddb0945d94a646fc991ff293c6ec526 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=4366ea339ddb0945d94a646fc991ff293c6ec526 commit 4366ea339ddb0945d94a646fc991ff293c6ec526 Author: Justin Hibbits AuthorDate: 2023-02-09 02:36:11 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:19 +0000 mlx4: Finish conversion to IfAPI Fix a few stragglers found with further IfAPI work. Sponsored by: Juniper Networks, Inc. --- sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c b/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c index 3a2b9d7a8139..ae82f8c1a187 100644 --- a/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c +++ b/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c @@ -731,11 +731,11 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port, if (!ndev) goto out_unlock; - tmp = iboe_get_mtu(ndev->if_mtu); + tmp = iboe_get_mtu(if_getmtu(ndev)); props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256; - props->state = ((ndev->if_drv_flags & IFF_DRV_RUNNING) != 0 && - ndev->if_link_state == LINK_STATE_UP) ? + props->state = ((if_getdrvflags(ndev) & IFF_DRV_RUNNING) != 0 && + if_getlinkstate(ndev) == LINK_STATE_UP) ? IB_PORT_ACTIVE : IB_PORT_DOWN; props->phys_state = state_to_phys_state(props->state); out_unlock: @@ -2281,7 +2281,7 @@ static int mlx4_ib_netdev_event(struct notifier_block *this, if_t dev = netdev_notifier_info_to_ifp(ptr); struct mlx4_ib_dev *ibdev; - if (dev->if_vnet != &init_net) + if (if_getvnet(dev) != &init_net) return NOTIFY_DONE; ibdev = container_of(this, struct mlx4_ib_dev, iboe.nb); @@ -3021,8 +3021,8 @@ static void handle_bonded_port_state_event(struct work_struct *work) continue; curr_port_state = - ((curr_netdev->if_drv_flags & IFF_DRV_RUNNING) != 0 && - curr_netdev->if_link_state == LINK_STATE_UP) ? + ((if_getdrvflags(curr_netdev) & IFF_DRV_RUNNING) != 0 && + if_getlinkstate(curr_netdev) == LINK_STATE_UP) ? IB_PORT_ACTIVE : IB_PORT_DOWN; bonded_port_state = (bonded_port_state != IB_PORT_ACTIVE) ? From nobody Tue Feb 14 15:36:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKY6Mkqz3s5FC; Tue, 14 Feb 2023 15:36: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 4PGQKY67Gyz4L7H; Tue, 14 Feb 2023 15:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YFRfvOzwl+VI6CDsXfPFCEzeIGfxF8F0I9VdlEDGuXY=; b=yX47F+YW1nOBPB/BW+Dh2JXQL/cw5zFYJIT8JnvA/087HPmEDRbl+FB/DypBphcEbueAIn Vx0j+h3PkCpPbtsmmuk8KrvMPHmL43iuKmGLikxhfZKNvfpoXU/EST6uuZ0vj3dSoiAJl2 BgvwVmMUPSNzYtg3Vlx1uROoP/Zw4Txt3lU+NapbGGpa5aA5fowrfRw24Lo/htwEfv5I5t QixC5yjYr3fV8VwFZS/dVj6N/IxlVxb32cp9DVGIyFn2q2+vF+GTLLC9wnFWfJqZYMVyZ7 JlgQqlqCC0punW4IFvxqai4hgUqBgadLJGRMxR0zOr2ZujOOGBj6XgL6M7NC9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YFRfvOzwl+VI6CDsXfPFCEzeIGfxF8F0I9VdlEDGuXY=; b=GPD2Sr/u3JQ2DD3reL2r8vmJfMbqWdG+hlXQ0HhkJos+yCg6/Av3wP88KZ4ieJCxz38b5Y zC6nxlnpudDI+6b6og3/fgBm1/+dVnRXiAe3rwFC+ZiC0tkvdorgmbgj5NzC8N4AE3UcDg G6ahDSt4GHNFqMe6AlpD0KKyZEUcGt9Oh+uwpu9qN+d9+44g6wHit5S+QRqsVhQcVoca7Q F/XC2MTplHwGZ88wxExULIqGYoWcgCsQk8ek6TF67kRqZzmd7bzc8fJ6Be3bui4e70CEA9 G8elwRhJjIaY3/QaRUYB5Xt6Mtbb7XOjTVRyGKNv3rEuPYic3MlgL2hIpYpUog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388977; a=rsa-sha256; cv=none; b=LeY7hX64DJnqq972B6/PJ/Nu2sQNGuzeyBWyep1qNTsfq1ZUysYU66QdJ1XvazyUgglMXn O0DbXOW21q9ptDvBvbA4XeCl7/cXIA0BlKmFdNPfiuUo90YZQms1XRDBf/+mxxcwQ3G276 fZzpKC8DZSnzO6rh/xBwetq9icgfQQ5uTLIp5XDQ+3gVzdhH4DzUgnYW0fowKMZuuZnSZ3 dT6lEe5zPxMexN4ReSBXBd1m7ocmZEht0wLi30ufJ5nT25Bc5a+T5RW8/MeBpCvZftH3AW WlSbng2G5IKGuAGoZSWy6a8K7a9SMz4dRm+q4sSW7GRtgZav42bgjvXdsZiV8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKY5DK7z13Vf; Tue, 14 Feb 2023 15:36: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 31EFaHJd043686; Tue, 14 Feb 2023 15:36:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaHkB043685; Tue, 14 Feb 2023 15:36:17 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:17 GMT Message-Id: <202302141536.31EFaHkB043685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: e330262f34fc - main - Mechanically convert netmap(4) to IfAPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e330262f34fc179ce920c16bb28ba8a1c4a73aff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=e330262f34fc179ce920c16bb28ba8a1c4a73aff commit e330262f34fc179ce920c16bb28ba8a1c4a73aff Author: Justin Hibbits AuthorDate: 2023-01-12 18:38:37 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:19 +0000 Mechanically convert netmap(4) to IfAPI Reviewed by: vmaffione, zlei Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37814 --- sys/dev/netmap/if_ptnet.c | 86 +++++++++++++++++++------------------- sys/dev/netmap/if_re_netmap.h | 14 +++---- sys/dev/netmap/if_vtnet_netmap.h | 22 +++++----- sys/dev/netmap/netmap.c | 44 ++++++++++---------- sys/dev/netmap/netmap_bdg.c | 4 +- sys/dev/netmap/netmap_bdg.h | 2 +- sys/dev/netmap/netmap_freebsd.c | 90 ++++++++++++++++++++-------------------- sys/dev/netmap/netmap_generic.c | 12 +++--- sys/dev/netmap/netmap_kern.h | 74 ++++++++++++++++----------------- sys/dev/netmap/netmap_kloop.c | 2 +- sys/dev/netmap/netmap_legacy.c | 4 +- sys/dev/netmap/netmap_mem2.c | 14 +++---- sys/dev/netmap/netmap_mem2.h | 4 +- sys/dev/netmap/netmap_monitor.c | 2 +- sys/dev/netmap/netmap_pipe.c | 2 +- sys/dev/netmap/netmap_vale.c | 14 +++---- 16 files changed, 194 insertions(+), 196 deletions(-) diff --git a/sys/dev/netmap/if_ptnet.c b/sys/dev/netmap/if_ptnet.c index be75da2db9dc..5b3332ee5915 100644 --- a/sys/dev/netmap/if_ptnet.c +++ b/sys/dev/netmap/if_ptnet.c @@ -408,14 +408,14 @@ ptnet_attach(device_t dev) } if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_baudrate = IF_Gbps(10); - ifp->if_softc = sc; - ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX; - ifp->if_init = ptnet_init; - ifp->if_ioctl = ptnet_ioctl; - ifp->if_get_counter = ptnet_get_counter; - ifp->if_transmit = ptnet_transmit; - ifp->if_qflush = ptnet_qflush; + if_setbaudrate(ifp, IF_Gbps(10)); + if_setsoftc(ifp, sc); + if_setflags(ifp, IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX); + if_setinitfn(ifp, ptnet_init); + if_setioctlfn(ifp, ptnet_ioctl); + if_setget_counter(ifp, ptnet_get_counter); + if_settransmitfn(ifp, ptnet_transmit); + if_setqflushfn(ifp, ptnet_qflush); ifmedia_init(&sc->media, IFM_IMASK, ptnet_media_change, ptnet_media_status); @@ -433,25 +433,25 @@ ptnet_attach(device_t dev) ether_ifattach(ifp, sc->hwaddr); - ifp->if_hdrlen = sizeof(struct ether_vlan_header); - ifp->if_capabilities |= IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU; + if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); + if_setcapabilitiesbit(ifp, IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU, 0); if (sc->ptfeatures & PTNETMAP_F_VNET_HDR) { /* Similarly to what the vtnet driver does, we can emulate * VLAN offloadings by inserting and removing the 802.1Q * header during transmit and receive. We are then able * to do checksum offloading of VLAN frames. */ - ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 + if_setcapabilitiesbit(ifp, IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_LRO | IFCAP_VLAN_HWTSO - | IFCAP_VLAN_HWTAGGING; + | IFCAP_VLAN_HWTAGGING, 0); } - ifp->if_capenable = ifp->if_capabilities; + if_setcapenable(ifp, if_getcapabilities(ifp)); #ifdef DEVICE_POLLING /* Don't enable polling by default. */ - ifp->if_capabilities |= IFCAP_POLLING; + if_setcapabilitiesbit(ifp, IFCAP_POLLING, 0); #endif snprintf(sc->lock_name, sizeof(sc->lock_name), "%s", device_get_nameunit(dev)); @@ -517,7 +517,7 @@ ptnet_detach(device_t dev) ptnet_device_shutdown(sc); #ifdef DEVICE_POLLING - if (sc->ifp->if_capenable & IFCAP_POLLING) { + if (if_getcapenable(sc->ifp) & IFCAP_POLLING) { ether_poll_deregister(sc->ifp); } #endif @@ -761,9 +761,9 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFFLAGS: - device_printf(dev, "SIOCSIFFLAGS %x\n", ifp->if_flags); + device_printf(dev, "SIOCSIFFLAGS %x\n", if_getflags(ifp)); PTNET_CORE_LOCK(sc); - if (ifp->if_flags & IFF_UP) { + if (if_getflags(ifp) & IFF_UP) { /* Network stack wants the iff to be up. */ err = ptnet_init_locked(sc); } else { @@ -777,8 +777,8 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data) case SIOCSIFCAP: device_printf(dev, "SIOCSIFCAP %x %x\n", - ifr->ifr_reqcap, ifp->if_capenable); - mask = ifr->ifr_reqcap ^ ifp->if_capenable; + ifr->ifr_reqcap, if_getcapenable(ifp)); + mask = ifr->ifr_reqcap ^ if_getcapenable(ifp); #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { struct ptnet_queue *pq; @@ -790,7 +790,7 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data) break; } /* Stop queues and sync with taskqueues. */ - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); for (i = 0; i < sc->num_rings; i++) { pq = sc-> queues + i; /* Make sure the worker sees the @@ -804,7 +804,7 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data) &pq->task); } } - ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_setdrvflagbits(ifp, IFF_DRV_RUNNING, 0); } else { err = ether_poll_deregister(ifp); for (i = 0; i < sc->num_rings; i++) { @@ -816,7 +816,7 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data) } } #endif /* DEVICE_POLLING */ - ifp->if_capenable = ifr->ifr_reqcap; + if_setcapenable(ifp, ifr->ifr_reqcap); break; case SIOCSIFMTU: @@ -826,7 +826,7 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data) err = EINVAL; } else { PTNET_CORE_LOCK(sc); - ifp->if_mtu = ifr->ifr_mtu; + if_setmtu(ifp, ifr->ifr_mtu); PTNET_CORE_UNLOCK(sc); } break; @@ -853,22 +853,22 @@ ptnet_init_locked(struct ptnet_softc *sc) unsigned int nm_buf_size; int ret; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { return 0; /* nothing to do */ } device_printf(sc->dev, "%s\n", __func__); /* Translate offload capabilities according to if_capenable. */ - ifp->if_hwassist = 0; - if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist |= PTNET_CSUM_OFFLOAD; - if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) - ifp->if_hwassist |= PTNET_CSUM_OFFLOAD_IPV6; - if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= CSUM_IP_TSO; - if (ifp->if_capenable & IFCAP_TSO6) - ifp->if_hwassist |= CSUM_IP6_TSO; + if_sethwassist(ifp, 0); + if (if_getcapenable(ifp) & IFCAP_TXCSUM) + if_sethwassistbits(ifp, PTNET_CSUM_OFFLOAD, 0); + if (if_getcapenable(ifp) & IFCAP_TXCSUM_IPV6) + if_sethwassistbits(ifp, PTNET_CSUM_OFFLOAD_IPV6, 0); + if (if_getcapenable(ifp) & IFCAP_TSO4) + if_sethwassistbits(ifp, CSUM_IP_TSO, 0); + if (if_getcapenable(ifp) & IFCAP_TSO6) + if_sethwassistbits(ifp, CSUM_IP6_TSO, 0); /* * Prepare the interface for netmap mode access. @@ -919,7 +919,7 @@ ptnet_init_locked(struct ptnet_softc *sc) callout_reset(&sc->tick, hz, ptnet_tick, sc); #endif - ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_setdrvflagbits(ifp, IFF_DRV_RUNNING, 0); return 0; @@ -946,14 +946,14 @@ ptnet_stop(struct ptnet_softc *sc) device_printf(sc->dev, "%s\n", __func__); - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) { return 0; /* nothing to do */ } /* Clear the driver-ready flag, and synchronize with all the queues, * so that after this loop we are sure nobody is working anymore with * the device. This scheme is taken from the vtnet driver. */ - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); callout_stop(&sc->tick); for (i = 0; i < sc->num_rings; i++) { PTNET_Q_LOCK(sc->queues + i); @@ -1198,7 +1198,7 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff) pq = sc->queues + i; pq->ktoa->kern_need_kick = 1; pq->atok->appl_need_kick = - (!(ifp->if_capenable & IFCAP_POLLING) + (!(if_getcapenable(ifp) & IFCAP_POLLING) && i >= sc->num_tx_rings); } @@ -1407,7 +1407,7 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, unsigned int budget, return 0; } - if (unlikely(!(ifp->if_drv_flags & IFF_DRV_RUNNING))) { + if (unlikely(!(if_getdrvflags(ifp) & IFF_DRV_RUNNING))) { PTNET_Q_UNLOCK(pq); nm_prlim(1, "Interface is down"); return ENETDOWN; @@ -1609,7 +1609,7 @@ ptnet_transmit(if_t ifp, struct mbuf *m) return err; } - if (ifp->if_capenable & IFCAP_POLLING) { + if (if_getcapenable(ifp) & IFCAP_POLLING) { /* If polling is on, the transmit queues will be * drained by the poller. */ return 0; @@ -1693,7 +1693,7 @@ ptnet_rx_eof(struct ptnet_queue *pq, unsigned int budget, bool may_resched) PTNET_Q_LOCK(pq); - if (unlikely(!(ifp->if_drv_flags & IFF_DRV_RUNNING))) { + if (unlikely(!(if_getdrvflags(ifp) & IFF_DRV_RUNNING))) { goto unlock; } @@ -1837,7 +1837,7 @@ host_sync: mhead->m_pkthdr.flowid = pq->kring_id; M_HASHTYPE_SET(mhead, M_HASHTYPE_OPAQUE); - if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { + if (if_getcapenable(ifp) & IFCAP_VLAN_HWTAGGING) { struct ether_header *eh; eh = mtod(mhead, struct ether_header *); @@ -1874,7 +1874,7 @@ skip: pq->stats.bytes += mhead->m_pkthdr.len; PTNET_Q_UNLOCK(pq); - (*ifp->if_input)(ifp, mhead); + if_input(ifp, mhead); PTNET_Q_LOCK(pq); /* The ring->head index (and related indices) are * updated under pq lock by ptnet_ring_update(). @@ -1883,7 +1883,7 @@ skip: * ring from there. */ head = ring->head; - if (unlikely(!(ifp->if_drv_flags & IFF_DRV_RUNNING))) { + if (unlikely(!(if_getdrvflags(ifp) & IFF_DRV_RUNNING))) { /* The interface has gone down while we didn't * have the lock. Stop any processing and exit. */ goto unlock; diff --git a/sys/dev/netmap/if_re_netmap.h b/sys/dev/netmap/if_re_netmap.h index 7c356ab4bd22..d658a3e5c8a7 100644 --- a/sys/dev/netmap/if_re_netmap.h +++ b/sys/dev/netmap/if_re_netmap.h @@ -47,8 +47,8 @@ static int re_netmap_reg(struct netmap_adapter *na, int onoff) { - struct ifnet *ifp = na->ifp; - struct rl_softc *adapter = ifp->if_softc; + if_t ifp = na->ifp; + struct rl_softc *adapter = if_getsoftc(ifp); RL_LOCK(adapter); re_stop(adapter); /* also clears IFF_DRV_RUNNING */ @@ -59,7 +59,7 @@ re_netmap_reg(struct netmap_adapter *na, int onoff) } re_init_locked(adapter); /* also enables intr */ RL_UNLOCK(adapter); - return (ifp->if_drv_flags & IFF_DRV_RUNNING ? 0 : 1); + return (if_getdrvflags(ifp) & IFF_DRV_RUNNING ? 0 : 1); } @@ -70,7 +70,7 @@ static int re_netmap_txsync(struct netmap_kring *kring, int flags) { struct netmap_adapter *na = kring->na; - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ @@ -79,7 +79,7 @@ re_netmap_txsync(struct netmap_kring *kring, int flags) u_int const head = kring->rhead; /* device-specific */ - struct rl_softc *sc = ifp->if_softc; + struct rl_softc *sc = if_getsoftc(ifp); struct rl_txdesc *txd = sc->rl_ldata.rl_tx_desc; bus_dmamap_sync(sc->rl_ldata.rl_tx_list_tag, @@ -172,7 +172,7 @@ static int re_netmap_rxsync(struct netmap_kring *kring, int flags) { struct netmap_adapter *na = kring->na; - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ @@ -181,7 +181,7 @@ re_netmap_rxsync(struct netmap_kring *kring, int flags) int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ - struct rl_softc *sc = ifp->if_softc; + struct rl_softc *sc = if_getsoftc(ifp); struct rl_rxdesc *rxd = sc->rl_ldata.rl_rx_desc; if (head > lim) diff --git a/sys/dev/netmap/if_vtnet_netmap.h b/sys/dev/netmap/if_vtnet_netmap.h index 8bff697b3fdb..fc18976ee023 100644 --- a/sys/dev/netmap/if_vtnet_netmap.h +++ b/sys/dev/netmap/if_vtnet_netmap.h @@ -37,15 +37,15 @@ static int vtnet_netmap_reg(struct netmap_adapter *na, int state) { - struct ifnet *ifp = na->ifp; - struct vtnet_softc *sc = ifp->if_softc; + if_t ifp = na->ifp; + struct vtnet_softc *sc = if_getsoftc(ifp); /* * Trigger a device reinit, asking vtnet_init_locked() to * also enter or exit netmap mode. */ VTNET_CORE_LOCK(sc); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); vtnet_init_locked(sc, state ? VTNET_INIT_NETMAP_ENTER : VTNET_INIT_NETMAP_EXIT); VTNET_CORE_UNLOCK(sc); @@ -59,7 +59,7 @@ static int vtnet_netmap_txsync(struct netmap_kring *kring, int flags) { struct netmap_adapter *na = kring->na; - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; struct netmap_ring *ring = kring->ring; u_int ring_nr = kring->ring_id; u_int nm_i; /* index into the netmap ring */ @@ -67,7 +67,7 @@ vtnet_netmap_txsync(struct netmap_kring *kring, int flags) u_int const head = kring->rhead; /* device-specific */ - struct vtnet_softc *sc = ifp->if_softc; + struct vtnet_softc *sc = if_getsoftc(ifp); struct vtnet_txq *txq = &sc->vtnet_txqs[ring_nr]; struct virtqueue *vq = txq->vtntx_vq; int interrupts = !(kring->nr_kflags & NKR_NOINTR); @@ -154,14 +154,14 @@ static int vtnet_netmap_kring_refill(struct netmap_kring *kring, u_int num) { struct netmap_adapter *na = kring->na; - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; struct netmap_ring *ring = kring->ring; u_int ring_nr = kring->ring_id; u_int const lim = kring->nkr_num_slots - 1; u_int nm_i; /* device-specific */ - struct vtnet_softc *sc = ifp->if_softc; + struct vtnet_softc *sc = if_getsoftc(ifp); struct vtnet_rxq *rxq = &sc->vtnet_rxqs[ring_nr]; struct virtqueue *vq = rxq->vtnrx_vq; @@ -245,7 +245,7 @@ static int vtnet_netmap_rxsync(struct netmap_kring *kring, int flags) { struct netmap_adapter *na = kring->na; - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; struct netmap_ring *ring = kring->ring; u_int ring_nr = kring->ring_id; u_int nm_i; /* index into the netmap ring */ @@ -256,7 +256,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int flags) int interrupts = !(kring->nr_kflags & NKR_NOINTR); /* device-specific */ - struct vtnet_softc *sc = ifp->if_softc; + struct vtnet_softc *sc = if_getsoftc(ifp); struct vtnet_rxq *rxq = &sc->vtnet_rxqs[ring_nr]; struct virtqueue *vq = rxq->vtnrx_vq; @@ -349,7 +349,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int flags) static void vtnet_netmap_intr(struct netmap_adapter *na, int state) { - struct vtnet_softc *sc = na->ifp->if_softc; + struct vtnet_softc *sc = if_getsoftc(na->ifp); int i; for (i = 0; i < sc->vtnet_max_vq_pairs; i++) { @@ -416,7 +416,7 @@ vtnet_netmap_rx_slots(struct vtnet_softc *sc) static int vtnet_netmap_config(struct netmap_adapter *na, struct nm_config_info *info) { - struct vtnet_softc *sc = na->ifp->if_softc; + struct vtnet_softc *sc = if_getsoftc(na->ifp); info->num_tx_rings = sc->vtnet_act_vq_pairs; info->num_rx_rings = sc->vtnet_act_vq_pairs; diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 37723fb36fe8..acc05513fbb2 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -637,7 +637,7 @@ netmap_set_all_rings(struct netmap_adapter *na, int stopped) * onload). */ void -netmap_disable_all_rings(struct ifnet *ifp) +netmap_disable_all_rings(if_t ifp) { if (NM_NA_VALID(ifp)) { netmap_set_all_rings(NA(ifp), NM_KR_LOCKED); @@ -650,7 +650,7 @@ netmap_disable_all_rings(struct ifnet *ifp) * napi_enable(). */ void -netmap_enable_all_rings(struct ifnet *ifp) +netmap_enable_all_rings(if_t ifp) { if (NM_NA_VALID(ifp)) { netmap_set_all_rings(NA(ifp), 0 /* enabled */); @@ -658,7 +658,7 @@ netmap_enable_all_rings(struct ifnet *ifp) } void -netmap_make_zombie(struct ifnet *ifp) +netmap_make_zombie(if_t ifp) { if (NM_NA_VALID(ifp)) { struct netmap_adapter *na = NA(ifp); @@ -669,7 +669,7 @@ netmap_make_zombie(struct ifnet *ifp) } void -netmap_undo_zombie(struct ifnet *ifp) +netmap_undo_zombie(if_t ifp) { if (NM_NA_VALID(ifp)) { struct netmap_adapter *na = NA(ifp); @@ -764,7 +764,7 @@ netmap_update_config(struct netmap_adapter *na) struct nm_config_info info; if (na->ifp && !nm_is_bwrap(na)) { - strlcpy(na->name, na->ifp->if_xname, sizeof(na->name)); + strlcpy(na->name, if_name(na->ifp), sizeof(na->name)); } bzero(&info, sizeof(info)); @@ -1194,7 +1194,7 @@ netmap_dtor(void *data) * After this call the queue is empty. */ static void -netmap_send_up(struct ifnet *dst, struct mbq *q) +netmap_send_up(if_t dst, struct mbq *q) { struct mbuf *m; struct mbuf *head = NULL, *prev = NULL; @@ -1465,7 +1465,7 @@ netmap_rxsync_from_host(struct netmap_kring *kring, int flags) */ static void netmap_hw_dtor(struct netmap_adapter *); /* needed by NM_IS_NATIVE() */ int -netmap_get_hw_na(struct ifnet *ifp, struct netmap_mem_d *nmd, struct netmap_adapter **na) +netmap_get_hw_na(if_t ifp, struct netmap_mem_d *nmd, struct netmap_adapter **na) { /* generic support */ int i = netmap_admode; /* Take a snapshot. */ @@ -1555,7 +1555,7 @@ assign_mem: */ int netmap_get_na(struct nmreq_header *hdr, - struct netmap_adapter **na, struct ifnet **ifp, + struct netmap_adapter **na, if_t *ifp, struct netmap_mem_d *nmd, int create) { struct nmreq_register *req = (struct nmreq_register *)(uintptr_t)hdr->nr_body; @@ -1671,7 +1671,7 @@ out: /* undo netmap_get_na() */ void -netmap_unget_na(struct netmap_adapter *na, struct ifnet *ifp) +netmap_unget_na(struct netmap_adapter *na, if_t ifp) { if (ifp) if_rele(ifp); @@ -2256,12 +2256,12 @@ netmap_buf_size_validate(const struct netmap_adapter *na, unsigned mtu) { nm_prerr("error: large MTU (%d) needed " "but %s does not support " "NS_MOREFRAG", mtu, - na->ifp->if_xname); + if_name(na->ifp)); return EINVAL; } else if (nbs < na->rx_buf_maxsize) { nm_prerr("error: using NS_MOREFRAG on " "%s requires netmap buf size " - ">= %u", na->ifp->if_xname, + ">= %u", if_name(na->ifp), na->rx_buf_maxsize); return EINVAL; } else { @@ -2269,7 +2269,7 @@ netmap_buf_size_validate(const struct netmap_adapter *na, unsigned mtu) { "%s needs to support " "NS_MOREFRAG " "(MTU=%u,netmap_buf_size=%u)", - na->ifp->if_xname, mtu, nbs); + if_name(na->ifp), mtu, nbs); } } return 0; @@ -2744,7 +2744,7 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, caddr_t data, struct mbq q; /* packets from RX hw queues to host stack */ struct netmap_adapter *na = NULL; struct netmap_mem_d *nmd = NULL; - struct ifnet *ifp = NULL; + if_t ifp = NULL; int error = 0; u_int i, qfirst, qlast; struct netmap_kring **krings; @@ -3039,7 +3039,7 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, caddr_t data, /* Build a nmreq_register out of the nmreq_port_hdr, * so that we can call netmap_get_bdg_na(). */ struct nmreq_register regreq; - struct ifnet *ifp; + if_t ifp; bzero(®req, sizeof(regreq)); regreq.nr_mode = NR_REG_ALL_NIC; @@ -3973,7 +3973,7 @@ netmap_attach_common(struct netmap_adapter *na) #ifdef __FreeBSD__ if (na->na_flags & NAF_HOST_RINGS && na->ifp) { - na->if_input = na->ifp->if_input; /* for netmap_send_up */ + na->if_input = if_getinputfn(na->ifp); /* for netmap_send_up */ } na->pdev = na; /* make sure netmap_mem_map() is called */ #endif /* __FreeBSD__ */ @@ -4063,7 +4063,7 @@ int netmap_attach_ext(struct netmap_adapter *arg, size_t size, int override_reg) { struct netmap_hw_adapter *hwna = NULL; - struct ifnet *ifp = NULL; + if_t ifp = NULL; if (size < sizeof(struct netmap_hw_adapter)) { if (netmap_debug & NM_DEBUG_ON) @@ -4099,7 +4099,7 @@ netmap_attach_ext(struct netmap_adapter *arg, size_t size, int override_reg) goto fail; hwna->up = *arg; hwna->up.na_flags |= NAF_HOST_RINGS | NAF_NATIVE; - strlcpy(hwna->up.name, ifp->if_xname, sizeof(hwna->up.name)); + strlcpy(hwna->up.name, if_name(ifp), sizeof(hwna->up.name)); if (override_reg) { hwna->nm_hw_register = hwna->up.nm_register; hwna->up.nm_register = netmap_hw_reg; @@ -4197,7 +4197,7 @@ netmap_hw_krings_create(struct netmap_adapter *na) * Called on module unload by the netmap-enabled drivers */ void -netmap_detach(struct ifnet *ifp) +netmap_detach(if_t ifp) { struct netmap_adapter *na; @@ -4243,7 +4243,7 @@ netmap_detach(struct ifnet *ifp) * we make sure to make the mode change visible here. */ int -netmap_transmit(struct ifnet *ifp, struct mbuf *m) +netmap_transmit(if_t ifp, struct mbuf *m) { struct netmap_adapter *na = NA(ifp); struct netmap_kring *kring, *tx_kring; @@ -4483,7 +4483,7 @@ netmap_common_irq(struct netmap_adapter *na, u_int q, u_int *work_done) * calls the proper forwarding routine. */ int -netmap_rx_irq(struct ifnet *ifp, u_int q, u_int *work_done) +netmap_rx_irq(if_t ifp, u_int q, u_int *work_done) { struct netmap_adapter *na = NA(ifp); @@ -4508,7 +4508,7 @@ netmap_rx_irq(struct ifnet *ifp, u_int q, u_int *work_done) void nm_set_native_flags(struct netmap_adapter *na) { - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; /* We do the setup for intercepting packets only if we are the * first user of this adapter. */ @@ -4524,7 +4524,7 @@ nm_set_native_flags(struct netmap_adapter *na) void nm_clear_native_flags(struct netmap_adapter *na) { - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; /* We undo the setup for intercepting packets only if we are the * last user of this adapter. */ diff --git a/sys/dev/netmap/netmap_bdg.c b/sys/dev/netmap/netmap_bdg.c index 1d49a97eec12..62b4c8801a47 100644 --- a/sys/dev/netmap/netmap_bdg.c +++ b/sys/dev/netmap/netmap_bdg.c @@ -390,7 +390,7 @@ netmap_get_bdg_na(struct nmreq_header *hdr, struct netmap_adapter **na, { char *nr_name = hdr->nr_name; const char *ifname; - struct ifnet *ifp = NULL; + if_t ifp = NULL; int error = 0; struct netmap_vp_adapter *vpna, *hostna = NULL; struct nm_bridge *b; @@ -1777,7 +1777,7 @@ netmap_bwrap_attach_common(struct netmap_adapter *na, na->na_flags |= NAF_MOREFRAG; nm_prdis("%s<->%s txr %d txd %d rxr %d rxd %d", - na->name, ifp->if_xname, + na->name, if_name(ifp), na->num_tx_rings, na->num_tx_desc, na->num_rx_rings, na->num_rx_desc); diff --git a/sys/dev/netmap/netmap_bdg.h b/sys/dev/netmap/netmap_bdg.h index ac8629141601..f5148c7407b7 100644 --- a/sys/dev/netmap/netmap_bdg.h +++ b/sys/dev/netmap/netmap_bdg.h @@ -59,7 +59,7 @@ typedef int (*bdg_config_fn_t)(struct nm_ifreq *); typedef void (*bdg_dtor_fn_t)(const struct netmap_vp_adapter *); typedef void *(*bdg_update_private_data_fn_t)(void *private_data, void *callback_data, int *error); typedef int (*bdg_vp_create_fn_t)(struct nmreq_header *hdr, - struct ifnet *ifp, struct netmap_mem_d *nmd, + if_t ifp, struct netmap_mem_d *nmd, struct netmap_vp_adapter **ret); typedef int (*bdg_bwrap_attach_fn_t)(const char *nr_name, struct netmap_adapter *hwna); struct netmap_bdg_ops { diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c index 8c480f2fb092..3b2fdd214f24 100644 --- a/sys/dev/netmap/netmap_freebsd.c +++ b/sys/dev/netmap/netmap_freebsd.c @@ -171,13 +171,13 @@ nm_os_put_module(void) } static void -netmap_ifnet_arrival_handler(void *arg __unused, struct ifnet *ifp) +netmap_ifnet_arrival_handler(void *arg __unused, if_t ifp) { netmap_undo_zombie(ifp); } static void -netmap_ifnet_departure_handler(void *arg __unused, struct ifnet *ifp) +netmap_ifnet_departure_handler(void *arg __unused, if_t ifp) { netmap_make_zombie(ifp); } @@ -209,9 +209,9 @@ nm_os_ifnet_fini(void) } unsigned -nm_os_ifnet_mtu(struct ifnet *ifp) +nm_os_ifnet_mtu(if_t ifp) { - return ifp->if_mtu; + return if_getmtu(ifp); } rawsum_t @@ -294,7 +294,7 @@ nm_os_csum_tcpudp_ipv6(struct nm_ipv6hdr *ip6h, void *data, /* on FreeBSD we send up one packet at a time */ void * -nm_os_send_up(struct ifnet *ifp, struct mbuf *m, struct mbuf *prev) +nm_os_send_up(if_t ifp, struct mbuf *m, struct mbuf *prev) { NA(ifp)->if_input(ifp, m); return NULL; @@ -315,7 +315,7 @@ nm_os_mbuf_has_seg_offld(struct mbuf *m) } static void -freebsd_generic_rx_handler(struct ifnet *ifp, struct mbuf *m) +freebsd_generic_rx_handler(if_t ifp, struct mbuf *m) { int stolen; @@ -341,7 +341,7 @@ int nm_os_catch_rx(struct netmap_generic_adapter *gna, int intercept) { struct netmap_adapter *na = &gna->up.up; - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; int ret = 0; nm_os_ifnet_lock(); @@ -351,10 +351,9 @@ nm_os_catch_rx(struct netmap_generic_adapter *gna, int intercept) ret = EBUSY; /* already set */ goto out; } - - ifp->if_capenable |= IFCAP_NETMAP; - gna->save_if_input = ifp->if_input; - ifp->if_input = freebsd_generic_rx_handler; + if_setcapenablebit(ifp, IFCAP_NETMAP, 0); + gna->save_if_input = if_getinputfn(ifp); + if_setinputfn(ifp, freebsd_generic_rx_handler); } else { if (!gna->save_if_input) { nm_prerr("Failed to undo RX intercept on %s", @@ -362,9 +361,8 @@ nm_os_catch_rx(struct netmap_generic_adapter *gna, int intercept) ret = EINVAL; /* not saved */ goto out; } - - ifp->if_capenable &= ~IFCAP_NETMAP; - ifp->if_input = gna->save_if_input; + if_setcapenablebit(ifp, 0, IFCAP_NETMAP); + if_setinputfn(ifp, gna->save_if_input); gna->save_if_input = NULL; } out: @@ -384,14 +382,14 @@ int nm_os_catch_tx(struct netmap_generic_adapter *gna, int intercept) { struct netmap_adapter *na = &gna->up.up; - struct ifnet *ifp = netmap_generic_getifp(gna); + if_t ifp = netmap_generic_getifp(gna); nm_os_ifnet_lock(); if (intercept) { - na->if_transmit = ifp->if_transmit; - ifp->if_transmit = netmap_transmit; + na->if_transmit = if_gettransmitfn(ifp); + if_settransmitfn(ifp, netmap_transmit); } else { - ifp->if_transmit = na->if_transmit; + if_settransmitfn(ifp, na->if_transmit); } nm_os_ifnet_unlock(); @@ -420,7 +418,7 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) { int ret; u_int len = a->len; - struct ifnet *ifp = a->ifp; + if_t ifp = a->ifp; struct mbuf *m = a->m; /* Link the external storage to @@ -437,7 +435,7 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); m->m_pkthdr.flowid = a->ring_nr; m->m_pkthdr.rcvif = ifp; /* used for tx notification */ - CURVNET_SET(ifp->if_vnet); + CURVNET_SET(if_getvnet(ifp)); ret = NA(ifp)->if_transmit(ifp, m); CURVNET_RESTORE(); return ret ? -1 : 0; @@ -447,7 +445,7 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) struct netmap_adapter * netmap_getna(if_t ifp) { - return (NA((struct ifnet *)ifp)); + return (NA(ifp)); } /* @@ -455,14 +453,14 @@ netmap_getna(if_t ifp) * way to extract the info from the ifp */ int -nm_os_generic_find_num_desc(struct ifnet *ifp, unsigned int *tx, unsigned int *rx) +nm_os_generic_find_num_desc(if_t ifp, unsigned int *tx, unsigned int *rx) { return 0; } void -nm_os_generic_find_num_queues(struct ifnet *ifp, u_int *txq, u_int *rxq) +nm_os_generic_find_num_queues(if_t ifp, u_int *txq, u_int *rxq) { unsigned num_rings = netmap_generic_rings ? netmap_generic_rings : 1; @@ -513,14 +511,14 @@ nm_os_mitigation_cleanup(struct nm_generic_mit *mit) } static int -nm_vi_dummy(struct ifnet *ifp, u_long cmd, caddr_t addr) +nm_vi_dummy(if_t ifp, u_long cmd, caddr_t addr) { return EINVAL; } static void -nm_vi_start(struct ifnet *ifp) +nm_vi_start(if_t ifp) { panic("nm_vi_start() must not be called"); } @@ -594,9 +592,9 @@ nm_vi_free_index(uint8_t val) * increment this refcount on if_attach(). */ int -nm_os_vi_persist(const char *name, struct ifnet **ret) +nm_os_vi_persist(const char *name, if_t *ret) { - struct ifnet *ifp; + if_t ifp; u_short macaddr_hi; uint32_t macaddr_mid; u_char eaddr[6]; @@ -620,14 +618,14 @@ nm_os_vi_persist(const char *name, struct ifnet **ret) return ENOMEM; } if_initname(ifp, name, IF_DUNIT_NONE); - ifp->if_flags = IFF_UP | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_init = (void *)nm_vi_dummy; - ifp->if_ioctl = nm_vi_dummy; - ifp->if_start = nm_vi_start; - ifp->if_mtu = ETHERMTU; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); - ifp->if_capabilities |= IFCAP_LINKSTATE; - ifp->if_capenable |= IFCAP_LINKSTATE; + if_setflags(ifp, IFF_UP | IFF_SIMPLEX | IFF_MULTICAST); + if_setinitfn(ifp, (void *)nm_vi_dummy); + if_setioctlfn(ifp, nm_vi_dummy); + if_setstartfn(ifp, nm_vi_start); + if_setmtu(ifp, ETHERMTU); + if_setsendqlen(ifp, ifqmaxlen); + if_setcapabilitiesbit(ifp, IFCAP_LINKSTATE, 0); + if_setcapenablebit(ifp, IFCAP_LINKSTATE, 0); ether_ifattach(ifp, eaddr); *ret = ifp; @@ -636,9 +634,9 @@ nm_os_vi_persist(const char *name, struct ifnet **ret) /* unregister from the system and drop the final refcount */ void -nm_os_vi_detach(struct ifnet *ifp) +nm_os_vi_detach(if_t ifp) { - nm_vi_free_index(((char *)IF_LLADDR(ifp))[5]); + nm_vi_free_index(((char *)if_getlladdr(ifp))[5]); ether_ifdetach(ifp); if_free(ifp); } @@ -1502,28 +1500,28 @@ out: } void -nm_os_onattach(struct ifnet *ifp) +nm_os_onattach(if_t ifp) { - ifp->if_capabilities |= IFCAP_NETMAP; + if_setcapabilitiesbit(ifp, IFCAP_NETMAP, 0); } void -nm_os_onenter(struct ifnet *ifp) +nm_os_onenter(if_t ifp) { struct netmap_adapter *na = NA(ifp); - na->if_transmit = ifp->if_transmit; - ifp->if_transmit = netmap_transmit; - ifp->if_capenable |= IFCAP_NETMAP; + na->if_transmit = if_gettransmitfn(ifp); + if_settransmitfn(ifp, netmap_transmit); + if_setcapenablebit(ifp, IFCAP_NETMAP, 0); } void -nm_os_onexit(struct ifnet *ifp) +nm_os_onexit(if_t ifp) { struct netmap_adapter *na = NA(ifp); - ifp->if_transmit = na->if_transmit; - ifp->if_capenable &= ~IFCAP_NETMAP; + if_settransmitfn(ifp, na->if_transmit); + if_setcapenablebit(ifp, 0, IFCAP_NETMAP); } extern struct cdevsw netmap_cdevsw; /* XXX used in netmap.c, should go elsewhere */ diff --git a/sys/dev/netmap/netmap_generic.c b/sys/dev/netmap/netmap_generic.c index 83908f10a3fe..038d6efc33f5 100644 --- a/sys/dev/netmap/netmap_generic.c +++ b/sys/dev/netmap/netmap_generic.c @@ -647,7 +647,7 @@ generic_netmap_txsync(struct netmap_kring *kring, int flags) { struct netmap_adapter *na = kring->na; struct netmap_generic_adapter *gna = (struct netmap_generic_adapter *)na; - struct ifnet *ifp = na->ifp; + if_t ifp = na->ifp; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ // j u_int const lim = kring->nkr_num_slots - 1; @@ -811,7 +811,7 @@ generic_netmap_txsync(struct netmap_kring *kring, int flags) * Returns 1 if the packet was stolen, 0 otherwise. */ int -generic_rx_handler(struct ifnet *ifp, struct mbuf *m) +generic_rx_handler(if_t ifp, struct mbuf *m) { struct netmap_adapter *na = NA(ifp); struct netmap_generic_adapter *gna = (struct netmap_generic_adapter *)na; @@ -1019,7 +1019,7 @@ static void generic_netmap_dtor(struct netmap_adapter *na) { struct netmap_generic_adapter *gna = (struct netmap_generic_adapter*)na; - struct ifnet *ifp = netmap_generic_getifp(gna); + if_t ifp = netmap_generic_getifp(gna); struct netmap_adapter *prev_na = gna->prev; if (prev_na != NULL) { @@ -1060,7 +1060,7 @@ na_is_generic(struct netmap_adapter *na) * actual configuration. */ int -generic_netmap_attach(struct ifnet *ifp) +generic_netmap_attach(if_t ifp) { struct netmap_adapter *na; struct netmap_generic_adapter *gna; @@ -1068,7 +1068,7 @@ generic_netmap_attach(struct ifnet *ifp) u_int num_tx_desc, num_rx_desc; #ifdef __FreeBSD__ - if (ifp->if_type == IFT_LOOP) { + if (if_gettype(ifp) == IFT_LOOP) { nm_prerr("if_loop is not supported by %s", __func__); return EINVAL; } @@ -1097,7 +1097,7 @@ generic_netmap_attach(struct ifnet *ifp) return ENOMEM; } na = (struct netmap_adapter *)gna; - strlcpy(na->name, ifp->if_xname, sizeof(na->name)); + strlcpy(na->name, if_name(ifp), sizeof(na->name)); na->ifp = ifp; na->num_tx_desc = num_tx_desc; na->num_rx_desc = num_rx_desc; diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h index eb708f5a5cc7..b4c7e4c83f6b 100644 --- a/sys/dev/netmap/netmap_kern.h +++ b/sys/dev/netmap/netmap_kern.h @@ -110,7 +110,7 @@ #define NM_ATOMIC_TEST_AND_SET(p) (!atomic_cmpset_acq_int((p), 0, 1)) #define NM_ATOMIC_CLEAR(p) atomic_store_rel_int((p), 0) *** 434 LINES SKIPPED *** From nobody Tue Feb 14 15:36:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKb0Sv5z3s5FD; Tue, 14 Feb 2023 15:36: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 4PGQKb00Y8z4Kxc; Tue, 14 Feb 2023 15:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Unt8IKA1raQdCK1l0ZDc0sOmc5pKt9KxQ9FPJablz3U=; b=PmZcjW89NHdVUwsKF+qEOPfQbtpeo1Wu+RHts84PS/I9gcRGSbtG+t+5cps468NXevipd8 jSBX5xJ33eVY1kEc9ZfZbEhLUhGxLOIEEHIPmq744RB4OMk6jyl0rpyLqby1+yestnV9ik KTwo5H7JVoB5yJz7k3qOb5DE8JpK+y3buIgNfaaBypCfxnrpRlgKsfuGpY4g02x2eEiZUS tfdIwmVOCOqTafDhfiqHNhYvasE5+2znG8brTCT5MkUrAw8yKs8/GxMT2p2Z/Oof2y7izP 3TUIVV8ExVFrBS50lSWrCRM7VDTYG6jBY2JZqR/e1iv9WNYhhFIfnab7VGp/nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Unt8IKA1raQdCK1l0ZDc0sOmc5pKt9KxQ9FPJablz3U=; b=gW/kyB4ntkzndIhaGo6fSG8vTCsEG5Lev6xoHxvwulcp4nbcm7GWSZu1IOo2iBjcYENP/I Mh8Dey3omFE8a6VJmvbKX69j6tY6SwFNVEA1m+0j8Eybz/9NRkfWNTrBtV5mgUxoLXIZ5X kQxcODSnHW41yNWUwewv5IeTe/l+TlzToJ1pKUINynlbFO4Y5m/0hRHmvNLwbPFT7kHvnu t8/g9+zZxjf9liZ029XdsjJyhZBQOzHi48E35fOZxJ9temQ/c4Qw8mqMzUksCQERtouh2T I/POz6WGcS577bwlg5rzsQulHop4ga17hNe2UB1hA9SENzTZejhAjSIyve9orw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388979; a=rsa-sha256; cv=none; b=GuhFs1SS+UKUvULPFo8+RctvrqJ2Sq5h+94+7SEbPaLkI87bwTvpecV2Mqo2iIitbvQbV3 yAW5F0qqbRGs+ywdNqau4vy/65nhUB5FGBbuwMdvgb0KT+fdMKR+r0LCxjjgbu4ZII/+Xc orYlPBQYhl9OW2CIqB346D5cL5nZmHY1oa9t5dNjJXWG/GLYsJt4KCTXN6GuyXURodMvB/ U2U5QqW8RLm6uUpNKEfK48Nf9UnfZdHKnegs+A2o1ETk1AabLDZ6DicSMpQytCo0B23GBj Lbv84XloExl95ZlEo2Lm1vlYNWQlsaMj49imvTv+SKfj9q2RRW0ZvYDNzGtRPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKZ6D2Tz142S; Tue, 14 Feb 2023 15:36: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 31EFaIWL043710; Tue, 14 Feb 2023 15:36:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaI9i043709; Tue, 14 Feb 2023 15:36:18 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:18 GMT Message-Id: <202302141536.31EFaI9i043709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 8d5feede40b4 - main - IfAPI: Finish changes of ice(4). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d5feede40b489a6c0b2f2ee5258f8851ae6af88 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=8d5feede40b489a6c0b2f2ee5258f8851ae6af88 commit 8d5feede40b489a6c0b2f2ee5258f8851ae6af88 Author: Justin Hibbits AuthorDate: 2023-01-23 15:42:13 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:19 +0000 IfAPI: Finish changes of ice(4). Reviewed by: erj Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38423 --- sys/dev/ice/ice_iflib_txrx.c | 2 +- sys/dev/ice/ice_lib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ice/ice_iflib_txrx.c b/sys/dev/ice/ice_iflib_txrx.c index f2ae62c77f7c..89c85357a755 100644 --- a/sys/dev/ice/ice_iflib_txrx.c +++ b/sys/dev/ice/ice_iflib_txrx.c @@ -419,7 +419,7 @@ ice_ift_queue_select(void *arg, struct mbuf *m, if_pkt_info_t pi) /* Included to match default iflib behavior */ /* Only go out on default queue if ALTQ is enabled */ struct ifnet *ifp = (struct ifnet *)iflib_get_ifp(sc->ctx); - if (ALTQ_IS_ENABLED(&ifp->if_snd)) + if (if_altq_is_enabled(ifp)) return (0); #endif diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 43311ddf3f8e..da69145e85de 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -7514,7 +7514,7 @@ ice_link_up_msg(struct ice_softc *sc) int ice_update_laa_mac(struct ice_softc *sc) { - const u8 *lladdr = (const u8 *)IF_LLADDR(sc->ifp); + const u8 *lladdr = (const u8 *)if_getlladdr(sc->ifp); struct ice_hw *hw = &sc->hw; enum ice_status status; From nobody Tue Feb 14 15:36:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKc1Mthz3s5QM; Tue, 14 Feb 2023 15:36: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 4PGQKc0y5Kz4KyB; Tue, 14 Feb 2023 15:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7D6g6+xWgXVOsmvCcPfWCtE/164znXWDImaGgdnOE/I=; b=yEFC1Af04OJAurpm47SNTdFT3VkE5BsogBB8SOblQbDeXEnNx4VmY83PGmDZRhFbKKx264 uevQRAbaDDQ1Ss4wveAfbW1eOEjYSTTkNnU5mFwmn2Nn05wwMlK84le3QsS6f2HvdYRFKd 1v7ackHnUZQcBggSzGF7xEdJT/2CXUi1BL7iNGZFuASzAWbXs+r2C6wp/XFGl038mq9Umu 2eaASRaDxDIJL4dj0D2xwGcQeo/lMt7Rv61uKL+u9foHeVU4lo4zsujtPef9IhTKWbgv/J uSsjdO3iDkubOLG7rUGB4+nWNMEfFCRYZdlRxgyinV+UcTmom9GWjWwWk/bAKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7D6g6+xWgXVOsmvCcPfWCtE/164znXWDImaGgdnOE/I=; b=iWjWXXKe9rAG69vAxebtlGyoZ8nOC5bEoRiz7CoG3zuXU02h7seRw7uCb6xWPcrwxZu5hQ s1PsD3VlIQNFQmVLfwvufW9pkIMEn2n+hIfpaf+KbslhkLB1AtCYmDZ58b+KF5vUC1aunS bmbP1DT91IYNtGnrsZMSJ+WwhA3SZJIC1FOEroGb9fsUHV8thB9Kq9QWccy0Ok6P+IKaYk Hvk45ejXsg3c9G2T6P7jAe0Rpl2q44OduJSxILMRYJgdI/Wc70npowy+LHAuzJuOWS+kWH nGY1HW9FjFbw4OunVIqzI3UTlQjTFHhZWwT1glmelra3RaEFKfrmdHuy5OeyMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388980; a=rsa-sha256; cv=none; b=wXlZyFCWHKia4FKs/PEu1RW8a+W8eNGm20vuuhlf+4g/8/mRkFkSlqvqT0FKpZ8GchkSAA TFeCGLFVV1A6R0n7bUNQxxb8DquoIXuq6DI9kfEtFRP3ly6VGsxMZ3USuTht7hqqgPZUYD 1caHoSxFRDuH7Bf8zUfGpT7EG1Qtl8XQ3mZ8EELqp13smhLRkz15Dtm/Bt9U3AEJLJzOcf wf3whLjRs7rN/xQw2ORnhHFcXhSEpLUMHagwERDUIAaVfcvvJsS6tXuvHVKtpVuALkD/zK qKVvZNG+tD5sWeeZpQWzn5CLm76knaCVj/7yUEiZul/yaRTybluWZco7mEz+LQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKc041pz142T; Tue, 14 Feb 2023 15:36: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 31EFaJCN043742; Tue, 14 Feb 2023 15:36:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaJOJ043741; Tue, 14 Feb 2023 15:36:19 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:19 GMT Message-Id: <202302141536.31EFaJOJ043741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 189c3729d84f - main - IfAPI: More accessors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 189c3729d84f620a6be10f62daef32ae9a47eff3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=189c3729d84f620a6be10f62daef32ae9a47eff3 commit 189c3729d84f620a6be10f62daef32ae9a47eff3 Author: Justin Hibbits AuthorDate: 2023-02-10 15:53:19 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:19 +0000 IfAPI: More accessors Summary: Add the following accessors needed by infiniband drivers: * if_getaddrlen() * if_setbroadcastaddr() * if_resolvemulti() With these accessors, and additional changes on the drivers' side, an amd64 kernel can be compiled with `struct ifnet` completely hidden. Reviewed by: melifaro Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38488 --- sys/net/if.c | 21 +++++++++++++++++++++ sys/net/if_var.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index 43d1e2b95a63..d17738fda0b7 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4681,6 +4681,15 @@ if_transmit(if_t ifp, struct mbuf *m) return (0); } +int +if_resolvemulti(if_t ifp, struct sockaddr **srcs, struct sockaddr *dst) +{ + if (ifp->if_resolvemulti == NULL) + return (EOPNOTSUPP); + + return (ifp->if_resolvemulti(ifp, srcs, dst)); +} + struct mbuf * if_dequeue(if_t ifp) { @@ -4928,6 +4937,12 @@ if_getbroadcastaddr(if_t ifp) return (ifp->if_broadcastaddr); } +void +if_setbroadcastaddr(if_t ifp, const uint8_t *addr) +{ + ifp->if_broadcastaddr = addr; +} + int if_getnumadomain(if_t ifp) { @@ -4964,6 +4979,12 @@ if_getfib(if_t ifp) return (ifp->if_fib); } +uint8_t +if_getaddrlen(if_t ifp) +{ + return (ifp->if_addrlen); +} + struct bpf_if * if_getbpf(if_t ifp) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index f33b4fc590c7..f6bb77908d40 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -604,8 +604,10 @@ int if_setflags(if_t ifp, int flags); void if_setllsoftc(if_t ifp, void *softc); void *if_getllsoftc(if_t ifp); u_int if_getfib(if_t ifp); +uint8_t if_getaddrlen(if_t ifp); int if_gethwaddr(const if_t ifp, struct ifreq *); const uint8_t *if_getbroadcastaddr(const if_t ifp); +void if_setbroadcastaddr(if_t ifp, const uint8_t *); int if_setmtu(if_t ifp, int mtu); int if_getmtu(const if_t ifp); int if_getmtu_family(const if_t ifp, int family); @@ -640,6 +642,7 @@ void if_etherbpfmtap(if_t ifp, struct mbuf *m); void if_vlancap(if_t ifp); int if_transmit(if_t ifp, struct mbuf *m); int if_init(if_t ifp, void *ctx); +int if_resolvemulti(if_t ifp, struct sockaddr **, struct sockaddr *); uint64_t if_getcounter(if_t ifp, ift_counter counter); struct label *if_getmaclabel(if_t ifp); void if_setmaclabel(if_t ifp, struct label *label); From nobody Tue Feb 14 15:36:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKd4n3Yz3s50y; Tue, 14 Feb 2023 15:36: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 4PGQKd20klz4LDc; Tue, 14 Feb 2023 15:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQ93FQ8oSS7E1Mjj2sgrQSb8iNgP418F2mJ5/EhAlHo=; b=hMccTEoorh+qMPfveBQHGVkRPgBELaPQd1FVxdHHCYzpXWpg/O9NfN63q+opjIw6fYVaSb zqBFPtt1jnhwxaxMOYlckTN3IP1aLA/+x3ODiRIoWuzOkiFZo6WdzAmLkflCNcFK008Ejh xk93yQxhxt3L7gEnSU+wL1zjA8Ir1nVsQWlnizSIzPXDc/qrksD7BSFlqi9ncJdC3c4IuC rrSQLeofdWI7lTtRJssuT+fTYAbENZ39a3lTl5pJtRSL3UDNdxRSCzEMXJtjdI/HATmGrP e1rfL3uQaArMojmjW71EDRHKObdhKDhZKreuCG8mYwUey06VCMDUcM6mD0Ktaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQ93FQ8oSS7E1Mjj2sgrQSb8iNgP418F2mJ5/EhAlHo=; b=L4LbGoxooTx7oW/+vjbTQyPqR1tWemXJMPRajpgNYT3GdliyqecIIYW5lGuKGhg/M0w9dk yuRm6R4OCep4d17kJfR3e8DfUVgFt7Ed8KTPSSLTqpVW0J//fnpy0oAa38/Cy6rdsyk5qe a+jliafWWhjUqkoQzvjBxVKMASsh8b3IKbrNwMVeBxSgTnHNrb+GVvi6tEM4xxcDCkoZol iwM0r/g8A+5fobgxcUMflVSkrEyDQf1HzpxNzTuxkgg2x4vICdvfi/5DYBC++3YV5WwqL1 WmaBhvzFtVv6gl+8Z/2+R4RqOFdbk0GjPR1NGz9MKaw5/jNGQad6L/s4/neVlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388981; a=rsa-sha256; cv=none; b=AyddBkef2FjkDV40tziP9NovPqjdIV15MVYzPZYqT7mBNea3X0eadqeyj/vGd31b9Sg85r 00C2hSpdF/kupxwBnRMrQQXVPHbFTJ5YQFO77nqVdU99zoaDM4hg2DAsY5TI/7iTrqDNda JDWcP/0SX2r3HlW/BSt3kPl5MER/sQ8SjM6RmdG7GKb2bI822d0ZX+x3jmjV7czm88XiFR wtRo2zsGkliLgYxZJDA30itB/mKHH6wwsJcTtbxGVmMSPKcakIt16unYc4GKa+7QTRp+A5 lU6/3jDG/GKAPKGikyrD82jIzFtHb1qjl7OgqUSkDgy4iWBheSSWlDtAlW6MoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKd0pvgz13Vg; Tue, 14 Feb 2023 15:36: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 31EFaLvB043767; Tue, 14 Feb 2023 15:36:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaLf9043766; Tue, 14 Feb 2023 15:36:21 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:21 GMT Message-Id: <202302141536.31EFaLf9043766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: a3a76c3d9031 - main - IfAPI: Add capabilities2/capenable2 accessors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3a76c3d9031d5fa432145afc8493ebda97719ce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=a3a76c3d9031d5fa432145afc8493ebda97719ce commit a3a76c3d9031d5fa432145afc8493ebda97719ce Author: Justin Hibbits AuthorDate: 2023-02-10 15:45:44 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:20 +0000 IfAPI: Add capabilities2/capenable2 accessors Summary: As a stopgap measure add basic accessors for the if_capabilities2 and if_capenable2 members to further hide the ifnet details. Sponsored by: Juniper Networks, Inc. Reviewed by: glebius, kib Differential Revision: https://reviews.freebsd.org/D38487 --- sys/net/if.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ sys/net/if_var.h | 7 +++++++ 2 files changed, 56 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index d17738fda0b7..da684dedec73 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4242,6 +4242,42 @@ if_setcapenablebit(if_t ifp, int setcap, int clearcap) return (0); } +int +if_setcapabilities2(if_t ifp, int capabilities) +{ + ifp->if_capabilities2 = capabilities; + return (0); +} + +int +if_setcapabilities2bit(if_t ifp, int setbit, int clearbit) +{ + ifp->if_capabilities2 &= ~clearbit; + ifp->if_capabilities2 |= setbit; + return (0); +} + +int +if_getcapabilities2(const if_t ifp) +{ + return (ifp->if_capabilities2); +} + +int +if_setcapenable2(if_t ifp, int capabilities2) +{ + ifp->if_capenable2 = capabilities2; + return (0); +} + +int +if_setcapenable2bit(if_t ifp, int setcap, int clearcap) +{ + ifp->if_capenable2 &= ~clearcap; + ifp->if_capenable2 |= setcap; + return (0); +} + const char * if_getdname(const if_t ifp) { @@ -4283,6 +4319,19 @@ if_getcapenable(const if_t ifp) return ((struct ifnet *)ifp)->if_capenable; } +int +if_togglecapenable2(if_t ifp, int togglecap) +{ + ifp->if_capenable2 ^= togglecap; + return (0); +} + +int +if_getcapenable2(const if_t ifp) +{ + return (ifp->if_capenable2); +} + int if_getdunit(const if_t ifp) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index f6bb77908d40..ef3e3d71a262 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -576,6 +576,13 @@ int if_togglecapenable(if_t ifp, int togglecap); int if_setcapenable(if_t ifp, int capenable); int if_setcapenablebit(if_t ifp, int setcap, int clearcap); int if_getcapenable(const if_t ifp); +int if_setcapabilities2(if_t ifp, int capabilities); +int if_setcapabilities2bit(if_t ifp, int setbit, int clearbit); +int if_getcapabilities2(const if_t ifp); +int if_togglecapenable2(if_t ifp, int togglecap); +int if_setcapenable2(if_t ifp, int capenable); +int if_setcapenable2bit(if_t ifp, int setcap, int clearcap); +int if_getcapenable2(const if_t ifp); int if_getdunit(const if_t ifp); int if_getindex(const if_t ifp); int if_getidxgen(const if_t ifp); From nobody Tue Feb 14 15:36:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKf2V3Yz3s58j; Tue, 14 Feb 2023 15:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGQKf2K4dz4LQJ; Tue, 14 Feb 2023 15:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8KT/x9i4JYYob1wvY7jrPkmkyVop1Gz/iudLur5xTc=; b=Vm9nSNp74ZAaZ1NGtRssDwhY9rOAX0g+M4K5opOcNiiyR2dpe3f32lhVqfPQ95Yx9CELsX 7WHqDrcBUt6ZD5G1wr66lcjqtsyI5wr7laN2xg3iBd3+Pqxi9eDBcMe/eqPcqJJcHq9/cY IRmaI9BSEf1B9XFvvDBMnjS1QjA159mRJ50zPAH5PCq/6GBlTIti4t0kd9b8Fm1KAI8bX8 vN349ystjSZtC0xPy+FY9MKfX5Z9brS0tokJaknatYRuuggtAmbW1JR/OzLlJwPkBAknS+ +7hpYVDFCc3CnoydNQ+wWmeN021k03D3AeWWYb2nO3b7LKx4mEBhZ4Yx6U3VtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8KT/x9i4JYYob1wvY7jrPkmkyVop1Gz/iudLur5xTc=; b=IybtpstnJwuwm0RpZ5Dt1pD35P9ZDUINo4TiohPSy/ijpJji0TpeY5Or2Qv4gDgf//oXbe aOnQAEN3qYr56JbHvpIqsa4ZaN/cx8+A1UVsAvFYz0/eoVlBgycGykHFRdPmsbS0rRwRBx g+Vo4FmdV44ieFJ/TqDIr6OiX80rbICr5JuZchdHNWbgsraq4nlEmJNS6qyBh1ZmMtEJsL QSA0lGOiWyChGtxPl/+70dD8Z98geKuTwO+vA4yKDJoLMzjR7f6feV/N3LBtVpYP+5pRm9 hX+QSjVWbZpSYnpYlsWJxAWsae2s5TNMKcN8hMQ2h/q02iNkiQY/7fMlUnVgbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388982; a=rsa-sha256; cv=none; b=xzaojjKoF4pdCVpsB/sheiH6gIeWB9MxMkvIPCfDZp7e8oB6H48vGkm1cHdduNwe3+JB4s j0j9PN0g8BmxtmvFdp7s38Lwbh6d2tg/y0tR3A7J9NwYJ2vL6dCbI4Cnf0P0blvaf0GB7H RzT2o88EdU18gxgVN4Tk8w5PLxa2WW6K128Pf35oaUX1+BtytJcK+gQH9mkaAEgNBCwvFG Rq3pBMWub3/9DoChlUwB/JKze2Lb24QAymq85mKZ9tKRISe+CBQASApzZ26rKvo+tCBWbn VUvXs3EOTCmyFXgE1+plBTnwWhASY3xHfrMsCjWaaMEgxGihXU/bpuItBilu1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKf1NBnz146w; Tue, 14 Feb 2023 15:36: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 31EFaMfd043791; Tue, 14 Feb 2023 15:36:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaMvv043790; Tue, 14 Feb 2023 15:36:22 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:22 GMT Message-Id: <202302141536.31EFaMvv043790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: aac2d19d9385 - main - IfAPI: Style cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aac2d19d9385188bfc08483b4b04da9a9fa79a3c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=aac2d19d9385188bfc08483b4b04da9a9fa79a3c commit aac2d19d9385188bfc08483b4b04da9a9fa79a3c Author: Justin Hibbits AuthorDate: 2023-02-10 21:33:30 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:20 +0000 IfAPI: Style cleanup Summary: Clean up style issues from IfAPI additions. Casts to (struct ifnet *) made sense when `if_t` was a `void *`, but since it's a `struct ifnet *` it no longer makes sense. Fix whitespace errors, among others. Reviewed by: kib, glebius Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38499 --- sys/net/if.c | 172 ++++++++++++++++++++++--------------------------------- sys/net/if_var.h | 4 +- 2 files changed, 72 insertions(+), 104 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index da684dedec73..bc13cdaf05f5 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -3964,7 +3964,6 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len) static int if_requestencap_default(struct ifnet *ifp, struct if_encap_req *req) { - if (req->rtype != IFENCAP_LL) return (EOPNOTSUPP); @@ -4034,7 +4033,6 @@ if_tunnel_check_nesting(struct ifnet *ifp, struct mbuf *m, uint32_t cookie, int if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr) { - if (ifp->if_hw_addr == NULL) return (ENODEV); @@ -4121,7 +4119,6 @@ if_transmit_default(struct ifnet *ifp, struct mbuf *m) static void if_input_default(struct ifnet *ifp __unused, struct mbuf *m) { - m_freem(m); } @@ -4198,47 +4195,42 @@ if_setbaudrate(struct ifnet *ifp, uint64_t baudrate) uint64_t if_getbaudrate(const if_t ifp) { - - return (((struct ifnet *)ifp)->if_baudrate); + return (ifp->if_baudrate); } int if_setcapabilities(if_t ifp, int capabilities) { - ((struct ifnet *)ifp)->if_capabilities = capabilities; + ifp->if_capabilities = capabilities; return (0); } int if_setcapabilitiesbit(if_t ifp, int setbit, int clearbit) { - ((struct ifnet *)ifp)->if_capabilities &= ~clearbit; - ((struct ifnet *)ifp)->if_capabilities |= setbit; - + ifp->if_capabilities &= ~clearbit; + ifp->if_capabilities |= setbit; return (0); } int if_getcapabilities(const if_t ifp) { - return ((struct ifnet *)ifp)->if_capabilities; + return (ifp->if_capabilities); } int if_setcapenable(if_t ifp, int capabilities) { - ((struct ifnet *)ifp)->if_capenable = capabilities; + ifp->if_capenable = capabilities; return (0); } int if_setcapenablebit(if_t ifp, int setcap, int clearcap) { - if(clearcap) - ((struct ifnet *)ifp)->if_capenable &= ~clearcap; - if(setcap) - ((struct ifnet *)ifp)->if_capenable |= setcap; - + ifp->if_capenable &= ~clearcap; + ifp->if_capenable |= setcap; return (0); } @@ -4281,19 +4273,19 @@ if_setcapenable2bit(if_t ifp, int setcap, int clearcap) const char * if_getdname(const if_t ifp) { - return ((struct ifnet *)ifp)->if_dname; + return (ifp->if_dname); } void if_setdname(if_t ifp, const char *dname) { - ((struct ifnet *)ifp)->if_dname = dname; + ifp->if_dname = dname; } const char * if_name(if_t ifp) { - return ((struct ifnet *)ifp)->if_xname; + return (ifp->if_xname); } int @@ -4301,7 +4293,7 @@ if_setname(if_t ifp, const char *name) { if (strlen(name) > sizeof(ifp->if_xname) - 1) return (ENAMETOOLONG); - strlcpy(ifp->if_xname, name, sizeof(ifp->if_xname)); + strcpy(ifp->if_xname, name); return (0); } @@ -4309,14 +4301,14 @@ if_setname(if_t ifp, const char *name) int if_togglecapenable(if_t ifp, int togglecap) { - ((struct ifnet *)ifp)->if_capenable ^= togglecap; + ifp->if_capenable ^= togglecap; return (0); } int if_getcapenable(const if_t ifp) { - return ((struct ifnet *)ifp)->if_capenable; + return (ifp->if_capenable); } int @@ -4335,13 +4327,13 @@ if_getcapenable2(const if_t ifp) int if_getdunit(const if_t ifp) { - return ((struct ifnet *)ifp)->if_dunit; + return (ifp->if_dunit); } int if_getindex(const if_t ifp) { - return ((struct ifnet *)ifp)->if_index; + return (ifp->if_index); } int @@ -4377,7 +4369,7 @@ if_freedescr(char *descrbuf) int if_getalloctype(const if_t ifp) { - return ((struct ifnet *)ifp)->if_alloctype; + return (ifp->if_alloctype); } /* @@ -4395,8 +4387,8 @@ if_setdev(if_t ifp, void *dev) int if_setdrvflagbits(if_t ifp, int set_flags, int clear_flags) { - ((struct ifnet *)ifp)->if_drv_flags &= ~clear_flags; - ((struct ifnet *)ifp)->if_drv_flags |= set_flags; + ifp->if_drv_flags &= ~clear_flags; + ifp->if_drv_flags |= set_flags; return (0); } @@ -4404,20 +4396,19 @@ if_setdrvflagbits(if_t ifp, int set_flags, int clear_flags) int if_getdrvflags(const if_t ifp) { - return ((struct ifnet *)ifp)->if_drv_flags; + return (ifp->if_drv_flags); } int if_setdrvflags(if_t ifp, int flags) { - ((struct ifnet *)ifp)->if_drv_flags = flags; + ifp->if_drv_flags = flags; return (0); } int if_setflags(if_t ifp, int flags) { - ifp->if_flags = flags; return (0); } @@ -4425,30 +4416,29 @@ if_setflags(if_t ifp, int flags) int if_setflagbits(if_t ifp, int set, int clear) { - ((struct ifnet *)ifp)->if_flags &= ~clear; - ((struct ifnet *)ifp)->if_flags |= set; - + ifp->if_flags &= ~clear; + ifp->if_flags |= set; return (0); } int if_getflags(const if_t ifp) { - return ((struct ifnet *)ifp)->if_flags; + return (ifp->if_flags); } int if_clearhwassist(if_t ifp) { - ((struct ifnet *)ifp)->if_hwassist = 0; + ifp->if_hwassist = 0; return (0); } int if_sethwassistbits(if_t ifp, int toset, int toclear) { - ((struct ifnet *)ifp)->if_hwassist &= ~toclear; - ((struct ifnet *)ifp)->if_hwassist |= toset; + ifp->if_hwassist &= ~toclear; + ifp->if_hwassist |= toset; return (0); } @@ -4456,34 +4446,34 @@ if_sethwassistbits(if_t ifp, int toset, int toclear) int if_sethwassist(if_t ifp, int hwassist_bit) { - ((struct ifnet *)ifp)->if_hwassist = hwassist_bit; + ifp->if_hwassist = hwassist_bit; return (0); } int if_gethwassist(const if_t ifp) { - return ((struct ifnet *)ifp)->if_hwassist; + return (ifp->if_hwassist); } int if_togglehwassist(if_t ifp, int toggle_bits) { - ((struct ifnet *)ifp)->if_hwassist ^= toggle_bits; + ifp->if_hwassist ^= toggle_bits; return (0); } int if_setmtu(if_t ifp, int mtu) { - ((struct ifnet *)ifp)->if_mtu = mtu; + ifp->if_mtu = mtu; return (0); } int if_getmtu(const if_t ifp) { - return ((struct ifnet *)ifp)->if_mtu; + return (ifp->if_mtu); } int @@ -4493,10 +4483,10 @@ if_getmtu_family(const if_t ifp, int family) SLIST_FOREACH(dp, &domains, dom_next) { if (dp->dom_family == family && dp->dom_ifmtu != NULL) - return (dp->dom_ifmtu((struct ifnet *)ifp)); + return (dp->dom_ifmtu(ifp)); } - return (((struct ifnet *)ifp)->if_mtu); + return (ifp->if_mtu); } /* @@ -4625,14 +4615,14 @@ if_foreach_addr_type(if_t ifp, int type, if_addr_cb_t cb, void *cb_arg) int if_setsoftc(if_t ifp, void *softc) { - ((struct ifnet *)ifp)->if_softc = softc; + ifp->if_softc = softc; return (0); } void * if_getsoftc(const if_t ifp) { - return ((struct ifnet *)ifp)->if_softc; + return (ifp->if_softc); } void @@ -4652,41 +4642,39 @@ if_setvtag(struct mbuf *m, uint16_t tag) uint16_t if_getvtag(struct mbuf *m) { - return (m->m_pkthdr.ether_vtag); } int if_sendq_empty(if_t ifp) { - return IFQ_DRV_IS_EMPTY(&((struct ifnet *)ifp)->if_snd); + return (IFQ_DRV_IS_EMPTY(&ifp->if_snd)); } struct ifaddr * if_getifaddr(const if_t ifp) { - return ((struct ifnet *)ifp)->if_addr; + return (ifp->if_addr); } int if_getamcount(const if_t ifp) { - return ((struct ifnet *)ifp)->if_amcount; + return (ifp->if_amcount); } int if_setsendqready(if_t ifp) { - IFQ_SET_READY(&((struct ifnet *)ifp)->if_snd); + IFQ_SET_READY(&ifp->if_snd); return (0); } int if_setsendqlen(if_t ifp, int tx_desc_count) { - IFQ_SET_MAXLEN(&((struct ifnet *)ifp)->if_snd, tx_desc_count); - ((struct ifnet *)ifp)->if_snd.ifq_drv_maxlen = tx_desc_count; - + IFQ_SET_MAXLEN(&ifp->if_snd, tx_desc_count); + ifp->if_snd.ifq_drv_maxlen = tx_desc_count; return (0); } @@ -4705,29 +4693,25 @@ if_getnetmapadapter(if_t ifp) int if_vlantrunkinuse(if_t ifp) { - return ((struct ifnet *)ifp)->if_vlantrunk != NULL?1:0; + return (ifp->if_vlantrunk != NULL); } -int +void if_init(if_t ifp, void *ctx) { - (*((struct ifnet *)ifp)->if_init)(ctx); - return (0); + (*ifp->if_init)(ctx); } -int +void if_input(if_t ifp, struct mbuf* sendmp) { - (*((struct ifnet *)ifp)->if_input)((struct ifnet *)ifp, sendmp); - return (0); - + (*ifp->if_input)(ifp, sendmp); } int if_transmit(if_t ifp, struct mbuf *m) { - (*((struct ifnet *)ifp)->if_transmit)((struct ifnet *)ifp, m); - return (0); + return ((*ifp->if_transmit)(ifp, m)); } int @@ -4743,29 +4727,29 @@ struct mbuf * if_dequeue(if_t ifp) { struct mbuf *m; - IFQ_DRV_DEQUEUE(&((struct ifnet *)ifp)->if_snd, m); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); return (m); } int if_sendq_prepend(if_t ifp, struct mbuf *m) { - IFQ_DRV_PREPEND(&((struct ifnet *)ifp)->if_snd, m); + IFQ_DRV_PREPEND(&ifp->if_snd, m); return (0); } int if_setifheaderlen(if_t ifp, int len) { - ((struct ifnet *)ifp)->if_hdrlen = len; + ifp->if_hdrlen = len; return (0); } caddr_t if_getlladdr(const if_t ifp) { - return (IF_LLADDR((struct ifnet *)ifp)); + return (IF_LLADDR(ifp)); } void * @@ -4775,83 +4759,72 @@ if_gethandle(u_char type) } void -if_bpfmtap(if_t ifh, struct mbuf *m) +if_bpfmtap(if_t ifp, struct mbuf *m) { - struct ifnet *ifp = (struct ifnet *)ifh; - BPF_MTAP(ifp, m); } void -if_etherbpfmtap(if_t ifh, struct mbuf *m) +if_etherbpfmtap(if_t ifp, struct mbuf *m) { - struct ifnet *ifp = (struct ifnet *)ifh; - ETHER_BPF_MTAP(ifp, m); } void -if_vlancap(if_t ifh) +if_vlancap(if_t ifp) { - struct ifnet *ifp = (struct ifnet *)ifh; VLAN_CAPABILITIES(ifp); } int if_sethwtsomax(if_t ifp, u_int if_hw_tsomax) { - - ((struct ifnet *)ifp)->if_hw_tsomax = if_hw_tsomax; + ifp->if_hw_tsomax = if_hw_tsomax; return (0); } int if_sethwtsomaxsegcount(if_t ifp, u_int if_hw_tsomaxsegcount) { - - ((struct ifnet *)ifp)->if_hw_tsomaxsegcount = if_hw_tsomaxsegcount; + ifp->if_hw_tsomaxsegcount = if_hw_tsomaxsegcount; return (0); } int if_sethwtsomaxsegsize(if_t ifp, u_int if_hw_tsomaxsegsize) { - - ((struct ifnet *)ifp)->if_hw_tsomaxsegsize = if_hw_tsomaxsegsize; + ifp->if_hw_tsomaxsegsize = if_hw_tsomaxsegsize; return (0); } u_int if_gethwtsomax(const if_t ifp) { - - return (((struct ifnet *)ifp)->if_hw_tsomax); + return (ifp->if_hw_tsomax); } u_int if_gethwtsomaxsegcount(const if_t ifp) { - - return (((struct ifnet *)ifp)->if_hw_tsomaxsegcount); + return (ifp->if_hw_tsomaxsegcount); } u_int if_gethwtsomaxsegsize(const if_t ifp) { - - return (((struct ifnet *)ifp)->if_hw_tsomaxsegsize); + return (ifp->if_hw_tsomaxsegsize); } void if_setinitfn(if_t ifp, if_init_fn_t init_fn) { - ((struct ifnet *)ifp)->if_init = init_fn; + ifp->if_init = init_fn; } void if_setinputfn(if_t ifp, if_input_fn_t input_fn) { - ((struct ifnet *)ifp)->if_input = input_fn; + ifp->if_input = input_fn; } if_input_fn_t @@ -4863,19 +4836,19 @@ if_getinputfn(if_t ifp) void if_setioctlfn(if_t ifp, if_ioctl_fn_t ioctl_fn) { - ((struct ifnet *)ifp)->if_ioctl = (void *)ioctl_fn; + ifp->if_ioctl = ioctl_fn; } void if_setoutputfn(if_t ifp, if_output_fn_t output_fn) { - ((struct ifnet *)ifp)->if_output = output_fn; + ifp->if_output = output_fn; } void if_setstartfn(if_t ifp, if_start_fn_t start_fn) { - ((struct ifnet *)ifp)->if_start = (void *)start_fn; + ifp->if_start = start_fn; } if_start_fn_t @@ -4887,7 +4860,7 @@ if_getstartfn(if_t ifp) void if_settransmitfn(if_t ifp, if_transmit_fn_t start_fn) { - ((struct ifnet *)ifp)->if_transmit = start_fn; + ifp->if_transmit = start_fn; } if_transmit_fn_t @@ -4899,21 +4872,19 @@ if_gettransmitfn(if_t ifp) void if_setqflushfn(if_t ifp, if_qflush_fn_t flush_fn) { - ((struct ifnet *)ifp)->if_qflush = flush_fn; - + ifp->if_qflush = flush_fn; } void if_setsndtagallocfn(if_t ifp, if_snd_tag_alloc_t alloc_fn) { - ((struct ifnet *)ifp)->if_snd_tag_alloc = alloc_fn; + ifp->if_snd_tag_alloc = alloc_fn; } int -if_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, +if_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **mstp) { - if (ifp->if_snd_tag_alloc == NULL) return (EOPNOTSUPP); return (ifp->if_snd_tag_alloc(ifp, params, mstp)); @@ -4922,7 +4893,6 @@ if_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, void if_setgetcounterfn(if_t ifp, if_get_counter_t fn) { - ifp->if_get_counter = fn; } @@ -5062,7 +5032,6 @@ if_getl2com(if_t ifp) static void if_show_ifnet(struct ifnet *ifp) { - if (ifp == NULL) return; db_printf("%s:\n", ifp->if_xname); @@ -5112,7 +5081,6 @@ if_show_ifnet(struct ifnet *ifp) DB_SHOW_COMMAND(ifnet, db_show_ifnet) { - if (!have_addr) { db_printf("usage: show ifnet \n"); return; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index ef3e3d71a262..7200cd5634d3 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -633,7 +633,7 @@ u_int if_gethwtsomaxsegcount(const if_t ifp); u_int if_gethwtsomaxsegsize(const if_t ifp); void if_setnetmapadapter(if_t ifp, struct netmap_adapter *na); struct netmap_adapter *if_getnetmapadapter(if_t ifp); -int if_input(if_t ifp, struct mbuf* sendmp); +void if_input(if_t ifp, struct mbuf* sendmp); int if_sendq_prepend(if_t ifp, struct mbuf *m); struct mbuf *if_dequeue(if_t ifp); int if_setifheaderlen(if_t ifp, int len); @@ -648,7 +648,7 @@ void if_bpfmtap(if_t ifp, struct mbuf *m); void if_etherbpfmtap(if_t ifp, struct mbuf *m); void if_vlancap(if_t ifp); int if_transmit(if_t ifp, struct mbuf *m); -int if_init(if_t ifp, void *ctx); +void if_init(if_t ifp, void *ctx); int if_resolvemulti(if_t ifp, struct sockaddr **, struct sockaddr *); uint64_t if_getcounter(if_t ifp, ift_counter counter); struct label *if_getmaclabel(if_t ifp); From nobody Tue Feb 14 15:36:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKg3pVJz3s5Bw; Tue, 14 Feb 2023 15:36: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 4PGQKg3GlJz4LT7; Tue, 14 Feb 2023 15:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hDKm9ZKT6ONqtv6QY32vSXhAGV2zDFFwXt401rq8mZM=; b=g4d18cwo9Q+g0IP26YbNHZ9uNUwJyyqLCc0QCd43CeDx4ZPDovHdUXwc9ApK6+fzoI0arK HYet6H0duQXuBms8zH0p3wN2ZHj3yTvbxWVBHlitAyFAz9IBnvr+6Anl+RZsOADgxGNo9P xFypeCa3n1W0vEZrNobZb9gfIk90cr7vNJRzAJCxWNGHb0FkIGa6Ajl3Huq9HAYtWhfrVw Zxnnw7bA+0EODbO21trxOKVK7Acw1+VVnvuwonE2YYRKTT1KutDedwA/uSLJb5QDZ86Khc k/q4ClkWsT/kFvBFFs17XdEdpddyKoE5Tx2D+KjI6k/XT2yYhIWaq/b0jDT6ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hDKm9ZKT6ONqtv6QY32vSXhAGV2zDFFwXt401rq8mZM=; b=TAcODsEmiiMH+nOr2gX171gufwCijs5mbos5iEw8S17AWxQdAL+xFpbyQ1k+1m5b75klJC W/ZiYRaCTdj1QqqtI1QcCTZqbKjvBm+g9RxliBlF2uw15ZIj07afXXWwu2nNPkAekqq/wT daOgqcYBTNPNczRUa8cG7jN6VK4lAfIIobv8a9N79jwbursmXxj8xBfOx2E8dU03Amb69Z 0U4hlvZHzF3AZhWnLhdF07qETDyB1Ty5m3tZH9z3YvNbpZ/1mzhBKakmqoAJyk4QeOJXBE KTf5kbaLL5d2ieiP4h98Fw64DVrdglDv9O1nAFet+570M7wWhYvKxGfb9PK5Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388983; a=rsa-sha256; cv=none; b=vEnAk0a8Dr+MCb/geU7W3uOcOMgctTTAQCOnTC7mWeSxMvW++vXhQAP6yMx1coD/7mdwuW vk4elaklf7y1A4eR9rQPzV2E095FKimq85x5lSrU3P2rGeKvxbQO4nQVwMLC2RLwDclw++ jvkCsdqMas/HQ6D2kwRe8PGCjvJWtTtV7K0ucrF5jMyQMyriD4DZL5N+SuXBUKak2GJHgn Kci19ObbEJvU4H8+tC4IK3zD030jnUXROUFL36YoQdVIuTWITUxilkqh9hLDfLhdM+C3mx 2lh6kYf025tfoIj7uZxmLGklLxG/RS1uaIJAPcIZAPAESWRdP7oxVxfKMIRbqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKg2LrDz148k; Tue, 14 Feb 2023 15:36: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 31EFaNWc043820; Tue, 14 Feb 2023 15:36:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaNe7043819; Tue, 14 Feb 2023 15:36:23 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:23 GMT Message-Id: <202302141536.31EFaNe7043819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 68b47dcbe3de - main - Finish mechanical conversion of axgbe(4) to IfAPI. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68b47dcbe3de6f307d5c3bbe5d637bb07e5c3bad Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=68b47dcbe3de6f307d5c3bbe5d637bb07e5c3bad commit 68b47dcbe3de6f307d5c3bbe5d637bb07e5c3bad Author: Justin Hibbits AuthorDate: 2023-02-07 18:40:06 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:20 +0000 Finish mechanical conversion of axgbe(4) to IfAPI. Sponsored by: Juniper Networks, Inc. --- sys/dev/axgbe/xgbe-dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/axgbe/xgbe-dev.c b/sys/dev/axgbe/xgbe-dev.c index 5787db4f0441..2fd0927b89af 100644 --- a/sys/dev/axgbe/xgbe-dev.c +++ b/sys/dev/axgbe/xgbe-dev.c @@ -973,8 +973,8 @@ xgbe_config_rx_mode(struct xgbe_prv_data *pdata) { unsigned int pr_mode, am_mode; - pr_mode = ((pdata->netdev->if_flags & IFF_PPROMISC) != 0); - am_mode = ((pdata->netdev->if_flags & IFF_ALLMULTI) != 0); + pr_mode = ((if_getflags(pdata->netdev) & IFF_PPROMISC) != 0); + am_mode = ((if_getflags(pdata->netdev) & IFF_ALLMULTI) != 0); xgbe_set_promiscuous_mode(pdata, pr_mode); xgbe_set_all_multicast_mode(pdata, am_mode); From nobody Tue Feb 14 15:36:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKh4x9Fz3s5QR; Tue, 14 Feb 2023 15:36:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGQKh4KN8z4LZG; Tue, 14 Feb 2023 15:36:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cntpjuop3aCbFlsxQH7ZfpwjC6p+aBuCNYr65GQqVbA=; b=vJDvbnNErEr8m2CsCWXlxgkz3wwqSSq9RLt/KkbROYIK5/PfNu6E38/+YbZ+y9om+9AkJQ oAtEUhLkTBjOTfxYMWLL/aIxLOTppj6G2c5fjij9yOGvqu8FSlqKSiPoO74rci12L6ZVKX tv07BzjHMAW8OkpyjrqAjD0RAfa8KbZWg3Hu0MXUYnVY5dG1+tnGqz4V8fAX8BUxdOavP/ rbv4nspbz3b8R/8nP87NDAGE5lSKd4GOJtuoXttklOoK4rpKhCIyLjheDeMABUu2QiiEIP VqxCj4bXBjAayf45FgfgaoEwheq96w/L428X2TzdguWxyKFhrfU5i7cDIuIUaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cntpjuop3aCbFlsxQH7ZfpwjC6p+aBuCNYr65GQqVbA=; b=IxqjuQVXAnBlADpWbRlTXI+WkTtrTJEo4XUWRfa8UK9jj5A5GikCY8MED062Ar92/9f489 w4UtN9oe7WiF5pRu2GTeGRKoXdLDjdmin99Ly9Khh40SmZ5eLL1hLBshKfrxEIVH6+1pZW Dif7BGHuLVO/daQtwr9hMvSX7hKINYNAo/QPgVrPMQDL/HU4z+SVXSS6yz+jFjbiw0hyvP 2kymWJ8EZkNn5ADrgKFCCEsod8+7eiUvv4B6Cf7/wV++ZdwP8J6uC933JWHPfmR+eag7HT LAGhrPEAE9SADBY8PJ1EUrytUoi8ez1KadaM/RMQjq8TynwBm+N0g7KN4Qs6vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388984; a=rsa-sha256; cv=none; b=XIibYlOEkv7WK7p3Et+o/8J0eFMERdc7GqiKIwYx0FTydw9IsN5fCLV2LNhAhjnJjNcwzm ZZojppZ+7mSszVMNwqKgSU6VF+d7YHDxuCVK+a0WhdU9PTtXXe8ygrXQ/73r5CEAofThTF JOpZUaiOfpyzzod60DuH9bJJYY+Uk9iACbuA/99T9ClLDrwg7mro0xe7sqKO9Vpw14kWEX Nd75+JO04+k650X76LVOTPQOul0a74/qkeSP6NvC/Ouc94WH2X4wn15X5kfz9Zc4IY5CoR F0r/vyRSs0whtk7lSfhsLTtbIWklEMI31XavU5Nyt4uFvqceUgnELw7BcdVGzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKh3NgYz13py; Tue, 14 Feb 2023 15:36: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 31EFaOVc043845; Tue, 14 Feb 2023 15:36:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaOoO043844; Tue, 14 Feb 2023 15:36:24 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:24 GMT Message-Id: <202302141536.31EFaOoO043844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 52d984831d82 - main - Port Linuxulator to IfAPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52d984831d82d97dc132d0d57fca6ee89572799b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=52d984831d82d97dc132d0d57fca6ee89572799b commit 52d984831d82d97dc132d0d57fca6ee89572799b Author: Justin Hibbits AuthorDate: 2023-02-01 21:30:22 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:28:44 +0000 Port Linuxulator to IfAPI Reviewed by: dchagin Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38349 --- sys/compat/linux/linux.c | 104 +++++++++++++-------- sys/compat/linux/linux.h | 4 +- sys/compat/linux/linux_ioctl.c | 205 +++++++++++++++++++++++++---------------- 3 files changed, 195 insertions(+), 118 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 4e435081b3b6..16aa731b20ff 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -241,6 +241,36 @@ bsd_to_linux_sigset(sigset_t *bss, l_sigset_t *lss) } } +struct ifname_linux_to_bsd_cb_s { + if_t ifp; + const char *lxname; + int unit; + int index; + bool is_lo; + bool is_eth; +}; + +static int +ifname_linux_to_bsd_cb(if_t ifp, void *arg) +{ + struct ifname_linux_to_bsd_cb_s *cbs = arg; + + /* + * Allow Linux programs to use FreeBSD names. Don't presume + * we never have an interface named "eth", so don't make + * the test optional based on is_eth. + */ + cbs->ifp = ifp; + if (strncmp(if_name(ifp), cbs->lxname, LINUX_IFNAMSIZ) == 0) + return (-1); + if (cbs->is_eth && IFP_IS_ETH(ifp) && cbs->unit == cbs->index++) + return (-1); + if (cbs->is_lo && IFP_IS_LOOP(ifp)) + return (-1); + cbs->ifp = NULL; + + return (0); +} /* * Translate a Linux interface name to a FreeBSD interface name, * and return the associated ifnet structure @@ -250,46 +280,33 @@ bsd_to_linux_sigset(sigset_t *bss, l_sigset_t *lss) struct ifnet * ifname_linux_to_bsd(struct thread *td, const char *lxname, char *bsdname) { - struct ifnet *ifp; - int len, unit; + struct ifname_linux_to_bsd_cb_s cbs = {}; + int len; char *ep; - int index; - bool is_eth, is_lo; + cbs.lxname = lxname; for (len = 0; len < LINUX_IFNAMSIZ; ++len) if (!isalpha(lxname[len]) || lxname[len] == '\0') break; if (len == 0 || len == LINUX_IFNAMSIZ) return (NULL); /* Linux loopback interface name is lo (not lo0) */ - is_lo = (len == 2 && strncmp(lxname, "lo", len) == 0); - unit = (int)strtoul(lxname + len, &ep, 10); + cbs.is_lo = (len == 2 && strncmp(lxname, "lo", len) == 0); + cbs.unit = (int)strtoul(lxname + len, &ep, 10); if ((ep == NULL || ep == lxname + len || ep >= lxname + LINUX_IFNAMSIZ) && - is_lo == 0) + cbs.is_lo == 0) return (NULL); - index = 0; - is_eth = (len == 3 && strncmp(lxname, "eth", len) == 0); + cbs.index = 0; + cbs.is_eth = (len == 3 && strncmp(lxname, "eth", len) == 0); CURVNET_SET(TD_TO_VNET(td)); IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - /* - * Allow Linux programs to use FreeBSD names. Don't presume - * we never have an interface named "eth", so don't make - * the test optional based on is_eth. - */ - if (strncmp(ifp->if_xname, lxname, LINUX_IFNAMSIZ) == 0) - break; - if (is_eth && IFP_IS_ETH(ifp) && unit == index++) - break; - if (is_lo && IFP_IS_LOOP(ifp)) - break; - } + if_foreach(ifname_linux_to_bsd_cb, &cbs); IFNET_RUNLOCK(); CURVNET_RESTORE(); - if (ifp != NULL && bsdname != NULL) - strlcpy(bsdname, ifp->if_xname, IFNAMSIZ); - return (ifp); + if (cbs.ifp != NULL && bsdname != NULL) + strlcpy(bsdname, if_name(cbs.ifp), IFNAMSIZ); + return (cbs.ifp); } void @@ -297,7 +314,7 @@ linux_ifflags(struct ifnet *ifp, short *flags) { unsigned short fl; - fl = (ifp->if_flags | ifp->if_drv_flags) & 0xffff; + fl = (if_getflags(ifp) | if_getdrvflags(ifp)) & 0xffff; *flags = 0; if (fl & IFF_UP) *flags |= LINUX_IFF_UP; @@ -321,11 +338,28 @@ linux_ifflags(struct ifnet *ifp, short *flags) *flags |= LINUX_IFF_MULTICAST; } +static u_int +linux_ifhwaddr_cb(void *arg, struct ifaddr *ifa, u_int count) +{ + struct sockaddr_dl *sdl = (struct sockaddr_dl *)ifa->ifa_addr; + struct l_sockaddr *lsa = arg; + + if (count > 0) + return (0); + + if (sdl->sdl_type != IFT_ETHER) + return (0); + + bzero(lsa, sizeof(*lsa)); + lsa->sa_family = LINUX_ARPHRD_ETHER; + bcopy(LLADDR(sdl), lsa->sa_data, LINUX_IFHWADDRLEN); + + return (1); +} + int linux_ifhwaddr(struct ifnet *ifp, struct l_sockaddr *lsa) { - struct ifaddr *ifa; - struct sockaddr_dl *sdl; if (IFP_IS_LOOP(ifp)) { bzero(lsa, sizeof(*lsa)); @@ -336,16 +370,8 @@ linux_ifhwaddr(struct ifnet *ifp, struct l_sockaddr *lsa) if (!IFP_IS_ETH(ifp)) return (ENOENT); - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - sdl = (struct sockaddr_dl*)ifa->ifa_addr; - if (sdl != NULL && (sdl->sdl_family == AF_LINK) && - (sdl->sdl_type == IFT_ETHER)) { - bzero(lsa, sizeof(*lsa)); - lsa->sa_family = LINUX_ARPHRD_ETHER; - bcopy(LLADDR(sdl), lsa->sa_data, LINUX_IFHWADDRLEN); - return (0); - } - } + if (if_foreach_addr_type(ifp, AF_LINK, linux_ifhwaddr_cb, lsa) > 0) + return (0); return (ENOENT); } @@ -732,5 +758,5 @@ bool linux_use_real_ifname(const struct ifnet *ifp) { - return (use_real_ifnames || !IFP_IS_ETH(ifp)); + return (use_real_ifnames || !IFP_IS_ETH(__DECONST(if_t, ifp))); } diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 055d8e3b9cf6..e133c35010cf 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -287,8 +287,8 @@ struct l_statx { /* * Criteria for interface name translation */ -#define IFP_IS_ETH(ifp) ((ifp)->if_type == IFT_ETHER) -#define IFP_IS_LOOP(ifp) ((ifp)->if_type == IFT_LOOP) +#define IFP_IS_ETH(ifp) (if_gettype(ifp) == IFT_ETHER) +#define IFP_IS_LOOP(ifp) (if_gettype(ifp) == IFT_LOOP) struct ifnet; diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 2cb0e9ead23f..c70060b8bf5d 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -2087,46 +2087,138 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args) /* * Implement the SIOCGIFNAME ioctl */ +struct linux_ioctl_ifname_cb_s { + struct l_ifreq ifr; + int index; + int ethno; +}; + +static int +linux_ioctl_ifname_cb(if_t ifp, void *arg) +{ + struct linux_ioctl_ifname_cb_s *cbs = arg; + + if (cbs->ifr.ifr_ifindex == cbs->index) { + if (!linux_use_real_ifname(ifp)) + snprintf(cbs->ifr.ifr_name, LINUX_IFNAMSIZ, + "eth%d", cbs->ethno); + else + strlcpy(cbs->ifr.ifr_name, if_name(ifp), + LINUX_IFNAMSIZ); + return (-1); + } + if (!linux_use_real_ifname(ifp)) + cbs->ethno++; + cbs->index++; + + return (0); +} static int linux_ioctl_ifname(struct thread *td, struct l_ifreq *uifr) { + struct linux_ioctl_ifname_cb_s cbs; struct l_ifreq ifr; - struct ifnet *ifp; - int error, ethno, index; + int error; - error = copyin(uifr, &ifr, sizeof(ifr)); + error = copyin(uifr, &cbs.ifr, sizeof(cbs.ifr)); if (error != 0) return (error); CURVNET_SET(TD_TO_VNET(curthread)); IFNET_RLOCK(); - index = 1; /* ifr.ifr_ifindex starts from 1 */ - ethno = 0; - error = ENODEV; - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (ifr.ifr_ifindex == index) { - if (!linux_use_real_ifname(ifp)) - snprintf(ifr.ifr_name, LINUX_IFNAMSIZ, - "eth%d", ethno); - else - strlcpy(ifr.ifr_name, ifp->if_xname, - LINUX_IFNAMSIZ); - error = 0; - break; - } - if (!linux_use_real_ifname(ifp)) - ethno++; - index++; - } - IFNET_RUNLOCK(); + cbs.index = 1; /* ifr.ifr_ifindex starts from 1 */ + cbs.ethno = 0; + error = if_foreach(linux_ioctl_ifname_cb, &cbs); + if (error == 0) + error = ENODEV; + IFNET_RUNLOCK(); + if (error == -1) error = copyout(&ifr, uifr, sizeof(ifr)); CURVNET_RESTORE(); return (error); } +static u_int +linux_ifconf_ifaddr_cb(void *arg, struct ifaddr *ifa, u_int count) +{ +#ifdef COMPAT_LINUX32 + struct l_ifconf *ifc; +#else + struct ifconf *ifc; +#endif + ifc = arg; + ifc->ifc_len += sizeof(struct l_ifreq); + + return (1); +} + +static int +linux_ifconf_ifnet_cb(if_t ifp, void *arg) +{ + if_foreach_addr_type(ifp, AF_INET, linux_ifconf_ifaddr_cb, arg); + + return (0); +} + +struct linux_ifconfig_ifaddr_cb2_s { + struct l_ifreq ifr; + struct sbuf *sb; + size_t max_len; + size_t valid_len; + int ethno; +}; + +static u_int +linux_ifconf_ifaddr_cb2(void *arg, struct ifaddr *ifa, u_int len) +{ + struct linux_ifconfig_ifaddr_cb2_s *cbs = arg; + struct sockaddr *sa = ifa->ifa_addr; + + cbs->ifr.ifr_addr.sa_family = LINUX_AF_INET; + memcpy(cbs->ifr.ifr_addr.sa_data, sa->sa_data, + sizeof(cbs->ifr.ifr_addr.sa_data)); + sbuf_bcat(cbs->sb, &cbs->ifr, sizeof(cbs->ifr)); + cbs->max_len += sizeof(cbs->ifr); + + if (sbuf_error(cbs->sb) == 0) + cbs->valid_len = sbuf_len(cbs->sb); + + return (len); +} + +static int +linux_ifconf_ifnet_cb2(if_t ifp, void *arg) +{ + struct linux_ifconfig_ifaddr_cb2_s *cbs = arg; + int addrs = 0; + + bzero(&cbs->ifr, sizeof(cbs->ifr)); + if (IFP_IS_ETH(ifp)) + snprintf(cbs->ifr.ifr_name, LINUX_IFNAMSIZ, "eth%d", + cbs->ethno++); + else + strlcpy(cbs->ifr.ifr_name, if_name(ifp), LINUX_IFNAMSIZ); + + /* Walk the address list */ + addrs = if_foreach_addr_type(ifp, AF_INET, + linux_ifconf_ifaddr_cb2, cbs); + if (sbuf_error(cbs->sb) == 0) + cbs->valid_len = sbuf_len(cbs->sb); + if (addrs == 0) { + bzero((caddr_t)&cbs->ifr.ifr_addr, sizeof(cbs->ifr.ifr_addr)); + sbuf_bcat(cbs->sb, &cbs->ifr, sizeof(cbs->ifr)); + cbs->max_len += sizeof(cbs->ifr); + + if (sbuf_error(cbs->sb) == 0) + cbs->valid_len = sbuf_len(cbs->sb); + } + + return (0); +} + /* * Implement the SIOCGIFCONF ioctl */ @@ -2139,30 +2231,22 @@ linux_ifconf(struct thread *td, struct ifconf *uifc) #else struct ifconf ifc; #endif - struct l_ifreq ifr; - struct ifnet *ifp; - struct ifaddr *ifa; + struct linux_ifconfig_ifaddr_cb2_s cbs; struct sbuf *sb; - int error, ethno, full = 0, valid_len, max_len; + int error, full = 0; error = copyin(uifc, &ifc, sizeof(ifc)); if (error != 0) return (error); - max_len = maxphys - 1; + cbs.max_len = maxphys - 1; CURVNET_SET(TD_TO_VNET(td)); /* handle the 'request buffer size' case */ if ((l_uintptr_t)ifc.ifc_buf == PTROUT(NULL)) { ifc.ifc_len = 0; IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - struct sockaddr *sa = ifa->ifa_addr; - if (sa->sa_family == AF_INET) - ifc.ifc_len += sizeof(ifr); - } - } + if_foreach(linux_ifconf_ifnet_cb, &ifc); IFNET_RUNLOCK(); error = copyout(&ifc, uifc, sizeof(ifc)); CURVNET_RESTORE(); @@ -2175,61 +2259,28 @@ linux_ifconf(struct thread *td, struct ifconf *uifc) } again: + cbs.ethno = 0; /* Keep track of eth interfaces */ - ethno = 0; - if (ifc.ifc_len <= max_len) { - max_len = ifc.ifc_len; + if (ifc.ifc_len <= cbs.max_len) { + cbs.max_len = ifc.ifc_len; full = 1; } - sb = sbuf_new(NULL, NULL, max_len + 1, SBUF_FIXEDLEN); - max_len = 0; - valid_len = 0; + sb = sbuf_new(NULL, NULL, cbs.max_len + 1, SBUF_FIXEDLEN); + cbs.max_len = 0; + cbs.valid_len = 0; + cbs.sb = sb; /* Return all AF_INET addresses of all interfaces */ IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - int addrs = 0; - - bzero(&ifr, sizeof(ifr)); - if (IFP_IS_ETH(ifp)) - snprintf(ifr.ifr_name, LINUX_IFNAMSIZ, "eth%d", - ethno++); - else - strlcpy(ifr.ifr_name, ifp->if_xname, LINUX_IFNAMSIZ); - - /* Walk the address list */ - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - struct sockaddr *sa = ifa->ifa_addr; - - if (sa->sa_family == AF_INET) { - ifr.ifr_addr.sa_family = LINUX_AF_INET; - memcpy(ifr.ifr_addr.sa_data, sa->sa_data, - sizeof(ifr.ifr_addr.sa_data)); - sbuf_bcat(sb, &ifr, sizeof(ifr)); - max_len += sizeof(ifr); - addrs++; - } - - if (sbuf_error(sb) == 0) - valid_len = sbuf_len(sb); - } - if (addrs == 0) { - bzero((caddr_t)&ifr.ifr_addr, sizeof(ifr.ifr_addr)); - sbuf_bcat(sb, &ifr, sizeof(ifr)); - max_len += sizeof(ifr); - - if (sbuf_error(sb) == 0) - valid_len = sbuf_len(sb); - } - } + if_foreach(linux_ifconf_ifnet_cb2, &cbs); IFNET_RUNLOCK(); - if (valid_len != max_len && !full) { + if (cbs.valid_len != cbs.max_len && !full) { sbuf_delete(sb); goto again; } - ifc.ifc_len = valid_len; + ifc.ifc_len = cbs.valid_len; sbuf_finish(sb); error = copyout(sbuf_data(sb), PTRIN(ifc.ifc_buf), ifc.ifc_len); if (error == 0) From nobody Tue Feb 14 16:54:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGS3R2gVyz3pjB4; Tue, 14 Feb 2023 16:54: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 4PGS3R1rfkz3Fpr; Tue, 14 Feb 2023 16:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xMQe3rHaknWD8dxjRzexX/beDEK0nZ+atGec2MXZ3yY=; b=TXSXH0EY08uWfr2ZpOF12us+KdXFMLyzc+FTWAjZQQo3zzD9aFabUbJ9ko92xK+dEgNjWp ayVOTbQhJ1zWqAAEZ6X0LZg6kXCj28ouIMPbesV3k6DPQwPoWJ/mZqQnD5/z5lIw4v09Us t2JuknkGTffGSOS1Ln4Jgzc1dWgJTIX9JNMxaP+bVbg4rivAP3HlHTLVMrZbrejNUAIz1y AYJst9cnMBc8+g49wWMLAlq4RdDmuKK7nilgmpSPtYVqtDwnlMDsJDz67dYvNlulukcg+1 DMGFtzgQ2lfgyTfFq5ADG99LcBzblcvd07i/nEs4/zwFAOQytip2l4fTHmd33g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xMQe3rHaknWD8dxjRzexX/beDEK0nZ+atGec2MXZ3yY=; b=eHmN4KcQvi/i86SHc4mxRurPMFDniTb0bPmsTz58L9MQNvkP9nPKjE6gNo1zjcwxhu1509 WXpgWXOi7JA8nh5yytL1T46hLOFfNuOT5Fm0+elQ86YMME4eJCSRkonQTB+7iId7qY+ci0 +VoXj8qESBRrlUSWkdcfpcEOxc1DPr2PWrESTBDUVTdC1qEQmAd8NCcug4jKRFqrfukC+8 6nRqEczsEiqUXE6tR4morgZxhTnp66DbHLRNGMOi/B75w9ErO3J+TSRPOygmdeo6t+yf7Q ZGxNfN3EdIlLhuirtbiPYfuGhcMohr9AmTbGBq+NCap1VjqafeBFrz++nUeSPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676393651; a=rsa-sha256; cv=none; b=t4QbcOXrVTgFj6lnzdBkuLsco74ys6lzkZKoXThuzDygWoGvgGfAJNTBNmGpjUY28krp9y CkNr6gCspdOxaqx7kUMInxw4yzysUAKuSaTPe6KyJnchMIyEnLAGYUQSAa+UVrNwQWdMir 5gJUzg5NWhn5pIjd5fqaEg7qSmDuFmenIwaNFnY030tz14Q4WdVV0Mz6qawd5z9S9A5YWU wt7zmPw/wgzQbgBd2yD+npO4UpuYumAmIHekghX3AoyVUgKhpF9oOF2HKHxSUz+A8Yah0v VNacuV7ohwiDsIhiSVe0K8xxcztzG5TFz/sJ22uQTKkHT0PhoE0fzdiEe4K2OA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGS3R0tyXz167V; Tue, 14 Feb 2023 16:54: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 31EGsBYi057311; Tue, 14 Feb 2023 16:54:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EGsBtE057310; Tue, 14 Feb 2023 16:54:11 GMT (envelope-from git) Date: Tue, 14 Feb 2023 16:54:11 GMT Message-Id: <202302141654.31EGsBtE057310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e35448a901aa - main - powerpc: Drop old workaround for old gcc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e35448a901aa56aa232efbc4fe7a73a9bdac3511 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e35448a901aa56aa232efbc4fe7a73a9bdac3511 commit e35448a901aa56aa232efbc4fe7a73a9bdac3511 Author: Warner Losh AuthorDate: 2023-02-14 16:47:08 +0000 Commit: Warner Losh CommitDate: 2023-02-14 16:47:08 +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 --- 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 Tue Feb 14 16:54:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGS3S6FYfz3pjGK; Tue, 14 Feb 2023 16:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGS3S2qDgz3FY8; Tue, 14 Feb 2023 16:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wBYa8Bq4D3ECxMTmDZ49z0yVH9zVbo2XEBzAdxE5bfo=; b=Gpxs7C6TpDeQqdNtGUPNSiQAtU2iCO9ZM13CqiQo31TKtenQti3MwYusxCHe2M6Bw/ywJM szixc5RIYcxaFcEiqRVliI6VqF1m/HTBfgF9GYVrGA8f5y+Bzjd/N3hem/pPCktdxDUaWK 87FFXgRiWEsvslj7VaIabqv+DpryULJImzchscrsFw99A0mXxJOebbyWxyLPobZiCcWNpO A23vZPvKag4gt4nECz0x5+5dcwAaTKkhQnPBerR/OF951vYMpoZjufza+g688me9EaM8js pzX02pvGZQrKcyHnEE6PAplf5ePMv4ePAzbI223xdB6jTuk2/Afx6jRBPDdaXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wBYa8Bq4D3ECxMTmDZ49z0yVH9zVbo2XEBzAdxE5bfo=; b=hCtkCv/RfwjxKrn2bkQ8sf1I0ToH+VXEEdpevixaYEJvwNR6PO21hS9lv8pkXbJr2hR+da KtpSYImfLXRZL18+hPPcHT0GuHZJeaJhnETB//eAtbmYfnoICK4Z0JnyYCIW6jUMOO5CoU XaegVDEmopoOEK6wAJpaqpb+JNlxKK17932p/CbETeZlzDPJsWsxFK8MsqaD9LycUO0gfh xDuzkN/11P3GYLY6+TjZ3hF+ERxmXwQ3ykJiqevFWnZD/zUCwvTTp14iKlxPyGRTy1yUST fXfbq1CMhvTkkhLoj28wztNMtnVqXEuseCjEaETJOVl5kVETFRuXkcXvVzcjTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676393652; a=rsa-sha256; cv=none; b=HQU4qU3mPNs2IQFVyX9o6jbugiKcjw+b13v38OR/PYT601tYL8LvB7Nc1j+ck75jbWsAyH 5Q6Hb3x8Ws4bAaCN0+WlHp8/ZHOL8oifCPkSur9N6AWDwzAJ7ZWLqj3CurYCJdjsMBdQqJ iFDwhN0fFGkmAgXYKfNsGHOd57dkyQrzH4BuguSMdF1hiihyfDx1jBGITiuIsRoQznAseY MVT+xeOnFDl2mmTGmrRA8I6fM9MTSzNnZRV9VHQoHFOKiTmfWPYWjeo5F7XcNAu59TRgQm uHbobzC+iDjV3upSer8ug7gXd2P5gpGMHTxepNViy7VMjsdectTHkRyQhKeayQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGS3S1qVmz15xy; Tue, 14 Feb 2023 16:54: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 31EGsCoN057335; Tue, 14 Feb 2023 16:54:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EGsCtH057334; Tue, 14 Feb 2023 16:54:12 GMT (envelope-from git) Date: Tue, 14 Feb 2023 16:54:12 GMT Message-Id: <202302141654.31EGsCtH057334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5c33688475a5 - main - arm: Remove armv5 supprt List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c33688475a5bb97d644079d5320068991c26b76 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5c33688475a5bb97d644079d5320068991c26b76 commit 5c33688475a5bb97d644079d5320068991c26b76 Author: Warner Losh AuthorDate: 2023-02-14 16:48:37 +0000 Commit: Warner Losh CommitDate: 2023-02-14 16:48:37 +0000 arm: Remove armv5 supprt This can only be true on armv5, so we can GC it. Sponsored by: Netflix Reviewed by: fuz@fuz.su, brooks, emaste Differential Revision: https://reviews.freebsd.org/D38563 --- share/mk/bsd.sys.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 43359fed29c7..169f9fe50779 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -108,10 +108,6 @@ CWARNFLAGS.clang+= -Wno-address-of-packed-member .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 90100 CWARNFLAGS.gcc+= -Wno-address-of-packed-member .endif -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 70000 && \ - ${MACHINE_CPUARCH} == "arm" && !${MACHINE_ARCH:Marmv[67]*} -CWARNFLAGS.clang+= -Wno-atomic-alignment -.endif .endif # WARNS <= 3 .if ${WARNS} <= 2 CWARNFLAGS.clang+= -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter From nobody Tue Feb 14 16:54:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGS3T3xFvz3pjGP; Tue, 14 Feb 2023 16:54: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 4PGS3T3Thjz3Flf; Tue, 14 Feb 2023 16:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hUC6B37PdSNPGtdMkQvwOuXXn3yYy5/lF3lae+4cOAA=; b=yP52wesTXRLkT6Ecw3tLd1hRIJTUTrHKrHN0Q3n/iGGivJF+UIAFBBfxW94GCYZuP9zgeW HEd7KtHWnN2i58rezDhnpgaCkqz9IMTShCaue1u4pq+kDNbaqbYSIOVlLXPUJzUXbytxro DuXX8qA1nNVlgVAuvoBV4VqAeIYCJY1Oq7xyD/bVseNOB85WhfmKIbLmMJZJkZsW0CV9gU 9tjjof3uOtnpI7TUdz7vjTc6VNl6wIL+oZbBz/zjFhY+Fh3JMwriyQNccP9qFngOcXGZnC UCNU0IeXs68Rv31L9f/RgGXj4rODxFsa/RavQYLQb6u0EFl8HfIF128JheiF1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hUC6B37PdSNPGtdMkQvwOuXXn3yYy5/lF3lae+4cOAA=; b=jwTR7+hbNBipuSVLMiqembT38eET7DfARAUYbYDbZUQybiNpiiYkAuasgkWrNKgZ8aJlRC j8aGdUJ9/uAAPyR6LJBqCWmT++0onjm7NFxZV/PdWeZgsGhyShFdSsL99IMaLLr0yZKuSx 3QWGonFWZPq9gvXv2xxQNxpZfpRE0Pco/3BEkTjwyci6p8vo/xheSsyWjzji3kY1HYTsVd YEAX7M5J5WIHa5bqKgHzSRN9wgZs8GYWcJrXeK9dVtqNtCv6Fz7EKlNF+Q59StVbMVVYX8 eETvSE6ED1I2fbD34YoiqmrVKn1NjKVP/UyeUX6/u86LQ+u65Xqc6RvBviWkVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676393653; a=rsa-sha256; cv=none; b=QZYdJ3mGAJhgzOf6fnL7AQ+6/PHoSn08YbQbCMBwmFXzYTZSfdNjRNxUTkEbpRQK06ObGC XXvNsVU0/v+5oJMQIMD27e+ip7MV0bVa3/ZZQahClayrbVL3O6jNhVPKl1yIlQ76oZhYNU jev9HbyqXWkr+53OaAm3dCOwYPDvhcoktb43Pu1DVKSHl9/yb01UJqu+LAwaXAx+jOt68f yNK4pmcVMT52stJeAnD83vgH0xpn4Wsqy5LWoW5s94WG5r+rPhIE0UFoihxKCUaK2mWyRy 5bf7Ly+xoxzC01o0dIpSCTkGaSTdP/57q4c3ItxNa/r09cU+jkSm0mB3g5TDdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGS3T2ZFjz16DM; Tue, 14 Feb 2023 16:54: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 31EGsDqD057480; Tue, 14 Feb 2023 16:54:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EGsDhE057479; Tue, 14 Feb 2023 16:54:13 GMT (envelope-from git) Date: Tue, 14 Feb 2023 16:54:13 GMT Message-Id: <202302141654.31EGsDhE057479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ae902a5be9b8 - main - libc: Simplify soft-float on 32-bit arm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae902a5be9b814332269a70350f4e27cb4eb1d94 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ae902a5be9b814332269a70350f4e27cb4eb1d94 commit ae902a5be9b814332269a70350f4e27cb4eb1d94 Author: Warner Losh AuthorDate: 2023-02-14 16:48:51 +0000 Commit: Warner Losh CommitDate: 2023-02-14 16:53:08 +0000 libc: Simplify soft-float on 32-bit arm Simplify the tests for 32-bit arm soft float support. For the files included only on arm, drop the test entirely. For others, test MACHINE_CPUARCH against arm. No functional change intended. File lists appear the same before / after the change. Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38582 --- lib/libc/Makefile | 3 +-- lib/libc/arm/Makefile.inc | 2 +- lib/libc/arm/aeabi/Makefile.inc | 5 ++--- lib/libc/arm/gen/Makefile.inc | 2 +- lib/libc/sys/Makefile.inc | 2 +- lib/libcompiler_rt/Makefile.inc | 2 +- lib/msun/arm/Makefile.inc | 2 +- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index c9150869f223..2ca5458d1437 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -124,8 +124,7 @@ NOASM= .include "${LIBC_SRCTOP}/rpc/Makefile.inc" .include "${LIBC_SRCTOP}/uuid/Makefile.inc" .include "${LIBC_SRCTOP}/xdr/Makefile.inc" -.if (${LIBC_ARCH} == "arm" && \ - (${MACHINE_ARCH:Marmv[67]*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \ +.if (${LIBC_ARCH} == "arm" && (defined(CPUTYPE) && ${CPUTYPE:M*soft*})) || \ (${LIBC_ARCH} == "riscv" && ${MACHINE_ARCH:Mriscv*sf} != "") .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" .endif diff --git a/lib/libc/arm/Makefile.inc b/lib/libc/arm/Makefile.inc index c4b3458ba2cd..c844c32778b8 100644 --- a/lib/libc/arm/Makefile.inc +++ b/lib/libc/arm/Makefile.inc @@ -11,7 +11,7 @@ SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol.map .include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc" -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if !defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "" SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map .endif diff --git a/lib/libc/arm/aeabi/Makefile.inc b/lib/libc/arm/aeabi/Makefile.inc index 9ccabc2186f9..dfb640564bdf 100644 --- a/lib/libc/arm/aeabi/Makefile.inc +++ b/lib/libc/arm/aeabi/Makefile.inc @@ -5,14 +5,13 @@ SRCS+= aeabi_atexit.c \ aeabi_unwind_cpp.c \ aeabi_unwind_exidx.c -.if (${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "") || \ - ${MACHINE_ARCH:Marmv[67]*} == "" +.if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" SRCS+= aeabi_asm_double.S \ aeabi_asm_float.S \ aeabi_double.c \ aeabi_float.c .endif -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if !defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "" SRCS+= aeabi_vfp_double.S \ aeabi_vfp_float.S .endif diff --git a/lib/libc/arm/gen/Makefile.inc b/lib/libc/arm/gen/Makefile.inc index 77c995f70cbc..4a35a0eb7efd 100644 --- a/lib/libc/arm/gen/Makefile.inc +++ b/lib/libc/arm/gen/Makefile.inc @@ -23,7 +23,7 @@ MAN+= \ arm_drain_writebuf.2 \ arm_sync_icache.2 \ -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if !defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "" SRCS+= \ fpgetmask_vfp.c \ diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index a86d7d160b6c..45287813fe13 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -128,7 +128,7 @@ SYM_MAPS+= ${LIBC_SRCTOP}/sys/Symbol.map CLEANFILES+= ${SASM} ${SPSEUDO} .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ - ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv[67]*} + ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" NOTE_GNU_STACK='\t.section .note.GNU-stack,"",%%progbits\n' .else NOTE_GNU_STACK='' diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 45eb72165cd8..a1cc3d4cac07 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -226,7 +226,7 @@ SRCF+= stdatomic .endif .for file in ${SRCF} -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ +.if ${MACHINE_CPUARCH} == "arm" && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) SRCS+= ${file}vfp.S . elif exists(${CRTSRC}/${CRTARCH}/${file}.S) diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc index 6ebf21a9c3c5..05f3548f946a 100644 --- a/lib/msun/arm/Makefile.inc +++ b/lib/msun/arm/Makefile.inc @@ -3,7 +3,7 @@ LDBL_PREC = 53 SYM_MAPS += ${.CURDIR}/arm/Symbol.map -.if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" +.if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" ARCH_SRCS = fenv-softfp.c fenv-vfp.c .endif From nobody Tue Feb 14 16:54:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGS3V4Wrmz3phrZ; Tue, 14 Feb 2023 16:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGS3V40b8z3Fw2; Tue, 14 Feb 2023 16:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iPpBvCaogaDe4eQh2RpHsgOe1V1CCFHt+Arg7LziR2I=; b=vfM19nuBMhpDANndmTd26mzqvNMg4Dd/XVjeACUYfa7/YHKGmOWhtVMGhMAqHEjGcorruJ SyNELjGOLYDs+DucWGWp6Cbq35caVGGyfxoIYSELYLdXV/QRWRabVVW6dLrLf7XSWgzgHY t7Nu0x8kJXmbZHN5Pkx/9WU5eiY4mNWSXKbiTikN4gDxNaLsuDCcs8pWCakSta4JTrb5tE 55V619KOwh3wWx+QWsD7DqDeTM50g8I2KqiNIY9G8jNVqoYuVPRHCP1NxpVi+bDcnFv3lQ i/bEhnQRHUtXSjZVJqZrvyCXfMHB5ggt3CmH179jFoEXUi9JeEpK3CGwgabVcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iPpBvCaogaDe4eQh2RpHsgOe1V1CCFHt+Arg7LziR2I=; b=QihloTor3g7YiUWjrYrNHRTPScDL33zW+jem6Fzv4Oxe5S+drBglFpn/G7YYpME+uxGaAg +1XjlcXnveBwsEY4o1oIkVb6l5wTloQya0YMP7sIFyBraqwyKnAnT/nIqqSmXGNxf7Lowb yz8973OtuytFvwEpcZ+dQ8P4oWM4UnSsBc/X68TJnQgOLndNKgvSd5cUFjin+h8dFCMLS0 NQMVf/r2fhe3KPJGyrHpBTn+OAalZ7hVCS7P1WPzp8KKpKpgabWO5c3Y87PAJ5PiwV7ulJ CZ1g5ZH7gWNvjwTAk16evkGAYD/5lyqIXXCauJ2S7obUJDZZ4DkvAU/unyTSAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676393654; a=rsa-sha256; cv=none; b=Wd+y2VQylJA4z4Ntdw8m5s+ExGgAcalXsH3flhVbzEmFr1Nja2+TDbYpgRizStJLsUESD3 TdeHz4bIPcZ2Det4q5sknHCFu9YaBvydk2zZW+jETvY7Gumfp0+1ePMytvs4ZNuXdB8DJh skHAbpfkJjMNP+FfKtyAhuTie+n9Cs7jFAnmFp1HYkkVIUsCiJJoTgYHefyyq2ezszGEKk RlAldCKfuh1YAgpJK3rmSXRuwVqtd+PHCw6y3Etbbqgl5XTIWbGzZxXDs6hgIHsWZrYlXk 2DgImzdQ9irj6qyx8ZzWRQpLt0akhVlNxnatK78Z5sdqHO18MF9hXWLnHNdNIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGS3V33fZz16K5; Tue, 14 Feb 2023 16:54: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 31EGsE4P057527; Tue, 14 Feb 2023 16:54:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EGsEPu057525; Tue, 14 Feb 2023 16:54:14 GMT (envelope-from git) Date: Tue, 14 Feb 2023 16:54:14 GMT Message-Id: <202302141654.31EGsEPu057525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e88e9894395e - main - armv5: Remove dead code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e88e9894395e27e2a5f7fef40f61ad3ed96b8399 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e88e9894395e27e2a5f7fef40f61ad3ed96b8399 commit e88e9894395e27e2a5f7fef40f61ad3ed96b8399 Author: Warner Losh AuthorDate: 2023-02-14 16:49:00 +0000 Commit: Warner Losh CommitDate: 2023-02-14 16:53:15 +0000 armv5: Remove dead code No need to mark anything as broken on armv5 anymore. Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38583 --- sys/conf/kern.opts.mk | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index eae05882cb17..5cda70156394 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -78,12 +78,6 @@ __DEFAULT_NO_OPTIONS = \ BROKEN_OPTIONS+= INIT_ALL_ZERO .endif -.if ${MACHINE_CPUARCH} == "arm" -. if ${MACHINE_ARCH:Marmv[67]*} == "" -BROKEN_OPTIONS+= CDDL ZFS -. endif -.endif - .if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} == "powerpc" BROKEN_OPTIONS+= ZFS .endif From nobody Tue Feb 14 16:54:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGS3W5gxNz3phxC; Tue, 14 Feb 2023 16:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGS3W4wK1z3G2J; Tue, 14 Feb 2023 16:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4iX30IWwmpOL5K8A12b0r/3J0mMUieZtUBra/66xF1E=; b=ignbsNoraeMSEALarwXQuz55pimZhhDLJVs2pXKFoZdiOXn7kQX146d/xLqCWZoFm53RRT /Om2BGI9gva96BVSMH44iBkwq3u/pBdyo8FixtsUjmjpn+z1c56J1MtO+qjd/bfQtTwFTU G9Y4UUKyzLlmnIjc9/bHdkh4LCQQXQW7Hh27C3exekb9xf2T9o2zTyvy7I942XevaZLNuY kKVlQbUpVRHxx5HEM53/t/5EmaXq66/jI3zjb5bStDiAfaBFeGBDIrKxG74s9OrdJNvYJY fv09cR111Eqg9sOUWFboTzQg2/yrN5FZfFa8NbQoBDGrfUeCrU+wWw5GDPzyDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4iX30IWwmpOL5K8A12b0r/3J0mMUieZtUBra/66xF1E=; b=L8t8uKD763PUTKlpc/zHp/I4d6q1RoVG2UZX+juSpui14VPApzBzHfwVFD+kmZznfzYA22 DtiamRAgKjYELbEybWtwk5Rtu/WqZwbtM77LB+LBMI6PJNOvJqsy14/O+A2pEzXFt3fxGh YX+0TN8SwBnmLvc4Nr8Y7hwg1h1TJFltrIwqu65uFW/ABd02N+vtFCgb5AaHasc51AkzRr o0VN3Eu2WubobJY+lWzy2e/RZHN/60tgNelR81qCAnbc6v1xo5z8oyUCgg4lE1sOUEXZPf FbQ6P8Xx03UFGHpkT9yz7H5i/Nkc3PCi0JgmBomRTT7Eo9aVUCD6+h7POrH7Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676393655; a=rsa-sha256; cv=none; b=DoQKPYDI1gTXmpBjNtdCzd7Tveyc4dfx+Pq56QlLd9dOl3KO7U5Ulw5DbR7FJrq6jy/Tk7 mDWP1q0+u5Ds/4LJDUPTY9ZRnN3nvC8qnEkPsnrUNcgqms2chDyQ/qeMFFdsJnP3a/e4VE nY6PLJNe5DRXS0bZxLivUUciVfgLDBivTMKZR719DHjzLwq2DwtQY1BoH12uMQ1+8j72ow P4R7LERDIRAj4LUNkxWTnEK8p0b9b5fNuE3JxyrvLstJUAJ4IS3CRn/jbP1QPcCWvO/Mv1 nSPybRb2XLdzj9fCP3A2kt4u3x3idnh3mYGKMO1qUkGVJlTgVt3UddKFem896A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGS3W4194z15y0; Tue, 14 Feb 2023 16:54: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 31EGsF94057574; Tue, 14 Feb 2023 16:54:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EGsFT0057567; Tue, 14 Feb 2023 16:54:15 GMT (envelope-from git) Date: Tue, 14 Feb 2023 16:54:15 GMT Message-Id: <202302141654.31EGsFT0057567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3ae78d66d9e5 - main - bsd.cpu.mk: Simplify armv[67] support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ae78d66d9e56fdda35bdf07b21c374ea5f2906b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3ae78d66d9e56fdda35bdf07b21c374ea5f2906b commit 3ae78d66d9e56fdda35bdf07b21c374ea5f2906b Author: Warner Losh AuthorDate: 2023-02-14 16:49:26 +0000 Commit: Warner Losh CommitDate: 2023-02-14 16:53:15 +0000 bsd.cpu.mk: Simplify armv[67] support Drop a clause that's no longer relevant to v4/v5. Drop support for softfloat for v[45]. Simplify soft float expression by assuming we're always either armv6 or armv7. Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38584 --- share/mk/bsd.cpu.mk | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index db5fa08df4bc..693a9b5209da 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -103,9 +103,9 @@ _CPUCFLAGS = -march=armv5te -D__XSCALE__ _CPUCFLAGS = -mfloat-abi=softfp . elif ${CPUTYPE} == "cortexa" _CPUCFLAGS = -march=armv7 -mfpu=vfp -. elif ${CPUTYPE:Marmv[4567]*} != "" +. elif ${CPUTYPE:Marmv[67]*} != "" # Handle all the armvX types that FreeBSD runs: -# armv4, armv4t, armv5, armv5te, armv6, armv6t2, armv7, armv7-a, armv7ve +# armv6, armv6t2, armv7, armv7-a, armv7ve # they require -march=. All the others require -mcpu=. _CPUCFLAGS = -march=${CPUTYPE} . else @@ -292,17 +292,11 @@ MACHINE_CPU += armv6 . if ${MACHINE_ARCH:Marmv7*} != "" MACHINE_CPU += armv7 . endif -# armv6 and armv7 are a hybrid. It can use the softfp ABI, but doesn't emulate -# floating point in the general case, so don't define softfp for it at this -# time. arm is pure softfp, so define it for them. -. if ${MACHINE_ARCH:Marmv[67]*} == "" -MACHINE_CPU += softfp -. endif # Normally armv6 and armv7 are hard float ABI from FreeBSD 11 onwards. However # when CPUTYPE has 'soft' in it, we use the soft-float ABI to allow building of # soft-float ABI libraries. In this case, we have to add the -mfloat-abi=softfp # to force that. -. if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" +. if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" # Needs to be CFLAGS not _CPUCFLAGS because it's needed for the ABI # not a nice optimization. Please note: softfp ABI uses hardware floating # instructions, but passes arguments to function calls in integer regsiters. From nobody Tue Feb 14 16:55:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGS5T3crpz3phxn; Tue, 14 Feb 2023 16: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 4PGS5T39qfz3HmH; Tue, 14 Feb 2023 16:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xHzYeGwFJy6FLwgRrMPUj1vtIHG2NedirPDdaNVQNfw=; b=jumyI97a4z4taaJWiwnOjhPi3EVOGjWHFbzbkzUZ/DPR84fBcvCBGhwZAbzfobf1cABWbP 169W2zb/SB+yFjLMzX6RIChC7czq/oUSzfm0pjBXuEbRR4prIv5j8M8xKpifbOYWymWHTv 73ZgZanx011EwN9E0aslDpzx9yXoHfseIuiweAr0Eph14roV412Y7xoirW+AA20xyMRpVZ YP3x9JV4lGYOqhMQbDXi7O+xF8VpN+HSPR1mG00g///QRLYguotq0gIHwmCdddAI/etzI4 5Q2cgIC1ZTcOoN+J5dRkFemHJ9nQQIikuRsfcFD4+f3xtOa2AdG3BQEk26093w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676393757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xHzYeGwFJy6FLwgRrMPUj1vtIHG2NedirPDdaNVQNfw=; b=nnJsU7kPkD/dXuL8+IXi32kfyFaZs0UaT3o0DVfwzZa3kNIplaWD116gxUAgb83ki3w9Qt qRhrnKTf1y1e0NlVDSOe7THkp8NQjWAOKhy8WSixn6AD6KpFs4H+q8T679id/wkNEPemcf V6Y3nbJU2LqcogZID3751wy/RCnS1Ex8xS7k+P/BxdEFNe7kguOcSskY8jZMEqpMsHuJXu bbeW9XpMStbRdXvVMC2s2Q8t4mfGiLPVJZo+0tzbVqIHS2gXf96BtUNF+NEUdZ+TTvQz+K oxsAdWSHxT7MBuguzEFAt4XuDroTJYMKGwMj9QNwT+9ffzrL+l5pslfGYwNMfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676393757; a=rsa-sha256; cv=none; b=eYWHEWEhleYd5W/I0UImvdoPB6FD73AXvjiDbbOFrGZegkGWoYpJzm9HuLRADWJwGO9EW+ lUTVVWq6oucjphc9wYQG2M++tMGfQ5w6cWaysSI+Ve6hQOWZTMFAgVBRNU2HMm6VpWlf/C dU2KXfcMiTStUBvJjJ3VOGiUKtluwhoWTJSbyUpStmSofoZn5qfJqCBKLZIsuR54y9PIap nb6gmWaXFmy9s0ldMrBnaE0p8Tm1laroEc1TzYy7JkJMDeFW1sSSeKAfWkRXHjfma9P+ru TMxTC9TXtmnvAFL0fN9K8QG8WRVLh4Dcg1jCXoy2dag5/SdfOAQag7dNbTqaFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGS5T2DMnz15y4; Tue, 14 Feb 2023 16: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 31EGtvSh058000; Tue, 14 Feb 2023 16: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 31EGtvM7057999; Tue, 14 Feb 2023 16:55:57 GMT (envelope-from git) Date: Tue, 14 Feb 2023 16:55:57 GMT Message-Id: <202302141655.31EGtvM7057999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 50fce3b4b070 - main - atkbd: correct bogus character in #ifdef List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50fce3b4b070a9eb59d7988da8b3356c4cf26b26 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=50fce3b4b070a9eb59d7988da8b3356c4cf26b26 commit 50fce3b4b070a9eb59d7988da8b3356c4cf26b26 Author: Ed Maste AuthorDate: 2023-02-14 16:54:12 +0000 Commit: Ed Maste CommitDate: 2023-02-14 16:55:52 +0000 atkbd: correct bogus character in #ifdef Fixes: f20058955c9d ("sys/kbio.h: make pre-unicode keymap...") Sponsored by: The FreeBSD Foundation --- sys/dev/atkbdc/atkbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index 0c6dadca43aa..5e3c65686363 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -1090,7 +1090,7 @@ atkbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) case PIO_KEYMAP: /* set keyboard translation table */ case PIO_KEYMAPENT: /* set keyboard translation table entry */ case PIO_DEADKEYMAP: /* set accent key translation table */ -äifdef COMPAT_FREEBSD13 +#ifdef COMPAT_FREEBSD13 case OPIO_KEYMAP: /* set keyboard translation table (compat) */ case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */ #endif /* COMPAT_FREEBSD13 */ From nobody Tue Feb 14 17:52:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGTLD13Phz3pmfd; Tue, 14 Feb 2023 17:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGTLD0bRxz3QGT; Tue, 14 Feb 2023 17:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676397124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x03YNmMOFSLUieF64JUHl9JFusqjLg+kmUlbRe1JdoE=; b=mCiYp1MmMXfVTZnvtpoeKXEuhk8DTKR7Yt+16gGrMlwCnnqSHGpzOuToTsczU6exsLoxR9 xgalWq6b5bdfDR3RdXlv0giV5wRuCSJcypXOCVwHuasoycBtKbKdFQe+Sm+5lycJLMa71F SrpcZlR/PtO4zrjAZHZ0ub0CqUzAHx84y1LIEgDM9v1V5tRpkoG+VeUpNFNRtz6raCJ/BR vnctn8dvfGE+iTyMENKJSw8jy2KMmsKhTRDX/SI9DlbTkCZCQkwC4Y9c42rLqSCFFD8IFe eGm80RAkBW3aZhdrRg4qddGk2hWSbFfGuBY6BGykFCkZ6ETiaIHIb/2hTJE6Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676397124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x03YNmMOFSLUieF64JUHl9JFusqjLg+kmUlbRe1JdoE=; b=nEck96hE7GMJZ97KUXlDQi+1+UCVtKXX/daANXIjTWrUQYQGpzczfI+/jMrH8nXBLaBTWu LXLbfffNT/FuCd9IW4fpImyclbDWH+zrqFkot7hOzEETk6/f/nL7I3nq05M8DQFRGkwFFN Cy95l5MflqNbI7gjtMyE/PJivvFvzf0ozAR9EuudSl+U8bbJOnOTe0MX6n/cdMQk7xmz7n 3v38ISv0RWb1OGUHZux9i1VgxSkF3v/E35VNWiHdDnXo1yKrSwGIH+/rFgYvb6dHZFbpge bQ0Hf4NMaiySDLgqIyNfwjMMnIUQWN1yryWYRZMRvzfMAmdwMKiIbzayecUItg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676397124; a=rsa-sha256; cv=none; b=T1mxOcHOh5rYzgF1lGpjULXNzuWbDsLqU4wL0Lcz5Swe115hE1bgNdfBDyVgzxSl+U6okO AITcdZu1zm1W+TeGhPFsMh3M19XtMRBg5CClJJAIsvGhqZytx81p1LKOaJpY2F4qMxF3qz dk1gBG40x1KasLsPimZT6wI1fb26D7wKRFnROfqioP1nyUEWuasnrrmi07nhL/+1Uwh/oG nk6RrHnqRuj1OuTLH1ir6Nk0wZlIwM9J/0nZgr/iw4J0vtZoxGU1/ZmgFdaeees634tlHb ibw2LVyUEDNgwF1ygc+85Bdt82sQwbK7HK/P/7VpCiYtx75d9p6gQnb+vGikEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGTLC6m9dz17b5; Tue, 14 Feb 2023 17:52: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 31EHq3Ng044090; Tue, 14 Feb 2023 17:52:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EHq3wK044089; Tue, 14 Feb 2023 17:52:03 GMT (envelope-from git) Date: Tue, 14 Feb 2023 17:52:03 GMT Message-Id: <202302141752.31EHq3wK044089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6f23df1ae7f6 - main - sys/_endian.h: Move powerpc workaround into _endian.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f23df1ae7f6ec3cd06a15c87f0aaaa770b2941b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6f23df1ae7f6ec3cd06a15c87f0aaaa770b2941b commit 6f23df1ae7f6ec3cd06a15c87f0aaaa770b2941b Author: Warner Losh AuthorDate: 2023-02-14 17:48:05 +0000 Commit: Warner Losh CommitDate: 2023-02-14 17:51:21 +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 --- 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 Tue Feb 14 18:03:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGTby29G3z3pnRt; Tue, 14 Feb 2023 18:03: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 4PGTby1cXVz3h0Z; Tue, 14 Feb 2023 18:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676397838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvMjKwrBo5ZRoAfj7gdAot6XdeYaXz9NZsKGuw97jxU=; b=rZrDvXGPZAKL64k3YVzx6bXJtC0IgdPLkzdQcALdpLV9/9oep0i+J6zv3dm95tXiqzBo+v Lh1kfUYYDjLNe9PBksaEfmuiwU4f1tXydRyVJu0iloPOpKZ9cH/FxWO8Z3zrS2Zm26Vdhs QNy+aDVPEkcf2tTirfmjK1XBuxAl3JFNS6GAwz3YbIULD+5RDgqEWoQqJBrI/+SVsqzyr0 MYO9EPZoAoQ51fLdhaulQ0GrbCzkya39sTHyDEn95ZhYyjZL9RllDtdcgwDuS4auSvfDvu TS/uBZKPlA4teEpKnCcg0L2aqQSZ26QSujvRlOTLh6i5ekgl+OjreVVQCvy78Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676397838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvMjKwrBo5ZRoAfj7gdAot6XdeYaXz9NZsKGuw97jxU=; b=K8x6DVIbbjUaN50QNlLBvjJgvlBdPirPFQtoDS5jHdijoVdPIaYVDVjFgJnr5kwRH2zgbA bDp3L+NhQDF2T6r+GEhuLrZVNJ7nKxqrTP2A9kKfLctsRgpzLlcTwIuBCuuYF7PcHkzFMi HliVjmdN2o2hmaJexC+n/7v/c6KVkoDy10SmmrBFJcFCilg1AWrs9gqb/Wir1K1dx1Am4a MN14pyvNOwyMzMwuZ/cxEvRwtlX5tqoJtF2THJdAaHngpu3yFyRyJaEZyFCcQPTLynhwsg 9pogByvhBboNnVe8SmR/E7EuFjZQdK3hDcGDhdYzOxXAdM6EkrLBya1KQey8sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676397838; a=rsa-sha256; cv=none; b=Q0ZPCgFdjfqswV8eT+KLNk1IGVPQrUb4Pz1FnLUauexeDuRcOl7m5gzTOIrRnxP+4PuJPg 78dYDq0mWcLbKuW6PQvOqgVphyIvKwrqUTNuKdoDGkF8RgUz7VokjiuWfPy+IIE3h6rGuj XFBnp2CC99/HjQe2cVA6aVhb8vywZ82d6VRUjFN/XTnUAINeI6pXWMHyG90jkAoHnj2+gu dlVDP+QYwr/+6Dv2qcn0fFr08os7FTpBh4RBPUSxbY69jVovCOk3VbkTBJlK4oNtmI+wlS Vq24RvMc53lYOOPfm93AFSYgB7VJ4kO+cMr8TtCiy0lUb0D9+ReTzQWAtYkLmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGTby0dY6z17TH; Tue, 14 Feb 2023 18:03: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 31EI3vC2059090; Tue, 14 Feb 2023 18:03:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EI3vin059089; Tue, 14 Feb 2023 18:03:57 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:03:57 GMT Message-Id: <202302141803.31EI3vin059089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: a22561501ff8 - main - net: use pfil_mbuf_{in,out} where we always have an mbuf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a22561501ff807b227305617ea2fb46072ce8b06 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a22561501ff807b227305617ea2fb46072ce8b06 commit a22561501ff807b227305617ea2fb46072ce8b06 Author: Gleb Smirnoff AuthorDate: 2023-02-14 18:02:49 +0000 Commit: Gleb Smirnoff CommitDate: 2023-02-14 18:02:49 +0000 net: use pfil_mbuf_{in,out} where we always have an mbuf This finalizes what has been started in 0b70e3e78b0. Reviewed by: kp, mjg Differential revision: https://reviews.freebsd.org/D37976 --- sys/dev/virtio/network/if_vtnet.c | 6 +----- sys/net/if_bridge.c | 32 +++++++++++++++++++------------- sys/net/if_enc.c | 8 ++++++-- sys/net/if_ethersubr.c | 5 ++--- sys/netinet/ip_output.c | 3 +-- 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 505a62b01b4e..41eaa6a56086 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -2137,12 +2137,8 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) if (PFIL_HOOKED_IN(sc->vtnet_pfil)) { pfil_return_t pfil; - pfil = pfil_run_hooks(sc->vtnet_pfil, &m, ifp, PFIL_IN, - NULL); + pfil = pfil_mbuf_in(sc->vtnet_pfil, &m, ifp, NULL); switch (pfil) { - case PFIL_REALLOCED: - m = pfil_mem2mbuf(m->m_data); - break; case PFIL_DROPPED: case PFIL_CONSUMED: continue; diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 5a4954e84869..9f99434dd4e0 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -3365,7 +3365,7 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) /* Run the packet through pfil before stripping link headers */ if (PFIL_HOOKED_OUT(V_link_pfil_head) && V_pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) { - switch (pfil_run_hooks(V_link_pfil_head, mp, ifp, dir, NULL)) { + switch (pfil_mbuf_out(V_link_pfil_head, mp, ifp, NULL)) { case PFIL_DROPPED: return (EACCES); case PFIL_CONSUMED: @@ -3419,17 +3419,20 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) * in_if -> bridge_if -> out_if */ if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL && (rv = - pfil_run_hooks(V_inet_pfil_head, mp, bifp, dir, NULL)) != + pfil_mbuf_out(V_inet_pfil_head, mp, bifp, NULL)) != PFIL_PASS) break; - if (V_pfil_member && ifp != NULL && (rv = - pfil_run_hooks(V_inet_pfil_head, mp, ifp, dir, NULL)) != - PFIL_PASS) - break; + if (V_pfil_member && ifp != NULL) { + rv = (dir == PFIL_OUT) ? + pfil_mbuf_out(V_inet_pfil_head, mp, ifp, NULL) : + pfil_mbuf_in(V_inet_pfil_head, mp, ifp, NULL); + if (rv != PFIL_PASS) + break; + } if (V_pfil_bridge && dir == PFIL_IN && bifp != NULL && (rv = - pfil_run_hooks(V_inet_pfil_head, mp, bifp, dir, NULL)) != + pfil_mbuf_in(V_inet_pfil_head, mp, bifp, NULL)) != PFIL_PASS) break; @@ -3467,17 +3470,20 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) #ifdef INET6 case ETHERTYPE_IPV6: if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL && (rv = - pfil_run_hooks(V_inet6_pfil_head, mp, bifp, dir, NULL)) != + pfil_mbuf_out(V_inet6_pfil_head, mp, bifp, NULL)) != PFIL_PASS) break; - if (V_pfil_member && ifp != NULL && (rv = - pfil_run_hooks(V_inet6_pfil_head, mp, ifp, dir, NULL)) != - PFIL_PASS) - break; + if (V_pfil_member && ifp != NULL) { + rv = (dir == PFIL_OUT) ? + pfil_mbuf_out(V_inet6_pfil_head, mp, ifp, NULL) : + pfil_mbuf_in(V_inet6_pfil_head, mp, ifp, NULL); + if (rv != PFIL_PASS) + break; + } if (V_pfil_bridge && dir == PFIL_IN && bifp != NULL && (rv = - pfil_run_hooks(V_inet6_pfil_head, mp, bifp, dir, NULL)) != + pfil_mbuf_in(V_inet6_pfil_head, mp, bifp, NULL)) != PFIL_PASS) break; break; diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c index da6ce7a1a815..b5ea1c68692c 100644 --- a/sys/net/if_enc.c +++ b/sys/net/if_enc.c @@ -247,7 +247,7 @@ enc_hhook(int32_t hhook_type, int32_t hhook_id, void *udata, void *ctx_data, struct enc_softc *sc; struct ifnet *ifp, *rcvif; struct pfil_head *ph; - int pdir; + int pdir, ret; sc = (struct enc_softc *)udata; ifp = sc->sc_ifp; @@ -307,7 +307,11 @@ enc_hhook(int32_t hhook_type, int32_t hhook_id, void *udata, void *ctx_data, /* Make a packet looks like it was received on enc(4) */ rcvif = (*ctx->mp)->m_pkthdr.rcvif; (*ctx->mp)->m_pkthdr.rcvif = ifp; - if (pfil_run_hooks(ph, ctx->mp, ifp, pdir, ctx->inp) != PFIL_PASS) { + if (pdir == PFIL_IN) + ret = pfil_mbuf_in(ph, ctx->mp, ifp, ctx->inp); + else + ret = pfil_mbuf_out(ph, ctx->mp, ifp, ctx->inp); + if (ret != PFIL_PASS) { *ctx->mp = NULL; /* consumed by filter */ return (EACCES); } diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 8bc66497e161..34ff4ac22e7f 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -474,8 +474,7 @@ ether_output_frame(struct ifnet *ifp, struct mbuf *m) return (0); if (PFIL_HOOKED_OUT(V_link_pfil_head)) - switch (pfil_run_hooks(V_link_pfil_head, &m, ifp, PFIL_OUT, - NULL)) { + switch (pfil_mbuf_out(V_link_pfil_head, &m, ifp, NULL)) { case PFIL_DROPPED: return (EACCES); case PFIL_CONSUMED: @@ -853,7 +852,7 @@ ether_demux(struct ifnet *ifp, struct mbuf *m) /* Do not grab PROMISC frames in case we are re-entered. */ if (PFIL_HOOKED_IN(V_link_pfil_head) && !(m->m_flags & M_PROMISC)) { - i = pfil_run_hooks(V_link_pfil_head, &m, ifp, PFIL_IN, NULL); + i = pfil_mbuf_in(V_link_pfil_head, &m, ifp, NULL); if (i != 0 || m == NULL) return; } diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 739138a6f791..e62935b247da 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -116,14 +116,13 @@ ip_output_pfil(struct mbuf **mp, struct ifnet *ifp, int flags, struct mbuf *m; struct in_addr odst; struct ip *ip; - int pflags = PFIL_OUT; m = *mp; ip = mtod(m, struct ip *); /* Run through list of hooks for output packets. */ odst.s_addr = ip->ip_dst.s_addr; - switch (pfil_run_hooks(V_inet_pfil_head, mp, ifp, pflags, inp)) { + switch (pfil_mbuf_out(V_inet_pfil_head, mp, ifp, inp)) { case PFIL_DROPPED: *error = EACCES; /* FALLTHROUGH */ From nobody Tue Feb 14 18:03:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGTbz2Z8lz3pnRy; Tue, 14 Feb 2023 18:03: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 4PGTbz2KbNz3hDY; Tue, 14 Feb 2023 18:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676397839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ngHUDF8GDewsCJCPPLYB/R6caZ0Q9bjhzQIolzHPm48=; b=HMnArO3Hu88JM7TobhQwb3bAzWskGlFy6mqUzfBYO9b2qzu+ajVRBNNBXmuN4J0LAUIe5i Nsl1w9ZKCUd8eDblfXbjmhwLdoTG4jFC8Iva6hJFt9hUaSgUViMxvNOPlldmk+tWWJ2soy IlGahBy0yrZhgH0rVqsQVdPyPXWUxWHvyjMRlsQ8blKfnRsN6m0kXKS4TG845f6Dza+y9V evMgZnErXdNPWkT3sdDwFVvCcYgjbsoq5wAfR4eBguiRGvuzSlHr0lia01XswKkkgcpAUb cyfm8bQ5l9nRz6DIGPr4FhGPUeHldgofp9778nNu5wLOTQkxmHR18IDDiq1ccg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676397839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ngHUDF8GDewsCJCPPLYB/R6caZ0Q9bjhzQIolzHPm48=; b=AQqmj/zWuPRc4L6f57uDyVw2wne4M0oZQYMIegYRTG1DN/I6Kug6o1U54Wfa7+9pYKjyhQ DErSgrbfKM+BZfw4kg9XWeK7KTS1C26LP8KIQ7lBwwz3htBWg7c4gFHDI5QkGC3xTf5qxq 72QiF+IuF8gjKta7VXZL421GsnIu33Gizw9wFh/Vu/WKlRjxU8s+92hkw4kVC+sPbmp5kY 1IKbIjFFD0s0dUJKHDvSxsslCqgkwLLpsYonSuq6KnfFFJsIpJJ5mnLU5V3EgW4Q266KY+ nv73rD1nibsaXfI1MJhyaSAY7sqIAmIqOesHf65McecQrHkesZ/omdMN1H1Wqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676397839; a=rsa-sha256; cv=none; b=LB5LlOSdjeH7IShMqAqTyH0GobjAi8T0WpgqVhEaKnP+X+/p6QuFB3mWaFue3QL798eKvT VYf6g3gdwz6gvNLLro7BwWMeBWviQanhImEGv42D26P1snNbyJG8zz7v2X36VnkoDcDSCR 4kIr/ahnWduwakDhQ6jZikzvpw1RA/q+ua/erLpFgRnNk3UsGVHFyRCNbuY6PhV1hKJIhB qqZk7ee6aD7fKRoqCSetXExv8gMkw0tYjHmhNKgieeaN07QyQMah7dCXNF7tAjtep4Vu8G yKNs3PU715WSON/1fhCR6A0PVrlf2KCYxA5iHqZJEJPoMo3NlALiKIR8U6fqbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGTbz1RGKz17fM; Tue, 14 Feb 2023 18:03: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 31EI3xwQ059116; Tue, 14 Feb 2023 18:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EI3xCd059115; Tue, 14 Feb 2023 18:03:59 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:03:59 GMT Message-Id: <202302141803.31EI3xCd059115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: caf32b260ad4 - main - pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: caf32b260ad46b17a4c1a8ce6383e37ac489f023 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=caf32b260ad46b17a4c1a8ce6383e37ac489f023 commit caf32b260ad46b17a4c1a8ce6383e37ac489f023 Author: Gleb Smirnoff AuthorDate: 2023-02-14 18:02:49 +0000 Commit: Gleb Smirnoff CommitDate: 2023-02-14 18:02:49 +0000 pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks() The 0b70e3e78b0 changed the original design of a single entry point into pfil(9) chains providing separate functions for the filtering points that always provide mbufs and know the direction of a flow. The motivation was to reduce branching. The logical continuation would be to do the same for the filtering points that always provide a memory pointer and retire the single entry point. o Hooks now provide two functions: one for mbufs and optional for memory pointers. o pfil_hook_args() has a new member and pfil_add_hook() has a requirement to zero out uninitialized data. Bump PFIL_VERSION. o As it was before, a hook function for a memory pointer may realloc into an mbuf. Such mbuf would be returned via a pointer that must be provided in argument. o The only hook that supports memory pointers is ipfw:default-link. It is rewritten to provide two functions. o All remaining uses of pfil_run_hooks() are converted to pfil_mem_in(). o Transparent union of pfil_packet_t and tricks to fix pointer alignment are retired. Internal pfil_realloc() reduces down to m_devget() and thus is retired, too. Reviewed by: mjg, ocochard Differential revision: https://reviews.freebsd.org/D37977 --- sys/dev/cxgbe/t4_sge.c | 4 +- sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 6 +- sys/net/iflib.c | 5 +- sys/net/pfil.c | 122 +++++++++--------- sys/net/pfil.h | 51 +++----- sys/netinet/siftr.c | 26 ++-- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 30 ++--- sys/netpfil/ipfw/ip_fw_pfil.c | 171 ++++++++++++++++---------- sys/netpfil/pf/pf_ioctl.c | 44 ++++--- 9 files changed, 233 insertions(+), 226 deletions(-) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 8dbb9e1fe93a..88a7f44cadb7 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -1998,8 +1998,7 @@ eth_rx(struct adapter *sc, struct sge_rxq *rxq, const struct iq_desc *d, sc->params.sge.fl_pktshift; frame = sd->cl + fl->rx_offset + sc->params.sge.fl_pktshift; CURVNET_SET_QUIET(ifp->if_vnet); - rc = pfil_run_hooks(vi->pfil, frame, ifp, - slen | PFIL_MEMPTR | PFIL_IN, NULL); + rc = pfil_mem_in(vi->pfil, frame, slen, ifp, &m0); CURVNET_RESTORE(); if (rc == PFIL_DROPPED || rc == PFIL_CONSUMED) { skip_fl_payload(sc, fl, plen); @@ -2007,7 +2006,6 @@ eth_rx(struct adapter *sc, struct sge_rxq *rxq, const struct iq_desc *d, } if (rc == PFIL_REALLOCED) { skip_fl_payload(sc, fl, plen); - m0 = pfil_mem2mbuf(frame); goto have_mbuf; } } diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c index f6caddfdf933..4b1fb25e0f82 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c @@ -536,9 +536,8 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) } if (pfil != NULL && PFIL_HOOKED_IN(pfil)) { seglen = MIN(byte_cnt, MLX5E_MAX_RX_BYTES); - rv = pfil_run_hooks(rq->channel->priv->pfil, - rq->mbuf[wqe_counter].data, rq->ifp, - seglen | PFIL_MEMPTR | PFIL_IN, NULL); + rv = pfil_mem_in(rq->channel->priv->pfil, + rq->mbuf[wqe_counter].data, seglen, rq->ifp, &mb); switch (rv) { case PFIL_DROPPED: @@ -556,7 +555,6 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) * and receive the new mbuf allocated * by the Filter */ - mb = pfil_mem2mbuf(rq->mbuf[wqe_counter].data); goto rx_common; default: /* diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 0a500f8e2810..39f3ccea4317 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2732,8 +2732,7 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd, payload = *sd->ifsd_cl; payload += ri->iri_pad; len = ri->iri_len - ri->iri_pad; - *pf_rv = pfil_run_hooks(rxq->pfil, payload, ri->iri_ifp, - len | PFIL_MEMPTR | PFIL_IN, NULL); + *pf_rv = pfil_mem_in(rxq->pfil, payload, len, ri->iri_ifp, &m); switch (*pf_rv) { case PFIL_DROPPED: case PFIL_CONSUMED: @@ -2746,8 +2745,8 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd, case PFIL_REALLOCED: /* * The filter copied it. Everything is recycled. + * 'm' points at new mbuf. */ - m = pfil_mem2mbuf(payload); unload = 0; break; case PFIL_PASS: diff --git a/sys/net/pfil.c b/sys/net/pfil.c index b68fbe8db5c5..e6f3ff8c1269 100644 --- a/sys/net/pfil.c +++ b/sys/net/pfil.c @@ -70,7 +70,8 @@ MTX_SYSINIT(pfil_mtxinit, &pfil_lock, "pfil(9) lock", MTX_DEF); #define PFIL_LOCK_ASSERT() mtx_assert(&pfil_lock, MA_OWNED) struct pfil_hook { - pfil_func_t hook_func; + pfil_mbuf_chk_t hook_mbuf_chk; + pfil_mem_chk_t hook_mem_chk; void *hook_ruleset; int hook_flags; int hook_links; @@ -82,7 +83,8 @@ struct pfil_hook { struct pfil_link { CK_STAILQ_ENTRY(pfil_link) link_chain; - pfil_func_t link_func; + pfil_mbuf_chk_t link_mbuf_chk; + pfil_mem_chk_t link_mem_chk; void *link_ruleset; int link_flags; struct pfil_hook *link_hook; @@ -114,92 +116,86 @@ VNET_DEFINE_STATIC(struct pfilhookhead, pfil_hook_list) = static struct pfil_link *pfil_link_remove(pfil_chain_t *, pfil_hook_t ); static void pfil_link_free(epoch_context_t); -int -pfil_realloc(pfil_packet_t *p, int flags, struct ifnet *ifp) -{ - struct mbuf *m; - - MPASS(flags & PFIL_MEMPTR); - - if ((m = m_devget(p->mem, PFIL_LENGTH(flags), 0, ifp, NULL)) == NULL) - return (ENOMEM); - *p = pfil_packet_align(*p); - *p->m = m; - - return (0); -} - +/* + * To couple a filtering point that provides memory pointer with a filter that + * works on mbufs only. + */ static __noinline int -pfil_fake_mbuf(pfil_func_t func, pfil_packet_t *p, struct ifnet *ifp, int flags, - void *ruleset, struct inpcb *inp) +pfil_fake_mbuf(pfil_mbuf_chk_t func, void *mem, u_int len, struct ifnet *ifp, + int flags, void *ruleset, struct mbuf **mp) { - struct mbuf m, *mp; + struct mbuf m; pfil_return_t rv; (void)m_init(&m, M_NOWAIT, MT_DATA, M_NOFREE | M_PKTHDR); - m_extadd(&m, p->mem, PFIL_LENGTH(flags), NULL, NULL, NULL, 0, - EXT_RXRING); - m.m_len = m.m_pkthdr.len = PFIL_LENGTH(flags); - mp = &m; - flags &= ~(PFIL_MEMPTR | PFIL_LENMASK); - - rv = func(&mp, ifp, flags, ruleset, inp); - if (rv == PFIL_PASS && mp != &m) { + m_extadd(&m, mem, len, NULL, NULL, NULL, 0, EXT_RXRING); + m.m_len = m.m_pkthdr.len = len; + *mp = &m; + + rv = func(mp, ifp, flags, ruleset, NULL); + if (rv == PFIL_PASS && *mp != &m) { /* * Firewalls that need pfil_fake_mbuf() most likely don't * know they need return PFIL_REALLOCED. */ rv = PFIL_REALLOCED; - *p = pfil_packet_align(*p); - *p->m = mp; } return (rv); } -/* - * pfil_run_hooks() runs the specified packet filter hook chain. - */ -int -pfil_run_hooks(struct pfil_head *head, pfil_packet_t p, struct ifnet *ifp, - int flags, struct inpcb *inp) +static __always_inline int +pfil_mem_common(pfil_chain_t *pch, void *mem, u_int len, int flags, + struct ifnet *ifp, struct mbuf **m) { - pfil_chain_t *pch; struct pfil_link *link; pfil_return_t rv; bool realloc = false; NET_EPOCH_ASSERT(); - - if (PFIL_DIR(flags) == PFIL_IN) - pch = &head->head_in; - else if (__predict_true(PFIL_DIR(flags) == PFIL_OUT)) - pch = &head->head_out; - else - panic("%s: bogus flags %d", __func__, flags); + KASSERT(flags == PFIL_IN || flags == PFIL_OUT, + ("%s: unsupported flags %d", __func__, flags)); rv = PFIL_PASS; CK_STAILQ_FOREACH(link, pch, link_chain) { - if ((flags & PFIL_MEMPTR) && !(link->link_flags & PFIL_MEMPTR)) - rv = pfil_fake_mbuf(link->link_func, &p, ifp, flags, - link->link_ruleset, inp); + if (__predict_true(link->link_mem_chk != NULL && !realloc)) + rv = link->link_mem_chk(mem, len, flags, ifp, + link->link_ruleset, m); + else if (!realloc) + rv = pfil_fake_mbuf(link->link_mbuf_chk, mem, len, ifp, + flags, link->link_ruleset, m); else - rv = (*link->link_func)(p, ifp, flags, - link->link_ruleset, inp); + rv = link->link_mbuf_chk(m, ifp, flags, + link->link_ruleset, NULL); + if (rv == PFIL_DROPPED || rv == PFIL_CONSUMED) break; - else if (rv == PFIL_REALLOCED) { - flags &= ~(PFIL_MEMPTR | PFIL_LENMASK); + else if (rv == PFIL_REALLOCED) realloc = true; - } } if (realloc && rv == PFIL_PASS) rv = PFIL_REALLOCED; return (rv); } +int +pfil_mem_in(struct pfil_head *head, void *mem, u_int len, struct ifnet *ifp, + struct mbuf **m) +{ + + return (pfil_mem_common(&head->head_in, mem, len, PFIL_IN, ifp, m)); +} + +int +pfil_mem_out(struct pfil_head *head, void *mem, u_int len, struct ifnet *ifp, + struct mbuf **m) +{ + + return (pfil_mem_common(&head->head_out, mem, len, PFIL_OUT, ifp, m)); +} + static __always_inline int -pfil_mbuf_common(pfil_chain_t *pch, pfil_packet_t p, struct ifnet *ifp, +pfil_mbuf_common(pfil_chain_t *pch, struct mbuf **m, struct ifnet *ifp, int flags, struct inpcb *inp) { struct pfil_link *link; @@ -211,7 +207,8 @@ pfil_mbuf_common(pfil_chain_t *pch, pfil_packet_t p, struct ifnet *ifp, rv = PFIL_PASS; CK_STAILQ_FOREACH(link, pch, link_chain) { - rv = (*link->link_func)(p, ifp, flags, link->link_ruleset, inp); + rv = link->link_mbuf_chk(m, ifp, flags, link->link_ruleset, + inp); if (rv == PFIL_DROPPED || rv == PFIL_CONSUMED) break; } @@ -219,19 +216,19 @@ pfil_mbuf_common(pfil_chain_t *pch, pfil_packet_t p, struct ifnet *ifp, } int -pfil_mbuf_in(struct pfil_head *head, pfil_packet_t p, struct ifnet *ifp, +pfil_mbuf_in(struct pfil_head *head, struct mbuf **m, struct ifnet *ifp, struct inpcb *inp) { - return (pfil_mbuf_common(&head->head_in, p, ifp, PFIL_IN, inp)); + return (pfil_mbuf_common(&head->head_in, m, ifp, PFIL_IN, inp)); } int -pfil_mbuf_out(struct pfil_head *head, pfil_packet_t p, struct ifnet *ifp, +pfil_mbuf_out(struct pfil_head *head, struct mbuf **m, struct ifnet *ifp, struct inpcb *inp) { - return (pfil_mbuf_common(&head->head_out, p, ifp, PFIL_OUT, inp)); + return (pfil_mbuf_common(&head->head_out, m, ifp, PFIL_OUT, inp)); } /* @@ -298,7 +295,8 @@ pfil_add_hook(struct pfil_hook_args *pa) MPASS(pa->pa_version == PFIL_VERSION); hook = malloc(sizeof(struct pfil_hook), M_PFIL, M_WAITOK | M_ZERO); - hook->hook_func = pa->pa_func; + hook->hook_mbuf_chk = pa->pa_mbuf_chk; + hook->hook_mem_chk = pa->pa_mem_chk; hook->hook_ruleset = pa->pa_ruleset; hook->hook_flags = pa->pa_flags; hook->hook_type = pa->pa_type; @@ -416,7 +414,8 @@ pfil_link(struct pfil_link_args *pa) if (pa->pa_flags & PFIL_IN) { in->link_hook = hook; - in->link_func = hook->hook_func; + in->link_mbuf_chk = hook->hook_mbuf_chk; + in->link_mem_chk = hook->hook_mem_chk; in->link_flags = hook->hook_flags; in->link_ruleset = hook->hook_ruleset; if (pa->pa_flags & PFIL_APPEND) @@ -428,7 +427,8 @@ pfil_link(struct pfil_link_args *pa) } if (pa->pa_flags & PFIL_OUT) { out->link_hook = hook; - out->link_func = hook->hook_func; + out->link_mbuf_chk = hook->hook_mbuf_chk; + out->link_mem_chk = hook->hook_mem_chk; out->link_flags = hook->hook_flags; out->link_ruleset = hook->hook_ruleset; if (pa->pa_flags & PFIL_APPEND) diff --git a/sys/net/pfil.h b/sys/net/pfil.h index d5e9eadd8b8c..b99ec6896266 100644 --- a/sys/net/pfil.h +++ b/sys/net/pfil.h @@ -82,41 +82,16 @@ struct pfilioc_link { #define PFIL_OUT 0x00020000 /* UNUSED 0x00040000 */ #define PFIL_DIR(f) ((f) & (PFIL_IN|PFIL_OUT)) -#define PFIL_MEMPTR 0x00080000 #define PFIL_HEADPTR 0x00100000 #define PFIL_HOOKPTR 0x00200000 #define PFIL_APPEND 0x00400000 #define PFIL_UNLINK 0x00800000 -#define PFIL_LENMASK 0x0000ffff -#define PFIL_LENGTH(f) ((f) & PFIL_LENMASK) #ifdef _KERNEL struct mbuf; struct ifnet; struct inpcb; -typedef union { - struct mbuf **m; - void *mem; - uintptr_t __ui; -} pfil_packet_t __attribute__((__transparent_union__)); - -static inline pfil_packet_t -pfil_packet_align(pfil_packet_t p) -{ - - return ((pfil_packet_t ) (((uintptr_t)(p).mem + - (_Alignof(void *) - 1)) & - _Alignof(void *))); -} - -static inline struct mbuf * -pfil_mem2mbuf(void *v) -{ - - return (*(struct mbuf **) (((uintptr_t)(v) + - (_Alignof(void *) - 1)) & - _Alignof(void *))); -} - typedef enum { PFIL_PASS = 0, PFIL_DROPPED, @@ -124,8 +99,11 @@ typedef enum { PFIL_REALLOCED, } pfil_return_t; -typedef pfil_return_t (*pfil_func_t)(pfil_packet_t, struct ifnet *, int, +typedef pfil_return_t (*pfil_mbuf_chk_t)(struct mbuf **, struct ifnet *, int, void *, struct inpcb *); +typedef pfil_return_t (*pfil_mem_chk_t)(void *, u_int, int, struct ifnet *, + void *, struct mbuf **); + /* * A pfil head is created by a packet intercept point. * @@ -142,14 +120,15 @@ typedef struct pfil_head * pfil_head_t; /* * Give us a chance to modify pfil_xxx_args structures in future. */ -#define PFIL_VERSION 1 +#define PFIL_VERSION 2 /* Argument structure used by packet filters to register themselves. */ struct pfil_hook_args { int pa_version; int pa_flags; enum pfil_types pa_type; - pfil_func_t pa_func; + pfil_mbuf_chk_t pa_mbuf_chk; + pfil_mem_chk_t pa_mem_chk; void *pa_ruleset; const char *pa_modname; const char *pa_rulname; @@ -192,12 +171,15 @@ pfil_head_t pfil_head_register(struct pfil_head_args *); void pfil_head_unregister(pfil_head_t); /* Public functions to run the packet inspection by inspection points. */ -int pfil_run_hooks(struct pfil_head *, pfil_packet_t, struct ifnet *, int, +int pfil_mem_in(struct pfil_head *, void *, u_int, struct ifnet *, + struct mbuf **); +int pfil_mem_out(struct pfil_head *, void *, u_int, struct ifnet *, + struct mbuf **); +int pfil_mbuf_in(struct pfil_head *, struct mbuf **, struct ifnet *, struct inpcb *inp); -int pfil_mbuf_in(struct pfil_head *, pfil_packet_t, struct ifnet *, - struct inpcb *inp); -int pfil_mbuf_out(struct pfil_head *, pfil_packet_t, struct ifnet *, +int pfil_mbuf_out(struct pfil_head *, struct mbuf **, struct ifnet *, struct inpcb *inp); + /* * Minimally exposed structure to avoid function call in case of absence * of any filters by protocols and macros to do the check. @@ -209,10 +191,5 @@ struct _pfil_head { #define PFIL_HOOKED_IN(p) (((struct _pfil_head *)(p))->head_nhooksin > 0) #define PFIL_HOOKED_OUT(p) (((struct _pfil_head *)(p))->head_nhooksout > 0) -/* - * Alloc mbuf to be used instead of memory pointer. - */ -int pfil_realloc(pfil_packet_t *, int, struct ifnet *); - #endif /* _KERNEL */ #endif /* _NET_PFIL_H_ */ diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index e21d15212979..7861031b724b 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -1139,18 +1139,16 @@ VNET_DEFINE_STATIC(pfil_hook_t, siftr_inet6_hook); static int siftr_pfil(int action) { - struct pfil_hook_args pha; - struct pfil_link_args pla; - - pha.pa_version = PFIL_VERSION; - pha.pa_flags = PFIL_IN | PFIL_OUT; - pha.pa_modname = "siftr"; - pha.pa_ruleset = NULL; - pha.pa_rulname = "default"; - - pla.pa_version = PFIL_VERSION; - pla.pa_flags = PFIL_IN | PFIL_OUT | - PFIL_HEADPTR | PFIL_HOOKPTR; + struct pfil_hook_args pha = { + .pa_version = PFIL_VERSION, + .pa_flags = PFIL_IN | PFIL_OUT, + .pa_modname = "siftr", + .pa_rulname = "default", + }; + struct pfil_link_args pla = { + .pa_version = PFIL_VERSION, + .pa_flags = PFIL_IN | PFIL_OUT | PFIL_HEADPTR | PFIL_HOOKPTR, + }; VNET_ITERATOR_DECL(vnet_iter); @@ -1159,14 +1157,14 @@ siftr_pfil(int action) CURVNET_SET(vnet_iter); if (action == HOOK) { - pha.pa_func = siftr_chkpkt; + pha.pa_mbuf_chk = siftr_chkpkt; pha.pa_type = PFIL_TYPE_IP4; V_siftr_inet_hook = pfil_add_hook(&pha); pla.pa_hook = V_siftr_inet_hook; pla.pa_head = V_inet_pfil_head; (void)pfil_link(&pla); #ifdef SIFTR_IPV6 - pha.pa_func = siftr_chkpkt6; + pha.pa_mbuf_chk = siftr_chkpkt6; pha.pa_type = PFIL_TYPE_IP6; V_siftr_inet6_hook = pfil_add_hook(&pha); pla.pa_hook = V_siftr_inet6_hook; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 95c8b73e6388..1822d19fbb4c 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -1311,31 +1311,31 @@ int ipf_pfil_unhook(void) { } int ipf_pfil_hook(void) { - struct pfil_hook_args pha; - struct pfil_link_args pla; int error, error6; - pha.pa_version = PFIL_VERSION; - pha.pa_flags = PFIL_IN | PFIL_OUT; - pha.pa_modname = "ipfilter"; - pha.pa_rulname = "default-ip4"; - pha.pa_func = ipf_check_wrapper; - pha.pa_ruleset = NULL; - pha.pa_type = PFIL_TYPE_IP4; + struct pfil_hook_args pha = { + .pa_version = PFIL_VERSION, + .pa_flags = PFIL_IN | PFIL_OUT, + .pa_modname = "ipfilter", + .pa_rulname = "default-ip4", + .pa_mbuf_chk = ipf_check_wrapper, + .pa_type = PFIL_TYPE_IP4, + }; V_ipf_inet_hook = pfil_add_hook(&pha); #ifdef USE_INET6 pha.pa_rulname = "default-ip6"; - pha.pa_func = ipf_check_wrapper6; + pha.pa_mbuf_chk = ipf_check_wrapper6; pha.pa_type = PFIL_TYPE_IP6; V_ipf_inet6_hook = pfil_add_hook(&pha); #endif - pla.pa_version = PFIL_VERSION; - pla.pa_flags = PFIL_IN | PFIL_OUT | - PFIL_HEADPTR | PFIL_HOOKPTR; - pla.pa_head = V_inet_pfil_head; - pla.pa_hook = V_ipf_inet_hook; + struct pfil_link_args pla = { + .pa_version = PFIL_VERSION, + .pa_flags = PFIL_IN | PFIL_OUT | PFIL_HEADPTR | PFIL_HOOKPTR, + .pa_head = V_inet_pfil_head, + .pa_hook = V_ipf_inet_hook, + }; error = pfil_link(&pla); error6 = 0; diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index 29ae06ba7713..ec46c077d8bb 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -327,52 +327,104 @@ again: } /* - * ipfw processing for ethernet packets (in and out). + * ipfw processing for ethernet packets (in and out), mbuf version. */ static pfil_return_t -ipfw_check_frame(pfil_packet_t p, struct ifnet *ifp, int flags, +ipfw_check_frame_mbuf(struct mbuf **m0, struct ifnet *ifp, const int flags, void *ruleset __unused, struct inpcb *inp) { - struct ip_fw_args args; + struct ip_fw_args args = { + .flags = IPFW_ARGS_ETHER | + ((flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT), + .ifp = ifp, + .inp = inp, + }; + struct m_tag *mtag; pfil_return_t ret; - bool mem, realloc; int ipfw; - if (flags & PFIL_MEMPTR) { - mem = true; - realloc = false; - args.flags = PFIL_LENGTH(flags) | IPFW_ARGS_ETHER; - args.mem = p.mem; - } else { - mem = realloc = false; - args.flags = IPFW_ARGS_ETHER; +again: + /* + * Fetch start point from rule, if any. + * Remove the tag if present. + */ + mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); + if (mtag != NULL) { + args.rule = *((struct ipfw_rule_ref *)(mtag+1)); + m_tag_delete(*m0, mtag); + if (args.rule.info & IPFW_ONEPASS) + return (PFIL_PASS); + args.flags |= IPFW_ARGS_REF; } - args.flags |= (flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT; - args.ifp = ifp; - args.inp = inp; + args.m = *m0, -again: - if (!mem) { - /* - * Fetch start point from rule, if any. - * Remove the tag if present. - */ - struct m_tag *mtag; - - mtag = m_tag_locate(*p.m, MTAG_IPFW_RULE, 0, NULL); - if (mtag != NULL) { - args.rule = *((struct ipfw_rule_ref *)(mtag+1)); - m_tag_delete(*p.m, mtag); - if (args.rule.info & IPFW_ONEPASS) - return (PFIL_PASS); - args.flags |= IPFW_ARGS_REF; + ipfw = ipfw_chk(&args); + *m0 = args.m; + + ret = PFIL_PASS; + switch (ipfw) { + case IP_FW_PASS: + break; + + case IP_FW_DENY: + ret = PFIL_DROPPED; + break; + + case IP_FW_DUMMYNET: + if (ip_dn_io_ptr == NULL) { + ret = PFIL_DROPPED; + break; } - args.m = *p.m; + MPASS(args.flags & IPFW_ARGS_REF); + ip_dn_io_ptr(m0, &args); + return (PFIL_CONSUMED); + + case IP_FW_NGTEE: + case IP_FW_NETGRAPH: + if (ng_ipfw_input_p == NULL) { + ret = PFIL_DROPPED; + break; + } + MPASS(args.flags & IPFW_ARGS_REF); + (void )ng_ipfw_input_p(m0, &args, ipfw == IP_FW_NGTEE); + if (ipfw == IP_FW_NGTEE) /* ignore errors for NGTEE */ + goto again; /* continue with packet */ + ret = PFIL_CONSUMED; + break; + + default: + KASSERT(0, ("%s: unknown retval", __func__)); } + if (ret != PFIL_PASS) { + if (*m0) + FREE_PKT(*m0); + *m0 = NULL; + } + + return (ret); +} + +/* + * ipfw processing for ethernet packets (in and out), memory pointer version, + * two in/out accessors. + */ +static pfil_return_t +ipfw_check_frame_mem(void *mem, u_int len, int flags, struct ifnet *ifp, + void *ruleset __unused, struct mbuf **m) +{ + struct ip_fw_args args = { + .flags = len | IPFW_ARGS_ETHER | + ((flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT), + .ifp = ifp, + .mem = mem, + }; + pfil_return_t ret; + int ipfw; + + *m = NULL; +again: ipfw = ipfw_chk(&args); - if (!mem) - *p.m = args.m; ret = PFIL_PASS; switch (ipfw) { @@ -388,16 +440,13 @@ again: ret = PFIL_DROPPED; break; } - if (mem) { - if (pfil_realloc(&p, flags, ifp) != 0) { - ret = PFIL_DROPPED; - break; - } - mem = false; - realloc = true; + *m = m_devget(mem, len, 0, ifp, NULL); + if (*m == NULL) { + ret = PFIL_DROPPED; + break; } MPASS(args.flags & IPFW_ARGS_REF); - ip_dn_io_ptr(p.m, &args); + ip_dn_io_ptr(m, &args); return (PFIL_CONSUMED); case IP_FW_NGTEE: @@ -406,16 +455,13 @@ again: ret = PFIL_DROPPED; break; } - if (mem) { - if (pfil_realloc(&p, flags, ifp) != 0) { - ret = PFIL_DROPPED; - break; - } - mem = false; - realloc = true; + *m = m_devget(mem, len, 0, ifp, NULL); + if (*m == NULL) { + ret = PFIL_DROPPED; + break; } MPASS(args.flags & IPFW_ARGS_REF); - (void )ng_ipfw_input_p(p.m, &args, ipfw == IP_FW_NGTEE); + (void )ng_ipfw_input_p(m, &args, ipfw == IP_FW_NGTEE); if (ipfw == IP_FW_NGTEE) /* ignore errors for NGTEE */ goto again; /* continue with packet */ ret = PFIL_CONSUMED; @@ -425,13 +471,7 @@ again: KASSERT(0, ("%s: unknown retval", __func__)); } - if (!mem && ret != PFIL_PASS) { - if (*p.m) - FREE_PKT(*p.m); - *p.m = NULL; - } - - if (realloc && ret == PFIL_PASS) + if (*m != NULL && ret == PFIL_PASS) ret = PFIL_REALLOCED; return (ret); @@ -543,34 +583,33 @@ VNET_DEFINE_STATIC(pfil_hook_t, ipfw_link_hook); static void ipfw_hook(int pf) { - struct pfil_hook_args pha; + struct pfil_hook_args pha = { + .pa_version = PFIL_VERSION, + .pa_flags = PFIL_IN | PFIL_OUT, + .pa_modname = "ipfw", + }; pfil_hook_t *h; - pha.pa_version = PFIL_VERSION; - pha.pa_flags = PFIL_IN | PFIL_OUT; - pha.pa_modname = "ipfw"; - pha.pa_ruleset = NULL; - switch (pf) { case AF_INET: - pha.pa_func = ipfw_check_packet; + pha.pa_mbuf_chk = ipfw_check_packet; pha.pa_type = PFIL_TYPE_IP4; pha.pa_rulname = "default"; h = &V_ipfw_inet_hook; break; #ifdef INET6 case AF_INET6: - pha.pa_func = ipfw_check_packet; + pha.pa_mbuf_chk = ipfw_check_packet; pha.pa_type = PFIL_TYPE_IP6; pha.pa_rulname = "default6"; h = &V_ipfw_inet6_hook; break; #endif case AF_LINK: - pha.pa_func = ipfw_check_frame; + pha.pa_mbuf_chk = ipfw_check_frame_mbuf; + pha.pa_mem_chk = ipfw_check_frame_mem; pha.pa_type = PFIL_TYPE_ETHERNET; pha.pa_rulname = "default-link"; - pha.pa_flags |= PFIL_MEMPTR; h = &V_ipfw_link_hook; break; } diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 76742aebf01a..cc1f5a5c2138 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -6532,21 +6532,20 @@ VNET_DEFINE_STATIC(pfil_hook_t, pf_ip6_out_hook); static void hook_pf_eth(void) { - struct pfil_hook_args pha; - struct pfil_link_args pla; + struct pfil_hook_args pha = { + .pa_version = PFIL_VERSION, + .pa_modname = "pf", + .pa_type = PFIL_TYPE_ETHERNET, + }; + struct pfil_link_args pla = { + .pa_version = PFIL_VERSION, + }; int ret __diagused; if (atomic_load_bool(&V_pf_pfil_eth_hooked)) return; - pha.pa_version = PFIL_VERSION; - pha.pa_modname = "pf"; - pha.pa_ruleset = NULL; - - pla.pa_version = PFIL_VERSION; - - pha.pa_type = PFIL_TYPE_ETHERNET; - pha.pa_func = pf_eth_check_in; + pha.pa_mbuf_chk = pf_eth_check_in; pha.pa_flags = PFIL_IN; pha.pa_rulname = "eth-in"; V_pf_eth_in_hook = pfil_add_hook(&pha); @@ -6555,7 +6554,7 @@ hook_pf_eth(void) pla.pa_hook = V_pf_eth_in_hook; ret = pfil_link(&pla); MPASS(ret == 0); - pha.pa_func = pf_eth_check_out; + pha.pa_mbuf_chk = pf_eth_check_out; pha.pa_flags = PFIL_OUT; pha.pa_rulname = "eth-out"; V_pf_eth_out_hook = pfil_add_hook(&pha); @@ -6571,22 +6570,21 @@ hook_pf_eth(void) static void hook_pf(void) { - struct pfil_hook_args pha; - struct pfil_link_args pla; + struct pfil_hook_args pha = { + .pa_version = PFIL_VERSION, + .pa_modname = "pf", + }; + struct pfil_link_args pla = { + .pa_version = PFIL_VERSION, + }; int ret __diagused; if (atomic_load_bool(&V_pf_pfil_hooked)) return; - pha.pa_version = PFIL_VERSION; - pha.pa_modname = "pf"; - pha.pa_ruleset = NULL; - - pla.pa_version = PFIL_VERSION; - #ifdef INET pha.pa_type = PFIL_TYPE_IP4; - pha.pa_func = pf_check_in; + pha.pa_mbuf_chk = pf_check_in; pha.pa_flags = PFIL_IN; pha.pa_rulname = "default-in"; V_pf_ip4_in_hook = pfil_add_hook(&pha); @@ -6595,7 +6593,7 @@ hook_pf(void) pla.pa_hook = V_pf_ip4_in_hook; ret = pfil_link(&pla); MPASS(ret == 0); - pha.pa_func = pf_check_out; + pha.pa_mbuf_chk = pf_check_out; pha.pa_flags = PFIL_OUT; pha.pa_rulname = "default-out"; V_pf_ip4_out_hook = pfil_add_hook(&pha); @@ -6607,7 +6605,7 @@ hook_pf(void) #endif #ifdef INET6 pha.pa_type = PFIL_TYPE_IP6; - pha.pa_func = pf_check6_in; + pha.pa_mbuf_chk = pf_check6_in; pha.pa_flags = PFIL_IN; pha.pa_rulname = "default-in6"; V_pf_ip6_in_hook = pfil_add_hook(&pha); @@ -6616,7 +6614,7 @@ hook_pf(void) pla.pa_hook = V_pf_ip6_in_hook; ret = pfil_link(&pla); MPASS(ret == 0); - pha.pa_func = pf_check6_out; + pha.pa_mbuf_chk = pf_check6_out; pha.pa_rulname = "default-out6"; pha.pa_flags = PFIL_OUT; V_pf_ip6_out_hook = pfil_add_hook(&pha); From nobody Tue Feb 14 18:23:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGV2x4Qm9z3pp4t; Tue, 14 Feb 2023 18:23: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 4PGV2x3xFyz3k8t; Tue, 14 Feb 2023 18:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=riN7ley6MZo9lLpD4PqG+wokqJvzhdjxe+hBmdQNlMs=; b=ZIBOoILCmNzwV5wFs5NEqMl3jTcBy08fcdDq6VvcaV7FcDVN0gdMxFWenMZ9NA7tOcmW58 0h7keuKoPqx3SVqspgFZvvg5SuQGiXp/FhSXV4n+Mh6xTaJGeiL+UkNkGdg77jdLWQTstO hwJkwYMFtgMqTirkOhS/55z+jXS7YJou1NbkN5X5YiQowoy7MxAFu6W3vmCx+UYUNOp2GD t3b5GIbDkAz7xy9klgyW6fWx4QLU69hTXrOPAh/BR0I/gUnfQ+kK6LhzJcb54GK5FUG7iA IUlDRb+W7ugzyqIQBsNvdjABTvI0fwWQpEpjL2Ct+5AK3pxn7lwVj3lvPZ1XLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=riN7ley6MZo9lLpD4PqG+wokqJvzhdjxe+hBmdQNlMs=; b=XpJwq7yBcdHaLObVUXoGIS/qRFIQjRFLcBu2j/uUqEpfzMsv86PzvtzQ6v3WhrdYYI6S1y s4Yc5UlRKh5jI7voRyVCJj4TR7xMAepqNxmOdSvWB8oCbl34n7h6Q/r9P5oCCV4qH7FAkc BmNyA8M2y9IFQORs4M895Vg5/mf6/hB4rNlZI50XnB0Wbla+umXHMAf3IlKsd1yCFGMcWB pyExPXr4f5jwrhdYq9XqbyW9WkyWRD60PXCLFYilLR+9b3L0stRNIPBQ+SCTT1gwI4e/A2 d/KqENiDgf9HbGJW/1XWuHH2IffG9/XmpR18nuWDOErEJ8BVWr9tc2lvZHUUDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399033; a=rsa-sha256; cv=none; b=oV5UwWi5fwmMQhyRBgjretXofy6Log0hL5HOiF3PHc5m+VNsia1HkRgsBHhx8r2MrML69T sXLOc5pJ7Lh0ZHKmtoImt77E030Da+wZK6QxGz493axZzpND73Zs34iOtH/qzaHgLoL1tu RqD+cbMX+oGMOLRZwVaxDp2rERuzJ1l4I8I2HntypRMgsrM9I0hMnEnxxIU07fVBgOUd+h +Hjg8oONrvmjhHcnC7fPrhyMTW06Zhkdg3c9v8Eh2z+yVxt6jIX5MnEz7US/UT/jpHFiMk Pq4EuyeS3lJ9+N5M7vUz9Q25FIwf8L9/54slObKQP4XpAFvYb55bCKHwOA6Gbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGV2x310Rz17y6; Tue, 14 Feb 2023 18:23: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 31EINraW087430; Tue, 14 Feb 2023 18:23:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EINree087429; Tue, 14 Feb 2023 18:23:53 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:23:53 GMT Message-Id: <202302141823.31EINree087429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 82e846df5bc2 - main - intrng: sort includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82e846df5bc20418b792f948fa5b558e523f0746 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=82e846df5bc20418b792f948fa5b558e523f0746 commit 82e846df5bc20418b792f948fa5b558e523f0746 Author: Mitchell Horne AuthorDate: 2023-02-04 17:04:30 +0000 Commit: Mitchell Horne CommitDate: 2023-02-14 18:06:00 +0000 intrng: sort includes MFC after: 3 days --- sys/kern/subr_intr.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 17f4a24ab860..96a319b3c8b4 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -42,31 +42,31 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include #include #include -#include -#include #include +#include #include #include -#include -#include -#include -#include -#include -#include #include #include #include #include +#include +#include +#include #include #ifdef HWPMC_HOOKS #include #endif #include -#include #include +#include #include #include From nobody Tue Feb 14 18:23:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGV2y5PS5z3ppCM; Tue, 14 Feb 2023 18:23: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 4PGV2y4qkvz3kJG; Tue, 14 Feb 2023 18:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwpJVWVPLvH8jMW6liC1szJUQCycjz6FDL4TtLYX5yU=; b=cyIxlMT9mJ9EBYIzBLwZUMGxlMtbzVsaj0MUyWcf0cFJBxAYhiZxZPgTKWSiskrk0rVEQm 2BmVu+LwQYJggTtTGgJ9DAANgMhqd1JMfznjBOkGGgXqzE025cVi5HJwSksA+qqi6ymF6e yvabbP5mG7UI0otzvaEr2dEtclAz5f00gwuEf+yqQr5+AqRGyVpeNkOlXc9ResZsxGOXfa GpaNc2b0Pt6xyvFKePvOJ/pAvYPf9s8NJe5OUWskckvshd1yGIyP+E9MlGv/5uU6ilB/Zg 3z/ltmPdVzKTnoteKAw62tHCax4bXmWZOEfBZpF6wr7EoGNkqRwvxE4ZpyZULw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676399034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwpJVWVPLvH8jMW6liC1szJUQCycjz6FDL4TtLYX5yU=; b=PFfRlePlH2WjuP5kMcKmLSv2q5WdpwQE5sxiSdX3VmYgO6Nxkf0ePPMFNAZ2Wg3KiRhBkk R/P32aJnCLZtyIQfS9oFkhK78DGNj3VmRI21lkvnrzP/krofmDQUvk/q4YZuA6YvVK+1oY ttkzWTd/tbmmvuW9GLsOhEDltO2IaT3BjIQ21pn05dvQxbR59Tw7V0fMiVkN6oJYUQ9SSX 9HBpwLpUbzy7mY5IoPkNVYykGfy10e94wfDb1tiToImQ2EckoFsLpZzSVvj3dZsxBJv0IT IYXWnD6L4jqVUlCWFhskbphAGOcKoyVe3gJj2UePiI9A99K8jBp7E9AwJG8Qrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676399034; a=rsa-sha256; cv=none; b=upDPgOCix0OOADQXNnRye5a6DBy0Ar6nQcMH3XNpjWEp4OF6cYTR5m+ZS4EtVvuWyj3ZAN C1rriv9XVfX/zOelisvtxxWpE5AvN8WCtRI8b+UvIJERleENXO64PT5vVHvANa4wVoRXmz WSoC5X6b2MOaXtxTd1Rnfb3lHp41FYWnVSCD6hwzsK8E58SLQnveC03ZEbwKEpBot1no/7 Sbnnnp/4KQOfnf9hHl9c3mFevPI77XNETforhuBJp8TPiZ9A7smHsNloWBuStMBFOnIZSp FvfLBTzwiOvnAdgzF+timAAAZnHtGjedmaW7dj42lKWNHXvUHmw+eXchNzvXxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGV2y3x4rz17wW; Tue, 14 Feb 2023 18:23: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 31EINsTf087460; Tue, 14 Feb 2023 18:23:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EINsQi087459; Tue, 14 Feb 2023 18:23:54 GMT (envelope-from git) Date: Tue, 14 Feb 2023 18:23:54 GMT Message-Id: <202302141823.31EINsQi087459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 28137bdb19aa - main - intrng: track counter allocation with a bitmap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28137bdb19aa34b8351108de4257795a93c0ba09 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=28137bdb19aa34b8351108de4257795a93c0ba09 commit 28137bdb19aa34b8351108de4257795a93c0ba09 Author: Mitchell Horne AuthorDate: 2023-02-14 18:02:12 +0000 Commit: Mitchell Horne CommitDate: 2023-02-14 18:06:00 +0000 intrng: track counter allocation with a bitmap Crucially, this allows releasing counters, and interrupt sources by extension. Where before we were incrementing intrcnt_index with atomics, now we protect the bitmap using the existing isrc_table_lock mutex. Reviewed by: mmel MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38437 --- sys/kern/subr_intr.c | 54 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 96a319b3c8b4..a95d2adbed04 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -152,7 +153,8 @@ u_long *intrcnt; char *intrnames; size_t sintrcnt; size_t sintrnames; -static u_int intrcnt_index; +int nintrcnt; +static bitstr_t *intrcnt_bitmap; static struct intr_irqsrc *intr_map_get_isrc(u_int res_id); static void intr_map_set_isrc(u_int res_id, struct intr_irqsrc *isrc); @@ -166,7 +168,6 @@ static void intr_map_copy_map_data(u_int res_id, device_t *dev, intptr_t *xref, static void intr_irq_init(void *dummy __unused) { - u_int intrcnt_count; SLIST_INIT(&pic_list); mtx_init(&pic_list_lock, "intr pic list", NULL, MTX_DEF); @@ -177,17 +178,21 @@ intr_irq_init(void *dummy __unused) * - 2 counters for each I/O interrupt. * - MAXCPU counters for each IPI counters for SMP. */ - intrcnt_count = intr_nirq * 2; + nintrcnt = intr_nirq * 2; #ifdef SMP - intrcnt_count += INTR_IPI_COUNT * MAXCPU; + nintrcnt += INTR_IPI_COUNT * MAXCPU; #endif - intrcnt = mallocarray(intrcnt_count, sizeof(u_long), M_INTRNG, + intrcnt = mallocarray(nintrcnt, sizeof(u_long), M_INTRNG, M_WAITOK | M_ZERO); - intrnames = mallocarray(intrcnt_count, INTRNAME_LEN, M_INTRNG, + intrnames = mallocarray(nintrcnt, INTRNAME_LEN, M_INTRNG, M_WAITOK | M_ZERO); - sintrcnt = intrcnt_count * sizeof(u_long); - sintrnames = intrcnt_count * INTRNAME_LEN; + sintrcnt = nintrcnt * sizeof(u_long); + sintrnames = nintrcnt * INTRNAME_LEN; + + /* Allocate the bitmap tracking counter allocations. */ + intrcnt_bitmap = bit_alloc(nintrcnt, M_INTRNG, M_WAITOK | M_ZERO); + irq_sources = mallocarray(intr_nirq, sizeof(struct intr_irqsrc*), M_INTRNG, M_WAITOK | M_ZERO); } @@ -266,13 +271,17 @@ isrc_update_name(struct intr_irqsrc *isrc, const char *name) static void isrc_setup_counters(struct intr_irqsrc *isrc) { - u_int index; + int index; + + mtx_assert(&isrc_table_lock, MA_OWNED); /* - * XXX - it does not work well with removable controllers and - * interrupt sources !!! + * Allocate two counter values, the second tracking "stray" interrupts. */ - index = atomic_fetchadd_int(&intrcnt_index, 2); + bit_ffc_area(intrcnt_bitmap, nintrcnt, 2, &index); + if (index == -1) + panic("Failed to allocate 2 counters. Array exhausted?"); + bit_nset(intrcnt_bitmap, index, index + 1); isrc->isrc_index = index; isrc->isrc_count = &intrcnt[index]; isrc_update_name(isrc, NULL); @@ -284,8 +293,11 @@ isrc_setup_counters(struct intr_irqsrc *isrc) static void isrc_release_counters(struct intr_irqsrc *isrc) { + int idx = isrc->isrc_index; - panic("%s: not implemented", __func__); + mtx_assert(&isrc_table_lock, MA_OWNED); + + bit_nclear(intrcnt_bitmap, idx, idx + 1); } #ifdef SMP @@ -298,11 +310,25 @@ intr_ipi_setup_counters(const char *name) u_int index, i; char str[INTRNAME_LEN]; - index = atomic_fetchadd_int(&intrcnt_index, MAXCPU); + mtx_lock(&isrc_table_lock); + + /* + * We should never have a problem finding MAXCPU contiguous counters, + * in practice. Interrupts will be allocated sequentially during boot, + * so the array should fill from low to high index. Once reserved, the + * IPI counters will never be released. Similarly, we will not need to + * allocate more IPIs once the system is running. + */ + bit_ffc_area(intrcnt_bitmap, nintrcnt, MAXCPU, &index); + if (index == -1) + panic("Failed to allocate %d counters. Array exhausted?", + MAXCPU); + bit_nset(intrcnt_bitmap, index, index + MAXCPU - 1); for (i = 0; i < MAXCPU; i++) { snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name); intrcnt_setname(str, index + i); } + mtx_unlock(&isrc_table_lock); return (&intrcnt[index]); } #endif From nobody Tue Feb 14 18:33:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/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 20:44:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGY9l0p7cz3pySk; Tue, 14 Feb 2023 20: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 4PGY9k6WlKz42L6; Tue, 14 Feb 2023 20:44:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676407498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwN4JNUmHJWXshm2qFsAMOVR9WODFvXAUKH+YRpvw8Q=; b=W0hXhKtKYyAbDnoTfBZtgJN1jIbAA/IApuEjTBoCPKVvhY+nSJtVQkSjIZFgASrdnaBAWH 1LRVOI3h8XchpKYEbKXl+YyL0ht0EnIRVDH6IH/W8BAAkmUwjx4FqRbDtb+VpVZLdG55A9 Omooihmj3VwjSAD5nNdPWl+cSQgZUFW1SnVF0APrlFWKtxeIKrBZUuOBZNpuIikJ+C+Ntv D7MJGsLcwa5U2xBKRk8IZYW+aiF96LA6b8KK68FWA+7SVpFeQm0GPOO+1FoSI1MOmHIJNi DWYGhSD/CMh8/KXWTp+ZrPittqEzGAF9P9W5KUhapUFSGH/YQrAnRZ25G4ViZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676407498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwN4JNUmHJWXshm2qFsAMOVR9WODFvXAUKH+YRpvw8Q=; b=niX/TRiTKtSZfPJ4MZKugENjnGwwAIsOYW2TpQohMFkZwkUyB3Esp77Vy1NX/itDTwm4P2 Vc8Kipfua7vIXGhrRmfjYD9e569BWacrRhn3uz4vDHZS1VDPC2sZNyURAxHeguvKBbAJIN x/AAH/YP6IRqV8D7atEAK3hbiDllDsOySWqNRdyHwFXTbOnJ8p8KIPkoT3JCeXupyxIsJB zSKb4pjvCX5afWQjQuYxtOgE7QdEzUitpFS8D+HUS86ZHKa7ocp2oSQpZNi2nuC9vN6l+0 MU/T+/Z0vwjotDDouET3/GilhbBc3djjCw3lNvgEC2llZYUlAkBBZA8+O44e2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676407498; a=rsa-sha256; cv=none; b=s2aSZYz965aakzd453U+pIYHylsZ1u8GAzIf/CiPMxpgaV/rHSGKTZbSX55AZuaW4WE3w6 9VjFh87Y2RhCBp77slr8HPInsY0fFWjOEXYF6uX6XAhJbLPT3fWOnZIBPY/tuoCKcx0EVn 79X66xrSMG/gnFJrMKeWMJrVP4tD4KLuTPlFGde/ZFdoyjfErOmnhwkEFVVVjaQifiRk39 LbK33XWOhWpv7x2gUN7up0fakYnD1zTAEz5ccoMX0z3vrogcoUBGvF1mFLISctHySmREAp 7Wa40Bc7SklYGaqYK9KJGQnSSAocbFBR6ZgxWj2Y/GLCaOvrRtpj/H6Y/p9UJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGY9k5ZgJz1Byy; Tue, 14 Feb 2023 20: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 31EKiwui088700; Tue, 14 Feb 2023 20: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 31EKiw6b088699; Tue, 14 Feb 2023 20:44:58 GMT (envelope-from git) Date: Tue, 14 Feb 2023 20:44:58 GMT Message-Id: <202302142044.31EKiw6b088699@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7b0593fdcbbb - main - Cirrus-CI: use makefs if root size exceeds QEMU's virtual FAT limit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b0593fdcbbb9c73d282fc0024d844c044423b31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7b0593fdcbbb9c73d282fc0024d844c044423b31 commit 7b0593fdcbbb9c73d282fc0024d844c044423b31 Author: Ed Maste AuthorDate: 2023-02-13 17:39:39 +0000 Commit: Ed Maste CommitDate: 2023-02-14 20:41:01 +0000 Cirrus-CI: use makefs if root size exceeds QEMU's virtual FAT limit We use QEMU's virtual FAT support to avoid having to create a disk image because it is much faster, but it has a limit of about 500MB. Artifacts produced by the GCC 12 CI job exceeded this size. Add support for creating a FAT partition image and MBR-partitioned disk image and use it when the file system is too large for QEMU. In one run the Cirrus-CI LLVM test task took 1m33s using QEMU's virtual FAT while the GCC task took 6m48s using makefs+mkimg. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38589 --- tools/boot/ci-qemu-test.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/boot/ci-qemu-test.sh b/tools/boot/ci-qemu-test.sh index e6481c794af5..b730e9725014 100755 --- a/tools/boot/ci-qemu-test.sh +++ b/tools/boot/ci-qemu-test.sh @@ -21,7 +21,7 @@ die() tempdir_cleanup() { trap - EXIT SIGINT SIGHUP SIGTERM SIGQUIT - rm -rf ${ROOTDIR} + rm -rf ${WORKDIR} } tempdir_setup() @@ -99,18 +99,31 @@ arm64) esac # Create a temp dir to hold the boot image. -ROOTDIR=$(mktemp -d -t ci-qemu-test-fat-root) +WORKDIR=$(mktemp -d -t ci-qemu-test-fat-root) +ROOTDIR=${WORKDIR}/stage-root trap tempdir_cleanup EXIT SIGINT SIGHUP SIGTERM SIGQUIT # Populate the boot image in a temp dir. ( cd ${SRCTOP} && tempdir_setup ) +# Using QEMU's virtual FAT support is much faster than creating a disk image, +# but only supports about 500MB. Fall back to creating a disk image if the +# staged root is too large. +hda="fat:${ROOTDIR}" +rootsize=$(du -skA ${ROOTDIR} | sed 's/[[:space:]].*$//') +if [ $rootsize -gt 512000 ]; then + echo "Root size ${rootsize}K too large for QEMU virtual FAT" >&2 + makefs -t msdos -s 1g $WORKDIR/image.fat $ROOTDIR + mkimg -s mbr -p efi:=$WORKDIR/image.fat -o $WORKDIR/image.mbr + hda="$WORKDIR/image.mbr" +fi + # And, boot in QEMU. : ${BOOTLOG:=${TMPDIR:-/tmp}/ci-qemu-test-boot.log} timeout 300 \ $QEMU -m 256M -nodefaults \ -serial stdio -vga none -nographic -monitor none \ - -snapshot -hda fat:${ROOTDIR} 2>&1 | tee ${BOOTLOG} + -snapshot -hda $hda 2>&1 | tee ${BOOTLOG} # Check whether we succesfully booted... if grep -q 'Hello world.' ${BOOTLOG}; then From nobody Tue Feb 14 21:21:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGYzR26wqz3q1Hd; Tue, 14 Feb 2023 21:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGYzR1g0bz44qF; Tue, 14 Feb 2023 21:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676409667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xdX9U6cSLYwSKNSoWvtXD6Vow9fuldcUOrXl/W20UKU=; b=NT8OSmo3bpd48oQtoTOnShvTac6yXAs/givuSYC1ItMpSuLJBe3olY/oIxQkpBszHym/M8 YcAy//vWx8cFtUYpVKrSXZcZ5cDde18QW10gSV0EIG4/KXbXymxnKeB3aFRrgQTkvCeZK9 NvN0WKmmJ0tiPIiyWLIdjsRYZCrG3uWppoeSD3Kk/PF1s8HV/RrYHv75SuTOvlX+IeNk7D Cj8QEo5kjdDaJvVp4nuYcgHs6wfnUwJr98prUIXFdzollh2U8GqLGOeZ5K21sg3U2hyo0t iNzbOnGmMbbkTvwQ/gtlEs8mcdsI7ODhdyb5hZk3km0y0MZro2Olqnt/wB/Pow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676409667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xdX9U6cSLYwSKNSoWvtXD6Vow9fuldcUOrXl/W20UKU=; b=Y5zmDEkzk7L7w8yZ5GzOI27i/tf8GdN2+qp5r5kZ1KnTbMZr5sKmY0qQm9fm6ULZrXQxEP gYhzxoWnRfIX3SXSOFAkSMt9+tzbtcPtk2uhN1hfHP8/xVXos8uBVX+pXDA/Nm6NT4SOH/ zrItt5BOsDqQp62P3bjHx5OSVdDqWldVTnbLgbOcgLfWD8s4iHEccSNt589Wl/1Esb2WPD foUNT0MQY8JIpzPwg4mGgB/ADXQsgLgDswc+nqTg08FCZjG3T9XMANHQ8BsaysDB+zgHwm DauScNOEC2s46ytFshEArFW4Dk10L/f/90dWYrB1k8xlUAIeSnWQgPkB2uenHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676409667; a=rsa-sha256; cv=none; b=sfX4v8XIhr+GAwFqF0nMfCpuctEcCWokNLK8DLAXlowBmaWmK1bazNFi+MO1OusqIXrrJ0 U8VHvm8LxSrUfAybwKAB5L2o3JXK3dhvZKYT9Eq+AEsMscyxgZL16PYn5IgPjkwr80Vgvm ubAIzwh7N/1Zkgo+TsEQPut+n1rp41nyileLoPuGrQjCsdicUBGvbUa3sVgLS4+Zb+sXhp myrpAbv226r1KmNT1qkFWCOvIT2nxN3wdU/53fCXFRaYvxrRLlVYTNWj1G0UgdvhSeJS/g PsCqBo0NPla75808HduB3GRHx5Z83EyfMf9zfQw/zxsHcU3TiLW4kJ+vcB33dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGYzR0jQhz1DLb; Tue, 14 Feb 2023 21:21: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 31ELL7Sb041981; Tue, 14 Feb 2023 21:21:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ELL6Cx041980; Tue, 14 Feb 2023 21:21:06 GMT (envelope-from git) Date: Tue, 14 Feb 2023 21:21:06 GMT Message-Id: <202302142121.31ELL6Cx041980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 1bdf879b97b6 - main - fusefs: fix some resource leaks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bdf879b97b686a8f36fdba050b68f9e7493f363 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1bdf879b97b686a8f36fdba050b68f9e7493f363 commit 1bdf879b97b686a8f36fdba050b68f9e7493f363 Author: Alan Somers AuthorDate: 2023-02-11 23:43:30 +0000 Commit: Alan Somers CommitDate: 2023-02-14 21:19:59 +0000 fusefs: fix some resource leaks fusefs would leak tickets in three cases: * After FUSE_CREATE, if the server returned a bad inode number. * After a FUSE_FALLOCATE operation during VOP_ALLOCATE * After a FUSE_FALLOCATE operation during VOP_DEALLOCATE MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38526 --- sys/fs/fuse/fuse_vnops.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index a088fe318d81..f97a1a52eaad 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -667,6 +667,7 @@ fuse_vnop_allocate(struct vop_allocate_args *ap) } } + fdisp_destroy(&fdi); return (err); } @@ -1103,6 +1104,7 @@ fuse_vnop_create(struct vop_create_args *ap) uint64_t nodeid = feo->nodeid; uint64_t fh_id = foo->fh; + fdisp_destroy(fdip); fdisp_init(fdip, sizeof(*fri)); fdisp_make(fdip, FUSE_RELEASE, mp, nodeid, td, cred); fri = fdip->indata; @@ -3021,6 +3023,7 @@ fuse_vnop_deallocate(struct vop_deallocate_args *ap) err = fdisp_wait_answ(&fdi); if (err == ENOSYS) { + fdisp_destroy(&fdi); fsess_set_notimpl(mp, FUSE_FALLOCATE); goto fallback; } else if (err == EOPNOTSUPP) { @@ -3028,6 +3031,7 @@ fuse_vnop_deallocate(struct vop_deallocate_args *ap) * The file system server does not support FUSE_FALLOCATE with * the supplied mode for this particular file. */ + fdisp_destroy(&fdi); goto fallback; } else if (!err) { /* @@ -3047,6 +3051,7 @@ fuse_vnop_deallocate(struct vop_deallocate_args *ap) } out: + fdisp_destroy(&fdi); if (closefufh) fuse_filehandle_close(vp, fufh, curthread, cred); From nobody Tue Feb 14 21:38:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGZM03jzXz3q28V; Tue, 14 Feb 2023 21:38: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 4PGZM03V2Lz46kv; Tue, 14 Feb 2023 21:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676410684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cn+8GPobxlpLR2OINYm61nbZdorFbbjcuIOkfJeEzXQ=; b=trKuUhUpCTikhE/0CuOkmSx7Ty9onnCx3IvStEnYzDKdyKw6x/QPKpscsOz+6h76+5DQg/ 0/3PEtcMKi3cVgvqKzTjykCiOVYXxprBVXbSBQ1olLwVJt7Kk4yHh1s8X3TmO4sUNiCyhE 5pHAMmWU/clX1o17UH9S+FYfxzhU1Bf3stxEiryvvBMGRVLaiIRRmHxoeVV5Zeb+QDqYWX TeSIYU7giOODMf4oNiFyaWzbF8fjvOyDgPweb93Vi62n9SskscPCChqJcIq5cZ350Zryr3 KKVYsdsMj/phCaqBEdCXnwJVO59cIwIPVF4TmVOR68iHugEP7mqeBCsqJVsCiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676410684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cn+8GPobxlpLR2OINYm61nbZdorFbbjcuIOkfJeEzXQ=; b=xabM7wzNHS4t3GeJpRZBdrA/Sz/O7f8eZUc6wqK3dpy4Z7MkDSqZBPObpyYBwotoWlDPJG 00Zkzh9Gsxaoccni6AySJZOidP/lrNsYAsdu53cSwBYVHMxisDqzEO1zgn5taMyBW0UyJJ 3E0NYVSyqEwzWy1LJfSal3VoOQsrxBDaT5Y9+jfXEjhpJUCITg5CmGO7rzwnsCMCaDGUux c2JMSGPBl2yKYqVKuEXR3Qu22Umi7TRI9nKsKIGimMxehEg0t86B0P7bu8TzWqV94/mDUp BT8ibatmjkrZk5bY6ixvrEjYmX6f9Ub6zzsT3vexLIHUkbyhw/PeFkkXd+hhPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676410684; a=rsa-sha256; cv=none; b=heRCddxsz7lzLvwJ9n1eYBBBqf2tat6lMew8IDRS7W2D7dF6S4RBYipI2FDa+zk0Ur1Epz toKEAjqR6Uyxj2U9txdTpKEIMMg5hkT9th9KMx8r320c+t8par58ckXw7MgpyI1tACul54 KI/VDTV279OJAUwnvmU4FfX/7EifIvKsoT5PNppZnHaA6EODficX+Y3KUxt6UeDDeAz5SK cQrK6RaZfEdLy1PKSADabva3yI3CN6qAzy24RFIxZBxFBGK+eACK76qYjRNmsJjgwlBii4 v+L0E9NovsIDseCyfNjxZpeDUypqpQ1LTWJh/pWRvI4X8Kb4wWdCrPRkRVmzbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGZM02XYqz1DpC; Tue, 14 Feb 2023 21:38: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 31ELc4wK060970; Tue, 14 Feb 2023 21:38:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ELc4aq060969; Tue, 14 Feb 2023 21:38:04 GMT (envelope-from git) Date: Tue, 14 Feb 2023 21:38:04 GMT Message-Id: <202302142138.31ELc4aq060969@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: f0db2b6022df - main - nfsd: Continue adding macros so nfsd can run in a vnet prison List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0db2b6022dfa15f375f5fcdd278b9df21cb88f5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f0db2b6022dfa15f375f5fcdd278b9df21cb88f5 commit f0db2b6022dfa15f375f5fcdd278b9df21cb88f5 Author: Rick Macklem AuthorDate: 2023-02-14 21:33:35 +0000 Commit: Rick Macklem CommitDate: 2023-02-14 21:33:35 +0000 nfsd: Continue adding macros so nfsd can run in a vnet prison Commit 7344856e3a6d added a lot of macros that will front end vnet macros so that nfsd(8) can run in vnet prison. This patch adds some more, to allow the nfsuserd(8) daemon to run in vnet prison, once the macros map to vnet ones. This is the last commit for NFSD_VNET_xxx macros, but there are still some for KRPC_VNET_xxx and KGSS_VNET_xx to allow the rpc.tlsservd(8) and gssd(8) daemons to run in a vnet prison. MFC after: 3 months --- sys/fs/nfs/nfs_commonport.c | 14 ++- sys/fs/nfs/nfs_commonsubs.c | 289 ++++++++++++++++++++++++-------------------- 2 files changed, 169 insertions(+), 134 deletions(-) diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index e45f26d53799..2a2869641d25 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -56,8 +56,6 @@ __FBSDID("$FreeBSD$"); #include extern int nfscl_ticks; -extern nfsuserd_state nfsrv_nfsuserd; -extern struct nfssockreq nfsrv_nfsuserdsock; extern void (*nfsd_call_recall)(struct vnode *, int, struct ucred *, struct thread *); extern int nfsrv_useacl; @@ -77,6 +75,9 @@ uint32_t nfs_srvmaxio = NFS_SRVMAXIO; NFSD_VNET_DEFINE(struct nfsstatsv1 *, nfsstatsv1_p); +NFSD_VNET_DECLARE(struct nfssockreq, nfsrv_nfsuserdsock); +NFSD_VNET_DECLARE(nfsuserd_state, nfsrv_nfsuserd); + int nfs_pnfsio(task_fn_t *, void *); static int nfs_realign_test; @@ -857,6 +858,7 @@ nfs_clean(struct prison *pr) { NFSD_CURVNET_SET(pr->pr_vnet); + mtx_destroy(&NFSD_VNET(nfsrv_nfsuserdsock).nr_mtx); if (pr != &prison0) free(NFSD_VNET(nfsstatsv1_p), M_TEMP); /* Clean out the name<-->id cache. */ @@ -876,6 +878,8 @@ nfs_vnetinit(const void *unused __unused) else NFSD_VNET(nfsstatsv1_p) = malloc(sizeof(struct nfsstatsv1), M_TEMP, M_WAITOK | M_ZERO); + mtx_init(&NFSD_VNET(nfsrv_nfsuserdsock).nr_mtx, "nfsuserd", + NULL, MTX_DEF); } SYSINIT(nfs_vnetinit, SI_SUB_VNET_DONE, SI_ORDER_ANY, nfs_vnetinit, NULL); @@ -900,8 +904,6 @@ nfscommon_modevent(module_t mod, int type, void *data) mtx_init(&nfs_sockl_mutex, "nfs_sockl_mutex", NULL, MTX_DEF); mtx_init(&nfs_slock_mutex, "nfs_slock_mutex", NULL, MTX_DEF); mtx_init(&nfs_req_mutex, "nfs_req_mutex", NULL, MTX_DEF); - mtx_init(&nfsrv_nfsuserdsock.nr_mtx, "nfsuserd", NULL, - MTX_DEF); mtx_init(&nfsrv_dslock_mtx, "nfs4ds", NULL, MTX_DEF); TAILQ_INIT(&nfsrv_devidhead); newnfs_init(); @@ -910,7 +912,8 @@ nfscommon_modevent(module_t mod, int type, void *data) break; case MOD_UNLOAD: - if (newnfs_numnfsd != 0 || nfsrv_nfsuserd != NOTRUNNING || + if (newnfs_numnfsd != 0 || + NFSD_VNET(nfsrv_nfsuserd) != NOTRUNNING || nfs_numnfscbd != 0) { error = EBUSY; break; @@ -926,7 +929,6 @@ nfscommon_modevent(module_t mod, int type, void *data) mtx_destroy(&nfs_sockl_mutex); mtx_destroy(&nfs_slock_mutex); mtx_destroy(&nfs_req_mutex); - mtx_destroy(&nfsrv_nfsuserdsock.nr_mtx); mtx_destroy(&nfsrv_dslock_mtx); loaded = 0; break; diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index c974e029efa8..e2e15063cf99 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -66,17 +66,10 @@ enum vtype nv34tov_type[8]={ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO }; struct timeval nfsboottime; /* Copy boottime once, so it never changes */ int nfscl_ticks; int nfsrv_useacl = 1; -struct nfssockreq nfsrv_nfsuserdsock; -nfsuserd_state nfsrv_nfsuserd = NOTRUNNING; -static int nfsrv_userdupcalls = 0; struct nfsreqhead nfsd_reqq; -uid_t nfsrv_defaultuid = UID_NOBODY; -gid_t nfsrv_defaultgid = GID_NOGROUP; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; -int nfsd_enable_stringtouid = 0; int nfsrv_doflexfile = 0; -static int nfs_enable_uidtostring = 0; NFSNAMEIDMUTEX; NFSSOCKMUTEX; extern int nfsrv_lughashsize; @@ -87,9 +80,20 @@ extern struct nfsdevicehead nfsrv_devidhead; extern struct nfsstatsv1 nfsstatsv1; extern uint32_t nfs_srvmaxio; +NFSD_VNET_DEFINE(int, nfsd_enable_stringtouid) = 0; +NFSD_VNET_DEFINE(struct nfssockreq, nfsrv_nfsuserdsock); +NFSD_VNET_DEFINE(nfsuserd_state, nfsrv_nfsuserd) = NOTRUNNING; +NFSD_VNET_DEFINE(uid_t, nfsrv_defaultuid) = UID_NOBODY; +NFSD_VNET_DEFINE(gid_t, nfsrv_defaultgid) = GID_NOGROUP; + +NFSD_VNET_DEFINE_STATIC(int, nfsrv_userdupcalls) = 0; + SYSCTL_DECL(_vfs_nfs); -SYSCTL_INT(_vfs_nfs, OID_AUTO, enable_uidtostring, CTLFLAG_RW, - &nfs_enable_uidtostring, 0, "Make nfs always send numeric owner_names"); + +NFSD_VNET_DEFINE_STATIC(int, nfs_enable_uidtostring) = 0; +SYSCTL_INT(_vfs_nfs, OID_AUTO, enable_uidtostring, + CTLFLAG_NFSD_VNET | CTLFLAG_RW, &NFSD_VNET_NAME(nfs_enable_uidtostring), 0, + "Make nfs always send numeric owner_names"); int nfsrv_maxpnfsmirror = 1; SYSCTL_INT(_vfs_nfs, OID_AUTO, pnfsmirror, CTLFLAG_RD, @@ -192,18 +196,19 @@ struct nfsv4_opflag nfsv4_opflag[NFSV42_NOPS] = { }; static int ncl_mbuf_mhlen = MHLEN; -static int nfsrv_usercnt = 0; -static int nfsrv_dnsnamelen; -static u_char *nfsrv_dnsname = NULL; -static int nfsrv_usermax = 999999999; struct nfsrv_lughash { struct mtx mtx; struct nfsuserhashhead lughead; }; -static struct nfsrv_lughash *nfsuserhash; -static struct nfsrv_lughash *nfsusernamehash; -static struct nfsrv_lughash *nfsgrouphash; -static struct nfsrv_lughash *nfsgroupnamehash; + +NFSD_VNET_DEFINE_STATIC(int, nfsrv_usercnt) = 0; +NFSD_VNET_DEFINE_STATIC(int, nfsrv_dnsnamelen) = 0; +NFSD_VNET_DEFINE_STATIC(int, nfsrv_usermax) = 999999999; +NFSD_VNET_DEFINE_STATIC(struct nfsrv_lughash *, nfsuserhash) = NULL; +NFSD_VNET_DEFINE_STATIC(struct nfsrv_lughash *, nfsusernamehash) = NULL; +NFSD_VNET_DEFINE_STATIC(struct nfsrv_lughash *, nfsgrouphash) = NULL; +NFSD_VNET_DEFINE_STATIC(struct nfsrv_lughash *, nfsgroupnamehash) = NULL; +NFSD_VNET_DEFINE_STATIC(u_char *, nfsrv_dnsname) = NULL; /* * This static array indicates whether or not the RPC generates a large @@ -1245,6 +1250,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, #endif CTASSERT(sizeof(ino_t) == sizeof(uint64_t)); + NFSD_CURVNET_SET_QUIET(NFSD_TD_TO_VNET(curthread)); if (compare) { retnotsup = 0; error = nfsrv_getattrbits(nd, &attrbits, NULL, &retnotsup); @@ -1870,7 +1876,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, } } else if (nap != NULL) { if (nfsv4_strtouid(nd, cp, j, &uid)) - nap->na_uid = nfsrv_defaultuid; + nap->na_uid = + NFSD_VNET(nfsrv_defaultuid); else nap->na_uid = uid; } @@ -1903,7 +1910,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, } } else if (nap != NULL) { if (nfsv4_strtogid(nd, cp, j, &gid)) - nap->na_gid = nfsrv_defaultgid; + nap->na_gid = + NFSD_VNET(nfsrv_defaultgid); else nap->na_gid = gid; } @@ -2266,6 +2274,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, error = nfsm_advance(nd, attrsize - attrsum, -1); } nfsmout: + NFSD_CURVNET_RESTORE(); NFSEXITCODE2(error, nd); return (error); } @@ -3142,14 +3151,16 @@ nfsv4_uidtostr(uid_t uid, u_char **cpp, int *retlenp) int cnt, hasampersand, len = NFSV4_SMALLSTR, ret; struct nfsrv_lughash *hp; + NFSD_CURVNET_SET_QUIET(NFSD_TD_TO_VNET(curthread)); cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0 && !nfs_enable_uidtostring) { + if (NFSD_VNET(nfsrv_dnsnamelen) > 0 && + !NFSD_VNET(nfs_enable_uidtostring)) { /* * Always map nfsrv_defaultuid to "nobody". */ - if (uid == nfsrv_defaultuid) { - i = nfsrv_dnsnamelen + 7; + if (uid == NFSD_VNET(nfsrv_defaultuid)) { + i = NFSD_VNET(nfsrv_dnsnamelen) + 7; if (i > len) { if (len > NFSV4_SMALLSTR) free(cp, M_NFSSTRING); @@ -3161,7 +3172,9 @@ tryagain: *retlenp = i; NFSBCOPY("nobody@", cp, 7); cp += 7; - NFSBCOPY(nfsrv_dnsname, cp, nfsrv_dnsnamelen); + NFSBCOPY(NFSD_VNET(nfsrv_dnsname), cp, + NFSD_VNET(nfsrv_dnsnamelen)); + NFSD_CURVNET_RESTORE(); return; } hasampersand = 0; @@ -3185,7 +3198,7 @@ tryagain: i = usrp->lug_namelen; else i = usrp->lug_namelen + - nfsrv_dnsnamelen + 1; + NFSD_VNET(nfsrv_dnsnamelen) + 1; if (i > len) { mtx_unlock(&hp->mtx); if (len > NFSV4_SMALLSTR) @@ -3200,12 +3213,14 @@ tryagain: if (!hasampersand) { cp += usrp->lug_namelen; *cp++ = '@'; - NFSBCOPY(nfsrv_dnsname, cp, nfsrv_dnsnamelen); + NFSBCOPY(NFSD_VNET(nfsrv_dnsname), cp, + NFSD_VNET(nfsrv_dnsnamelen)); } TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); TAILQ_INSERT_TAIL(&hp->lughead, usrp, lug_numhash); mtx_unlock(&hp->mtx); + NFSD_CURVNET_RESTORE(); return; } } @@ -3233,6 +3248,7 @@ tryagain: *cp-- = '0' + (tmp % 10); tmp /= 10; } + NFSD_CURVNET_RESTORE(); return; } @@ -3253,7 +3269,7 @@ nfsrv_getgrpscred(struct ucred *oldcred) cnt = 0; uid = oldcred->cr_uid; tryagain: - if (nfsrv_dnsnamelen > 0) { + if (NFSD_VNET(nfsrv_dnsnamelen) > 0) { hp = NFSUSERHASH(uid); mtx_lock(&hp->mtx); TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { @@ -3300,6 +3316,7 @@ nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp) uid_t tuid; struct nfsrv_lughash *hp, *hp2; + NFSD_CURVNET_SET_QUIET(NFSD_TD_TO_VNET(curthread)); if (len == 0) { error = NFSERR_BADOWNER; goto out; @@ -3311,7 +3328,7 @@ nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp) /* A numeric string. */ if ((nd->nd_flag & ND_KERBV) == 0 && ((nd->nd_flag & ND_NFSCL) != 0 || - nfsd_enable_stringtouid != 0)) + NFSD_VNET(nfsd_enable_stringtouid) != 0)) *uidp = tuid; else error = NFSERR_BADOWNER; @@ -3328,7 +3345,7 @@ nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp) cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0) { + if (NFSD_VNET(nfsrv_dnsnamelen) > 0) { /* * If an '@' is found and the domain name matches, search for * the name with dns stripped off. @@ -3336,9 +3353,10 @@ tryagain: * all upper case will not. */ if (cnt == 0 && i < len && i > 0 && - (len - 1 - i) == nfsrv_dnsnamelen && - !nfsrv_cmpmixedcase(cp, nfsrv_dnsname, nfsrv_dnsnamelen)) { - len -= (nfsrv_dnsnamelen + 1); + (len - 1 - i) == NFSD_VNET(nfsrv_dnsnamelen) && + !nfsrv_cmpmixedcase(cp, + NFSD_VNET(nfsrv_dnsname), NFSD_VNET(nfsrv_dnsnamelen))) { + len -= (NFSD_VNET(nfsrv_dnsnamelen) + 1); *(cp - 1) = '\0'; } @@ -3346,7 +3364,7 @@ tryagain: * Check for the special case of "nobody". */ if (len == 6 && !NFSBCMP(str, "nobody", 6)) { - *uidp = nfsrv_defaultuid; + *uidp = NFSD_VNET(nfsrv_defaultuid); error = 0; goto out; } @@ -3380,6 +3398,7 @@ tryagain: error = NFSERR_BADOWNER; out: + NFSD_CURVNET_RESTORE(); NFSEXITCODE(error); return (error); } @@ -3401,14 +3420,16 @@ nfsv4_gidtostr(gid_t gid, u_char **cpp, int *retlenp) int cnt, hasampersand, len = NFSV4_SMALLSTR, ret; struct nfsrv_lughash *hp; + NFSD_CURVNET_SET_QUIET(NFSD_TD_TO_VNET(curthread)); cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0 && !nfs_enable_uidtostring) { + if (NFSD_VNET(nfsrv_dnsnamelen) > 0 && + !NFSD_VNET(nfs_enable_uidtostring)) { /* * Always map nfsrv_defaultgid to "nogroup". */ - if (gid == nfsrv_defaultgid) { - i = nfsrv_dnsnamelen + 8; + if (gid == NFSD_VNET(nfsrv_defaultgid)) { + i = NFSD_VNET(nfsrv_dnsnamelen) + 8; if (i > len) { if (len > NFSV4_SMALLSTR) free(cp, M_NFSSTRING); @@ -3420,7 +3441,9 @@ tryagain: *retlenp = i; NFSBCOPY("nogroup@", cp, 8); cp += 8; - NFSBCOPY(nfsrv_dnsname, cp, nfsrv_dnsnamelen); + NFSBCOPY(NFSD_VNET(nfsrv_dnsname), cp, + NFSD_VNET(nfsrv_dnsnamelen)); + NFSD_CURVNET_RESTORE(); return; } hasampersand = 0; @@ -3444,7 +3467,7 @@ tryagain: i = usrp->lug_namelen; else i = usrp->lug_namelen + - nfsrv_dnsnamelen + 1; + NFSD_VNET(nfsrv_dnsnamelen) + 1; if (i > len) { mtx_unlock(&hp->mtx); if (len > NFSV4_SMALLSTR) @@ -3459,12 +3482,14 @@ tryagain: if (!hasampersand) { cp += usrp->lug_namelen; *cp++ = '@'; - NFSBCOPY(nfsrv_dnsname, cp, nfsrv_dnsnamelen); + NFSBCOPY(NFSD_VNET(nfsrv_dnsname), cp, + NFSD_VNET(nfsrv_dnsnamelen)); } TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); TAILQ_INSERT_TAIL(&hp->lughead, usrp, lug_numhash); mtx_unlock(&hp->mtx); + NFSD_CURVNET_RESTORE(); return; } } @@ -3492,6 +3517,7 @@ tryagain: *cp-- = '0' + (tmp % 10); tmp /= 10; } + NFSD_CURVNET_RESTORE(); return; } @@ -3514,6 +3540,7 @@ nfsv4_strtogid(struct nfsrv_descript *nd, u_char *str, int len, gid_t *gidp) gid_t tgid; struct nfsrv_lughash *hp, *hp2; + NFSD_CURVNET_SET_QUIET(NFSD_TD_TO_VNET(curthread)); if (len == 0) { error = NFSERR_BADOWNER; goto out; @@ -3525,7 +3552,7 @@ nfsv4_strtogid(struct nfsrv_descript *nd, u_char *str, int len, gid_t *gidp) /* A numeric string. */ if ((nd->nd_flag & ND_KERBV) == 0 && ((nd->nd_flag & ND_NFSCL) != 0 || - nfsd_enable_stringtouid != 0)) + NFSD_VNET(nfsd_enable_stringtouid) != 0)) *gidp = tgid; else error = NFSERR_BADOWNER; @@ -3542,15 +3569,16 @@ nfsv4_strtogid(struct nfsrv_descript *nd, u_char *str, int len, gid_t *gidp) cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0) { + if (NFSD_VNET(nfsrv_dnsnamelen) > 0) { /* * If an '@' is found and the dns name matches, search for the * name with the dns stripped off. */ if (cnt == 0 && i < len && i > 0 && - (len - 1 - i) == nfsrv_dnsnamelen && - !nfsrv_cmpmixedcase(cp, nfsrv_dnsname, nfsrv_dnsnamelen)) { - len -= (nfsrv_dnsnamelen + 1); + (len - 1 - i) == NFSD_VNET(nfsrv_dnsnamelen) && + !nfsrv_cmpmixedcase(cp, + NFSD_VNET(nfsrv_dnsname), NFSD_VNET(nfsrv_dnsnamelen))) { + len -= (NFSD_VNET(nfsrv_dnsnamelen) + 1); *(cp - 1) = '\0'; } @@ -3558,7 +3586,7 @@ tryagain: * Check for the special case of "nogroup". */ if (len == 7 && !NFSBCMP(str, "nogroup", 7)) { - *gidp = nfsrv_defaultgid; + *gidp = NFSD_VNET(nfsrv_defaultgid); error = 0; goto out; } @@ -3592,6 +3620,7 @@ tryagain: error = NFSERR_BADOWNER; out: + NFSD_CURVNET_RESTORE(); NFSEXITCODE(error); return (error); } @@ -3642,12 +3671,12 @@ nfsrv_nfsuserdport(struct nfsuserd_args *nargs, NFSPROC_T *p) int error; NFSLOCKNAMEID(); - if (nfsrv_nfsuserd != NOTRUNNING) { + if (NFSD_VNET(nfsrv_nfsuserd) != NOTRUNNING) { NFSUNLOCKNAMEID(); error = EPERM; goto out; } - nfsrv_nfsuserd = STARTSTOP; + NFSD_VNET(nfsrv_nfsuserd) = STARTSTOP; /* * Set up the socket record and connect. * Set nr_client NULL before unlocking, just to ensure that no other @@ -3655,7 +3684,7 @@ nfsrv_nfsuserdport(struct nfsuserd_args *nargs, NFSPROC_T *p) * occur if the use of the nameid lock to protect nfsrv_nfsuserd is * broken. */ - rp = &nfsrv_nfsuserdsock; + rp = &NFSD_VNET(nfsrv_nfsuserdsock); rp->nr_client = NULL; NFSUNLOCKNAMEID(); rp->nr_sotype = SOCK_DGRAM; @@ -3696,12 +3725,12 @@ nfsrv_nfsuserdport(struct nfsuserd_args *nargs, NFSPROC_T *p) &rp->nr_client); if (error == 0) { NFSLOCKNAMEID(); - nfsrv_nfsuserd = RUNNING; + NFSD_VNET(nfsrv_nfsuserd) = RUNNING; NFSUNLOCKNAMEID(); } else { free(rp->nr_nam, M_SONAME); NFSLOCKNAMEID(); - nfsrv_nfsuserd = NOTRUNNING; + NFSD_VNET(nfsrv_nfsuserd) = NOTRUNNING; NFSUNLOCKNAMEID(); } out: @@ -3717,20 +3746,20 @@ nfsrv_nfsuserddelport(void) { NFSLOCKNAMEID(); - if (nfsrv_nfsuserd != RUNNING) { + if (NFSD_VNET(nfsrv_nfsuserd) != RUNNING) { NFSUNLOCKNAMEID(); return; } - nfsrv_nfsuserd = STARTSTOP; + NFSD_VNET(nfsrv_nfsuserd) = STARTSTOP; /* Wait for all upcalls to complete. */ - while (nfsrv_userdupcalls > 0) - msleep(&nfsrv_userdupcalls, NFSNAMEIDMUTEXPTR, PVFS, + while (NFSD_VNET(nfsrv_userdupcalls) > 0) + msleep(&NFSD_VNET(nfsrv_userdupcalls), NFSNAMEIDMUTEXPTR, PVFS, "nfsupcalls", 0); NFSUNLOCKNAMEID(); - newnfs_disconnect(NULL, &nfsrv_nfsuserdsock); - free(nfsrv_nfsuserdsock.nr_nam, M_SONAME); + newnfs_disconnect(NULL, &NFSD_VNET(nfsrv_nfsuserdsock)); + free(NFSD_VNET(nfsrv_nfsuserdsock).nr_nam, M_SONAME); NFSLOCKNAMEID(); - nfsrv_nfsuserd = NOTRUNNING; + NFSD_VNET(nfsrv_nfsuserd) = NOTRUNNING; NFSUNLOCKNAMEID(); } @@ -3750,7 +3779,7 @@ nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name) int error; NFSLOCKNAMEID(); - if (nfsrv_nfsuserd != RUNNING) { + if (NFSD_VNET(nfsrv_nfsuserd) != RUNNING) { NFSUNLOCKNAMEID(); error = EPERM; goto out; @@ -3759,9 +3788,9 @@ nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name) * Maintain a count of upcalls in progress, so that nfsrv_X() * can wait until no upcalls are in progress. */ - nfsrv_userdupcalls++; + NFSD_VNET(nfsrv_userdupcalls)++; NFSUNLOCKNAMEID(); - KASSERT(nfsrv_userdupcalls > 0, + KASSERT(NFSD_VNET(nfsrv_userdupcalls) > 0, ("nfsrv_getuser: non-positive upcalls")); nd = &nfsd; cred = newnfs_getcred(); @@ -3779,11 +3808,13 @@ nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name) len = strlen(name); (void) nfsm_strtom(nd, name, len); } - error = newnfs_request(nd, NULL, NULL, &nfsrv_nfsuserdsock, NULL, NULL, - cred, RPCPROG_NFSUSERD, RPCNFSUSERD_VERS, NULL, 0, NULL, NULL); + error = newnfs_request(nd, NULL, NULL, &NFSD_VNET(nfsrv_nfsuserdsock), + NULL, NULL, cred, RPCPROG_NFSUSERD, RPCNFSUSERD_VERS, NULL, 0, + NULL, NULL); NFSLOCKNAMEID(); - if (--nfsrv_userdupcalls == 0 && nfsrv_nfsuserd == STARTSTOP) - wakeup(&nfsrv_userdupcalls); + if (--NFSD_VNET(nfsrv_userdupcalls) == 0 && + NFSD_VNET(nfsrv_nfsuserd) == STARTSTOP) + wakeup(&NFSD_VNET(nfsrv_userdupcalls)); NFSUNLOCKNAMEID(); NFSFREECRED(cred); if (!error) { @@ -3823,7 +3854,8 @@ nfssvc_idname(struct nfsd_idargs *nidp) free(cp, M_NFSSTRING); goto out; } - if (atomic_cmpset_acq_int(&nfsrv_dnsnamelen, 0, 0) == 0) { + if (atomic_cmpset_acq_int(&NFSD_VNET(nfsrv_dnsnamelen), 0, 0) == + 0) { /* * Free up all the old stuff and reinitialize hash * lists. All mutexes for both lists must be locked, @@ -3831,80 +3863,81 @@ nfssvc_idname(struct nfsd_idargs *nidp) * ones, to avoid a LOR. */ for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsusernamehash[i].mtx); + mtx_lock(&NFSD_VNET(nfsusernamehash)[i].mtx); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsuserhash[i].mtx); + mtx_lock(&NFSD_VNET(nfsuserhash)[i].mtx); for (i = 0; i < nfsrv_lughashsize; i++) TAILQ_FOREACH_SAFE(usrp, - &nfsuserhash[i].lughead, lug_numhash, nusrp) + &NFSD_VNET(nfsuserhash)[i].lughead, lug_numhash, nusrp) nfsrv_removeuser(usrp, 1); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_unlock(&nfsuserhash[i].mtx); + mtx_unlock(&NFSD_VNET(nfsuserhash)[i].mtx); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_unlock(&nfsusernamehash[i].mtx); + mtx_unlock(&NFSD_VNET(nfsusernamehash)[i].mtx); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsgroupnamehash[i].mtx); + mtx_lock(&NFSD_VNET(nfsgroupnamehash)[i].mtx); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsgrouphash[i].mtx); + mtx_lock(&NFSD_VNET(nfsgrouphash)[i].mtx); for (i = 0; i < nfsrv_lughashsize; i++) TAILQ_FOREACH_SAFE(usrp, - &nfsgrouphash[i].lughead, lug_numhash, + &NFSD_VNET(nfsgrouphash)[i].lughead, lug_numhash, nusrp) nfsrv_removeuser(usrp, 0); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_unlock(&nfsgrouphash[i].mtx); + mtx_unlock(&NFSD_VNET(nfsgrouphash)[i].mtx); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_unlock(&nfsgroupnamehash[i].mtx); - free(nfsrv_dnsname, M_NFSSTRING); - nfsrv_dnsname = NULL; + mtx_unlock(&NFSD_VNET(nfsgroupnamehash)[i].mtx); + free(NFSD_VNET(nfsrv_dnsname), M_NFSSTRING); + NFSD_VNET(nfsrv_dnsname) = NULL; } - if (nfsuserhash == NULL) { + if (NFSD_VNET(nfsuserhash) == NULL) { /* Allocate the hash tables. */ - nfsuserhash = malloc(sizeof(struct nfsrv_lughash) * + NFSD_VNET(nfsuserhash) = malloc(sizeof(struct nfsrv_lughash) * nfsrv_lughashsize, M_NFSUSERGROUP, M_WAITOK | M_ZERO); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_init(&nfsuserhash[i].mtx, "nfsuidhash", + mtx_init(&NFSD_VNET(nfsuserhash)[i].mtx, "nfsuidhash", NULL, MTX_DEF | MTX_DUPOK); - nfsusernamehash = malloc(sizeof(struct nfsrv_lughash) * + NFSD_VNET(nfsusernamehash) = malloc(sizeof(struct nfsrv_lughash) * nfsrv_lughashsize, M_NFSUSERGROUP, M_WAITOK | M_ZERO); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_init(&nfsusernamehash[i].mtx, + mtx_init(&NFSD_VNET(nfsusernamehash)[i].mtx, "nfsusrhash", NULL, MTX_DEF | MTX_DUPOK); - nfsgrouphash = malloc(sizeof(struct nfsrv_lughash) * + NFSD_VNET(nfsgrouphash) = malloc(sizeof(struct nfsrv_lughash) * nfsrv_lughashsize, M_NFSUSERGROUP, M_WAITOK | M_ZERO); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_init(&nfsgrouphash[i].mtx, "nfsgidhash", + mtx_init(&NFSD_VNET(nfsgrouphash)[i].mtx, "nfsgidhash", NULL, MTX_DEF | MTX_DUPOK); - nfsgroupnamehash = malloc(sizeof(struct nfsrv_lughash) * + NFSD_VNET(nfsgroupnamehash) = malloc(sizeof(struct nfsrv_lughash) * nfsrv_lughashsize, M_NFSUSERGROUP, M_WAITOK | M_ZERO); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_init(&nfsgroupnamehash[i].mtx, + mtx_init(&NFSD_VNET(nfsgroupnamehash)[i].mtx, "nfsgrphash", NULL, MTX_DEF | MTX_DUPOK); } /* (Re)initialize the list heads. */ for (i = 0; i < nfsrv_lughashsize; i++) - TAILQ_INIT(&nfsuserhash[i].lughead); + TAILQ_INIT(&NFSD_VNET(nfsuserhash)[i].lughead); for (i = 0; i < nfsrv_lughashsize; i++) - TAILQ_INIT(&nfsusernamehash[i].lughead); + TAILQ_INIT(&NFSD_VNET(nfsusernamehash)[i].lughead); for (i = 0; i < nfsrv_lughashsize; i++) - TAILQ_INIT(&nfsgrouphash[i].lughead); + TAILQ_INIT(&NFSD_VNET(nfsgrouphash)[i].lughead); for (i = 0; i < nfsrv_lughashsize; i++) - TAILQ_INIT(&nfsgroupnamehash[i].lughead); + TAILQ_INIT(&NFSD_VNET(nfsgroupnamehash)[i].lughead); /* * Put name in "DNS" string. */ - nfsrv_dnsname = cp; - nfsrv_defaultuid = nidp->nid_uid; - nfsrv_defaultgid = nidp->nid_gid; - nfsrv_usercnt = 0; - nfsrv_usermax = nidp->nid_usermax; - atomic_store_rel_int(&nfsrv_dnsnamelen, nidp->nid_namelen); + NFSD_VNET(nfsrv_dnsname) = cp; + NFSD_VNET(nfsrv_defaultuid) = nidp->nid_uid; + NFSD_VNET(nfsrv_defaultgid) = nidp->nid_gid; + NFSD_VNET(nfsrv_usercnt) = 0; + NFSD_VNET(nfsrv_usermax) = nidp->nid_usermax; + atomic_store_rel_int(&NFSD_VNET(nfsrv_dnsnamelen), + nidp->nid_namelen); goto out; } @@ -3931,7 +3964,7 @@ nfssvc_idname(struct nfsd_idargs *nidp) cr->cr_uid = cr->cr_ruid = cr->cr_svuid = nidp->nid_uid; crsetgroups(cr, nidp->nid_ngroup, grps); cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; - cr->cr_prison = &prison0; + cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); #ifdef MAC mac_cred_associate_nfsd(cr); @@ -3963,7 +3996,7 @@ nfssvc_idname(struct nfsd_idargs *nidp) if (nidp->nid_flag & (NFSID_DELUID | NFSID_ADDUID)) { /* Must lock all username hash lists first, to avoid a LOR. */ for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsusernamehash[i].mtx); + mtx_lock(&NFSD_VNET(nfsusernamehash)[i].mtx); username_locked = 1; hp_idnum = NFSUSERHASH(nidp->nid_uid); mtx_lock(&hp_idnum->mtx); @@ -3992,7 +4025,7 @@ nfssvc_idname(struct nfsd_idargs *nidp) } else if (nidp->nid_flag & (NFSID_DELGID | NFSID_ADDGID)) { /* Must lock all groupname hash lists first, to avoid a LOR. */ for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsgroupnamehash[i].mtx); + mtx_lock(&NFSD_VNET(nfsgroupnamehash)[i].mtx); groupname_locked = 1; hp_idnum = NFSGROUPHASH(nidp->nid_gid); mtx_lock(&hp_idnum->mtx); @@ -4035,7 +4068,7 @@ nfssvc_idname(struct nfsd_idargs *nidp) thp = NFSUSERNAMEHASH(newusrp->lug_name, newusrp->lug_namelen); mtx_assert(&thp->mtx, MA_OWNED); TAILQ_INSERT_TAIL(&thp->lughead, newusrp, lug_namehash); - atomic_add_int(&nfsrv_usercnt, 1); + atomic_add_int(&NFSD_VNET(nfsrv_usercnt), 1); } else if (nidp->nid_flag & (NFSID_ADDGID | NFSID_ADDGROUPNAME)) { newusrp->lug_gid = nidp->nid_gid; thp = NFSGROUPHASH(newusrp->lug_gid); @@ -4044,7 +4077,7 @@ nfssvc_idname(struct nfsd_idargs *nidp) thp = NFSGROUPNAMEHASH(newusrp->lug_name, newusrp->lug_namelen); mtx_assert(&thp->mtx, MA_OWNED); TAILQ_INSERT_TAIL(&thp->lughead, newusrp, lug_namehash); - atomic_add_int(&nfsrv_usercnt, 1); + atomic_add_int(&NFSD_VNET(nfsrv_usercnt), 1); } else { if (newusrp->lug_cred != NULL) crfree(newusrp->lug_cred); @@ -4073,17 +4106,17 @@ nfssvc_idname(struct nfsd_idargs *nidp) NFSID_DELUSERNAME | NFSID_ADDUSERNAME)) != 0) { if (username_locked == 0) { for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsusernamehash[i].mtx); + mtx_lock(&NFSD_VNET(nfsusernamehash)[i].mtx); username_locked = 1; } KASSERT(user_locked == 0, ("nfssvc_idname: user_locked")); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsuserhash[i].mtx); + mtx_lock(&NFSD_VNET(nfsuserhash)[i].mtx); user_locked = 1; for (i = 0; i < nfsrv_lughashsize; i++) { TAILQ_FOREACH_SAFE(usrp, - &nfsuserhash[i].lughead, lug_numhash, + &NFSD_VNET(nfsuserhash)[i].lughead, lug_numhash, nusrp) if (usrp->lug_expiry < NFSD_MONOSEC) nfsrv_removeuser(usrp, 1); @@ -4094,26 +4127,26 @@ nfssvc_idname(struct nfsd_idargs *nidp) * algorithm. This code deletes the least * recently used entry on each hash list. */ - if (nfsrv_usercnt <= nfsrv_usermax) + if (NFSD_VNET(nfsrv_usercnt) <= NFSD_VNET(nfsrv_usermax)) break; - usrp = TAILQ_FIRST(&nfsuserhash[i].lughead); + usrp = TAILQ_FIRST(&NFSD_VNET(nfsuserhash)[i].lughead); if (usrp != NULL) nfsrv_removeuser(usrp, 1); } } else { if (groupname_locked == 0) { for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsgroupnamehash[i].mtx); + mtx_lock(&NFSD_VNET(nfsgroupnamehash)[i].mtx); groupname_locked = 1; } KASSERT(group_locked == 0, ("nfssvc_idname: group_locked")); for (i = 0; i < nfsrv_lughashsize; i++) - mtx_lock(&nfsgrouphash[i].mtx); + mtx_lock(&NFSD_VNET(nfsgrouphash)[i].mtx); group_locked = 1; for (i = 0; i < nfsrv_lughashsize; i++) { TAILQ_FOREACH_SAFE(usrp, - &nfsgrouphash[i].lughead, lug_numhash, + &NFSD_VNET(nfsgrouphash)[i].lughead, lug_numhash, nusrp) if (usrp->lug_expiry < NFSD_MONOSEC) nfsrv_removeuser(usrp, 0); @@ -4124,9 +4157,9 @@ nfssvc_idname(struct nfsd_idargs *nidp) * algorithm. This code deletes the least * recently user entry on each hash list. */ - if (nfsrv_usercnt <= nfsrv_usermax) + if (NFSD_VNET(nfsrv_usercnt) <= NFSD_VNET(nfsrv_usermax)) break; - usrp = TAILQ_FIRST(&nfsgrouphash[i].lughead); + usrp = TAILQ_FIRST(&NFSD_VNET(nfsgrouphash)[i].lughead); if (usrp != NULL) nfsrv_removeuser(usrp, 0); } @@ -4142,16 +4175,16 @@ nfssvc_idname(struct nfsd_idargs *nidp) mtx_unlock(&hp_name->mtx); if (user_locked != 0) for (i = 0; i < nfsrv_lughashsize; i++) - mtx_unlock(&nfsuserhash[i].mtx); + mtx_unlock(&NFSD_VNET(nfsuserhash)[i].mtx); if (username_locked != 0) for (i = 0; i < nfsrv_lughashsize; i++) - mtx_unlock(&nfsusernamehash[i].mtx); + mtx_unlock(&NFSD_VNET(nfsusernamehash)[i].mtx); if (group_locked != 0) for (i = 0; i < nfsrv_lughashsize; i++) - mtx_unlock(&nfsgrouphash[i].mtx); + mtx_unlock(&NFSD_VNET(nfsgrouphash)[i].mtx); if (groupname_locked != 0) for (i = 0; i < nfsrv_lughashsize; i++) - mtx_unlock(&nfsgroupnamehash[i].mtx); + mtx_unlock(&NFSD_VNET(nfsgroupnamehash)[i].mtx); out: NFSEXITCODE(error); return (error); @@ -4180,7 +4213,7 @@ nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser) mtx_assert(&hp->mtx, MA_OWNED); TAILQ_REMOVE(&hp->lughead, usrp, lug_namehash); } - atomic_add_int(&nfsrv_usercnt, -1); + atomic_add_int(&NFSD_VNET(nfsrv_usercnt), -1); if (usrp->lug_cred != NULL) crfree(usrp->lug_cred); free(usrp, M_NFSUSERGROUP); @@ -4190,7 +4223,7 @@ nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser) * Free up all the allocations related to the name<-->id cache. * This function should only be called when the nfsuserd daemon isn't * running, since it doesn't do any locking. - * This function is meant to be used when the nfscommon module is unloaded. + * This function is meant to be called when a vnet jail is destroyed. */ void nfsrv_cleanusergroup(void) @@ -4199,11 +4232,11 @@ nfsrv_cleanusergroup(void) struct nfsusrgrp *nusrp, *usrp; int i; - if (nfsuserhash == NULL) + if (NFSD_VNET(nfsuserhash) == NULL) return; for (i = 0; i < nfsrv_lughashsize; i++) { - hp = &nfsuserhash[i]; + hp = &NFSD_VNET(nfsuserhash)[i]; TAILQ_FOREACH_SAFE(usrp, &hp->lughead, lug_numhash, nusrp) { TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); hp2 = NFSUSERNAMEHASH(usrp->lug_name, @@ -4213,7 +4246,7 @@ nfsrv_cleanusergroup(void) crfree(usrp->lug_cred); free(usrp, M_NFSUSERGROUP); } - hp = &nfsgrouphash[i]; + hp = &NFSD_VNET(nfsgrouphash)[i]; TAILQ_FOREACH_SAFE(usrp, &hp->lughead, lug_numhash, nusrp) { TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); hp2 = NFSGROUPNAMEHASH(usrp->lug_name, @@ -4223,16 +4256,16 @@ nfsrv_cleanusergroup(void) crfree(usrp->lug_cred); free(usrp, M_NFSUSERGROUP); } - mtx_destroy(&nfsuserhash[i].mtx); - mtx_destroy(&nfsusernamehash[i].mtx); - mtx_destroy(&nfsgroupnamehash[i].mtx); - mtx_destroy(&nfsgrouphash[i].mtx); + mtx_destroy(&NFSD_VNET(nfsuserhash)[i].mtx); + mtx_destroy(&NFSD_VNET(nfsusernamehash)[i].mtx); + mtx_destroy(&NFSD_VNET(nfsgroupnamehash)[i].mtx); + mtx_destroy(&NFSD_VNET(nfsgrouphash)[i].mtx); } - free(nfsuserhash, M_NFSUSERGROUP); - free(nfsusernamehash, M_NFSUSERGROUP); - free(nfsgrouphash, M_NFSUSERGROUP); - free(nfsgroupnamehash, M_NFSUSERGROUP); - free(nfsrv_dnsname, M_NFSSTRING); + free(NFSD_VNET(nfsuserhash), M_NFSUSERGROUP); + free(NFSD_VNET(nfsusernamehash), M_NFSUSERGROUP); + free(NFSD_VNET(nfsgrouphash), M_NFSUSERGROUP); + free(NFSD_VNET(nfsgroupnamehash), M_NFSUSERGROUP); + free(NFSD_VNET(nfsrv_dnsname), M_NFSSTRING); } /* From nobody Tue Feb 14 21:44:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGZV64htSz3q33G; Tue, 14 Feb 2023 21:44:14 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGZV648PQz47br; Tue, 14 Feb 2023 21:44:14 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676411054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uumGPxa4yPIoGShGj0vNuv+wZYz7mXJ+5eRWLUnHIug=; b=w/rRhvYb0RUL8RxOP2d6nKs/6P1pUhJyYjZpiYC2LH0nqb2/aiRnzKM9tegnLcleXrsmza kna8Ig+nqUxIvzB650MNwTCLlokTCjt09JcCKS+vuYplG2EHsLybq0Pb6njuZD/xd6XpsJ ste+akCcOVMdzNQQLnj1Kz6WCxN5dxDAwLx7QVPyCoZ201WuqVHGIx79KBy9kwjvu1LPkG bt38JpIpoyWS70f3wiZIA3X638vBuQkWBay4QFj9xvscUPeNUPdilN+ugdLaTjialxprT4 9C/6Tbyj9/EPBEjEjVRz3ak/cyC01daByK16oP8yis7qjSMis94Q46LvIt68Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676411054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uumGPxa4yPIoGShGj0vNuv+wZYz7mXJ+5eRWLUnHIug=; b=QNLWQfzWN9c6Ef1ZfJa7oDPxbwzh6WfmMv0ifeiMnThYQeIYJtaCAmG0tMwBZlJ2rP6HeA zpmJX+KaCRdW00jGmYpf6KMLWEN082Q3CtoSwRMNgIn1OFjXClu03/fTeeLcLKtPzkt+ko Gi373HE1bfo7/dS1LkgRkTNPWl2LF2cS5BH2xwH29OPJfhLqyXAiSCprXdYbl+QDx15Mvw GPqchl1EEa2mBWUy91GTOdNzOAwR8kzUojfmZp7mbApNvus3428y6G4TeRfa+w3udDdCpV kWEFB9kswz/3DYLTPDXe10/Y0cshjqq7XcsTspGiKRGSrJB5kwt+HXRi2T79HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676411054; a=rsa-sha256; cv=none; b=D5H9/JbsMzlDpCT24KIY2Kz+OGOX3NcZ4qL8svxK/Ha/uHx3xA44Xi+g8knh0HrLHCa0FN J7nsu7cLYGLlucg8R/oeGkvxFEl5j/mGCD0KpnRs/AdVDxV5uVI1clIUplFS80iFbGmZEC J6rgJPavCr6rNisoDj7GaPNQ6vx8PRPez0rxVhjLQSrkNscBqXVX8pf4lPTkkd3wLBUeT5 DdSOhMlMxRwBzmoTNUJWc+Kg4ufcFKSzqU7k+vmZa/lT5y9QdGJyHyNdCYr56Hs2jeJ6NP n4aehH2m6F7a5KP/Qby17Fjri1LOYf4eVSFq0Ix+L84wgSkJNVdgVloGA/g+Xw== Received: from [192.168.1.10] (unknown [98.42.164.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PGZV56fjtzmfb; Tue, 14 Feb 2023 21:44:13 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.69.23011802 Date: Tue, 14 Feb 2023 13:44:09 -0800 Subject: Re: e35448a901aa - main - powerpc: Drop old workaround for old gcc From: Ravi Pokala To: Warner Losh , , , Message-ID: <68E1F686-AB9F-4AC9-BBC5-0FE5F17041C0@panasas.com> Thread-Topic: e35448a901aa - main - powerpc: Drop old workaround for old gcc References: <202302141654.31EGsBtE057310@gitrepo.freebsd.org> In-Reply-To: <202302141654.31EGsBtE057310@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N > However, that causes problems > for programs that do: It feels like there was supposed to be an example there, but there isn't on= e...? Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: > on behalf of Warner Losh > Date: 2023-02-14, Tuesday at 08:54 To: >, >, > Subject: git: e35448a901aa - main - powerpc: Drop old workaround for old gc= c The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3De35448a901aa56aa232efbc4fe7a73= a9bdac3511 commit e35448a901aa56aa232efbc4fe7a73a9bdac3511 Author: Warner Losh > AuthorDate: 2023-02-14 16:47:08 +0000 Commit: Warner Losh > CommitDate: 2023-02-14 16:47:08 +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 --- 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 Tue Feb 14 21:54:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGZjy3wx6z3q3T7; Tue, 14 Feb 2023 21:54: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 4PGZjy3NpJz4Bj3; Tue, 14 Feb 2023 21:54:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676411670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kOgXDxNkhz1c4XJVkhQYIqjmZkDgqmKVNbNZnu4F0qk=; b=nn7D+S2KBD5tXJHZVOgoWlf8VJk0p/UqQJ0FKrUu1NEMGj0HB9WIKlxEJKCKVhkUmwLOqw 2zxR1APX3TTh/RN9HTAS8Ga2nVK1nGGCaTPFGA4yvuUPzuaYMBhMzoSFaAsH7m1nOJHR5t uR5XUsy3tKwcVb8QmPYIOho0U68+1AnhaAJXorrMy0hSYzVFhbh5ImkQ5DrlwZwevN7BR7 kO37Imfqz19H58kgCYbDkYrHzh3tz4aeIXXrDs2skDHRs751WOvkhhEk2SnFvaqg0bhgDI ANW1Hc9PDTDXAuoOvHZlguNe6b2y0DtHu+8L/8t+n5fOJ8DOrvOX33DDMVnEJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676411670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kOgXDxNkhz1c4XJVkhQYIqjmZkDgqmKVNbNZnu4F0qk=; b=qaJUGZp7/K+kWYNBoWoY+OjHzRBRE2LFo9aTD8pFJ5TErqP0aG89xpsWOPzMcx1WbfjWvn hMQf1x7wG/XAHrcjX4YiO7d9pjlTVxGhBCEW7MV85gVyklkRPtYbU6dVSaM96M0HvUwF43 jQ1zvubGoLPrUE4oEOq5eGd8g03aMVoMgO32jjvcglK2JktNIM50kI3DWOI297iplE6YEf nMTKgFBg6MFQfQw6kRUX4S1QuTclYy9yUEcAaUQDbB9L5xwHnqy7x1IMILH1kMVCkDZfyv pguyyHd2AIXJaaXZMT4Sjd8QgKscTruZG02vOcox5s4Boc8IOE1zfPY493zcQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676411670; a=rsa-sha256; cv=none; b=jpaZxwrwqmLnFhm5hzqmVSKYohOOwEDQIJyuKx/XR06Pdh4MOLL/bCuzerx+3TC8Gzp1Tf vTrJlEk/8623P4ObL7Ofikd2P4uV448W6QBp5rwlpPGXmnfo8hfV9JE8hXUUyImmKjOey5 jfUZOIc39PY4FwPRsuE2kPhSI7jnZrIyFqcijV/4a6vjBE62fMeVw3mjrD1KulJUQq4E4/ fpYnp8M6wtHQBfo27bL9j8Fk5W4rijAUTGcFNdZo7gH/lsXjy3IcTMuMaV28UIpkse7okH oKNtouX0rLJrJ6mMRTIH3eIC9TgiGur9MHMhRcrEcUWRC6GFzhh8h31p18KZbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGZjy2Qy8z1Dqs; Tue, 14 Feb 2023 21:54: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 31ELsUes088219; Tue, 14 Feb 2023 21:54:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ELsU2p088218; Tue, 14 Feb 2023 21:54:30 GMT (envelope-from git) Date: Tue, 14 Feb 2023 21:54:30 GMT Message-Id: <202302142154.31ELsU2p088218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 364391a9bb5e - main - krpc: Remove VNET_NFSD #ifdefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 364391a9bb5eb85af5f711a952ba40a4b1f768da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=364391a9bb5eb85af5f711a952ba40a4b1f768da commit 364391a9bb5eb85af5f711a952ba40a4b1f768da Author: Rick Macklem AuthorDate: 2023-02-14 21:53:39 +0000 Commit: Rick Macklem CommitDate: 2023-02-14 21:53:39 +0000 krpc: Remove VNET_NFSD #ifdefs The consensus is that the VNET_NFSD kernel option is not needed, so this commit removes its use from the kernel RPC. MFC after: 3 months --- sys/rpc/svc_auth.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/rpc/svc_auth.c b/sys/rpc/svc_auth.c index a5c9753c4fde..22ce83f72bdb 100644 --- a/sys/rpc/svc_auth.c +++ b/sys/rpc/svc_auth.c @@ -198,12 +198,7 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xprt->xp_uid; crsetgroups(cr, xprt->xp_ngrps, xprt->xp_gidp); cr->cr_rgid = cr->cr_svgid = xprt->xp_gidp[0]; -#ifdef VNET_NFSD - if (jailed(curthread->td_ucred)) - cr->cr_prison = curthread->td_ucred->cr_prison; - else -#endif - cr->cr_prison = &prison0; + cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = cr; return (TRUE); @@ -216,12 +211,7 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xcr->cr_uid; crsetgroups(cr, xcr->cr_ngroups, xcr->cr_groups); cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; -#ifdef VNET_NFSD - if (jailed(curthread->td_ucred)) - cr->cr_prison = curthread->td_ucred->cr_prison; - else -#endif - cr->cr_prison = &prison0; + cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = cr; return (TRUE); From nobody Tue Feb 14 22:06:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGZzq3qyqz3q3v1; Tue, 14 Feb 2023 22:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGZzq3JM7z4DVJ; Tue, 14 Feb 2023 22:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlKsCxi4Wv+cu2AUApB/51RtdUwVbCqqbE8Er+Ggros=; b=kMn3qXwL+DcO16qjALHIq8//7A5lyVVZm61+PRMyCKWWVKAmw246x6Qumu+bg2c0rJ1Xdk 3hIA0LD95SBbsB5Carmi2c7hgy/90cmvzbKIy38AGcBhDffHR0lwB2YpkG12rVa+aKZNw9 1TrvvXsdOp0XNJjtz9X9pNJSBi/uacL4jwHR3jmJnq/hrMGHXX6apRYv+3Hcorb2XzGbEw onyd27YviBwp+6l94HQT2BRx5bv6Mge5OsCK+Ya3jZRm7g2U2E3BW2BmG7lgZpzTWdFdDj f91WIP+Q0tAkWDqoL9R/C8ynSUht5U3Amy3ZnCEN/fiHKRBktplIMyGXVudH2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlKsCxi4Wv+cu2AUApB/51RtdUwVbCqqbE8Er+Ggros=; b=IAM1AgIAVgSM+eIOduiI7PBKzd0e/T63PDNN8OjN5CEshA+ZCry/JilrtphQOiZBPQM89C FdwActvZ3B4bMt9lBV194DM8PTK2JZaYynruXgOV5ktQPl9CmYNou6cTfD9YykCU31yXq1 vEI3AO5aSgY9NPD23B/rJf4ml5kK57OfzlRsW3KErNfeoFVx1jHVFq2Sqjee5XxlRksOcQ 8SKC0WK0GB/JLAQqaOBN+yvNVtUjHZnM06XaDdGYEIGo+T1yVWOajkHABaqX3Fw/JaMD6s R6Y/yMKeit6PBXds2SU1oiqG2OS/mitluIOf2QyS9pOLRE5qv+V2fXYLXyPwCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676412391; a=rsa-sha256; cv=none; b=pCJoZEO0daHFuufvT18S5o+z6LjW17B/RY/rpf5yy0LBLk9O3STRaFUWQRFwQQCYH3VvA2 XeQ6XqY/WoWb1WY3n/OJd8GeNUBEOTYGR9QYftXZ3fRJfdmcz+XLUvMf+TbZsS8CUUo9UM E+Z7uVPuGiHxWLaTaOd3ylPHbOYnlmDLyeIGdFnSp+VchZ30spr+pYcfAo/m8kUb3S2z03 2J0EOo9Wr3lig8qeIoskXHfG3FvcyBFdWA0/eBP46yHuRJhqgCIBD4/bieKXV3zGVstD6i IhQNkpJt5+QlFf0wYpCCbs1BvhxRdskWXCEVvK5DZQfW3+qI2Jxu1/CfqJv8Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGZzq2M7mz1FH9; Tue, 14 Feb 2023 22:06: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 31EM6Vmk004027; Tue, 14 Feb 2023 22:06:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EM6V9K004026; Tue, 14 Feb 2023 22:06:31 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:06:31 GMT Message-Id: <202302142206.31EM6V9K004026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 3102ea3b15b6 - main - linuxkpi: Accept NULL as a value in `linux_xarray` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3102ea3b15b6c3ed1ea50716d65980b680375ebc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3102ea3b15b6c3ed1ea50716d65980b680375ebc commit 3102ea3b15b6c3ed1ea50716d65980b680375ebc Author: Jean-Sébastien Pédron AuthorDate: 2023-02-11 10:12:08 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-14 22:01:02 +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 --- 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 Tue Feb 14 22:06:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGZzr57Mxz3q40P; Tue, 14 Feb 2023 22:06: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 4PGZzr4RBHz4DSN; Tue, 14 Feb 2023 22:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JzdLAphA6PEfR6ER0hG5gW5ciOp/Cf8/E2TuEswgKnE=; b=YFJoMUh7rPMbq1hJ+lM9tM2nuoidVEkDbVLoL1vpmn5E8W1XH9defm73qITSCgXuVkVbwZ BRFgm/CcCuEIqPQPy92Npraqz6e6e1uiIpmap2vbGSmjvYi2M6BxZs2GNZ+8V+ygHofAK7 L4jvcoBGyWkvTZIrJfwKWtejRWMMLOTSHFVXTtVOFUlpDoBWES1uBzB8cZmottsuojFhy0 daS3HZFokBg7cEucrbO6OiejExvHDKzK7qfuWrPdtXKpF10IXRMC0vi/HBFgDnYkIe2wUs gWejUGKPh6noVgg4Eh17OQJPyTEUIQcSC+Sn/AzoQILVDYd24N5LPOehjlGgXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JzdLAphA6PEfR6ER0hG5gW5ciOp/Cf8/E2TuEswgKnE=; b=vme6nHgaxPZ31Yvur2MQpcr2Ode3QfP3WsR6GXS9A8nMP54qWga9dCG0DjKeBrn3MW3l2H yYUR7GFll4zyQq49Mypr7+HQ2niKaulMHpLeDB2AWKI5OZXOVoCZtcdWJT81RKkiFfQTbw 1t1iafv8dQXjUngVQDG6utJltF8SWSQDy1J+T3Bsey81xoAxLselr53dJGG0p930UAfNsg 2Rg94xafM165BrzJnRPrmv93udxu5QH+0d8quJGni6C3ByfIEWfnMOXw45KvvKJppJgYgZ B78U2k/h3yQQ/XlNPhbUhUNtOz1kCmXPScFJ+WNYLG1yrS51/3bWJKySNllEcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676412392; a=rsa-sha256; cv=none; b=S8jz5K9TtegflUVQNT04dNQByeRINXlnWQTHD4eEZhG/9l25zTZcVbx89pQ6POtsv0Slre kCMZu7y3S4E7VsExU67WgABQBEt01my80OQAsy8ZBWl1+H0UCS1yNboBxsM47Ty1PnWd0h eGyvEBYfv+/kC4XhTlAJos+LzqODtNFalnJE2oyBVC5LkmEPBaFoUSof6uGAFrlGmKGRtS Y+YUjQMXFhX+tns0AFR7jY+9/COwQcHyYuXEEzO7r7BLydSPIYJXmbTrIB7fIwhYfPjAsE zOA0PFTuiD1p/BuLO84ZE/joum2myp4aR8aUQR9PWhdE4114F2AvkiJo/fP8cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGZzr3LDwz1FLL; Tue, 14 Feb 2023 22:06: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 31EM6W9o004056; Tue, 14 Feb 2023 22:06:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EM6WBA004055; Tue, 14 Feb 2023 22:06:32 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:06:32 GMT Message-Id: <202302142206.31EM6WBA004055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 53da54b936e6 - main - linuxkpi: Define `totalram_pages()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53da54b936e646ba1216c0cc19582dad058ca5d0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=53da54b936e646ba1216c0cc19582dad058ca5d0 commit 53da54b936e646ba1216c0cc19582dad058ca5d0 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:52:43 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-14 22:01:06 +0000 linuxkpi: Define `totalram_pages()` It returns `physmem`. `__FreeBSD_version` is bumped to 1400080. We need that to remove a copy of this function in the i915 DRM driver, maintained outside of base. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38531 --- sys/compat/linuxkpi/common/include/linux/mm.h | 6 ++++++ sys/sys/param.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 2dcf32cbe84a..8dab5b9daa76 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -348,6 +348,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); diff --git a/sys/sys/param.h b/sys/sys/param.h index b2c2b1a04b4b..751020f6d087 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400079 +#define __FreeBSD_version 1400080 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Tue Feb 14 22:06:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGZzs71srz3q47S; Tue, 14 Feb 2023 22:06: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 4PGZzs6S4Qz4Dkf; Tue, 14 Feb 2023 22:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=riXx+Qb5ztdqh2QkfnRgo7rcjMD1Tk1opJwu8tlxBx8=; b=DFf4RLK1+sUaKjDYFi/oNuW7YhkVJusVl8shrq1j0GO7ZqMjN83mKPRyH3SnA30f+NubEr C3L/xyrrVST3YQ1WIpCEwX7Ts9PqRFk9F258t3kLLAM+t6SsKltdOKs/f2it3BfREemU+B tsUnO4DxiTmQqB7zWtWs/YWa01Oxpj3OIehO2qIbacIqZmyISQW4AnIZ/9I98DGHGIWe4+ mGao+mFAmEvCGhlH+g6IhTf0g/162pqisn2JREp4qLIj/Fbwc3k7KcAFQQARMH6DHLHeQG g12KBe65PNaIrJ3lLQUk0QACJQN4TgSe32GeBl206l/MDEjR11escGlHRi3JFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=riXx+Qb5ztdqh2QkfnRgo7rcjMD1Tk1opJwu8tlxBx8=; b=ZppBi+ZRvBW3ku6mC6VFLyuGyObgEFlai9qpPGU4guU8n48RGOILuz1HSBNgJkmeLKcgHi CdYK6Gmnf/8qMB9ppuNWaPuGRa9ZidfjCurmMZyG9n36i3+JIEiIFoSmk6/4lWMNNKkCXv E3LwTelYwUFkcR8FbWHvUWq1sKenUDbK+9iTWQo1U0MSekZspn72I/sXHmnQ+0SjESX/Mo 8ZOVKF6UlabY+VP1yIH3ID13sXhkt5rS1HPRZyvxjvFSd3MhX9LvKdqvIdPZJk9fJXLX3k RkCXhzfhiteHSnvvUNFTtUSN9tTI6hG08Fp5r1vKyXmmQFBIdeKGQnHlyXIhGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676412393; a=rsa-sha256; cv=none; b=RrfuGUErnfwitq8Fi4RdekLmDU3u26M5XEV154QWWbXDH0ORKVGNp2eGi+LSI8IPwd5M4v WCZpIS58E3/wqcCK52IsqAlsQ6qq4UmNJp5Dov8hY83Yvh9O52vhlhcZMQoelOpkedrg6g jyp8bE6uyiE1o8tQKzxaRXfNlgSHTnhZ/TRb9Cvwt+i6VVJRqwrOrEkVrhP+PhBBYY6qb1 xICdHjK1N7kUCyuSUx1nTwpt8JS1NYWfzUAvg6UNFtbUny2VOzYQVponPpZXaUr7rDmKdQ VqzZeFnfw0yhujWWtwWpfld/u9R/KubCEfquLq7trN9PwGmfd1m3Soxx1ADMNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGZzs4J1fz1FbZ; Tue, 14 Feb 2023 22:06: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 31EM6Xdh004085; Tue, 14 Feb 2023 22:06:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EM6XPx004084; Tue, 14 Feb 2023 22:06:33 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:06:33 GMT Message-Id: <202302142206.31EM6XPx004084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 836367272917 - main - linuxkpi: Add `synchronize_shrinkers()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 83636727291714c235726da987a02c5b1d51bb54 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=83636727291714c235726da987a02c5b1d51bb54 commit 83636727291714c235726da987a02c5b1d51bb54 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-13 20:49:28 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-14 22:01:06 +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 --- 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 Tue Feb 14 22:06:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGZzt6cqgz3q452; Tue, 14 Feb 2023 22:06: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 4PGZzt6BNrz4Dmk; Tue, 14 Feb 2023 22:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SlUtMmGnJPoKhg7NXJHbwkZANEXJlLxyKLOm+7UVHXM=; b=vygpMQDgCaWIbs/0hVT3CjNN3mIHwwS1ssrGrkeYpoyoV1+5nlELebREvnq2KDJ5f2AsMn B4/NRUgCxt3G1ZLPKtrWzHjzeIS/2mFSPRSJHe8n3PHibnJaO76mGvaYHt2RimCQfmNqRa ubgzXDJguGxNZoed3Om4y4FXqtC7GB8jt7LDw09MseFPY5E8Cm+W/GYplCVQBG7g54DC0I SQiLglznBgwnSSLTGPVywHl+KooeZ3jOvB3SL7cAAt2B4u3cYVK1CSXNGZ9Y+jdiroSr1F dbyjpfoaIqqLc8znSsbLQqaQ9C41O5Npwly43X3DVQeToK9zXehib/WCGrJo8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SlUtMmGnJPoKhg7NXJHbwkZANEXJlLxyKLOm+7UVHXM=; b=HE95wZMyNCuS2M8P4LwPLHBPsaJgAvjaiFMRFJukVrYMyYUa5TtblUhIuHX8GGiel8oP9b UuHs/FFnSS8PblYScuV2FDRtBTmAknV7ntgBT4F79eflMu9I9vxX9O0IFzWU6auD4Odqi0 LOE0+Vtj/LgfLP+t1H0wW//wq8DWodK1G1qGQJYdj9KBON5CGyT3xEJyMa7LD595XilYFU U8XCbYkhTLWAGIQa8GRYqDbkum8n3Jju934dgjaMXL/q7lzJE7zJjntP3XKML4SUJEzFLC oM1rYn0Ubx8qsno9IQUEGiwIS2Kr7bA+waHcnzPXn05Wq1KDb8jfpskAPxqhZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676412394; a=rsa-sha256; cv=none; b=IfY9iLcETLeSA/UAf7kCRmddFfIbeq+/txEIAPDEJNaV2kohQyrx3EzqzW4w1w8GdpkQVV KvxTxgGlcrsqaMxaEUSJduEes1YbpfO33pLwoWxRDMV/5BsieaNK2pbbI2vjRrzv4Mfdws s+pKi09UGHgT5M8GVSd1gb4pzYFGIg6PXdpK7yAWUTdUzA9ub4JQsHvfZLzWH8N+JEzWOq Q2GU6M3sLIXRPqvKEIU3TID9yb5LyScMV1R3NhV+vFReHiCy/QfNKtJtzu6RIHoFhHSwGc SH3bZh+92ZLwhHV70TE5pQfxVcG9WM2CpTH8S0BTNfngAMUrwRj2TJoO8A2sKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGZzt5GNbz1F3Z; Tue, 14 Feb 2023 22:06: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 31EM6YYt004114; Tue, 14 Feb 2023 22:06:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EM6Yi5004113; Tue, 14 Feb 2023 22:06:34 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:06:34 GMT Message-Id: <202302142206.31EM6Yi5004113@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 7d03acf065ed - main - linuxkpi: Declare `struct fwnode_handle` in List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7d03acf065ed96fd04a54bf8e1c83a032ffed097 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7d03acf065ed96fd04a54bf8e1c83a032ffed097 commit 7d03acf065ed96fd04a54bf8e1c83a032ffed097 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-13 20:51:00 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-14 22:01:06 +0000 linuxkpi: Declare `struct fwnode_handle` in Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38566 --- 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 32dc7a30769c..18f2eef895c0 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 Tue Feb 14 22:06:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGZzw0L5Wz3q4DJ; Tue, 14 Feb 2023 22:06: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 4PGZzv6lzmz4DnB; Tue, 14 Feb 2023 22:06:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/CSztGl3XMUZeZA8h9YEF+GLHsSi0jJH284pZ+S4K9c=; b=usflIlWEjOv+d/VK7XDTlguCDTl3ATzMx/83Xsx/LgRuKT7lsrMeTTrRzpTI9iJMzxnxw6 SkQN6cUxh5PFjnMwdrTrxpd8mSgnKuVXedTrNesYvpryd7LtcEMRP5NucUXSY1mw8947CJ xFSikTgTFQMZfIajdKo7y6A6D24skZZW+ph6zJ8OyOWEXTIL7Twch4q0IYP1bs7i9EsQTj isfT8pD/Vtashyczzs1YmSqj3T5/H96fZjasCgMkSFXCphCeeb6BD/hH22lg+SwvFJOcJX Q8GiPwXVXHWRxhecIToOR/tJx8mwIEMLU+9o8CmG9h3Yy7CoaSRF4etQUeS35g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/CSztGl3XMUZeZA8h9YEF+GLHsSi0jJH284pZ+S4K9c=; b=XDaXgdBOWbuXV6zjmPlfcfM3LvD28cOdOubVQVQhwVLw5pknHJPlMD/a+NkmjBGXu5IBfV 8oA4nBrne9Vk89ECnbigrNAG5t/+RalBbuqmVyBXnYi0RWsyDiDGsYKTtLFOyd05IEBpM8 Bj4067Nli68x5i0Iuu/RszLeWeuwt06tM/hCyhq7uiuGHiw5/SbvrDtCVFE8/kjk58i0Uy EWrt5kRXGzVxcn9mlkNgJC+RXTe68oO69LG4M01YckX4cXUd78m2AfOFJlOe0Y/5XvrE3V NwSSP/YV8OW3Zv+8fUun7ffec/aE2cbRn1gG2BuSoXiLD3V3p1CzAwJuVuN/aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676412396; a=rsa-sha256; cv=none; b=tOZez/NBjeD01VqTPGipZJHrKqaTtWpwU21P/HGUCJfwpU0HMoyqYXKQJNZjE/DUnmCCuz 7tjbIZHnL5HVapXo+e0B+hxJTaAMCoH7vlIiGCtxr9Iv6laZmAEAccb4NwuA6YSHHyM1xV aKoMX3hfaKbCbYtS/FeSn+vA9eFL6UjYcOXUC+c65+PSsP9nvP4meDt1que+gnN9geubJe jCgK7Zk/JZT3nKCtMs1zFH3PJcnVoEXD6Lt67LUzch3FjGBMZ72APFMt6gOxVylAsRekeU paoA2j6XhoEXX1ZIEeWoiFhX6fXrclpjXGdro4+SQb03hafbNqsDcKv50TGwrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGZzv5t9fz1FYG; Tue, 14 Feb 2023 22:06: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 31EM6Z4d004146; Tue, 14 Feb 2023 22:06:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EM6ZLw004145; Tue, 14 Feb 2023 22:06:35 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:06:35 GMT Message-Id: <202302142206.31EM6ZLw004145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: e6f7fe74a903 - main - linuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e6f7fe74a903b4085d60b0054ff75ee677beaf76 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e6f7fe74a903b4085d60b0054ff75ee677beaf76 commit e6f7fe74a903b4085d60b0054ff75ee677beaf76 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-13 22:22:54 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-14 22:01:07 +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 --- 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 Tue Feb 14 22:09:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGb2l562fz3q4G8; Tue, 14 Feb 2023 22:09: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 4PGb2l4g4nz4GNm; Tue, 14 Feb 2023 22:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v8myQ58JeShgI95arDfzJzUSkTT4LkR2+e+DhXyiIn4=; b=shO2tKlOzl8kOmW6il3RHq75vixJ9TpjuRGN0Etk1E8oTVjJWA++YksXYtYb/yyGnxjvPf FYuBmMlpeFZXdj1HfK7Kc9SI1q7SH1GCSvDkNgvYb3eIrAR85R2Ei3yrekhB47ztf9z1AL 7+uXbbPwnOSl5w7b8z9LX1zMb5IwzrmOgx7hCUYEdtF4KpTGMLDJQDYu3rXXEo3tIO4zKz /+FawLxmImpBToSw92vmaaCvCqDJeXMn+4rgbtWs9/efkHgOKFDpum7f5Qgu4W8X6/bOVg honFyq7mVxP/6zHJ6ptAeoORShY7k/+uWyBbabp2ZzOa2iJDW0e1W+I4dathGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676412543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v8myQ58JeShgI95arDfzJzUSkTT4LkR2+e+DhXyiIn4=; b=IZwHtKB8fg41B9V2Gf68CxrUW+AhJkGhY0Skjbt/Aock2b2kbt/ZU88rHv046OsHtsNBWZ sXspAOoMi6lkxAFicK97f/LuwI+YyhLojPo/IzBF6BuJWlp/MjFl9dhmgfHefrG7oexa+3 9AFtvooD+kQ/UZXit+sWh3VTag80dq2zetx3RWvaehfm1do9yDrXz6WWayAlEx+gyycwME yDOdAhZm6VFLS+cLloDhnA8IDDjfYX5kTRu0d12qn7Ze5ECvrV+ZxDV15eAMkyYVAaE0qd EMApsQDZEBUhLpDC8qnXTevVPQqkn45nJmXik1l0Z4dIVxxgJUjf/HDgcj69nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676412543; a=rsa-sha256; cv=none; b=VYAdjVOR8q4SBxdFpE3JaqL6ht9LPhgV2tBeaO2KgfbBvfDur+E8quPiP/N8PDeFJ27Zku m1tlFvA6PL5uXQ5RfCaGTqSfR8l2LjVQmovIpcD99aaN/7iYLoXsBRlRAWho9IF1tHotAg BQUEdaFQMFaKBaIJh9H4XdXXhcAtVH6VSTps0aq68Mf9kI4lKqFVMErsjIc2oe6rrM+3Nm biWwXx3AEaV+6nHVN/zD5KrvAPdKUGwU/XzVrrPL16CeirFKfDthINaSExTqXk0o6ZUIon ++PElbmtq2ho6+MiiT8wj1oKD93CyPS8OQ7CuG47eiHxApH+JfYJ8wIOrlNVaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGb2l3hlsz1FVp; Tue, 14 Feb 2023 22:09: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 31EM93Qs004571; Tue, 14 Feb 2023 22:09:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EM93RW004570; Tue, 14 Feb 2023 22:09:03 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:09:03 GMT Message-Id: <202302142209.31EM93RW004570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 96e16cf368f6 - main - linuxkpi: Add List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 96e16cf368f6d8aa3c0efd44db4c4678892e1fea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=96e16cf368f6d8aa3c0efd44db4c4678892e1fea commit 96e16cf368f6d8aa3c0efd44db4c4678892e1fea Author: Jean-Sébastien Pédron AuthorDate: 2023-02-14 21:44:21 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-14 22:07:19 +0000 linuxkpi: Add It defines the `cc_platform_has()` function. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38596 --- 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 Tue Feb 14 22:20:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/releng/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:26:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGbRR5KHWz3q4tr; Tue, 14 Feb 2023 22:26: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 4PGbRR4MPqz4Jf8; Tue, 14 Feb 2023 22:26:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676413619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r+LtCgJxIgKf1ars98XWEW5ipz2d4kh3qZxVOyc+gds=; b=QucEDhiDvW+NqO6PMREkeSUIRRiuJhnYUgUSi27pOSEtDEZialwqtFZJweG52rqLMnFvbT MKQ4eccsEhSVvaHg66hB88gR6qFZ8cGxsP1wRWQofCcpczERJ6eroW7KIUs7MPkI82665M eq30VBihJk881rHupSA+qR5QFMddAIFcx/JtQ/w3hi3IqfqUcbgo9Rx+P86jsd23ow+Dof 72QGGv74hDDGXKipWzG4R/RN+6cIRRj7Zl5BgQqHPXd+cgOXKrbXR4JAod3xqV4yaVJYRC IRyrWiEOYYWlJybva+HTJ7cQPck2e5plGXr8LjezMPFVSNvhZZHh45/smBW3xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676413619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r+LtCgJxIgKf1ars98XWEW5ipz2d4kh3qZxVOyc+gds=; b=l3GCQC7lD60mSjXxVB8KKI91Yuv/agMdVR9y2ISF0ObA/k6gXnrMHjwBePlORdfc2ArFYM yJlBiiB5Dh3Cj9jkUqIetz1w4xXSU431vUiAY7tdNAJed1FuC0eQjyAZaocM83u4wahLzm FkEPF3zNjnKxpF0+Uq/rS1z+4ewWRN8rlDkEGxc9dQbgt3VQsW5N+W2DdBBTHByc0iM2uU s2K4RiljHCtpKlNzyQ+gXNZnCyxA4dN8MepYK0VW9joUCWfab4BrtcB2Zg/WzVZ5RbMuF1 r7G++XXrs6b+hdMcWfAiWofrCBkPUP1L5MVp55jU3fTW4GAsHIBz4CAWeJ4R0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676413619; a=rsa-sha256; cv=none; b=tPl3bJxg5ochErWQ0/cLLpdYFfTIqn4RzqW/Gap/wOcc4mb+kJttlLi0FpVusKAmoXt/6D jaNBpqW8Z9n11BIDqdlUlrwl1SoQ8SU2JL55GzFz202XUiYDp6HPw8ceIIAUGGBOJaimR9 JDd+G0YaTSoRo9vFOFnHrTQAY1XX1f9PYam+/n2uEWe8aHsgLeZsLeArBWYZlIgYcI1p7n I5PaTwlGNiDql+VL9ssvyfwi7vPmC0WBrEnWhAiq3K3Xe2UAbqcOh7i86qV0kw/ku8tK1/ ZgqEbqLleFNLevUfXkjjdjERbnaFWzeoGuce2AYupJ6Cne3ETsbhzZFyauORBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGbRR3Jkjz1G1S; Tue, 14 Feb 2023 22:26: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 31EMQxOo032422; Tue, 14 Feb 2023 22:26:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EMQxfJ032421; Tue, 14 Feb 2023 22:26:59 GMT (envelope-from git) Date: Tue, 14 Feb 2023 22:26:59 GMT Message-Id: <202302142226.31EMQxfJ032421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: dad64f0e7cad - main - wc: Clean up and modernize. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dad64f0e7cadb5913d6463fc014f59f8706d316c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dad64f0e7cadb5913d6463fc014f59f8706d316c commit dad64f0e7cadb5913d6463fc014f59f8706d316c Author: Dag-Erling Smørgrav AuthorDate: 2023-02-14 22:26:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-14 22:26:47 +0000 wc: Clean up and modernize. * Drop , which is unnecessary since we use libxo. * As per POSIX, report an error if output fails. * Fix some type mismatches. * Use bool instead of int where appropriate. * Avoid repeatedly checking for a null filename. * Miscellaneous other tidying. * Add tests (partly derived from work performed by SHENG-YI HONG ). Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38496 --- etc/mtree/BSD.tests.dist | 2 + usr.bin/wc/Makefile | 3 + usr.bin/wc/tests/Makefile | 8 ++ usr.bin/wc/tests/wc_test.sh | 197 ++++++++++++++++++++++++++++++++++++++++++++ usr.bin/wc/wc.c | 142 ++++++++++++++++--------------- 5 files changed, 279 insertions(+), 73 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 910db16f0d15..859b5c5ace7f 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1120,6 +1120,8 @@ .. vmstat .. + wc + .. xargs .. xinstall diff --git a/usr.bin/wc/Makefile b/usr.bin/wc/Makefile index 550b718e1478..060c67193e00 100644 --- a/usr.bin/wc/Makefile +++ b/usr.bin/wc/Makefile @@ -12,4 +12,7 @@ LIBADD+= cap_fileargs CFLAGS+=-DWITH_CASPER .endif +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests + .include diff --git a/usr.bin/wc/tests/Makefile b/usr.bin/wc/tests/Makefile new file mode 100644 index 000000000000..81e6c4246544 --- /dev/null +++ b/usr.bin/wc/tests/Makefile @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= wc_test +BINDIR= ${TESTSDIR} + +.include diff --git a/usr.bin/wc/tests/wc_test.sh b/usr.bin/wc/tests/wc_test.sh new file mode 100755 index 000000000000..574f2daacaca --- /dev/null +++ b/usr.bin/wc/tests/wc_test.sh @@ -0,0 +1,197 @@ +# +# Copyright (c) 2023 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# +# These tests need to run in a multibyte locale with non-localized +# error messages. +# +export LC_CTYPE=C.UTF-8 +export LC_MESSAGES=C + +# +# Sample text containing multibyte characters +# +tv="Der bode en underlig gråsprængt en +på den yderste nøgne ø; – +han gjorde visst intet menneske mén +hverken på land eller sjø; +dog stundom gnistred hans øjne stygt, – +helst mod uroligt vejr, – +og da mente folk, at han var forrykt, +og da var der få, som uden frykt +kom Terje Vigen nær. +" +tvl=10 +tvw=55 +tvc=300 +tvm=283 +tvcL=42 +tvmL=39 + +# +# Run a series of tests using the same input file. The first argument +# is the name of the file. The next three are the expected line, +# word, and byte counts. The optional fifth is the expected character +# count; if not provided, it is expected to be identical to the byte +# count. +# +atf_check_wc() { + local file="$1" + local l="$2" + local w="$3" + local c="$4" + local m="${5-$4}" + + atf_check -o match:"^ +${l} +${w} +${c}\$" wc <"${file}" + atf_check -o match:"^ +${l}\$" wc -l <"${file}" + atf_check -o match:"^ +${w}\$" wc -w <"${file}" + atf_check -o match:"^ +${c}\$" wc -c <"${file}" + atf_check -o match:"^ +${m}\$" wc -m <"${file}" + atf_check -o match:"^ +${l} +${w} +${c} ${file}\$" wc "$file" + atf_check -o match:"^ +${l} ${file}\$" wc -l "$file" + atf_check -o match:"^ +${w} ${file}\$" wc -w "$file" + atf_check -o match:"^ +${c} ${file}\$" wc -c "$file" + atf_check -o match:"^ +${m} ${file}\$" wc -m "$file" +} + +atf_test_case basic +basic_head() +{ + atf_set "descr" "Basic test case" +} +basic_body() +{ + printf "a b\n" >foo + atf_check_wc foo 1 2 4 +} + +atf_test_case blank +blank_head() +{ + atf_set "descr" "Input containing only blank lines" +} +blank_body() +{ + printf "\n\n\n" >foo + atf_check_wc foo 3 0 3 +} + +atf_test_case empty +empty_head() +{ + atf_set "descr" "Empty input" +} +empty_body() +{ + printf "" >foo + atf_check_wc foo 0 0 0 +} + +atf_test_case invalid +invalid_head() +{ + atf_set "descr" "Invalid multibyte input" +} +invalid_body() +{ + printf "a\377b\n" >foo + atf_check \ + -e match:"Illegal byte sequence" \ + -o match:"^ +4 foo$" \ + wc -m foo +} + +atf_test_case multiline +multiline_head() +{ + atf_set "descr" "Multiline, multibyte input" +} +multiline_body() +{ + printf "%s\n" "$tv" >foo + atf_check_wc foo $tvl $tvw $tvc $tvm + # longest line in bytes + atf_check -o match:"^ +$tvc +$tvcL foo" wc -cL foo + atf_check -o match:"^ +$tvc +$tvcL" wc -cL foo + atf_check_wc foo $((tvl*c)) $((tvw*c)) $((tvc*c)) $((tvm*c)) +} + +atf_test_case total +total_head() +{ + atf_set "descr" "Multiple inputs" +} +total_body() +{ + printf "%s\n" "$tv" >foo + printf "%s\n" "$tv" >bar + atf_check \ + -o match:"^ +$((tvl*2)) +$((tvw*2)) +$((tvc*2)) total$" \ + wc foo bar +} + +atf_test_case unterminated +unterminated_head() +{ + atf_set "descr" "Input not ending in newline" +} +unterminated_body() +{ + printf "a b" >foo + atf_check_wc foo 0 2 3 +} + +atf_test_case usage +usage_head() +{ + atf_set "descr" "Trigger usage message" +} +usage_body() +{ + atf_check -s exit:1 -e match:"usage: wc" wc -\? +} + +atf_test_case whitespace +whitespace_head() +{ + atf_set "descr" "Input containing only whitespace and newlines" +} +whitespace_body() +{ + printf "\n \n\t\n" >foo + atf_check_wc foo 3 0 5 +} + +atf_init_test_cases() +{ + atf_add_test_case basic + atf_add_test_case blank + atf_add_test_case empty + atf_add_test_case invalid + atf_add_test_case multiline + atf_add_test_case multiline_repeated + atf_add_test_case total + atf_add_test_case unterminated + atf_add_test_case usage + atf_add_test_case whitespace +} diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index a12c13a3e36d..9c129917dd04 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -50,10 +50,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include +#include #include #include #include @@ -66,9 +66,11 @@ __FBSDID("$FreeBSD$"); #include #include +static const char *stdin_filename = "stdin"; + static fileargs_t *fa; static uintmax_t tlinect, twordct, tcharct, tlongline; -static int doline, doword, dochar, domulti, dolongline; +static bool doline, doword, dochar, domulti, dolongline; static volatile sig_atomic_t siginfo; static xo_handle_t *stderr_handle; @@ -102,26 +104,26 @@ main(int argc, char *argv[]) argc = xo_parse_args(argc, argv); if (argc < 0) - return (argc); + exit(EXIT_FAILURE); while ((ch = getopt(argc, argv, "clmwL")) != -1) switch((char)ch) { case 'l': - doline = 1; + doline = true; break; case 'w': - doword = 1; + doword = true; break; case 'c': - dochar = 1; - domulti = 0; + dochar = true; + domulti = false; break; case 'L': - dolongline = 1; + dolongline = true; break; case 'm': - domulti = 1; - dochar = 0; + domulti = true; + dochar = false; break; case '?': default: @@ -134,27 +136,17 @@ main(int argc, char *argv[]) fa = fileargs_init(argc, argv, O_RDONLY, 0, cap_rights_init(&rights, CAP_READ, CAP_FSTAT), FA_OPEN); - if (fa == NULL) { - xo_warn("Unable to init casper"); - exit(1); - } - + if (fa == NULL) + xo_err(EXIT_FAILURE, "Unable to initialize casper"); caph_cache_catpages(); - if (caph_limit_stdio() < 0) { - xo_warn("Unable to limit stdio"); - fileargs_free(fa); - exit(1); - } - - if (caph_enter_casper() < 0) { - xo_warn("Unable to enter capability mode"); - fileargs_free(fa); - exit(1); - } + if (caph_limit_stdio() < 0) + xo_err(EXIT_FAILURE, "Unable to limit stdio"); + if (caph_enter_casper() < 0) + xo_err(EXIT_FAILURE, "Unable to enter capability mode"); /* Wc's flags are on by default. */ - if (doline + doword + dochar + domulti + dolongline == 0) - doline = doword = dochar = 1; + if (!(doline || doword || dochar || domulti || dolongline)) + doline = doword = dochar = true; stderr_handle = xo_create_to_file(stderr, XO_STYLE_TEXT, 0); xo_open_container("wc"); @@ -162,19 +154,19 @@ main(int argc, char *argv[]) errors = 0; total = 0; - if (!*argv) { - xo_open_instance("file"); - if (cnt((char *)NULL) != 0) + if (argc == 0) { + xo_open_instance("file"); + if (cnt(NULL) != 0) ++errors; - xo_close_instance("file"); + xo_close_instance("file"); } else { - do { - xo_open_instance("file"); - if (cnt(*argv) != 0) + while (argc--) { + xo_open_instance("file"); + if (cnt(*argv++) != 0) ++errors; - xo_close_instance("file"); + xo_close_instance("file"); ++total; - } while(*++argv); + } } xo_close_list("file"); @@ -187,8 +179,9 @@ main(int argc, char *argv[]) fileargs_free(fa); xo_close_container("wc"); - xo_finish(); - exit(errors == 0 ? 0 : 1); + if (xo_finish() < 0) + xo_err(EXIT_FAILURE, "stdout"); + exit(errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } static void @@ -212,7 +205,7 @@ show_cnt(const char *file, uintmax_t linect, uintmax_t wordct, xo_emit_h(xop, " {:characters/%7ju/%ju}", charct); if (dolongline) xo_emit_h(xop, " {:long-lines/%7ju/%ju}", llct); - if (file != NULL) + if (file != stdin_filename) xo_emit_h(xop, " {:filename/%s}\n", file); else xo_emit_h(xop, "\n"); @@ -221,20 +214,21 @@ show_cnt(const char *file, uintmax_t linect, uintmax_t wordct, static int cnt(const char *file) { + char buf[MAXBSIZE], *p; struct stat sb; + mbstate_t mbs; uintmax_t linect, wordct, charct, llct, tmpll; - int fd, len, warned; + ssize_t len; size_t clen; - short gotsp; - u_char *p; - u_char buf[MAXBSIZE]; + int fd; wchar_t wch; - mbstate_t mbs; + bool gotsp, warned; linect = wordct = charct = llct = tmpll = 0; - if (file == NULL) + if (file == NULL) { fd = STDIN_FILENO; - else if ((fd = fileargs_open(fa, file)) < 0) { + file = stdin_filename; + } else if ((fd = fileargs_open(fa, file)) < 0) { xo_warn("%s: open", file); return (1); } @@ -246,7 +240,7 @@ cnt(const char *file) */ if (doline == 0 && dolongline == 0) { if (fstat(fd, &sb)) { - xo_warn("%s: fstat", file != NULL ? file : "stdin"); + xo_warn("%s: fstat", file); (void)close(fd); return (1); } @@ -265,9 +259,9 @@ cnt(const char *file) * lines than to get words, since the word count requires locale * handling. */ - while ((len = read(fd, buf, MAXBSIZE))) { - if (len == -1) { - xo_warn("%s: read", file != NULL ? file : "stdin"); + while ((len = read(fd, buf, sizeof(buf)))) { + if (len < 0) { + xo_warn("%s: read", file); (void)close(fd); return (1); } @@ -275,14 +269,16 @@ cnt(const char *file) show_cnt(file, linect, wordct, charct, llct); charct += len; if (doline || dolongline) { - for (p = buf; len--; ++p) + for (p = buf; len > 0; --len, ++p) { if (*p == '\n') { if (tmpll > llct) llct = tmpll; tmpll = 0; ++linect; - } else + } else { tmpll++; + } + } } } reset_siginfo(); @@ -297,12 +293,12 @@ cnt(const char *file) return (0); /* Do it the hard way... */ -word: gotsp = 1; - warned = 0; +word: gotsp = true; + warned = false; memset(&mbs, 0, sizeof(mbs)); - while ((len = read(fd, buf, MAXBSIZE)) != 0) { - if (len == -1) { - xo_warn("%s: read", file != NULL ? file : "stdin"); + while ((len = read(fd, buf, sizeof(buf))) != 0) { + if (len < 0) { + xo_warn("%s: read", file); (void)close(fd); return (1); } @@ -313,21 +309,20 @@ word: gotsp = 1; if (!domulti || MB_CUR_MAX == 1) { clen = 1; wch = (unsigned char)*p; - } else if ((clen = mbrtowc(&wch, p, len, &mbs)) == - (size_t)-1) { + } else if ((clen = mbrtowc(&wch, p, len, &mbs)) == 0) { + clen = 1; + } else if (clen == (size_t)-1) { if (!warned) { errno = EILSEQ; - xo_warn("%s", - file != NULL ? file : "stdin"); - warned = 1; + xo_warn("%s", file); + warned = true; } memset(&mbs, 0, sizeof(mbs)); clen = 1; wch = (unsigned char)*p; - } else if (clen == (size_t)-2) + } else if (clen == (size_t)-2) { break; - else if (clen == 0) - clen = 1; + } charct++; if (wch != L'\n') tmpll++; @@ -339,18 +334,19 @@ word: gotsp = 1; tmpll = 0; ++linect; } - if (iswspace(wch)) - gotsp = 1; - else if (gotsp) { - gotsp = 0; + if (iswspace(wch)) { + gotsp = true; + } else if (gotsp) { + gotsp = false; ++wordct; } } } reset_siginfo(); - if (domulti && MB_CUR_MAX > 1) + if (domulti && MB_CUR_MAX > 1) { if (mbrtowc(NULL, NULL, 0, &mbs) == (size_t)-1 && !warned) - xo_warn("%s", file != NULL ? file : "stdin"); + xo_warn("%s", file); + } if (doline) tlinect += linect; if (doword) @@ -368,5 +364,5 @@ static void usage(void) { xo_error("usage: wc [-Lclmw] [file ...]\n"); - exit(1); + exit(EXIT_FAILURE); } From nobody Tue Feb 14 22:34:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/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:07:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGcLf3D9Wz3qN9n; Tue, 14 Feb 2023 23:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGcLf2jX5z4NDC; Tue, 14 Feb 2023 23:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676416074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmzMEdH/X7E54smInXy6DQKEznOT1R5YGcN6f+/ExUY=; b=CAgW8wPkMJXSwFdJAJ244tw6Zxe+HOlCANlQuBe+UIjtSfLQTEFdsycpLJ5wKBmqNdMOWc ZTp7EfZg/LB0pBNfC2KtgphMl5J2rUkIKHgDAabQprBtZ6oYkHf+Pi5B3C2sQ9gZVhAg9C dHr80OHXni6dgyWQuuGqFAoCl9wSCvAKMSFnnFwJYiz6gm0QraMV+zsoAdjQh9D5GRpWum XjDEC9tuZYDcy/iLYeg0JptjtiAoQeR+fy7IvupRSdvJJx5PYz4h/MWWGTduGYqQoSeT88 8Upq+dcI4ekMamaQJjDsE4dHdLZiSN3IPd6/v8/XD4fNmOa0IIAO+fswD3c0gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676416074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmzMEdH/X7E54smInXy6DQKEznOT1R5YGcN6f+/ExUY=; b=xAYPIGjZIex3yrmm8MYlmWXn8jEqPx4YX7W6MrFOp3IyO9FED97X9Us6AFjejVGuT/BPS/ SEnjgtX/7lV+yM8TTyOuEt4f+lJM9yOB45nCFXi3GZEZAGJIoSanK0pXAYZGBw82fnwm4r QvpvTj7z4sanrHAMCf/GvYfOnQ/dDKrfU/PbyGrRn8hF6QVTx20f9DgC3unWqKlcT0EOsS Fbb+QbDWoDbFbv4dl7181sCPILYL35r6KITcDx6t5UD8loQ7d1Ob/EmpqdA5PEj8PviZPB YNra8lhE0kZYLF5Oj07dXt9cSci3s+IiIMhIdhrgTcCM8yUHUqopL1A/xuUgsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676416074; a=rsa-sha256; cv=none; b=AjJcyVFqz8sJQDFQOTi+MZJ2XBmO/7PK3DJrFEj/KyCmNi1jSsxQB9RY1/AeDjao4S7CAm olenG5LKMJDdq0HLPOFkHDmQd11yg+q6YX2JNTxmFpaXft6xsUStcupMM9StXTlc1YXabt 64rHHzaKCoMXYt7Ym2SBEvLjH8jNjP9RpO8UESYxcwm8sbJw20EK8x1VacagKn5EzW78CT 281rD7O1QsJzh3rvLjZ7pPmpFLLI68IOtWxCdhHlBWG5+jfu4ktX59F/Hq0hRkVI+Wmjvs YYzmsv/DQd7ydfvo8O17ZFCuY9tGlILFoWqzZ3LiTkWoJWYXYEWMeqoPsl2WGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGcLf1lpkz1GYG; Tue, 14 Feb 2023 23:07: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 31EN7sRt091041; Tue, 14 Feb 2023 23:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EN7sX9091040; Tue, 14 Feb 2023 23:07:54 GMT (envelope-from git) Date: Tue, 14 Feb 2023 23:07:54 GMT Message-Id: <202302142307.31EN7sX9091040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 4b0552d5f4ea - main - linuxkpi: Move `IS_ENABLED()` and friends to List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4b0552d5f4ea0bd09d7f0f178810886472e84d63 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=4b0552d5f4ea0bd09d7f0f178810886472e84d63 commit 4b0552d5f4ea0bd09d7f0f178810886472e84d63 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-13 20:52:08 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-14 23:06:32 +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 --- 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 Tue Feb 14 23:17:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 00:44:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGfTw3rVNz3qV27; Wed, 15 Feb 2023 00:44: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 4PGfTw3M4hz4VKr; Wed, 15 Feb 2023 00:44:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676421860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NP0jxJuelgjOI1UYSjmGwXbMNRUkPHaBgWKjRdmt3wc=; b=reC+IhpJ6UMUqqfaz2q0z99iGU169FzVVRmaAXWyLcU8riJsQRw7D95cH6dVZAIXeuq7MX Z2XxIhih/cyyT/DkHifXNzdvkpBtKo4yMG1EfQmYxoOhXYg/BB2XOS8Vg4MDTAn/hB9xIx RkYwQ0qzWodOq6y4xhl1Yuipxv6udrmN2xFYSP9jtxb+e85nYDCAsvVDpBvDakMpVJZtiM TUtyj53XVN7OQYAT1Rdhm9qwO70rqLkettlIqAtxow9Kf0Ms9q0ckWJHVlfyD4Gy8EbYEH Qa4JtO/boXQhTuZpTjl/OYxNaGxTn7UHyepCv6SDrmJhWf4eX9P8xbQNZ+YHLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676421860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NP0jxJuelgjOI1UYSjmGwXbMNRUkPHaBgWKjRdmt3wc=; b=uAqUBa8s60VpkM/QdeO9acu4Kf0Rk1D8qIsBc0EP7hmtdR0vyl+LZu3LiBHwGFpaR1cgL8 Fj3wZcZjwTY0zCDxlqtU+PEz0z1XPUlWLmOiqEVhJG5Md68vOd6ds6LWVojoQsTynesjrL Cw3Xql/XIPWyQpCOC7q0hyzGfUWM68upvzIIIpYgl3pIxKG7zDv9bfFY6dFRaVbmBrPczU 5DKiAMLGYr7RrAODbInjIMJvkpObWno1uj32/LNxGLwFeuiDoCAyuU6IcPvEL8jC6kKlSF 9WjAkQLoyxWvCQDcnkulRMJp5qi/u3Z89YaQnuv97fzbhLO14wdjqp887MAUxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676421860; a=rsa-sha256; cv=none; b=DboeZVwOFMtolYpQO/bST8NmyJjq5SAAn+PReVYx9BF/HeFyGzawUpKraDoFmvj7N5MA2R rqT854yhJitqXGBnGpf0KbwESUHOmJZ9sfxHOJOlkeclGP4UFsEK9mgu0NB3Ldv5be1H7W OPj3qOypyhmluKBJ7rQYfl6AdNV/bBbgqDZX6m09LO0I8RvrqQbqQoG1L6O8ukF2NppOaj IrdrMg2523pf3KXk6sWji2gLv3wLw6gaZ5nasDZwQ4wCQxr+YWUaAduASC8tHKObOZFK4B fzpSkZZEWmq8c9UNEjCguenskexp0M/QmzILsXTm1ywR/71cDLy++Y9WO7T7dA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGfTw2Prfz1K5v; Wed, 15 Feb 2023 00:44: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 31F0iK2i033431; Wed, 15 Feb 2023 00:44:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31F0iKLn033430; Wed, 15 Feb 2023 00:44:20 GMT (envelope-from git) Date: Wed, 15 Feb 2023 00:44:20 GMT Message-Id: <202302150044.31F0iKLn033430@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5942b4b6fde3 - main - sys/param.h: Add _WANT_P_OSREL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5942b4b6fde3f4ce6d0295fbcf135f552f92c607 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5942b4b6fde3f4ce6d0295fbcf135f552f92c607 commit 5942b4b6fde3f4ce6d0295fbcf135f552f92c607 Author: Konstantin Belousov AuthorDate: 2023-02-14 08:52:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-15 00:43:18 +0000 sys/param.h: Add _WANT_P_OSREL Use it instead of defining IN_RTLD by base sources that want P_OSREL_ defines in userspace, but are not rtld. This allows to remove abuse of IN_RTLD from userspace. Reviewed by: dchagin, markj, imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38585 --- lib/libc/amd64/sys/amd64_get_fsbase.c | 3 +-- lib/libc/amd64/sys/amd64_get_gsbase.c | 3 +-- lib/libc/amd64/sys/amd64_set_fsbase.c | 3 +-- lib/libc/amd64/sys/amd64_set_gsbase.c | 3 +-- libexec/rtld-elf/amd64/reloc.c | 1 + libexec/rtld-elf/map_object.c | 1 + sbin/fsck_ffs/main.c | 2 +- sbin/newfs/mkfs.c | 2 +- sys/sys/param.h | 2 +- 9 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/libc/amd64/sys/amd64_get_fsbase.c b/lib/libc/amd64/sys/amd64_get_fsbase.c index 2de99912daf2..04d872165e32 100644 --- a/lib/libc/amd64/sys/amd64_get_fsbase.c +++ b/lib/libc/amd64/sys/amd64_get_fsbase.c @@ -33,9 +33,8 @@ #include __FBSDID("$FreeBSD$"); -#define IN_RTLD 1 +#define _WANT_P_OSREL #include -#undef IN_RTLD #include #include #include diff --git a/lib/libc/amd64/sys/amd64_get_gsbase.c b/lib/libc/amd64/sys/amd64_get_gsbase.c index 0deac34c90d1..35f69da6ac1e 100644 --- a/lib/libc/amd64/sys/amd64_get_gsbase.c +++ b/lib/libc/amd64/sys/amd64_get_gsbase.c @@ -33,9 +33,8 @@ #include __FBSDID("$FreeBSD$"); -#define IN_RTLD 1 +#define _WANT_P_OSREL #include -#undef IN_RTLD #include #include #include diff --git a/lib/libc/amd64/sys/amd64_set_fsbase.c b/lib/libc/amd64/sys/amd64_set_fsbase.c index 02ca9233d855..9474b1148161 100644 --- a/lib/libc/amd64/sys/amd64_set_fsbase.c +++ b/lib/libc/amd64/sys/amd64_set_fsbase.c @@ -33,9 +33,8 @@ #include __FBSDID("$FreeBSD$"); -#define IN_RTLD 1 +#define _WANT_P_OSREL #include -#undef IN_RTLD #include #include #include diff --git a/lib/libc/amd64/sys/amd64_set_gsbase.c b/lib/libc/amd64/sys/amd64_set_gsbase.c index c4880c126ae9..5ecde27f27f0 100644 --- a/lib/libc/amd64/sys/amd64_set_gsbase.c +++ b/lib/libc/amd64/sys/amd64_set_gsbase.c @@ -33,9 +33,8 @@ #include __FBSDID("$FreeBSD$"); -#define IN_RTLD 1 +#define _WANT_P_OSREL #include -#undef IN_RTLD #include #include #include diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index c7cf7bd58845..c9a2734853b6 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -33,6 +33,7 @@ * John Polstra . */ +#define _WANT_P_OSREL #include #include #include diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 4bf32398710d..1ca5fc16477a 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -27,6 +27,7 @@ * $FreeBSD$ */ +#define _WANT_P_OSREL #include #include #include diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 14b5c1076d5e..f7d995a54d1b 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #include __FBSDID("$FreeBSD$"); -#define IN_RTLD /* So we pickup the P_OSREL defines */ +#define _WANT_P_OSREL #include #include #include diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 48091d7882d0..56496eacdc7c 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -46,7 +46,7 @@ static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95"; #include __FBSDID("$FreeBSD$"); -#define IN_RTLD /* So we pickup the P_OSREL defines */ +#define _WANT_P_OSREL #include #include #include diff --git a/sys/sys/param.h b/sys/sys/param.h index 751020f6d087..2d5edf9a0b90 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -94,7 +94,7 @@ #undef __FreeBSD_kernel__ #define __FreeBSD_kernel__ -#if defined(_KERNEL) || defined(IN_RTLD) +#if defined(_KERNEL) || defined(_WANT_P_OSREL) #define P_OSREL_SIGWAIT 700000 #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 From nobody Wed Feb 15 00:57:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGfng6NFXz3qVXP; Wed, 15 Feb 2023 00:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGfng5nxhz4WyY; Wed, 15 Feb 2023 00:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676422679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5pxo9aEHMJqLGR7LSADAty45A8abkt+6hRqYBQdbuM0=; b=Rq8TXA5pcvmqSzKPaTrJhmm9kzBHHKNK2MsQyiv8DlbRAmoIn5AlmqIIBc7yvlIksx7l76 9O7XCUsG+osqGwhTtX+iSdwEpwqiKoxWIaXNQ7XpA576HMyZSoqrF/o5b9SbFbXaY5zb3t KVh3JonCTW77jvBARDW3OrfaP+zqH40SaLpJKfIrBJDF+NOjMtDLAjzQ4AC6Fy3Nggr51g 1NrkcsBjqgzTp0mZZqs6beOamyn7n3+5ew9MkeZV9QWjX+HnkTGIEdNBvFzPAf7RGuQj7T 3BVazogp9Ud7qCIuJwqWfQRMpLex+C8Tw4bNjBPX2Ayh5hlI11ppTY0XQL4B9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676422679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5pxo9aEHMJqLGR7LSADAty45A8abkt+6hRqYBQdbuM0=; b=LvszN7eEmFte9FNs2hPfXL6NBZceVgUg6a7mhcYloFWsnz5nBplrQZRrg/8059mG23I9Hm FSkbSxlCtraKk46zd3ifPD2N16rd+BtsXWXxn6/7ro3k8kvD81UPXGLXLtyz10yvndq9Gi I8w4ddgZ7BXoQodwaIR7Jcd6igjauloYKUPgxGLRVcAiOGbod7FlStsLm0rlAzp8lZ1wTB KYXUe2BekTSZZ2S47NiLBaYaRkZzPtgqPVwkTU9LutJvEHHKwG30ToRWd/hSjMLCktYCQA dvfASv7Ho7tvoM8399wqbmHx/mOMoDKdU9hwAOPjn3uJJZd9VtzfToKm1uO5rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676422679; a=rsa-sha256; cv=none; b=u2E+LK+OuBgLfZUN1U1AlniaF/de0+nCgy3s5+6oUoGyvwHhWp21POBwkNo/FTM1oc6M89 y1QaSEWTszsoE/fMR+N/QJnnXhMfsVd7HMRsUVLGPx5W35UGuuTtnvP+53EeNwji5SIX4v tgJMJ39EgE+FCbCrqtwk30SOce149zfbiPF+OTeR1GDUyxDBh3TMEV4cD9BNi/xYVYyVe4 wsP/LiHjpaprLlWhwQcAcE8s2Q45CxBofLMXfaHQlcy6qa/eSyGcUlhtFyW3nWiLbuFzu3 h4RJo2OkMlRa8Ra5sg0rvxlG81/U2N/wYTZIMxB9zB/wFBSvyLuHY9+zVCUGkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGfng4rNzz1K6Y; Wed, 15 Feb 2023 00:57: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 31F0vxn3047920; Wed, 15 Feb 2023 00:57:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31F0vxJw047919; Wed, 15 Feb 2023 00:57:59 GMT (envelope-from git) Date: Wed, 15 Feb 2023 00:57:59 GMT Message-Id: <202302150057.31F0vxJw047919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9ff2fbdf2ded - main - tmpfs: remove bogus MPASS(VOP_ISLOCKED(vp)) asserts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ff2fbdf2ded59e276fdbf7ef7d18c726386b6fb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9ff2fbdf2ded59e276fdbf7ef7d18c726386b6fb commit 9ff2fbdf2ded59e276fdbf7ef7d18c726386b6fb Author: Konstantin Belousov AuthorDate: 2023-02-13 23:23:24 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-15 00:57:40 +0000 tmpfs: remove bogus MPASS(VOP_ISLOCKED(vp)) asserts VOP_ISLOCKED() does not return bool, its only reliable use it to check that the vnode is exclusively locked by the calling thread. Almost all asserts of this form repeated auto-generated assertions from vnode_if.src for VOPs, in the incorrect way. In two places where the assertions would be meaningful, convert them to ASSERT_VOP_LOCKED() statements. Reviewed by: markj, mjg Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38576 --- sys/fs/tmpfs/tmpfs_subr.c | 3 ++- sys/fs/tmpfs/tmpfs_vnops.c | 24 ++++++++---------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index ccb9977c39eb..cfd4787fb712 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1110,7 +1110,8 @@ out: *vpp = vp; #ifdef INVARIANTS - MPASS(*vpp != NULL && VOP_ISLOCKED(*vpp)); + MPASS(*vpp != NULL); + ASSERT_VOP_LOCKED(*vpp, __func__); TMPFS_NODE_LOCK(node); MPASS(*vpp == node->tn_vnode); TMPFS_NODE_UNLOCK(node); diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index b1d6bce6754f..ea09170661e7 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -218,11 +218,18 @@ tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) cache_enter(dvp, *vpp, cnp); out: +#ifdef INVARIANTS /* * If there were no errors, *vpp cannot be null and it must be * locked. */ - MPASS(IFF(error == 0, *vpp != NULLVP && VOP_ISLOCKED(*vpp))); + if (error == 0) { + MPASS(*vpp != NULLVP); + ASSERT_VOP_LOCKED(*vpp, __func__); + } else { + MPASS(*vpp == NULL); + } +#endif return (error); } @@ -545,7 +552,6 @@ tmpfs_setattr(struct vop_setattr_args *v) int error; - MPASS(VOP_ISLOCKED(vp)); ASSERT_VOP_IN_SEQC(vp); error = 0; @@ -588,8 +594,6 @@ tmpfs_setattr(struct vop_setattr_args *v) */ tmpfs_update(vp); - MPASS(VOP_ISLOCKED(vp)); - return (error); } @@ -725,8 +729,6 @@ tmpfs_fsync(struct vop_fsync_args *v) { struct vnode *vp = v->a_vp; - MPASS(VOP_ISLOCKED(vp)); - tmpfs_check_mtime(vp); tmpfs_update(vp); @@ -745,9 +747,6 @@ tmpfs_remove(struct vop_remove_args *v) struct tmpfs_node *dnode; struct tmpfs_node *node; - MPASS(VOP_ISLOCKED(dvp)); - MPASS(VOP_ISLOCKED(vp)); - if (vp->v_type == VDIR) { error = EISDIR; goto out; @@ -796,7 +795,6 @@ tmpfs_link(struct vop_link_args *v) struct tmpfs_dirent *de; struct tmpfs_node *node; - MPASS(VOP_ISLOCKED(dvp)); MPASS(dvp != vp); /* XXX When can this be false? */ node = VP_TO_TMPFS_NODE(vp); @@ -987,9 +985,6 @@ tmpfs_rename(struct vop_rename_args *v) int error; bool want_seqc_end; - MPASS(VOP_ISLOCKED(tdvp)); - MPASS(IMPLIES(tvp != NULL, VOP_ISLOCKED(tvp))); - want_seqc_end = false; /* @@ -1323,9 +1318,6 @@ tmpfs_rmdir(struct vop_rmdir_args *v) struct tmpfs_node *dnode; struct tmpfs_node *node; - MPASS(VOP_ISLOCKED(dvp)); - MPASS(VOP_ISLOCKED(vp)); - tmp = VFS_TO_TMPFS(dvp->v_mount); dnode = VP_TO_TMPFS_DIR(dvp); node = VP_TO_TMPFS_DIR(vp); From nobody Wed Feb 15 00:58:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGfnj0b4gz3qVHY; Wed, 15 Feb 2023 00:58: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 4PGfnh6tzBz4X00; Wed, 15 Feb 2023 00:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676422681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfqIHpiM1Jc3IDeBjDFI1h9aPqPoxYLq1YsXTRLU7QM=; b=mIVQVLiBLrvBwwsd2AOD1IF/XddS2+Ej6XTCaGMyjeSC10Xl+iI7DEZ5os8mjUL+lz98uq ULy7wC5zuG7lhR/xq6l2O/TX2fLJlkxRXGQmVZBFZMwiADqQxSBw+mQ9CDjYTHSXdo1nLf OfglZtpGgy/BP8R3zMqlXfgFNGCtldegBk6xX20s0/q7ea2ouY9cMp6JzvbvCBCrpHOcni UdIKZnNv+bzK6czFa0ojeOeJq6DHZT7iNmesoy9MMoKFwyVWi5rfNjR8KN/7ilsrQZVxJN T19rkc8BNFu771/+svklfa4oSyA7QqcnnU2zHum2RTgil14qkBgscyI6Gj6lEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676422681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfqIHpiM1Jc3IDeBjDFI1h9aPqPoxYLq1YsXTRLU7QM=; b=LA+ioprd0DtgqkrpwRrnvJ/OQr2Ck9NCFfqUJDdWFPHE+ncgrSUvKoV6xQm2GhCuN7IBic 3fulURuxt6FNWfu2dHMZMPvh91d6kwBu/tTkZ5aGbY1nnM4ErBSrvTGa34SIh8rFtNILuD 3ThgFG9XhWPHmnhIPLFpk88tV4GrJMglNSXpx9FDP/xK+zWCZAz7shDJnIr3UHqDN69b84 emNLeP6iR27V4SFSMM6dU52/oCThOSU/MsvZgGecK6G2UxleYi2lqIeZwgGba0JxRk1UcZ 8ikNZ3bQjU4f95iDRupWX4EDG6OgDl+Y2eUEXPLcM+QQ60WMZPxn+GQ1AVnlig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676422681; a=rsa-sha256; cv=none; b=tbl6pjnx3+fWej3czeXuhWDF0RL06nBANQrY+r0E762McMi9rnwFuwjEgRIqf7JiVyHTMm RpwRgS2S+Mrou1b77kGhRS+eyt7RftYPtqX/Cqn4RluXygMwzWqzqsWAmAul5Vb59Loxs1 3x0Q5txKzc9whp4af2C9SNmenEzo5Wk/qFD/z5XVLXfbQTfYKUU3NeV9DluvqSqU2q3mi7 uWsNlrh5CrZ+dp9IP3L3qekEABIW3ZYhn47nTu4b2TDBoawvPaKNeOR7KPwJyimVrkR/HU eyKiT559tXhgGUCH5KAwuwrYZ+6VJLFsZsXAr0D6uUDFj587IODbj7mGFdP5/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 4PGfnh5zyBz1KB0; Wed, 15 Feb 2023 00:58: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 31F0w0Ok047951; Wed, 15 Feb 2023 00:58:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31F0w06E047950; Wed, 15 Feb 2023 00:58:00 GMT (envelope-from git) Date: Wed, 15 Feb 2023 00:58:00 GMT Message-Id: <202302150058.31F0w06E047950@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b918ee2ce485 - main - tmpfs: remove IFF macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b918ee2ce4850253ddd884e39dabecd6e96bf474 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b918ee2ce4850253ddd884e39dabecd6e96bf474 commit b918ee2ce4850253ddd884e39dabecd6e96bf474 Author: Konstantin Belousov AuthorDate: 2023-02-13 23:47:44 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-15 00:57:41 +0000 tmpfs: remove IFF macro Requested by: mjg Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38576 --- sys/fs/tmpfs/tmpfs.h | 1 - sys/fs/tmpfs/tmpfs_subr.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 70ed066ef0f5..eda1c3b12c24 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -516,7 +516,6 @@ tmpfs_update(struct vnode *vp) * Convenience macros to simplify some logical expressions. */ #define IMPLIES(a, b) (!(a) || (b)) -#define IFF(a, b) (IMPLIES(a, b) && IMPLIES(b, a)) /* * Checks that the directory entry pointed by 'de' matches the name 'name' diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index cfd4787fb712..351ca825f203 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -547,8 +547,8 @@ tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, enum vtype type, * allocated, this must be the request to do it. */ MPASS(IMPLIES(tmp->tm_root == NULL, parent == NULL && type == VDIR)); - MPASS(IFF(type == VLNK, target != NULL)); - MPASS(IFF(type == VBLK || type == VCHR, rdev != VNOVAL)); + MPASS((type == VLNK) ^ (target == NULL)); + MPASS((type == VBLK || type == VCHR) ^ (rdev == VNOVAL)); if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max) return (ENOSPC); From nobody Wed Feb 15 02:13:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGhSt6R6Hz3qb6P; Wed, 15 Feb 2023 02:13: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 4PGhSt5w59z4cY9; Wed, 15 Feb 2023 02:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676427214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RL9h+KyfIDAHyyQdIlkP40PUg5ggRo920tTQqQKxsn0=; b=XNevxtq3vjtnzgGTCl9GFRwTZvp5dQo4K5k8+3GSgIH10fS+e4BIu/LOKxDu74zqJ+1uDL Te5jadV/EWOdL1uOEJV5Y0qGRuiZgl4o8HtkqFNYq+REH8Iv8jIRLgYKxskSITEeVz8v93 xOir50SDG5VlTE2FDcn63hpoAvWHCKziKoRToaCvahnnCR5o3SPEEOlUol25qBnivklG7l kiSKmw36G4Rro/C7ziIc45EFWgIK/QJkkPsPow8fp+Ha4S8LuN8cL2M4ejREWMYS1Pc7kg n7YtNSxJ+P9e4rQBmzn8KjxOBdJeHxlDuRsn/XF09FqXIF4P9D2EaDkjpTrUxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676427214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RL9h+KyfIDAHyyQdIlkP40PUg5ggRo920tTQqQKxsn0=; b=xUzcQRC4pTGUI5nNMSwtpEqBFHUoRDU2lgGGsEHlS3Uu3nQ1CJJb8vMIquI/HDAaYR0Qfu pMKsPlMw8OLF5XHk4J5eIgve9lZDs9WtQxiAwKIH1XANyMOXbIy67/+juYA82ThdqN7f00 kKdPbPv8y8H7zEQalaTPGvbNX4iFSrTgx6pVjlcM0JdbtucCpQ+mFKclb2mHwocYa2CRBl Mh/hnlo/6z8qndfsbP0fAftoyd4qTd68t91zw/NLlozkbcZKmnyPbBaQUcHYCocs0KCgA2 JMLA+5zUlD1wtWeoxgsEqqY2ut9+KQfhIVJ6VRjGIAjJM3/7o9IF1dL9Zm0Uwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676427214; a=rsa-sha256; cv=none; b=VgkZPJT/WdWylTbJP1HKMw+SnEgdQSGRTuS8G8H28gNOlNm7YHs5rUQsgnIh2AgInjSzuL mVFdWPKMQGzHn0FI0hDHMXQ1pQtHqgOU16pQjpn/0kWRyKUoBr8gC05dKbU0sXIlieugOf 0wzs++IWxWsjY/sNYzkR+/8v+FYQRnGosMBLcDnbNdSGCnC42WMJMWXB3j+8B3ZfYTir+r OU3N+OCtNgTB8OCRyVKLH0Z2zJYnOaOXg5v0EgLn9VFRguVwuL1tqw2ONVKVCl/3y4l7So 1yY7FJ0eVaCx+RC+saphkoJq4zbGI2x8QOQA9JhAhLa6PgYMTSaD6yCVDDqKKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGhSt4gSJz1M6d; Wed, 15 Feb 2023 02:13: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 31F2DY2I062011; Wed, 15 Feb 2023 02:13:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31F2DYAH062010; Wed, 15 Feb 2023 02:13:34 GMT (envelope-from git) Date: Wed, 15 Feb 2023 02:13:34 GMT Message-Id: <202302150213.31F2DYAH062010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: ae6cff89738b - main - tarfs: Don't panic if the parent of a new node is not a directory. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae6cff89738bab9a4a956c230fb9dc6c4d5e113f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ae6cff89738bab9a4a956c230fb9dc6c4d5e113f commit ae6cff89738bab9a4a956c230fb9dc6c4d5e113f Author: Dag-Erling Smørgrav AuthorDate: 2023-02-15 02:12:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-15 02:13:11 +0000 tarfs: Don't panic if the parent of a new node is not a directory. PR: 269519 Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D38587 --- sys/fs/tarfs/tarfs_subr.c | 3 ++- sys/fs/tarfs/tarfs_vfsops.c | 12 +++++++++++- tests/sys/fs/tarfs/tarfs_test.sh | 30 ++++++++++++++++++++++++++---- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/sys/fs/tarfs/tarfs_subr.c b/sys/fs/tarfs/tarfs_subr.c index fc2955b44606..0cba43a8c21b 100644 --- a/sys/fs/tarfs/tarfs_subr.c +++ b/sys/fs/tarfs/tarfs_subr.c @@ -171,6 +171,8 @@ tarfs_alloc_node(struct tarfs_mount *tmp, const char *name, size_t namelen, TARFS_DPF(ALLOC, "%s(%.*s)\n", __func__, (int)namelen, name); + if (parent != NULL && parent->type != VDIR) + return (ENOTDIR); tnp = malloc(sizeof(struct tarfs_node), M_TARFSNODE, M_WAITOK | M_ZERO); mtx_init(&tnp->lock, "tarfs node lock", NULL, MTX_DEF); tnp->gen = arc4random(); @@ -233,7 +235,6 @@ tarfs_alloc_node(struct tarfs_mount *tmp, const char *name, size_t namelen, panic("%s: type %d not allowed", __func__, type); } if (parent != NULL) { - MPASS(parent->type == VDIR); TARFS_NODE_LOCK(parent); TAILQ_INSERT_TAIL(&parent->dir.dirhead, tnp, dirents); parent->size += sizeof(struct tarfs_node); diff --git a/sys/fs/tarfs/tarfs_vfsops.c b/sys/fs/tarfs/tarfs_vfsops.c index 138a57c22e7f..b3c30e884a9d 100644 --- a/sys/fs/tarfs/tarfs_vfsops.c +++ b/sys/fs/tarfs/tarfs_vfsops.c @@ -320,6 +320,12 @@ tarfs_lookup_path(struct tarfs_mount *tmp, char *name, size_t namelen, break; } + /* we're not at the end, so parent must be a directory */ + if (parent->type != VDIR) { + error = ENOTDIR; + break; + } + /* locate the next separator */ for (sep = name, len = 0; *sep != '\0' && *sep != '/' && len < namelen; @@ -685,8 +691,12 @@ again: error = tarfs_lookup_path(tmp, name, namelen, &namep, &sep, &parent, &tnp, true); - if (error != 0) + if (error != 0) { + TARFS_DPF(ALLOC, "%s: failed to look up %.*s\n", __func__, + (int)namelen, name); + error = EINVAL; goto bad; + } if (tnp != NULL) { if (hdrp->typeflag[0] == TAR_TYPE_DIRECTORY) { /* XXX set attributes? */ diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh index d812ced80bbb..634b6be3dd08 100644 --- a/tests/sys/fs/tarfs/tarfs_test.sh +++ b/tests/sys/fs/tarfs/tarfs_test.sh @@ -33,10 +33,11 @@ mnt="$(realpath ${TMPDIR:-/tmp})/mnt.$$" sum=4da2143234486307bb44eaa610375301781a577d1172f362b88bb4b1643dee62 atf_test_case tarfs_test -tarfs_test_head() { +tarfs_basic_head() { + atf_set "descr" "Basic function test" atf_set "require.user" "root" } -tarfs_test_body() { +tarfs_basic_body() { mkdir "${mnt}" "${mktar}" tarfs_test.tar.zst atf_check mount -rt tarfs tarfs_test.tar.zst "${mnt}" @@ -45,10 +46,31 @@ tarfs_test_body() { atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/long_link)" atf_check_equal "$(sha256 -q "${mnt}"/sparse_file)" ${sum} } -tarfs_test_cleanup() { +tarfs_basic_cleanup() { + umount "${mnt}" +} + +atf_test_case tarfs_notdir +tarfs_notdir_head() { + atf_set "descr" "Regression test for PR 269519" + atf_set "require.user" "root" +} +tarfs_notdir_body() { + mkdir "${mnt}" + echo "hello" >d + tar cf tarfs_notdir.tar d + rm d + mkdir -p d/s + echo "world" >d/s/f + tar rf tarfs_notdir.tar d/s/f + atf_check -s not-exit:0 -e match:"Invalid" \ + mount -rt tarfs tarfs_notdir.tar "${mnt}" +} +tarfs_notdir_cleanup() { umount "${mnt}" } atf_init_test_cases() { - atf_add_test_case tarfs_test + atf_add_test_case tarfs_basic + atf_add_test_case tarfs_notdir } From nobody Wed Feb 15 05:18:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGmYz5sC1z3rHhP; Wed, 15 Feb 2023 05:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGmYz5L2fz3N2L; Wed, 15 Feb 2023 05:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676438295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdaoEQSZ71U+TFggIFYvuRL21zVDKAe/XF7QP0fFlzA=; b=vYFr7y01BWv5SOz2gKlbcIig2X5FOvY7FJJpX+IBYttD6ny9tR3wFtba6HK/I+5clgR5vq IdAl5YZ69HeED4ICTLiqbsmvxUMi4tlhzwdQmBFTHC3Sg+vUVgGMtK2enEGaLyJ+Jl2Q1x 9nXJMSXYhF7G7jF1V3Blp23d9/Mt7+/Ggm43z4YCtaIwbS9JhfvI3HozV/szz243apDuVz 6rQkDaguxp62mKc9Pob6V3lOXV2uDjieetG2PAbGljiQAz7MPF6GnkIgWchusyKdfiiCtX rK1J+zK30Pa+316e9OQTS9h0dp7mXYdT/3Ol4kMMQscdq4FPBwg9EftVXh0oMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676438295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdaoEQSZ71U+TFggIFYvuRL21zVDKAe/XF7QP0fFlzA=; b=r5ntK0pcFgZlQdggBWY6utBA7FO9Nl82aKdOEI0h3S2sC6mOVi1M/i3j9AF33NHP1hdfNY EhSebQkdqJVnthk1AHLDzypaPqpymFSKvrlPDyZhwM8nswlE1tHi1dt59OOp4LJZYohHne tNm4bWLdY940wtAcMC4yplrC+u41TMnrlU7QydlDLzUptebDT1+I3HH8v9Uy7/U5wERsF2 cqC5Y65QJW88bHTc6c/TxuDUu0KlC8W4bvt+oWG9GHfx/eZcU3Y5QDeSZN07soljrofUdm 7TSIltl9FNGvNi+ypm0Cvn/wSOQE7zWBfxLVDZ1F6JPJY1DQAj1hoydXa6vXDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676438295; a=rsa-sha256; cv=none; b=ErzGY6MBZYkkkkw3LvFzsskMnDolLzUADKM40oi44wBdREBz+k5SbciwZs3lFcVcTv2qOY p6QgHinqNRy+MRn8j/2bio6l6sOJnRhTud8Ph1mZwbkTgrBRxc2S9+NPZPkk8yDPNEWkHa au2hvHCUIn/2XbE/xh2XGzrM1MTtOfirLGfb7xRids0g8aPOYEdXntcWzv4hve1qXQUmTe rqS8RsX55MTpftN/sEROVR52HIzf7wj7erv8aC/+cvrD50d1EZiy07OcWvrzqz7Dk816j9 8iIJyjM++nqjmD+Ttin1WGqhNvBH4JxaFOdRZSQiG8niZ3Xw29KLqj0OTphn/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 4PGmYz4M0Yz1RRZ; Wed, 15 Feb 2023 05:18: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 31F5IFTb019528; Wed, 15 Feb 2023 05:18:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31F5IFiL019526; Wed, 15 Feb 2023 05:18:15 GMT (envelope-from git) Date: Wed, 15 Feb 2023 05:18:15 GMT Message-Id: <202302150518.31F5IFiL019526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 3bafe73affe3 - main - usb: Remove unused member in struct mos_softc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3bafe73affe37de3e94d91d4c1310f1272375970 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3bafe73affe37de3e94d91d4c1310f1272375970 commit 3bafe73affe37de3e94d91d4c1310f1272375970 Author: Zhenlei Huang AuthorDate: 2023-02-15 05:07:19 +0000 Commit: Zhenlei Huang CommitDate: 2023-02-15 05:07:19 +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 --- 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 Wed Feb 15 08:45:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 09:23:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGt126qpWz3rXj9; Wed, 15 Feb 2023 09:23: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 4PGt1261n4z3xX2; Wed, 15 Feb 2023 09:23:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676453014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oDkUEL0E2PiEEabf7z5WMp6xjM3qEhiN/GHMKYmTYgc=; b=XCLqf+Yd2V/H1n8VDKxu+sr5jIoVIM/QtdBOczMB+AvWL7OXg6WYT1HzaTaIQB1j/7iZh7 ZYRnO5rxKr03QdH8lF0IPePlAjyxL/WyD2TqT1poMM55Wz1sp4LUWGCjK9GJqzB4ZSbjEL 2KZRqPzGce6HO4amNAGQd9E3HCTcqo2pQaLaZUMmPpjKh91M1vWbxhQg7VYl5Ksu4UzRdp Y0qxJV7JM6uFFNvVaM5qNg5dpvp438DechSMYNmDROfjzwukKjlXzqkyHj3N5hGXNNy/XD F8AwyFi6TDIJXUAENsrk9BCgveOu6dTHcB/JKJetpDc3VZYEDtBvbJK9WMs1jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676453014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oDkUEL0E2PiEEabf7z5WMp6xjM3qEhiN/GHMKYmTYgc=; b=Y2hEUGGoz3GWctk5knxkXj5zuWdABjNKxb/ZZIhjg4aX/xGyf31mSfDNYzn/R+BpajpTs3 mA7bohJgEoFIptSJaCx49m/ajIZXTvsQ+1mlhNQTax/vKshl75+tz5kMZelf62p2V7VUwS Xo8khwI7O0g0KYpxv4bCaVMA57FXDF2GPLUuTz8Nq/oE+v+zwCYUvMwYViQG0exB1xTSMY q1wMEomV96XCPfOCamFse5qqha6KtTqtWcIbuN2Ul7If9mPRTJRPLrlQbX4nmlJcNKnxu7 llWb4qXCCl9B9t7Utv6xhT3DH89BGZoFpWVdVmg1VC2QJf/cynkLD2PThhtw0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676453014; a=rsa-sha256; cv=none; b=qpY+W/KqIU/axW+uN3/imxWhRj8e7aPuACCT+qfAXtueAkLXi4P/f3p+G/VXhUnzlP7O6V 8D7/S62k6XlbUrl42C0QTaqpHSmCSwtpaV9EtqsdiOqpDvOYAeOzfWBii9VElbqSw0QrqK sRCEnrUcCW+3PgRB3Hmb1WJuhWvLfKvOxhKCsRe9L/r++0eMUjY0wKfP+QUPKNq/41tM2f k3AefwBs8nkTLVg7EiiKyQN9D0bWyAI1VW3bifaADVke3zNeO1rTaSXTWEYK3pKDqwfdnl 6MuHh18PV4a9NTHHgEzmJXqAdciclpNfGpi+uVWcAQAtGOR595yZxlM/zG1yUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGt12559vzJq4; Wed, 15 Feb 2023 09:23: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 31F9NYBL075269; Wed, 15 Feb 2023 09:23:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31F9NYBv075268; Wed, 15 Feb 2023 09:23:34 GMT (envelope-from git) Date: Wed, 15 Feb 2023 09:23:34 GMT Message-Id: <202302150923.31F9NYBv075268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: cbc32e4c5e84 - main - cpuset: Add compat shim to the sched_affinity functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbc32e4c5e8427e0f1032d9d3aa5863dd1538c11 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=cbc32e4c5e8427e0f1032d9d3aa5863dd1538c11 commit cbc32e4c5e8427e0f1032d9d3aa5863dd1538c11 Author: Dmitry Chagin AuthorDate: 2023-02-15 09:23:15 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-15 09:23:15 +0000 cpuset: Add compat shim to the sched_affinity functions To allow to run a newer world on a pre-1400079 kernel a compat shims to the sched_affinity functions has beed added. Reported by: antoine Tested by: antoine Reviewed by: kib Differential revision: https://reviews.freebsd.org/D38555 MFC after: 3 days --- lib/libc/gen/sched_getaffinity.c | 15 ++++++++++++++- lib/libc/gen/sched_setaffinity.c | 14 +++++++++++++- lib/libc/include/libc_private.h | 6 ++++++ sys/sys/param.h | 1 + 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/sched_getaffinity.c b/lib/libc/gen/sched_getaffinity.c index 95145a1eb019..fce47fbfc0d2 100644 --- a/lib/libc/gen/sched_getaffinity.c +++ b/lib/libc/gen/sched_getaffinity.c @@ -26,16 +26,29 @@ * SUCH DAMAGE. */ +#define _WANT_P_OSREL +#include #include #include #include +#include "libc_private.h" + int sched_getaffinity(pid_t pid, size_t cpusetsz, cpuset_t *cpuset) { + cpuwhich_t which; int error; - error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TIDPID, + if (__getosreldate() < P_OSREL_TIDPID) { + if (pid == 0 || pid > _PID_MAX) + which = CPU_WHICH_TID; + else + which = CPU_WHICH_PID; + } else + which = CPU_WHICH_TIDPID; + + error = cpuset_getaffinity(CPU_LEVEL_WHICH, which, pid == 0 ? -1 : pid, cpusetsz, cpuset); if (error == -1 && errno == ERANGE) errno = EINVAL; diff --git a/lib/libc/gen/sched_setaffinity.c b/lib/libc/gen/sched_setaffinity.c index 36ed0f45d417..b878e1affc41 100644 --- a/lib/libc/gen/sched_setaffinity.c +++ b/lib/libc/gen/sched_setaffinity.c @@ -26,20 +26,32 @@ * SUCH DAMAGE. */ +#define _WANT_P_OSREL #include #include #include #include #include +#include "libc_private.h" + int sched_setaffinity(pid_t pid, size_t cpusetsz, const cpuset_t *cpuset) { static int mp_maxid; + cpuwhich_t which; cpuset_t c; int error, lbs, cpu; size_t len, sz; + if (__getosreldate() < P_OSREL_TIDPID) { + if (pid == 0 || pid > _PID_MAX) + which = CPU_WHICH_TID; + else + which = CPU_WHICH_PID; + } else + which = CPU_WHICH_TIDPID; + sz = cpusetsz > sizeof(cpuset_t) ? sizeof(cpuset_t) : cpusetsz; memset(&c, 0, sizeof(c)); memcpy(&c, cpuset, sz); @@ -58,7 +70,7 @@ sched_setaffinity(pid_t pid, size_t cpusetsz, const cpuset_t *cpuset) if (cpu > mp_maxid) CPU_CLR(cpu, &c); } - error = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TIDPID, + error = cpuset_setaffinity(CPU_LEVEL_WHICH, which, pid == 0 ? -1 : pid, sizeof(cpuset_t), &c); if (error == -1 && errno == EDEADLK) errno = EINVAL; diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 641b9272c7fc..0a8e531e0c3c 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -39,6 +39,12 @@ #include #include +/* + * The kernel doesn't expose PID_MAX to the user space. Save it here + * to allow to run a newer world on a pre-1400079 kernel. + */ +#define _PID_MAX 99999 + /* * This global flag is non-zero when a process has created one * or more threads. It is used to avoid calling locking functions diff --git a/sys/sys/param.h b/sys/sys/param.h index 2d5edf9a0b90..e0808609447d 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -107,6 +107,7 @@ #define P_OSREL_CK_SUPERBLOCK 1300000 #define P_OSREL_CK_INODE 1300005 #define P_OSREL_POWERPC_NEW_AUX_ARGS 1300070 +#define P_OSREL_TIDPID 1400079 #define P_OSREL_MAJOR(x) ((x) / 100000) #endif From nobody Wed Feb 15 09:31:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGtBc1xfWz3rY0h; Wed, 15 Feb 2023 09:31:52 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher 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 "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGtBZ4Y5Tz3yv4; Wed, 15 Feb 2023 09:31:50 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=FLkaRBrX; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com; dmarc=pass (policy=none) header.from=bidouilliste.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1676453502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JjuL/tkuDtocShAhi6RdF0l+5JVmj6PdbC/rUuQJTZM=; b=FLkaRBrXtYjrapDQq7hK016pVlMV5JzBlGNO2kxSzkYoPevin5yo8vtRoiC6d4GbSRMiyw UcxU3vKNH95dYcqdt90a8KyQL1s1wpUfGCfrwixFazjg8SlL35+tqSYwA+t6mSNxuqW7GF b31rXwsOneiu6FUOwZBaNXuyqkQcUk8= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 8f9cf688 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 15 Feb 2023 09:31:42 +0000 (UTC) Date: Wed, 15 Feb 2023 10:31:39 +0100 From: Emmanuel Vadot To: Alan Somers Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 7919c76dbdd2 - main - bsdinstall: use gpt/efiboot0 label in /etc/fstab Message-Id: <20230215103139.c66c65a80b9be787deaa36a2@bidouilliste.com> In-Reply-To: <202205241917.24OJHipu099732@gitrepo.freebsd.org> References: <202205241917.24OJHipu099732@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org,dev-commits-src-all@FreeBSD.org]; DKIM_TRACE(0.00)[bidouilliste.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[manu]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4PGtBZ4Y5Tz3yv4 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hello Alan, On Tue, 24 May 2022 19:17:44 GMT Alan Somers wrote: > The branch main has been updated by asomers: > > URL: https://cgit.FreeBSD.org/src/commit/?id=7919c76dbdd20161247d1bfb647110d87ca5ee0f > > commit 7919c76dbdd20161247d1bfb647110d87ca5ee0f > Author: Alan Somers > AuthorDate: 2022-05-24 18:24:12 +0000 > Commit: Alan Somers > CommitDate: 2022-05-24 19:17:10 +0000 > > bsdinstall: use gpt/efiboot0 label in /etc/fstab > > Otherwise, boot will hang if the numbering of disks has changed since > initial install. > > MFC after: 2 weeks > Sponsored by: Axcient > Reviewed by: brd > Differential Revision: https://reviews.freebsd.org/D35309 So, I understand the initial problem but this causes a new one. efibootmgr is now confused when you ask to print the unix path of the ESP because the device resolved is still ada0p1 (for example) and since it's not mounted anymore as the label is used we can't discover the path to the mounted ESP. Since it's now in 13.2 we've just noticed that at work. We will parse glabel but it's really horrible to parse and it be good to have efibootmgr -E -p working again on a fresh install. Cheers, -- Emmanuel Vadot From nobody Wed Feb 15 11:39:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGx1z3LqCz3pxby; Wed, 15 Feb 2023 11: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 4PGx1z2tT8z49cg; Wed, 15 Feb 2023 11: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=1676461175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9t+wZD2ojdtQsQaqAyvPutI2iNaXws2LHfOmAYfKbGg=; b=T4qqKedz18NYTqStGml4ZxXExb9iqAFHreCdi97Gr1RHGyEt3kXYPSP5AnZ+3JQNlDMcMr Npbb0/17uBzqZVVEs/fenqPOYxj5eXSwbsOpIo7bzuH2MAIS0zf7+S6ERhYt7NL2cwG1rS QKkM5IHiyNULGk7JkGRcyuR9tmLX6UAOlSB4AQ/hwdn0N/FqtdiF57GiaJGB6H/pir+Vdx q1ZGv7PqueEOVP5Nu8uBU6KZJQedxMiu38zfQCcdEjXcrcx6rV3XJ0CD8Vdg+jeuiiDnCo IuN6datHW0LEPcnFgv3Nr0v+36my7WHBnA9moX1d65rJJPBo9BkETwzQ/rTQ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676461175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9t+wZD2ojdtQsQaqAyvPutI2iNaXws2LHfOmAYfKbGg=; b=Ja2+kO/yzMsj/aFRPIIY7sEjnzOs7gvs9eVrfx3vXaGN1g/d4Zn628+h3J/zibBFntiSQV i1vu7tRwdFrgLBUvnDPOXw1Gi+8ee1cacKHHj7qxX1wLloZ0G42TKEVbjI7vWwEMVLNUZ8 6wFIVEfIdM718MohFZ2C7mBFxjpt/PFtCVEQ8HH2udCAwdZa4hR+y/ilJr5xg5zh6bFYdG g+2U4LizUYClIZOcKCoqX3iufhaFvh0KNRohiihYlHysOQJc8RU2XQEVdtTlUaOzeZzpqP Jf9eLxSVlrXqoSt4Mao73oxCDKAP6VBDBvPXzqsMSU+TxG3hd21V8uJMLezCKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676461175; a=rsa-sha256; cv=none; b=Lq37vz6hOzxdIs208Ln02Y3wxXFT4uHWRHdx4mG9YZPS0F5gHd+KY6kfllmOc9MbGtkO1l 8eqzdQ1jYx/EOQhQc4fqiYJFOP9plKLONn2kjMeabPwUwgUuO9/0AJxzocX+Hs/c7p5MZz cOVMw7l9G6j6gIA2917bIO+ubxOiK6hBXO/tN/AUpBldJ6npbeZiBzGti8HB/tCMUVGIYj /NHLzM72qXjthgLOw15xsTNzM0Av15JI0cAMnFpCRKk2VokonBvx+bockmFQJxQha0WYpc rUnTD+2OZ/FghKxK1QV69zGD6GiAD5jOHiCcjqCeZfHsgeizcx4UHXuIvk2dpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGx1z1yj8zN2S; Wed, 15 Feb 2023 11: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 31FBdZLr060587; Wed, 15 Feb 2023 11: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 31FBdZ2J060586; Wed, 15 Feb 2023 11:39:35 GMT (envelope-from git) Date: Wed, 15 Feb 2023 11:39:35 GMT Message-Id: <202302151139.31FBdZ2J060586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: fe01817876a0 - main - Add an example using /etc/rc.conf syntax List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe01817876a08309becc9ba4f46187a613845049 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=fe01817876a08309becc9ba4f46187a613845049 commit fe01817876a08309becc9ba4f46187a613845049 Author: Poul-Henning Kamp AuthorDate: 2023-02-15 11:39:15 +0000 Commit: Poul-Henning Kamp CommitDate: 2023-02-15 11:39:15 +0000 Add an example using /etc/rc.conf syntax --- share/man/man4/lagg.4 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/share/man/man4/lagg.4 b/share/man/man4/lagg.4 index b46566120050..f3c7d9a5f713 100644 --- a/share/man/man4/lagg.4 +++ b/share/man/man4/lagg.4 @@ -214,6 +214,15 @@ The following example shows how to create an infiniband failover interface. # ifconfig lagg0 laggproto failover laggport ib0 laggport ib1 \e 1.1.1.1 netmask 255.255.255.0 .Ed +.Pp +Configure two ethernets for failover and static IP in /etc/rc.conf: +.Bd -literal -offset indent +cloned_interfaces="lagg0" +ifconfig_lagg0="laggproto failover laggport bge0 laggport bge1 \e + 10.1.29.21/24" +ifconfig_bge0="up" +ifconfig_bge1="up" +.Ed .Sh SEE ALSO .Xr ng_one2many 4 , .Xr ifconfig 8 , From nobody Wed Feb 15 13:32:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGzXS36tKz3q5Pf; Wed, 15 Feb 2023 13:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGzXS2X8qz4MxM; Wed, 15 Feb 2023 13:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676467960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hnniLCkkjX2Jh84JksN5RCV1OW4v6+yUCqLsniKhYd8=; b=Z0iRatGPg1lmpAMOknM4Z9+yX+HHKSfx+ySrtgew+o5sH+njxb0GOqgFLwvmUfu63DyPnx dlqQoYj6O07//MXzGEkAB66J5swbQJjPeB05t32jqBaGbVl1YdgH36uFncelL9iPWE5QVu Upt8KrajmNIGBigOdwb9aQQOaOakFD5OPOshlOc5a4L0cLwNMDy59/DeFTmGJq64FjWFN7 4FPC2b/by4IaB89z4ZzLLJBIFCs5U+njZ9tr/Fk/Cg2Y3rB6N/hhQM45yjVSCo7eUebQD3 IWEptiksnCL2ac5Ah9fojBgjwrdxvbZETmEo+x57F3eOXWw9mes3Tfmna/rVWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676467960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hnniLCkkjX2Jh84JksN5RCV1OW4v6+yUCqLsniKhYd8=; b=KhoMvD5GQlut0dP6kw7JeiJz2m5QB5w8myQhmJwcJJN/ACV9EjlSzskzR18PAXB4Zon0/U rXlQ/2ZOcH6DRJTK0omWS7WofcN5ZzNe5TI6mLtSD+sOO/p603sNq0es944U6ZRUvNUUCQ 1YRTbqH6x5WLOh/zZxh+NInM2fFlKGNOrg4adynLagKvDdM08yB5gU0UfyF0R1BoikLH6c cyVa/iKIbrffqQ4KFN+Fz9OtaPlpk1sXRE6C3PAdeMqAIeEvlfMismr9Ccwlu7DMikCtut 8YMnaznM3FoWo3W7fcp4IEbFRc120/uFd4zNgORIk5Xycn14vVdoX5lEOIFmlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676467960; a=rsa-sha256; cv=none; b=ezSAktkXUumGGhVienNyWmlgJaQvQWTGoqFBU23dkGijsFc/TRpHSrskU50iJNizbSyJWO TVcyolhjyEbYmZyygu+0X/6yBdTNvCA+XAafzET/jLhLqFPj2eEHkgQX8zpLETQ1/wpld4 LFyuEfl+9CD0oayl/IRAoEdsFvt3u0w+ilfXAL6oWHwct0cJi0UsDeajq0hswK/+c7IPBY UaujppJ97kG35A1Uae8jkVsqUqyCMZr5kbFQpuJD5QL/8Ki570F+1PWq9QGrJTSDdnYHpd yMGLOMJHO2ciu821Awd6yeYNRKt1kMAGIh5Olbqo18d37hW3zZGpFt+W3F697Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGzXS1cnwzQpy; Wed, 15 Feb 2023 13:32: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 31FDWeKc030630; Wed, 15 Feb 2023 13:32:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FDWeBC030629; Wed, 15 Feb 2023 13:32:40 GMT (envelope-from git) Date: Wed, 15 Feb 2023 13:32:40 GMT Message-Id: <202302151332.31FDWeBC030629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c3821149f425 - main - Drop space in "vm object" lock name to improve wchan List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3821149f4252f087ba5133e20896ae4274f4da1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c3821149f4252f087ba5133e20896ae4274f4da1 commit c3821149f4252f087ba5133e20896ae4274f4da1 Author: Ed Maste AuthorDate: 2023-02-15 13:31:17 +0000 Commit: Ed Maste CommitDate: 2023-02-15 13:31:17 +0000 Drop space in "vm object" lock name to improve wchan Lock names are shown in top as a `*` followed by the first five characters of the name. `*vmobj` a little more obvious and easier to search for than `*vm ob`. Differential Revision: https://reviews.freebsd.org/D36264 --- sys/vm/vm_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 341c8aaec01a..be81ad4942a4 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -216,7 +216,7 @@ vm_object_zinit(void *mem, int size, int flags) vm_object_t object; object = (vm_object_t)mem; - rw_init_flags(&object->lock, "vm object", RW_DUPOK | RW_NEW); + rw_init_flags(&object->lock, "vmobject", RW_DUPOK | RW_NEW); /* These are true for any object that has been freed */ object->type = OBJT_DEAD; From nobody Wed Feb 15 13:43:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGzmR1rf8z3q5kX; Wed, 15 Feb 2023 13:43:03 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGzmQ6nfxz4Nn6; Wed, 15 Feb 2023 13:43:02 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.16.1/8.16.1) with ESMTP id 31FDh1xV076540; Wed, 15 Feb 2023 07:43:01 -0600 (CST) (envelope-from mike@karels.net) Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id NKqvLWXh7GP6KgEAs/W3XQ (envelope-from ); Wed, 15 Feb 2023 07:43:01 -0600 From: Mike Karels To: Poul-Henning Kamp Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: fe01817876a0 - main - Add an example using /etc/rc.conf syntax Date: Wed, 15 Feb 2023 07:43:01 -0600 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <202302151139.31FBdZ2J060586@gitrepo.freebsd.org> References: <202302151139.31FBdZ2J060586@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PGzmQ6nfxz4Nn6 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 15 Feb 2023, at 5:39, Poul-Henning Kamp wrote: > The branch main has been updated by phk: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dfe01817876a08309becc9ba4= f46187a613845049 > > commit fe01817876a08309becc9ba4f46187a613845049 > Author: Poul-Henning Kamp > AuthorDate: 2023-02-15 11:39:15 +0000 > Commit: Poul-Henning Kamp > CommitDate: 2023-02-15 11:39:15 +0000 > > Add an example using /etc/rc.conf syntax > --- > share/man/man4/lagg.4 | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/share/man/man4/lagg.4 b/share/man/man4/lagg.4 > index b46566120050..f3c7d9a5f713 100644 > --- a/share/man/man4/lagg.4 > +++ b/share/man/man4/lagg.4 > @@ -214,6 +214,15 @@ The following example shows how to create an infin= iband failover interface. > # ifconfig lagg0 laggproto failover laggport ib0 laggport ib1 \e > 1.1.1.1 netmask 255.255.255.0 > .Ed > +.Pp > +Configure two ethernets for failover and static IP in /etc/rc.conf: That should be =E2=80=9C.Pa /etc/rc.conf :=E2=80=9D. You should probably also add rc.conf(5) to the SEE ALSO section. Mike > +.Bd -literal -offset indent > +cloned_interfaces=3D"lagg0" > +ifconfig_lagg0=3D"laggproto failover laggport bge0 laggport bge1 \e > + 10.1.29.21/24" > +ifconfig_bge0=3D"up" > +ifconfig_bge1=3D"up" > +.Ed > .Sh SEE ALSO > .Xr ng_one2many 4 , > .Xr ifconfig 8 , From nobody Wed Feb 15 13:59:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH07r6LMvz3q6ZF; Wed, 15 Feb 2023 13:59: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 4PH07r5r1tz4PSV; Wed, 15 Feb 2023 13:59:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676469592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vuhmZcyUFlybO35urzA3kpnruQ49FEHt1UYJ5YftFzk=; b=L6D73l2wuVmb0yGZgMzjSkD2DxdCgm1nYE0fYgVIS/tdZM81KkbqBB4Rt5pNwPHvHDF3VX CqkemcgGe9AcS6L9TU8A35utTOgUFwHi/gSsBwoNhQUTsjT/oNcA/0tRA8dGPex4wexYUg ZEQ+FFu3aoIFuVvZooTlCChrFohQagw3EtnZPmLQiJfhUJAohPAfiu6CPUQWYVVGnvqUHG 8AGCQ/XPmUtb21NB8zJUCAAlPmwZWvbgvu8gelx6LI0TcvyNFWjQCNfpf8E2veVj0gigo9 eAn7c0gFfWli3TAjy0cVkl4XIrwmoKW6e8sd0MNH3we7ONRcuC5/3mMYnpsxuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676469592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vuhmZcyUFlybO35urzA3kpnruQ49FEHt1UYJ5YftFzk=; b=kGvTdQk/NLuU8H/I1sDGfkDlxYLHqYVAwWh56lQ/wD2TG96FBBsb3IuFERQcii11JgI1eM AVFAd+MLtE/1W+c3aXB61f+abIrZr6q97oEDh1OoMaEB/rPXISIP1zerE9MRVnZq+M/rPq BdXd/7oONSaBNQsI+gUX8s3ne+GSgQUlV7r6+ISa5hLXdqq6LI0w9MZUoPvFVQYQyg7jot aTyiR52hdXHhtpjFa9gMk+ogbt1OVCCq/nBZDE6NLR2yeyz1X8ih9J0MiYraHwqjmWxH93 W5H5mSfqdEaAPoFPGeaXTIFawWltete5QOJFVxiFiHSuG724QNol3vLPGkGJRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676469592; a=rsa-sha256; cv=none; b=Ej5kfUUvREX3U+7buwWQajKjxWAo5zTcaPrxhbVf/x0KVKptn+Wko0eQlOIUjxhwo3EHb1 ZvFWuUHSsBNmEU/uuagAeHaGgjMNqgayrJjT/cjkPqi51xC9pAAr9379iiSObNEwimE3hY WBC81pUB9qD8MdL4ES98D6XiR/rb7WBAoAVEqnC4KUb9AipfrimJkEPHyG2/nkCRKDgxnR FCIHTNK5/4pBZW3Fm+9pueuQbvJPgF2vz7GIF2VOfic5UKKajGDhMrPVs/XA2471uhrh8y K+rWPd6SbSXyNb2lxGhqyqMnrwgbxem2OGNiTs+fZkrLWnYirbjZfb24AcAg9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH07r4tb4zR4q; Wed, 15 Feb 2023 13:59: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 31FDxqN8059363; Wed, 15 Feb 2023 13:59:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FDxqIN059362; Wed, 15 Feb 2023 13:59:52 GMT (envelope-from git) Date: Wed, 15 Feb 2023 13:59:52 GMT Message-Id: <202302151359.31FDxqIN059362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 6444662a563b - main - krpc: Add macros so that rpc.tlsservd can run in vnet prison List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6444662a563ba714fed8563645764262c6f5e90f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6444662a563ba714fed8563645764262c6f5e90f commit 6444662a563ba714fed8563645764262c6f5e90f Author: Rick Macklem AuthorDate: 2023-02-15 13:58:21 +0000 Commit: Rick Macklem CommitDate: 2023-02-15 13:58:21 +0000 krpc: Add macros so that rpc.tlsservd can run in vnet prison Commit 7344856e3a6d added a lot of macros that will front end vnet macros so that nfsd(8) can run in vnet prison. This patch adds similar macros named KRPC_VNETxxx so that the rpc.tlsservd(8) daemon can run in a vnet prison, once the macros front end the vnet ones. For now, they are null macros. MFC after: 3 months --- sys/rpc/rpcsec_tls.h | 18 +++++ sys/rpc/rpcsec_tls/rpctls_impl.c | 164 +++++++++++++++++++++++++-------------- 2 files changed, 125 insertions(+), 57 deletions(-) diff --git a/sys/rpc/rpcsec_tls.h b/sys/rpc/rpcsec_tls.h index 6c49f9577cc8..ac2fee1b09fc 100644 --- a/sys/rpc/rpcsec_tls.h +++ b/sys/rpc/rpcsec_tls.h @@ -76,6 +76,9 @@ enum clnt_stat rpctls_srv_disconnect(uint64_t sec, uint64_t usec, /* Initialization function for rpcsec_tls. */ int rpctls_init(void); +/* Cleanup function for rpcsec_tls. */ +void rpctls_cleanup(void); + /* Get TLS information function. */ bool rpctls_getinfo(u_int *maxlen, bool rpctlscd_run, bool rpctlssd_run); @@ -86,6 +89,21 @@ bool rpctls_getinfo(u_int *maxlen, bool rpctlscd_run, /* ssl refno value to indicate TLS handshake being done. */ #define RPCTLS_REFNO_HANDSHAKE 0xFFFFFFFFFFFFFFFFULL +/* Macros for VIMAGE. */ +/* Define the KRPC_VNET macros similar to !VIMAGE. */ +#define KRPC_VNET_NAME(n) n +#define KRPC_VNET_DECLARE(t, n) extern t n +#define KRPC_VNET_DEFINE(t, n) t n +#define KRPC_VNET_DEFINE_STATIC(t, n) static t n +#define KRPC_VNET(n) (n) + +#define CTLFLAG_KRPC_VNET 0 + +#define KRPC_CURVNET_SET(n) +#define KRPC_CURVNET_SET_QUIET(n) +#define KRPC_CURVNET_RESTORE() +#define KRPC_TD_TO_VNET(n) NULL + #endif /* _KERNEL */ #endif /* _RPC_RPCSEC_TLS_H_ */ diff --git a/sys/rpc/rpcsec_tls/rpctls_impl.c b/sys/rpc/rpcsec_tls/rpctls_impl.c index 9d7f686af768..4e9d52bf5d48 100644 --- a/sys/rpc/rpcsec_tls/rpctls_impl.c +++ b/sys/rpc/rpcsec_tls/rpctls_impl.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -51,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -74,15 +77,16 @@ static CLIENT *rpctls_connect_handle; static struct mtx rpctls_connect_lock; static struct socket *rpctls_connect_so = NULL; static CLIENT *rpctls_connect_cl = NULL; -static CLIENT *rpctls_server_handle[RPCTLS_SRV_MAXNPROCS]; static struct mtx rpctls_server_lock; -static struct socket *rpctls_server_so = NULL; -static SVCXPRT *rpctls_server_xprt = NULL; -static bool rpctls_srv_newdaemon = false; -static int rpctls_srv_prevproc = 0; -static bool rpctls_server_busy[RPCTLS_SRV_MAXNPROCS]; static struct opaque_auth rpctls_null_verf; +KRPC_VNET_DEFINE_STATIC(CLIENT **, rpctls_server_handle); +KRPC_VNET_DEFINE_STATIC(struct socket *, rpctls_server_so) = NULL; +KRPC_VNET_DEFINE_STATIC(SVCXPRT *, rpctls_server_xprt) = NULL; +KRPC_VNET_DEFINE_STATIC(bool, rpctls_srv_newdaemon) = false; +KRPC_VNET_DEFINE_STATIC(int, rpctls_srv_prevproc) = 0; +KRPC_VNET_DEFINE_STATIC(bool *, rpctls_server_busy); + static CLIENT *rpctls_connect_client(void); static CLIENT *rpctls_server_client(int procpos); static enum clnt_stat rpctls_server(SVCXPRT *xprt, struct socket *so, @@ -90,10 +94,25 @@ static enum clnt_stat rpctls_server(SVCXPRT *xprt, struct socket *so, uid_t *uid, int *ngrps, gid_t **gids, int *procposp); +static void +rpctls_vnetinit(const void *unused __unused) +{ + int i; + + KRPC_VNET(rpctls_server_handle) = malloc(sizeof(CLIENT *) * + RPCTLS_SRV_MAXNPROCS, M_RPC, M_WAITOK | M_ZERO); + KRPC_VNET(rpctls_server_busy) = malloc(sizeof(bool) * + RPCTLS_SRV_MAXNPROCS, M_RPC, M_WAITOK | M_ZERO); + for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) + KRPC_VNET(rpctls_server_busy)[i] = false; +} +SYSINIT(rpctls_vnetinit, SI_SUB_VNET_DONE, SI_ORDER_ANY, + rpctls_vnetinit, NULL); + int rpctls_init(void) { - int error, i; + int error; error = syscall_helper_register(rpctls_syscalls, SY_THR_STATIC_KLD); if (error != 0) { @@ -107,8 +126,6 @@ rpctls_init(void) rpctls_null_verf.oa_flavor = AUTH_NULL; rpctls_null_verf.oa_base = RPCTLS_START_STRING; rpctls_null_verf.oa_length = strlen(RPCTLS_START_STRING); - for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) - rpctls_server_busy[i] = false; return (0); } @@ -133,27 +150,36 @@ sys_rpctls_syscall(struct thread *td, struct rpctls_syscall_args *uap) if (error != 0) return (error); + KRPC_CURVNET_SET(KRPC_TD_TO_VNET(td)); switch (uap->op) { case RPCTLS_SYSC_SRVSTARTUP: - /* Get rid of all old CLIENTs. */ - mtx_lock(&rpctls_server_lock); - for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { - oldcl[i] = rpctls_server_handle[i]; - rpctls_server_handle[i] = NULL; - rpctls_server_busy[i] = false; - } - rpctls_srv_newdaemon = true; - rpctls_srv_prevproc = 0; - mtx_unlock(&rpctls_server_lock); - for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { - if (oldcl[i] != NULL) { - CLNT_CLOSE(oldcl[i]); - CLNT_RELEASE(oldcl[i]); + if (jailed(curthread->td_ucred) && + !prison_check_nfsd(curthread->td_ucred)) + error = EPERM; + if (error == 0) { + /* Get rid of all old CLIENTs. */ + mtx_lock(&rpctls_server_lock); + for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { + oldcl[i] = KRPC_VNET(rpctls_server_handle)[i]; + KRPC_VNET(rpctls_server_handle)[i] = NULL; + KRPC_VNET(rpctls_server_busy)[i] = false; + } + KRPC_VNET(rpctls_srv_newdaemon) = true; + KRPC_VNET(rpctls_srv_prevproc) = 0; + mtx_unlock(&rpctls_server_lock); + for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { + if (oldcl[i] != NULL) { + CLNT_CLOSE(oldcl[i]); + CLNT_RELEASE(oldcl[i]); + } } } break; case RPCTLS_SYSC_CLSETPATH: - error = copyinstr(uap->path, path, sizeof(path), NULL); + if (jailed(curthread->td_ucred)) + error = EPERM; + if (error == 0) + error = copyinstr(uap->path, path, sizeof(path), NULL); if (error == 0) { error = ENXIO; #ifdef KERN_TLS @@ -209,7 +235,11 @@ sys_rpctls_syscall(struct thread *td, struct rpctls_syscall_args *uap) } break; case RPCTLS_SYSC_SRVSETPATH: - error = copyinstr(uap->path, path, sizeof(path), NULL); + if (jailed(curthread->td_ucred) && + !prison_check_nfsd(curthread->td_ucred)) + error = EPERM; + if (error == 0) + error = copyinstr(uap->path, path, sizeof(path), NULL); if (error == 0) { error = ENXIO; #ifdef KERN_TLS @@ -254,14 +284,14 @@ sys_rpctls_syscall(struct thread *td, struct rpctls_syscall_args *uap) for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) oldcl[i] = NULL; mtx_lock(&rpctls_server_lock); - if (rpctls_srv_newdaemon) { + if (KRPC_VNET(rpctls_srv_newdaemon)) { /* * For a new daemon, the rpctls_srv_handles have * already been cleaned up by RPCTLS_SYSC_SRVSTARTUP. * Scan for an available array entry to use. */ for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { - if (rpctls_server_handle[i] == NULL) + if (KRPC_VNET(rpctls_server_handle)[i] == NULL) break; } if (i == RPCTLS_SRV_MAXNPROCS && error == 0) @@ -269,14 +299,14 @@ sys_rpctls_syscall(struct thread *td, struct rpctls_syscall_args *uap) } else { /* For an old daemon, clear out old CLIENTs. */ for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { - oldcl[i] = rpctls_server_handle[i]; - rpctls_server_handle[i] = NULL; - rpctls_server_busy[i] = false; + oldcl[i] = KRPC_VNET(rpctls_server_handle)[i]; + KRPC_VNET(rpctls_server_handle)[i] = NULL; + KRPC_VNET(rpctls_server_busy)[i] = false; } i = 0; /* Set to use rpctls_server_handle[0]. */ } if (error == 0) - rpctls_server_handle[i] = cl; + KRPC_VNET(rpctls_server_handle)[i] = cl; mtx_unlock(&rpctls_server_lock); for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { @@ -300,10 +330,10 @@ sys_rpctls_syscall(struct thread *td, struct rpctls_syscall_args *uap) case RPCTLS_SYSC_SRVSHUTDOWN: mtx_lock(&rpctls_server_lock); for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { - oldcl[i] = rpctls_server_handle[i]; - rpctls_server_handle[i] = NULL; + oldcl[i] = KRPC_VNET(rpctls_server_handle)[i]; + KRPC_VNET(rpctls_server_handle)[i] = NULL; } - rpctls_srv_newdaemon = false; + KRPC_VNET(rpctls_srv_newdaemon) = false; mtx_unlock(&rpctls_server_lock); for (i = 0; i < RPCTLS_SRV_MAXNPROCS; i++) { @@ -342,10 +372,10 @@ sys_rpctls_syscall(struct thread *td, struct rpctls_syscall_args *uap) break; case RPCTLS_SYSC_SRVSOCKET: mtx_lock(&rpctls_server_lock); - so = rpctls_server_so; - rpctls_server_so = NULL; - xprt = rpctls_server_xprt; - rpctls_server_xprt = NULL; + so = KRPC_VNET(rpctls_server_so); + KRPC_VNET(rpctls_server_so) = NULL; + xprt = KRPC_VNET(rpctls_server_xprt); + KRPC_VNET(rpctls_server_xprt) = NULL; mtx_unlock(&rpctls_server_lock); if (so != NULL) { error = falloc(td, &fp, &fd, 0); @@ -370,6 +400,7 @@ sys_rpctls_syscall(struct thread *td, struct rpctls_syscall_args *uap) default: error = EINVAL; } + KRPC_CURVNET_RESTORE(); return (error); } @@ -400,11 +431,13 @@ rpctls_server_client(int procpos) { CLIENT *cl; + KRPC_CURVNET_SET_QUIET(KRPC_TD_TO_VNET(curthread)); mtx_lock(&rpctls_server_lock); - cl = rpctls_server_handle[procpos]; + cl = KRPC_VNET(rpctls_server_handle)[procpos]; if (cl != NULL) CLNT_ACQUIRE(cl); mtx_unlock(&rpctls_server_lock); + KRPC_CURVNET_RESTORE(); return (cl); } @@ -611,33 +644,37 @@ rpctls_server(SVCXPRT *xprt, struct socket *so, uint32_t *flags, uint64_t *sslp, uint32_t *gidv; int i, procpos; + KRPC_CURVNET_SET_QUIET(KRPC_TD_TO_VNET(curthread)); cl = NULL; procpos = -1; mtx_lock(&rpctls_server_lock); - for (i = (rpctls_srv_prevproc + 1) % RPCTLS_SRV_MAXNPROCS; - i != rpctls_srv_prevproc; i = (i + 1) % RPCTLS_SRV_MAXNPROCS) { - if (rpctls_server_handle[i] != NULL) + for (i = (KRPC_VNET(rpctls_srv_prevproc) + 1) % RPCTLS_SRV_MAXNPROCS; + i != KRPC_VNET(rpctls_srv_prevproc); + i = (i + 1) % RPCTLS_SRV_MAXNPROCS) { + if (KRPC_VNET(rpctls_server_handle)[i] != NULL) break; } - if (i == rpctls_srv_prevproc) { - if (rpctls_server_handle[i] != NULL) + if (i == KRPC_VNET(rpctls_srv_prevproc)) { + if (KRPC_VNET(rpctls_server_handle)[i] != NULL) procpos = i; } else - rpctls_srv_prevproc = procpos = i; + KRPC_VNET(rpctls_srv_prevproc) = procpos = i; mtx_unlock(&rpctls_server_lock); if (procpos >= 0) cl = rpctls_server_client(procpos); - if (cl == NULL) + if (cl == NULL) { + KRPC_CURVNET_RESTORE(); return (RPC_SYSTEMERROR); + } /* Serialize the server upcalls. */ mtx_lock(&rpctls_server_lock); - while (rpctls_server_busy[procpos]) - msleep(&rpctls_server_busy[procpos], &rpctls_server_lock, PVFS, - "rtlssn", 0); - rpctls_server_busy[procpos] = true; - rpctls_server_so = so; - rpctls_server_xprt = xprt; + while (KRPC_VNET(rpctls_server_busy)[procpos]) + msleep(&KRPC_VNET(rpctls_server_busy)[procpos], + &rpctls_server_lock, PVFS, "rtlssn", 0); + KRPC_VNET(rpctls_server_busy)[procpos] = true; + KRPC_VNET(rpctls_server_so) = so; + KRPC_VNET(rpctls_server_xprt) = xprt; mtx_unlock(&rpctls_server_lock); /* Do the server upcall. */ @@ -672,11 +709,12 @@ rpctls_server(SVCXPRT *xprt, struct socket *so, uint32_t *flags, uint64_t *sslp, /* Once the upcall is done, the daemon is done with the fp and so. */ mtx_lock(&rpctls_server_lock); - rpctls_server_so = NULL; - rpctls_server_xprt = NULL; - rpctls_server_busy[procpos] = false; - wakeup(&rpctls_server_busy[procpos]); + KRPC_VNET(rpctls_server_so) = NULL; + KRPC_VNET(rpctls_server_xprt) = NULL; + KRPC_VNET(rpctls_server_busy)[procpos] = false; + wakeup(&KRPC_VNET(rpctls_server_busy)[procpos]); mtx_unlock(&rpctls_server_lock); + KRPC_CURVNET_RESTORE(); return (stat); } @@ -795,9 +833,21 @@ rpctls_getinfo(u_int *maxlenp, bool rpctlscd_run, bool rpctlssd_run) return (false); if (rpctlscd_run && rpctls_connect_handle == NULL) return (false); - if (rpctlssd_run && rpctls_server_handle[0] == NULL) + KRPC_CURVNET_SET_QUIET(KRPC_TD_TO_VNET(curthread)); + if (rpctlssd_run && KRPC_VNET(rpctls_server_handle)[0] == NULL) { + KRPC_CURVNET_RESTORE(); return (false); + } + KRPC_CURVNET_RESTORE(); *maxlenp = maxlen; return (enable); } +void +rpctls_cleanup(void) +{ + + free(KRPC_VNET(rpctls_server_handle), M_RPC); + free(KRPC_VNET(rpctls_server_busy), M_RPC); +} + From nobody Wed Feb 15 14:43:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH1665TSfz3qPRK; Wed, 15 Feb 2023 14:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH1664wjQz3JPT; Wed, 15 Feb 2023 14:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676472206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nn3dvEpgEwySnCwX9fC+u1JKF+C4MWdwvINymhV77wE=; b=PKQA0Tm+0/ttQTdooxmkQGVNmnUDqD0MAotmAqbYsh/BuWYGGwYkDPMPH69uRzOyyyqKei BhL6uI00hUYtNro9wRt9J1SD6ZxKLmssrq/zMCPtgpYbYN1/gE6uoFMZ5FNHcDoHBzZhRw NCjZOXE5wNECBnO+MS+snf24vMCCDDur1S9VfH52AdVC/dTUEZL0gzVFkL5XdMnHXcQQ19 ATDiEmSk67YSsMv9aHjyNtDUzXO3YG4LFN4uF15DQWL4WrbKn8iY+ykfdhhr0WnIArx+8d y2bI2ZJoY28YnWd87aTjgwhmgCYiBnW4M85pcw5KtLyVHRm46giKhqUUevF7hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676472206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nn3dvEpgEwySnCwX9fC+u1JKF+C4MWdwvINymhV77wE=; b=bxEhYI23fOdS3uhDNGkfQVkVJGBuRezqH1n1kIAYN33+MPXyk1U4lcjLMF/4jgTBN8M97M WRyukpBZG5/Myw9PKcq0lT6fkuDSR4SPP3cuwnil5xgKFRUq3n32hLvrreCCX1ARYJYpsH dk/+NTfmmotxAhMdLOU2gIn7m+Af3d41+Q36XPX7XtPUU7bIeK+oJ+169PuozJEBzWwfw/ EaAry9MhF2QpvzoTzJutWjPqzs1+Xk2O6FOZEWUhTQWXlMIVa6JihKEUTWGlOf3+ylCMqq N6d3XS7tYR2a3gO3HfIvEXmL2pdSeA+4P6UE+RT0AIigXhdVIuhGV7uHHJ4G2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676472206; a=rsa-sha256; cv=none; b=Ue5mc9sQPHr5kzc2sjPgfg57yJ8XgmspbNJTEe78KUsRr1ldSOr003uJSCeeg5p/IoCfnp +zsAcOAlPLb0rdYM+m7UCWLVjnHfkeNruUerKJQruMUEWM/FJXmUDoqAnYib0qpzzwfXw9 JKNnxMnr29w+0yRxE9NFGDzIjKd5xfO1LqP+ILq+0y66HbLIURkB7VvXgYClwYwsf83gIE SkTtoRp1T1LH9RwdBhwuSpE1HcxNeS6FcyBhvCxWWOsQdToIHEVPNz3h7DadFjxcr6DMIL kIiojxj/vmEygnAuhkh0suKkvLQMEz1ngFCvYRvopUPXEmWRouv6saoZLRpjmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH1663vtLzSRn; Wed, 15 Feb 2023 14:43: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 31FEhQVK030246; Wed, 15 Feb 2023 14:43:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FEhQxr030245; Wed, 15 Feb 2023 14:43:26 GMT (envelope-from git) Date: Wed, 15 Feb 2023 14:43:26 GMT Message-Id: <202302151443.31FEhQxr030245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 5dc00f00b747 - main - Mechanically convert mlx5en(4) to IfAPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5dc00f00b74775ee70a13048c2393f1246555452 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=5dc00f00b74775ee70a13048c2393f1246555452 commit 5dc00f00b74775ee70a13048c2393f1246555452 Author: Justin Hibbits AuthorDate: 2022-09-19 20:58:00 +0000 Commit: Justin Hibbits CommitDate: 2023-02-15 14:32:41 +0000 Mechanically convert mlx5en(4) to IfAPI Reviewed by: zlei Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38595 --- sys/dev/mlx5/mlx5_en/en.h | 18 +- sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c | 2 +- sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 38 ++--- sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c | 6 +- sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c | 8 +- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 268 +++++++++++++++--------------- sys/dev/mlx5/mlx5_en/mlx5_en_rl.c | 6 +- sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 14 +- sys/dev/mlx5/mlx5_en/mlx5_en_tx.c | 16 +- sys/dev/mlx5/mlx5_ib/mlx5_ib.h | 2 +- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 56 ++++--- 11 files changed, 221 insertions(+), 213 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index d24383f4c927..f4a048a6d2ca 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -770,7 +770,7 @@ struct mlx5e_rq { u32 wqe_sz; u32 nsegs; struct mlx5e_rq_mbuf *mbuf; - struct ifnet *ifp; + if_t ifp; struct mlx5e_cq cq; struct lro_ctrl lro; volatile int enabled; @@ -1114,7 +1114,7 @@ struct mlx5e_priv { struct work_struct set_rx_mode_work; MLX5_DECLARE_DOORBELL_LOCK(doorbell_lock) - struct ifnet *ifp; + if_t ifp; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_ifnet; struct sysctl_oid *sysctl_hw; @@ -1200,10 +1200,10 @@ struct mlx5e_eeprom { bool mlx5e_do_send_cqe(struct mlx5e_sq *); int mlx5e_get_full_header_size(const struct mbuf *, const struct tcphdr **); -int mlx5e_xmit(struct ifnet *, struct mbuf *); +int mlx5e_xmit(if_t, struct mbuf *); -int mlx5e_open_locked(struct ifnet *); -int mlx5e_close_locked(struct ifnet *); +int mlx5e_open_locked(if_t); +int mlx5e_close_locked(if_t); void mlx5e_cq_error_event(struct mlx5_core_cq *mcq, int event); void mlx5e_dump_err_cqe(struct mlx5e_cq *, u32, const struct mlx5_err_cqe *); @@ -1221,14 +1221,14 @@ int mlx5e_open_flow_rules(struct mlx5e_priv *priv); void mlx5e_close_flow_rules(struct mlx5e_priv *priv); void mlx5e_set_rx_mode_work(struct work_struct *work); -void mlx5e_vlan_rx_add_vid(void *, struct ifnet *, u16); -void mlx5e_vlan_rx_kill_vid(void *, struct ifnet *, u16); +void mlx5e_vlan_rx_add_vid(void *, if_t, u16); +void mlx5e_vlan_rx_kill_vid(void *, if_t, u16); void mlx5e_enable_vlan_filter(struct mlx5e_priv *priv); void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv); -void mlx5e_vxlan_start(void *arg, struct ifnet *ifp, sa_family_t family, +void mlx5e_vxlan_start(void *arg, if_t ifp, sa_family_t family, u_int port); -void mlx5e_vxlan_stop(void *arg, struct ifnet *ifp, sa_family_t family, +void mlx5e_vxlan_stop(void *arg, if_t ifp, sa_family_t family, u_int port); int mlx5e_add_all_vxlan_rules(struct mlx5e_priv *priv); void mlx5e_del_all_vxlan_rules(struct mlx5e_priv *priv); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c index f57d70080a46..59a8cbc56bbb 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c @@ -1133,7 +1133,7 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS) MLX5_CAP_ETH(priv->mdev, lro_cap)) { priv->params_ethtool.hw_lro = 1; /* check if feature should actually be enabled */ - if (priv->ifp->if_capenable & IFCAP_LRO) { + if (if_getcapenable(priv->ifp) & IFCAP_LRO) { priv->params.hw_lro_en = true; } else { priv->params.hw_lro_en = false; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c index 5607aad50da5..aec2bb646644 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -722,7 +722,7 @@ add_main_vxlan_rules_out: static int mlx5e_vport_context_update_vlans(struct mlx5e_priv *priv) { - struct ifnet *ifp = priv->ifp; + if_t ifp = priv->ifp; int max_list_size; int list_size; u16 *vlans; @@ -914,7 +914,7 @@ mlx5e_enable_vlan_filter(struct mlx5e_priv *priv) { if (priv->vlan.filter_disabled) { priv->vlan.filter_disabled = false; - if (priv->ifp->if_flags & IFF_PROMISC) + if (if_getflags(priv->ifp) & IFF_PROMISC) return; if (test_bit(MLX5E_STATE_FLOW_RULES_READY, &priv->state)) mlx5e_del_any_vid_rules(priv); @@ -926,7 +926,7 @@ mlx5e_disable_vlan_filter(struct mlx5e_priv *priv) { if (!priv->vlan.filter_disabled) { priv->vlan.filter_disabled = true; - if (priv->ifp->if_flags & IFF_PROMISC) + if (if_getflags(priv->ifp) & IFF_PROMISC) return; if (test_bit(MLX5E_STATE_FLOW_RULES_READY, &priv->state)) mlx5e_add_any_vid_rules(priv); @@ -934,7 +934,7 @@ mlx5e_disable_vlan_filter(struct mlx5e_priv *priv) } void -mlx5e_vlan_rx_add_vid(void *arg, struct ifnet *ifp, u16 vid) +mlx5e_vlan_rx_add_vid(void *arg, if_t ifp, u16 vid) { struct mlx5e_priv *priv = arg; @@ -949,7 +949,7 @@ mlx5e_vlan_rx_add_vid(void *arg, struct ifnet *ifp, u16 vid) } void -mlx5e_vlan_rx_kill_vid(void *arg, struct ifnet *ifp, u16 vid) +mlx5e_vlan_rx_kill_vid(void *arg, if_t ifp, u16 vid) { struct mlx5e_priv *priv = arg; @@ -1087,7 +1087,7 @@ mlx5e_sync_ifp_addr(struct mlx5e_priv *priv) struct mlx5e_eth_addr_hash_head head_uc; struct mlx5e_eth_addr_hash_head head_mc; struct mlx5e_eth_addr_hash_node *hn; - struct ifnet *ifp = priv->ifp; + if_t ifp = priv->ifp; size_t x; size_t num; @@ -1110,8 +1110,7 @@ retry: hn = mlx5e_move_hn(&head_free, &head_uc); MPASS(hn != NULL); - ether_addr_copy(hn->ai.addr, - LLADDR((struct sockaddr_dl *)(ifp->if_addr->ifa_addr))); + ether_addr_copy(hn->ai.addr, if_getlladdr(ifp)); ctx.free = &head_free; ctx.fill = &head_uc; @@ -1158,7 +1157,7 @@ static void mlx5e_fill_addr_array(struct mlx5e_priv *priv, int list_type, u8 addr_array[][ETH_ALEN], int size) { bool is_uc = (list_type == MLX5_NIC_VPORT_LIST_TYPE_UC); - struct ifnet *ifp = priv->ifp; + if_t ifp = priv->ifp; struct mlx5e_eth_addr_hash_node *hn; struct mlx5e_eth_addr_hash_head *addr_list; struct mlx5e_eth_addr_hash_node *tmp; @@ -1168,12 +1167,12 @@ static void mlx5e_fill_addr_array(struct mlx5e_priv *priv, int list_type, addr_list = is_uc ? priv->eth_addr.if_uc : priv->eth_addr.if_mc; if (is_uc) /* Make sure our own address is pushed first */ - ether_addr_copy(addr_array[i++], IF_LLADDR(ifp)); + ether_addr_copy(addr_array[i++], if_getlladdr(ifp)); else if (priv->eth_addr.broadcast_enabled) - ether_addr_copy(addr_array[i++], ifp->if_broadcastaddr); + ether_addr_copy(addr_array[i++], if_getbroadcastaddr(ifp)); mlx5e_for_each_hash_node(hn, tmp, addr_list, hi) { - if (ether_addr_equal(IF_LLADDR(ifp), hn->ai.addr)) + if (ether_addr_equal(if_getlladdr(ifp), hn->ai.addr)) continue; if (i >= size) break; @@ -1275,10 +1274,11 @@ static void mlx5e_set_rx_mode_core(struct mlx5e_priv *priv, bool rx_mode_enable) { struct mlx5e_eth_addr_db *ea = &priv->eth_addr; - struct ifnet *ndev = priv->ifp; + if_t ndev = priv->ifp; + int ndev_flags = if_getflags(ndev); - bool promisc_enabled = rx_mode_enable && (ndev->if_flags & IFF_PROMISC); - bool allmulti_enabled = rx_mode_enable && (ndev->if_flags & IFF_ALLMULTI); + bool promisc_enabled = rx_mode_enable && (ndev_flags & IFF_PROMISC); + bool allmulti_enabled = rx_mode_enable && (ndev_flags & IFF_ALLMULTI); bool broadcast_enabled = rx_mode_enable; bool enable_promisc = !ea->promisc_enabled && promisc_enabled; @@ -1290,7 +1290,7 @@ mlx5e_set_rx_mode_core(struct mlx5e_priv *priv, bool rx_mode_enable) /* update broadcast address */ ether_addr_copy(priv->eth_addr.broadcast.addr, - priv->ifp->if_broadcastaddr); + if_getbroadcastaddr(priv->ifp)); if (enable_promisc) { mlx5e_add_eth_addr_rule(priv, &ea->promisc, MLX5E_PROMISC); @@ -1894,7 +1894,7 @@ mlx5e_add_vxlan_rule(struct mlx5e_priv *priv, sa_family_t family, u_int port) } el = mlx5e_vxlan_alloc_db_el(priv, proto, port); - if ((priv->ifp->if_capenable & IFCAP_VXLAN_HWCSUM) != 0) { + if ((if_getcapenable(priv->ifp) & IFCAP_VXLAN_HWCSUM) != 0) { err = mlx5e_add_vxlan_rule_from_db(priv, el); if (err == 0) el->installed = true; @@ -2023,7 +2023,7 @@ mlx5e_del_vxlan_catchall_rule(struct mlx5e_priv *priv) } void -mlx5e_vxlan_start(void *arg, struct ifnet *ifp __unused, sa_family_t family, +mlx5e_vxlan_start(void *arg, if_t ifp __unused, sa_family_t family, u_int port) { struct mlx5e_priv *priv = arg; @@ -2037,7 +2037,7 @@ mlx5e_vxlan_start(void *arg, struct ifnet *ifp __unused, sa_family_t family, } void -mlx5e_vxlan_stop(void *arg, struct ifnet *ifp __unused, sa_family_t family, +mlx5e_vxlan_stop(void *arg, if_t ifp __unused, sa_family_t family, u_int port) { struct mlx5e_priv *priv = arg; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c index e6b4759aeb7a..b99a7c98500c 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c @@ -309,7 +309,7 @@ mlx5e_tls_set_params(void *ctx, const struct tls_session_params *en) CTASSERT(MLX5E_TLS_ST_INIT == 0); int -mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, +mlx5e_tls_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { @@ -320,7 +320,7 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, const struct tls_session_params *en; int error; - priv = ifp->if_softc; + priv = if_getsoftc(ifp); if (priv->gone != 0 || priv->tls.init == 0) return (EOPNOTSUPP); @@ -489,7 +489,7 @@ mlx5e_tls_snd_tag_free(struct m_snd_tag *pmt) ptag->state = MLX5E_TLS_ST_RELEASE; MLX5E_TLS_TAG_UNLOCK(ptag); - priv = ptag->tag.ifp->if_softc; + priv = if_getsoftc(ptag->tag.ifp); queue_work(priv->tls.wq, &ptag->work); } diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c index 356962cfad99..576eea1d7660 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c @@ -654,7 +654,7 @@ CTASSERT(MLX5E_TLS_RX_ST_INIT == 0); * Returns zero on success else an error happened. */ int -mlx5e_tls_rx_snd_tag_alloc(struct ifnet *ifp, +mlx5e_tls_rx_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { @@ -666,7 +666,7 @@ mlx5e_tls_rx_snd_tag_alloc(struct ifnet *ifp, uint32_t value; int error; - priv = ifp->if_softc; + priv = if_getsoftc(ifp); if (unlikely(priv->gone != 0 || priv->tls_rx.init == 0 || params->hdr.flowtype == M_HASHTYPE_NONE)) @@ -801,7 +801,7 @@ mlx5e_tls_rx_snd_tag_alloc(struct ifnet *ifp, goto cleanup; } - if (ifp->if_pcp != IFNET_PCP_NONE || params->tls_rx.vlan_id != 0) { + if (if_getpcp(ifp) != IFNET_PCP_NONE || params->tls_rx.vlan_id != 0) { /* create flow rule for TLS RX traffic (tagged) */ flow_rule = mlx5e_accel_fs_add_inpcb(priv, params->tls_rx.inp, ptag->tirn, MLX5_FS_DEFAULT_FLOW_TAG, params->tls_rx.vlan_id); @@ -996,7 +996,7 @@ mlx5e_tls_rx_snd_tag_free(struct m_snd_tag *pmt) ptag->state = MLX5E_TLS_RX_ST_RELEASE; MLX5E_TLS_RX_TAG_UNLOCK(ptag); - priv = ptag->tag.ifp->if_softc; + priv = if_getsoftc(ptag->tag.ifp); queue_work(priv->tls_rx.wq, &ptag->work); } diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 04e3c302005b..84adef8398bb 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -391,7 +391,7 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) MLX5_PTYS_EN, 1); if (error) { priv->media_active_last = IFM_ETHER; - priv->ifp->if_baudrate = 1; + if_setbaudrate(priv->ifp, 1); mlx5_en_err(priv->ifp, "query port ptys failed: 0x%x\n", error); return; @@ -449,15 +449,15 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) break; } priv->media_active_last = media_entry.subtype | IFM_ETHER | IFM_FDX; - priv->ifp->if_baudrate = media_entry.baudrate; + if_setbaudrate(priv->ifp, media_entry.baudrate); if_link_state_change(priv->ifp, LINK_STATE_UP); } static void -mlx5e_media_status(struct ifnet *dev, struct ifmediareq *ifmr) +mlx5e_media_status(if_t dev, struct ifmediareq *ifmr) { - struct mlx5e_priv *priv = dev->if_softc; + struct mlx5e_priv *priv = if_getsoftc(dev); ifmr->ifm_status = priv->media_status_last; ifmr->ifm_current = ifmr->ifm_active = priv->media_active_last | @@ -530,9 +530,9 @@ mlx5e_set_port_pfc(struct mlx5e_priv *priv) } static int -mlx5e_media_change(struct ifnet *dev) +mlx5e_media_change(if_t dev) { - struct mlx5e_priv *priv = dev->if_softc; + struct mlx5e_priv *priv = if_getsoftc(dev); struct mlx5_core_dev *mdev = priv->mdev; u32 eth_proto_cap; u32 link_mode; @@ -2332,7 +2332,7 @@ mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs) u32 r, n; r = priv->params.hw_lro_en ? priv->params.lro_wqe_sz : - MLX5E_SW2MB_MTU(priv->ifp->if_mtu); + MLX5E_SW2MB_MTU(if_getmtu(priv->ifp)); if (r > MJUM16BYTES) return (-ENOMEM); @@ -3207,9 +3207,9 @@ mlx5e_close_tirs(struct mlx5e_priv *priv) * HW MTU includes all headers and checksums. */ static int -mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu) +mlx5e_set_dev_port_mtu(if_t ifp, int sw_mtu) { - struct mlx5e_priv *priv = ifp->if_softc; + struct mlx5e_priv *priv = if_getsoftc(ifp); struct mlx5_core_dev *mdev = priv->mdev; int hw_mtu; int err; @@ -3231,7 +3231,7 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu) err); } - ifp->if_mtu = sw_mtu; + if_setmtu(ifp, sw_mtu); err = mlx5_query_vport_mtu(mdev, &hw_mtu); if (err || !hw_mtu) { @@ -3264,9 +3264,9 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu) } int -mlx5e_open_locked(struct ifnet *ifp) +mlx5e_open_locked(if_t ifp) { - struct mlx5e_priv *priv = ifp->if_softc; + struct mlx5e_priv *priv = if_getsoftc(ifp); int err; u16 set_id; @@ -3338,14 +3338,14 @@ mlx5e_open(void *arg) "Setting port status to up failed\n"); mlx5e_open_locked(priv->ifp); - priv->ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_setdrvflagbits(priv->ifp, IFF_DRV_RUNNING, 0); PRIV_UNLOCK(priv); } int -mlx5e_close_locked(struct ifnet *ifp) +mlx5e_close_locked(if_t ifp) { - struct mlx5e_priv *priv = ifp->if_softc; + struct mlx5e_priv *priv = if_getsoftc(ifp); /* check if already closed */ if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) @@ -3365,9 +3365,9 @@ mlx5e_close_locked(struct ifnet *ifp) } static uint64_t -mlx5e_get_counter(struct ifnet *ifp, ift_counter cnt) +mlx5e_get_counter(if_t ifp, ift_counter cnt) { - struct mlx5e_priv *priv = ifp->if_softc; + struct mlx5e_priv *priv = if_getsoftc(ifp); u64 retval; /* PRIV_LOCK(priv); XXX not allowed */ @@ -3418,15 +3418,15 @@ mlx5e_get_counter(struct ifnet *ifp, ift_counter cnt) } static void -mlx5e_set_rx_mode(struct ifnet *ifp) +mlx5e_set_rx_mode(if_t ifp) { - struct mlx5e_priv *priv = ifp->if_softc; + struct mlx5e_priv *priv = if_getsoftc(ifp); queue_work(priv->wq, &priv->set_rx_mode_work); } static int -mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +mlx5e_ioctl(if_t ifp, u_long command, caddr_t data) { struct mlx5e_priv *priv; struct ifreq *ifr; @@ -3443,7 +3443,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) int max_mtu; uint8_t read_addr; - priv = ifp->if_softc; + priv = if_getsoftc(ifp); /* check if detaching */ if (priv == NULL || priv->gone != 0) @@ -3478,27 +3478,27 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) PRIV_UNLOCK(priv); break; case SIOCSIFFLAGS: - if ((ifp->if_flags & IFF_UP) && - (ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if ((if_getflags(ifp) & IFF_UP) && + (if_getdrvflags(ifp) & IFF_DRV_RUNNING)) { mlx5e_set_rx_mode(ifp); break; } PRIV_LOCK(priv); - if (ifp->if_flags & IFF_UP) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + if (if_getflags(ifp) & IFF_UP) { + if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) { if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) mlx5e_open_locked(ifp); - ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_setdrvflagbits(ifp, IFF_DRV_RUNNING, 0); mlx5_set_port_status(priv->mdev, MLX5_PORT_UP); } } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { mlx5_set_port_status(priv->mdev, MLX5_PORT_DOWN); if (test_bit(MLX5E_STATE_OPENED, &priv->state) != 0) mlx5e_close_locked(ifp); mlx5e_update_carrier(priv); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); } } PRIV_UNLOCK(priv); @@ -3521,98 +3521,98 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) drv_ioctl_data = &drv_ioctl_data_d; drv_ioctl_data->reqcap = ifr->ifr_reqcap; PRIV_LOCK(priv); - drv_ioctl_data->reqcap2 = ifp->if_capenable2; + drv_ioctl_data->reqcap2 = if_getcapenable2(ifp); drv_ioctl_data->nvcap = NULL; goto siocsifcap_driver; case SIOCSIFCAPNV: drv_ioctl_data = (struct siocsifcapnv_driver_data *)data; PRIV_LOCK(priv); siocsifcap_driver: - mask = drv_ioctl_data->reqcap ^ ifp->if_capenable; + mask = drv_ioctl_data->reqcap ^ if_getcapenable(ifp); if (mask & IFCAP_TXCSUM) { - ifp->if_capenable ^= IFCAP_TXCSUM; - ifp->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP); + if_togglecapenable(ifp, IFCAP_TXCSUM); + if_togglehwassist(ifp, (CSUM_TCP | CSUM_UDP | CSUM_IP)); - if (IFCAP_TSO4 & ifp->if_capenable && - !(IFCAP_TXCSUM & ifp->if_capenable)) { + if (IFCAP_TSO4 & if_getcapenable(ifp) && + !(IFCAP_TXCSUM & if_getcapenable(ifp))) { mask &= ~IFCAP_TSO4; - ifp->if_capenable &= ~IFCAP_TSO4; - ifp->if_hwassist &= ~CSUM_IP_TSO; + if_setcapenablebit(ifp, 0, IFCAP_TSO4); + if_sethwassistbits(ifp, 0, CSUM_IP_TSO); mlx5_en_err(ifp, "tso4 disabled due to -txcsum.\n"); } } if (mask & IFCAP_TXCSUM_IPV6) { - ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; - ifp->if_hwassist ^= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); + if_togglecapenable(ifp, IFCAP_TXCSUM_IPV6); + if_togglehwassist(ifp, (CSUM_UDP_IPV6 | CSUM_TCP_IPV6)); - if (IFCAP_TSO6 & ifp->if_capenable && - !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + if (IFCAP_TSO6 & if_getcapenable(ifp) && + !(IFCAP_TXCSUM_IPV6 & if_getcapenable(ifp))) { mask &= ~IFCAP_TSO6; - ifp->if_capenable &= ~IFCAP_TSO6; - ifp->if_hwassist &= ~CSUM_IP6_TSO; + if_setcapenablebit(ifp, 0, IFCAP_TSO6); + if_sethwassistbits(ifp, 0, CSUM_IP6_TSO); mlx5_en_err(ifp, "tso6 disabled due to -txcsum6.\n"); } } if (mask & IFCAP_MEXTPG) - ifp->if_capenable ^= IFCAP_MEXTPG; + if_togglecapenable(ifp, IFCAP_MEXTPG); if (mask & IFCAP_TXTLS4) - ifp->if_capenable ^= IFCAP_TXTLS4; + if_togglecapenable(ifp, IFCAP_TXTLS4); if (mask & IFCAP_TXTLS6) - ifp->if_capenable ^= IFCAP_TXTLS6; + if_togglecapenable(ifp, IFCAP_TXTLS6); #ifdef RATELIMIT if (mask & IFCAP_TXTLS_RTLMT) - ifp->if_capenable ^= IFCAP_TXTLS_RTLMT; + if_togglecapenable(ifp, IFCAP_TXTLS_RTLMT); #endif if (mask & IFCAP_RXCSUM) - ifp->if_capenable ^= IFCAP_RXCSUM; + if_togglecapenable(ifp, IFCAP_RXCSUM); if (mask & IFCAP_RXCSUM_IPV6) - ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; + if_togglecapenable(ifp, IFCAP_RXCSUM_IPV6); if (mask & IFCAP_TSO4) { - if (!(IFCAP_TSO4 & ifp->if_capenable) && - !(IFCAP_TXCSUM & ifp->if_capenable)) { + if (!(IFCAP_TSO4 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM & if_getcapenable(ifp))) { mlx5_en_err(ifp, "enable txcsum first.\n"); error = EAGAIN; goto out; } - ifp->if_capenable ^= IFCAP_TSO4; - ifp->if_hwassist ^= CSUM_IP_TSO; + if_togglecapenable(ifp, IFCAP_TSO4); + if_togglehwassist(ifp, CSUM_IP_TSO); } if (mask & IFCAP_TSO6) { - if (!(IFCAP_TSO6 & ifp->if_capenable) && - !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + if (!(IFCAP_TSO6 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM_IPV6 & if_getcapenable(ifp))) { mlx5_en_err(ifp, "enable txcsum6 first.\n"); error = EAGAIN; goto out; } - ifp->if_capenable ^= IFCAP_TSO6; - ifp->if_hwassist ^= CSUM_IP6_TSO; + if_togglecapenable(ifp, IFCAP_TSO6); + if_togglehwassist(ifp, CSUM_IP6_TSO); } if (mask & IFCAP_VLAN_HWTSO) - ifp->if_capenable ^= IFCAP_VLAN_HWTSO; + if_togglecapenable(ifp, IFCAP_VLAN_HWTSO); if (mask & IFCAP_VLAN_HWFILTER) { - if (ifp->if_capenable & IFCAP_VLAN_HWFILTER) + if (if_getcapenable(ifp) & IFCAP_VLAN_HWFILTER) mlx5e_disable_vlan_filter(priv); else mlx5e_enable_vlan_filter(priv); - ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + if_togglecapenable(ifp, IFCAP_VLAN_HWFILTER); } if (mask & IFCAP_VLAN_HWTAGGING) - ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + if_togglecapenable(ifp, IFCAP_VLAN_HWTAGGING); if (mask & IFCAP_WOL_MAGIC) - ifp->if_capenable ^= IFCAP_WOL_MAGIC; + if_togglecapenable(ifp, IFCAP_WOL_MAGIC); if (mask & IFCAP_VXLAN_HWCSUM) { const bool was_enabled = - (ifp->if_capenable & IFCAP_VXLAN_HWCSUM) != 0; + (if_getcapenable(ifp) & IFCAP_VXLAN_HWCSUM) != 0; if (was_enabled) mlx5e_del_all_vxlan_rules(priv); - ifp->if_capenable ^= IFCAP_VXLAN_HWCSUM; - ifp->if_hwassist ^= CSUM_INNER_IP | CSUM_INNER_IP_UDP | + if_togglecapenable(ifp, IFCAP_VXLAN_HWCSUM); + if_togglehwassist(ifp, CSUM_INNER_IP | CSUM_INNER_IP_UDP | CSUM_INNER_IP_TCP | CSUM_INNER_IP6_UDP | - CSUM_INNER_IP6_TCP; + CSUM_INNER_IP6_TCP); if (!was_enabled) { int err = mlx5e_add_all_vxlan_rules(priv); if (err != 0) { @@ -3622,9 +3622,9 @@ siocsifcap_driver: } } if (mask & IFCAP_VXLAN_HWTSO) { - ifp->if_capenable ^= IFCAP_VXLAN_HWTSO; - ifp->if_hwassist ^= CSUM_INNER_IP_TSO | - CSUM_INNER_IP6_TSO; + if_togglecapenable(ifp, IFCAP_VXLAN_HWTSO); + if_togglehwassist(ifp, CSUM_INNER_IP_TSO | + CSUM_INNER_IP6_TSO); } VLAN_CAPABILITIES(ifp); @@ -3633,10 +3633,10 @@ siocsifcap_driver: int was_opened = test_bit(MLX5E_STATE_OPENED, &priv->state); bool need_restart = false; - ifp->if_capenable ^= IFCAP_LRO; + if_togglecapenable(ifp, IFCAP_LRO); /* figure out if updating HW LRO is needed */ - if (!(ifp->if_capenable & IFCAP_LRO)) { + if (!(if_getcapenable(ifp) & IFCAP_LRO)) { if (priv->params.hw_lro_en) { priv->params.hw_lro_en = false; need_restart = true; @@ -3654,8 +3654,8 @@ siocsifcap_driver: } } if (mask & IFCAP_HWRXTSTMP) { - ifp->if_capenable ^= IFCAP_HWRXTSTMP; - if (ifp->if_capenable & IFCAP_HWRXTSTMP) { + if_togglecapenable(ifp, IFCAP_HWRXTSTMP); + if (if_getcapenable(ifp) & IFCAP_HWRXTSTMP) { if (priv->clbr_done == 0) mlx5e_reset_calibration_callout(priv); } else { @@ -3663,11 +3663,11 @@ siocsifcap_driver: priv->clbr_done = 0; } } - mask = drv_ioctl_data->reqcap2 ^ ifp->if_capenable2; + mask = drv_ioctl_data->reqcap2 ^ if_getcapenable2(ifp); if ((mask & IFCAP2_BIT(IFCAP2_RXTLS4)) != 0) - ifp->if_capenable2 ^= IFCAP2_BIT(IFCAP2_RXTLS4); + if_togglecapenable2(ifp, IFCAP2_BIT(IFCAP2_RXTLS4)); if ((mask & IFCAP2_BIT(IFCAP2_RXTLS6)) != 0) - ifp->if_capenable2 ^= IFCAP2_BIT(IFCAP2_RXTLS6); + if_togglecapenable2(ifp, IFCAP2_BIT(IFCAP2_RXTLS6)); out: PRIV_UNLOCK(priv); break; @@ -3911,7 +3911,7 @@ static int mlx5e_create_mkey(struct mlx5e_priv *priv, u32 pdn, struct mlx5_core_mkey *mkey) { - struct ifnet *ifp = priv->ifp; + if_t ifp = priv->ifp; struct mlx5_core_dev *mdev = priv->mdev; int inlen = MLX5_ST_SZ_BYTES(create_mkey_in); void *mkc; @@ -4332,14 +4332,14 @@ mlx5e_setup_pauseframes(struct mlx5e_priv *priv) } static int -mlx5e_ul_snd_tag_alloc(struct ifnet *ifp, +mlx5e_ul_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { struct mlx5e_priv *priv; struct mlx5e_channel *pch; - priv = ifp->if_softc; + priv = if_getsoftc(ifp); if (unlikely(priv->gone || params->hdr.flowtype == M_HASHTYPE_NONE)) { return (EOPNOTSUPP); @@ -4394,7 +4394,7 @@ mlx5e_ul_snd_tag_free(struct m_snd_tag *pmt) } static int -mlx5e_snd_tag_alloc(struct ifnet *ifp, +mlx5e_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { @@ -4440,7 +4440,7 @@ static const uint64_t adapter_rates_mlx[NUM_HDWR_RATES_MLX] = { }; static void -mlx5e_ratelimit_query(struct ifnet *ifp __unused, struct if_ratelimit_query_results *q) +mlx5e_ratelimit_query(if_t ifp __unused, struct if_ratelimit_query_results *q) { /* * This function needs updating by the driver maintainer! @@ -4485,7 +4485,7 @@ mlx5e_ifm_add(struct mlx5e_priv *priv, int type) static void * mlx5e_create_ifp(struct mlx5_core_dev *mdev) { - struct ifnet *ifp; + if_t ifp; struct mlx5e_priv *priv; u8 dev_addr[ETHER_ADDR_LEN] __aligned(4); struct sysctl_oid_list *child; @@ -4522,71 +4522,71 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) goto err_free_ifp; } - ifp->if_softc = priv; + if_setsoftc(ifp, priv); if_initname(ifp, "mce", device_get_unit(mdev->pdev->dev.bsddev)); - ifp->if_mtu = ETHERMTU; - ifp->if_init = mlx5e_open; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_KNOWSEPOCH; - ifp->if_ioctl = mlx5e_ioctl; - ifp->if_transmit = mlx5e_xmit; - ifp->if_qflush = if_qflush; - ifp->if_get_counter = mlx5e_get_counter; - ifp->if_snd.ifq_maxlen = ifqmaxlen; + if_setmtu(ifp, ETHERMTU); + if_setinitfn(ifp, mlx5e_open); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | + IFF_KNOWSEPOCH); + if_setioctlfn(ifp, mlx5e_ioctl); + if_settransmitfn(ifp, mlx5e_xmit); + if_setqflushfn(ifp, if_qflush); + if_setgetcounterfn(ifp, mlx5e_get_counter); + if_setsendqlen(ifp, ifqmaxlen); /* * Set driver features */ - ifp->if_capabilities |= IFCAP_NV; - ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6; - ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; - ifp->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; - ifp->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; - ifp->if_capabilities |= IFCAP_LRO; - ifp->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; - ifp->if_capabilities |= IFCAP_HWSTATS | IFCAP_HWRXTSTMP; - ifp->if_capabilities |= IFCAP_MEXTPG; - ifp->if_capabilities |= IFCAP_TXTLS4 | IFCAP_TXTLS6; + if_setcapabilities(ifp, IFCAP_NV); + if_setcapabilitiesbit(ifp, IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6, 0); + if_setcapabilitiesbit(ifp, IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING, 0); + if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER, 0); + if_setcapabilitiesbit(ifp, IFCAP_LINKSTATE | IFCAP_JUMBO_MTU, 0); + if_setcapabilitiesbit(ifp, IFCAP_LRO, 0); + if_setcapabilitiesbit(ifp, IFCAP_TSO | IFCAP_VLAN_HWTSO, 0); + if_setcapabilitiesbit(ifp, IFCAP_HWSTATS | IFCAP_HWRXTSTMP, 0); + if_setcapabilitiesbit(ifp, IFCAP_MEXTPG, 0); + if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); #ifdef RATELIMIT - ifp->if_capabilities |= IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT; + if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, 0); #endif - ifp->if_capabilities |= IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO; - ifp->if_capabilities2 |= IFCAP2_BIT(IFCAP2_RXTLS4) | - IFCAP2_BIT(IFCAP2_RXTLS6); - ifp->if_snd_tag_alloc = mlx5e_snd_tag_alloc; + if_setcapabilitiesbit(ifp, IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO, 0); + if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | + IFCAP2_BIT(IFCAP2_RXTLS6), 0); + if_setsndtagallocfn(ifp, mlx5e_snd_tag_alloc); #ifdef RATELIMIT - ifp->if_ratelimit_query = mlx5e_ratelimit_query; + if_setratelimitqueryfn(ifp, mlx5e_ratelimit_query); #endif /* set TSO limits so that we don't have to drop TX packets */ - ifp->if_hw_tsomax = MLX5E_MAX_TX_PAYLOAD_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); - ifp->if_hw_tsomaxsegcount = MLX5E_MAX_TX_MBUF_FRAGS - 1 /* hdr */; - ifp->if_hw_tsomaxsegsize = MLX5E_MAX_TX_MBUF_SIZE; - - ifp->if_capenable = ifp->if_capabilities; - ifp->if_capenable2 = ifp->if_capabilities2; - ifp->if_hwassist = 0; - if (ifp->if_capenable & IFCAP_TSO) - ifp->if_hwassist |= CSUM_TSO; - if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP | CSUM_IP); - if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) - ifp->if_hwassist |= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); - if (ifp->if_capabilities & IFCAP_VXLAN_HWCSUM) - ifp->if_hwassist |= CSUM_INNER_IP6_UDP | CSUM_INNER_IP6_TCP | + if_sethwtsomax(ifp, MLX5E_MAX_TX_PAYLOAD_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); + if_sethwtsomaxsegcount(ifp, MLX5E_MAX_TX_MBUF_FRAGS - 1 /* hdr */); + if_sethwtsomaxsegsize(ifp, MLX5E_MAX_TX_MBUF_SIZE); + + if_setcapenable(ifp, if_getcapabilities(ifp)); + if_setcapenable2(ifp, if_getcapabilities2(ifp)); + if_sethwassist(ifp, 0); + if (if_getcapenable(ifp) & IFCAP_TSO) + if_sethwassistbits(ifp, CSUM_TSO, 0); + if (if_getcapenable(ifp) & IFCAP_TXCSUM) + if_sethwassistbits(ifp, (CSUM_TCP | CSUM_UDP | CSUM_IP), 0); + if (if_getcapenable(ifp) & IFCAP_TXCSUM_IPV6) + if_sethwassistbits(ifp, (CSUM_UDP_IPV6 | CSUM_TCP_IPV6), 0); + if (if_getcapabilities(ifp) & IFCAP_VXLAN_HWCSUM) + if_sethwassistbits(ifp, CSUM_INNER_IP6_UDP | CSUM_INNER_IP6_TCP | CSUM_INNER_IP | CSUM_INNER_IP_UDP | CSUM_INNER_IP_TCP | - CSUM_ENCAP_VXLAN; - if (ifp->if_capabilities & IFCAP_VXLAN_HWTSO) - ifp->if_hwassist |= CSUM_INNER_IP6_TSO | CSUM_INNER_IP_TSO; + CSUM_ENCAP_VXLAN, 0); + if (if_getcapabilities(ifp) & IFCAP_VXLAN_HWTSO) + if_sethwassistbits(ifp, CSUM_INNER_IP6_TSO | CSUM_INNER_IP_TSO, 0); /* ifnet sysctl tree */ sysctl_ctx_init(&priv->sysctl_ctx); priv->sysctl_ifnet = SYSCTL_ADD_NODE(&priv->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_dev), - OID_AUTO, ifp->if_dname, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + OID_AUTO, if_getdname(ifp), CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "MLX5 ethernet - interface name"); if (priv->sysctl_ifnet == NULL) { mlx5_core_err(mdev, "SYSCTL_ADD_NODE() failed\n"); goto err_free_sysctl; } - snprintf(unit, sizeof(unit), "%d", ifp->if_dunit); + snprintf(unit, sizeof(unit), "%d", if_getdunit(ifp)); priv->sysctl_ifnet = SYSCTL_ADD_NODE(&priv->sysctl_ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), OID_AUTO, unit, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "MLX5 ethernet - interface unit"); @@ -4682,7 +4682,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) } /* set default MTU */ - mlx5e_set_dev_port_mtu(ifp, ifp->if_mtu); + mlx5e_set_dev_port_mtu(ifp, if_getmtu(ifp)); /* Set default media status */ priv->media_status_last = IFM_AVALID; @@ -4805,7 +4805,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) pa.pa_version = PFIL_VERSION; pa.pa_flags = PFIL_IN; pa.pa_type = PFIL_TYPE_ETHERNET; - pa.pa_headname = ifp->if_xname; + pa.pa_headname = if_name(ifp); priv->pfil = pfil_head_register(&pa); PRIV_LOCK(priv); @@ -4866,7 +4866,7 @@ static void mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vpriv) { struct mlx5e_priv *priv = vpriv; - struct ifnet *ifp = priv->ifp; + if_t ifp = priv->ifp; /* don't allow more IOCTLs */ priv->gone = 1; @@ -4964,7 +4964,7 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vpriv) #ifdef DEBUGNET static void -mlx5_en_debugnet_init(struct ifnet *dev, int *nrxr, int *ncl, int *clsize) +mlx5_en_debugnet_init(if_t dev, int *nrxr, int *ncl, int *clsize) { struct mlx5e_priv *priv = if_getsoftc(dev); @@ -4976,12 +4976,12 @@ mlx5_en_debugnet_init(struct ifnet *dev, int *nrxr, int *ncl, int *clsize) } static void -mlx5_en_debugnet_event(struct ifnet *dev, enum debugnet_ev event) +mlx5_en_debugnet_event(if_t dev, enum debugnet_ev event) { } static int -mlx5_en_debugnet_transmit(struct ifnet *dev, struct mbuf *m) +mlx5_en_debugnet_transmit(if_t dev, struct mbuf *m) { struct mlx5e_priv *priv = if_getsoftc(dev); struct mlx5e_sq *sq; @@ -5011,7 +5011,7 @@ mlx5_en_debugnet_transmit(struct ifnet *dev, struct mbuf *m) } static int -mlx5_en_debugnet_poll(struct ifnet *dev, int count) +mlx5_en_debugnet_poll(if_t dev, int count) { struct mlx5e_priv *priv = if_getsoftc(dev); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c index d00e99fce1d4..e4f6c0bdf979 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c @@ -515,7 +515,7 @@ mlx5e_rlw_channel_set_rate_locked(struct mlx5e_rl_worker *rlw, /* get current burst size in bytes */ temp = rl->param.tx_burst_size * - MLX5E_SW2HW_MTU(rlw->priv->ifp->if_mtu); + MLX5E_SW2HW_MTU(if_getmtu(rlw->priv->ifp)); /* limit burst size to 64K currently */ if (temp > 65535) @@ -1202,7 +1202,7 @@ mlx5e_find_available_tx_ring_index(struct mlx5e_rl_worker *rlw, } int -mlx5e_rl_snd_tag_alloc(struct ifnet *ifp, +mlx5e_rl_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { @@ -1211,7 +1211,7 @@ mlx5e_rl_snd_tag_alloc(struct ifnet *ifp, struct mlx5e_priv *priv; int error; - priv = ifp->if_softc; + priv = if_getsoftc(ifp); /* check if there is support for packet pacing or if device is going away */ if (!MLX5_CAP_GEN(priv->mdev, qos) || diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c index 4b1fb25e0f82..28a49ec98fb2 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c @@ -279,7 +279,7 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq, struct mbuf *mb, u32 cqe_bcnt) { - struct ifnet *ifp = rq->ifp; + if_t ifp = rq->ifp; struct mlx5e_channel *c; struct mbuf *mb_head; int lro_num_seg; /* HW LRO session aggregated packets counter */ @@ -375,7 +375,7 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, } else { rq->stats.csum_none++; } - } else if (likely((ifp->if_capenable & (IFCAP_RXCSUM | + } else if (likely((if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0) && ((cqe->hds_ip_ext & (CQE_L2_OK | CQE_L3_OK | CQE_L4_OK)) == (CQE_L2_OK | CQE_L3_OK | CQE_L4_OK))) { @@ -501,7 +501,7 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) struct pfil_head *pfil; int i, rv; - CURVNET_SET_QUIET(rq->ifp->if_vnet); + CURVNET_SET_QUIET(if_getvnet(rq->ifp)); pfil = rq->channel->priv->pfil; for (i = 0; i < budget; i++) { struct mlx5e_rx_wqe *wqe; @@ -586,17 +586,17 @@ rx_common: rq->stats.bytes += byte_cnt; rq->stats.packets++; #ifdef NUMA - mb->m_pkthdr.numa_domain = rq->ifp->if_numa_domain; + mb->m_pkthdr.numa_domain = if_getnumadomain(rq->ifp); #endif #if !defined(HAVE_TCP_LRO_RX) tcp_lro_queue_mbuf(&rq->lro, mb); #else if (mb->m_pkthdr.csum_flags == 0 || - (rq->ifp->if_capenable & IFCAP_LRO) == 0 || + (if_getcapenable(rq->ifp) & IFCAP_LRO) == 0 || rq->lro.lro_cnt == 0 || *** 228 LINES SKIPPED *** From nobody Wed Feb 15 15:11:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH1kw3Dxwz3qRKB; Wed, 15 Feb 2023 15:11:52 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher 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 "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH1kt4LSqz3MPF; Wed, 15 Feb 2023 15:11:50 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=DRHp5UjO; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com; dmarc=pass (policy=none) header.from=bidouilliste.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1676473907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uQ2rDm8R8B3zk/+1R9C3UOrfkESIS8IZxlk282KSa78=; b=DRHp5UjOCpUqKJHKiB/JLusMYOMp4zZgWGMeg2tF06XF+lOhmPE07k6uHOvnE6vEt/uUhu AlMFZTT9XKQawFAjcQNHv0c4z+Eb6vV9auuk8VEDj0vF9s9d7SIWHbeXYCtSL6uJnevASf pqVzhoF+mTO03BfgwPDt4Rxz3pc375o= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id ff68eec8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 15 Feb 2023 15:11:47 +0000 (UTC) Date: Wed, 15 Feb 2023 16:11:43 +0100 From: Emmanuel Vadot To: Alan Somers Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 7919c76dbdd2 - main - bsdinstall: use gpt/efiboot0 label in /etc/fstab Message-Id: <20230215161143.246cfa8146b0777b24bdb491@bidouilliste.com> In-Reply-To: <20230215103139.c66c65a80b9be787deaa36a2@bidouilliste.com> References: <202205241917.24OJHipu099732@gitrepo.freebsd.org> <20230215103139.c66c65a80b9be787deaa36a2@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; DKIM_TRACE(0.00)[bidouilliste.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[manu]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4PH1kt4LSqz3MPF X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On Wed, 15 Feb 2023 10:31:39 +0100 Emmanuel Vadot wrote: > > Hello Alan, > > On Tue, 24 May 2022 19:17:44 GMT > Alan Somers wrote: > > > The branch main has been updated by asomers: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=7919c76dbdd20161247d1bfb647110d87ca5ee0f > > > > commit 7919c76dbdd20161247d1bfb647110d87ca5ee0f > > Author: Alan Somers > > AuthorDate: 2022-05-24 18:24:12 +0000 > > Commit: Alan Somers > > CommitDate: 2022-05-24 19:17:10 +0000 > > > > bsdinstall: use gpt/efiboot0 label in /etc/fstab > > > > Otherwise, boot will hang if the numbering of disks has changed since > > initial install. > > > > MFC after: 2 weeks > > Sponsored by: Axcient > > Reviewed by: brd > > Differential Revision: https://reviews.freebsd.org/D35309 > > So, I understand the initial problem but this causes a new one. > efibootmgr is now confused when you ask to print the unix path of the > ESP because the device resolved is still ada0p1 (for example) and since > it's not mounted anymore as the label is used we can't discover the > path to the mounted ESP. > Since it's now in 13.2 we've just noticed that at work. > We will parse glabel but it's really horrible to parse and it be good > to have efibootmgr -E -p working again on a fresh install. > > Cheers, corvink@ created a bug entry for this : https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269564 It also break efibootmgr to install new boot entries. -- Emmanuel Vadot From nobody Wed Feb 15 16:19:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:34:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3Zz1RgKz3qWsc; Wed, 15 Feb 2023 16:35:07 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH3Zy6VVTz3mSl; Wed, 15 Feb 2023 16:35:06 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-f172.google.com with SMTP id n22so6027060vkm.11; Wed, 15 Feb 2023 08:35:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676478906; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y2qLFpQ+fagAlZozY6/gZ1eVXvOOOJtkO+FgSl5EGBo=; b=B/qSt29gIPshaiJmKrGn2QFCpGTZIkZtZHe8n0CUvKQbMnMFzc0sSTS7ZBDCfwRSuw +CZLplnkbV1pP0VAmeQWtmH8pCpJsHqBgZ56MTcz7Lqgwo9jzOlai4EmN8o0DyKF4+Nh dTUArvLG3x5vRZxPDWiDO2Onr3JVIYkE0k05URf3rDwbfSyhZwe7VpqLamwnFjLTw9yu +RjAJDaBjCzrJWRjnZ4RL5hxIqjtSc4MbMIyhYEyBIq7RYlsz2vVevYe5NGG9ARB+3D0 0KGmCNM/tRYZwjZXHmNMN6HlAypq0ejI/OY/eLPER4jhgBlqKkhKZqfQHTdBeTaZA3k5 +2Og== X-Gm-Message-State: AO0yUKUgsLR+Ew5SFVM7WddgdrI2XMjxlcVlQGL++ASbQyIGPPWVT9pb FITrqaEnzAOUKU/KFeRryLy4iLjglnbO6sjjVR32v32A X-Google-Smtp-Source: AK7set+uLtYqTIR//bsSZDRE3CDlGk9XRhYib1cfTFB5gP+5IGCfAHcKvcpXle9fx+A6vL3bYBeBx6K1xeleYbwiCs8= X-Received: by 2002:a05:6122:1436:b0:3e1:f8b0:e35d with SMTP id o22-20020a056122143600b003e1f8b0e35dmr413190vkp.35.1676478905691; Wed, 15 Feb 2023 08:35:05 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202205241917.24OJHipu099732@gitrepo.freebsd.org> <20230215103139.c66c65a80b9be787deaa36a2@bidouilliste.com> In-Reply-To: <20230215103139.c66c65a80b9be787deaa36a2@bidouilliste.com> From: Alan Somers Date: Wed, 15 Feb 2023 09:34:53 -0700 Message-ID: Subject: Re: git: 7919c76dbdd2 - main - bsdinstall: use gpt/efiboot0 label in /etc/fstab To: Emmanuel Vadot Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PH3Zy6VVTz3mSl 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 Wed, Feb 15, 2023 at 2:31 AM Emmanuel Vadot wrote: > > > Hello Alan, > > On Tue, 24 May 2022 19:17:44 GMT > Alan Somers wrote: > > > The branch main has been updated by asomers: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=7919c76dbdd20161247d1bfb647110d87ca5ee0f > > > > commit 7919c76dbdd20161247d1bfb647110d87ca5ee0f > > Author: Alan Somers > > AuthorDate: 2022-05-24 18:24:12 +0000 > > Commit: Alan Somers > > CommitDate: 2022-05-24 19:17:10 +0000 > > > > bsdinstall: use gpt/efiboot0 label in /etc/fstab > > > > Otherwise, boot will hang if the numbering of disks has changed since > > initial install. > > > > MFC after: 2 weeks > > Sponsored by: Axcient > > Reviewed by: brd > > Differential Revision: https://reviews.freebsd.org/D35309 > > So, I understand the initial problem but this causes a new one. > efibootmgr is now confused when you ask to print the unix path of the > ESP because the device resolved is still ada0p1 (for example) and since > it's not mounted anymore as the label is used we can't discover the > path to the mounted ESP. > Since it's now in 13.2 we've just noticed that at work. > We will parse glabel but it's really horrible to parse and it be good > to have efibootmgr -E -p working again on a fresh install. > > Cheers, > > -- > Emmanuel Vadot Annoying. Could you please open a bugzilla PR so we don't lose track of this? From nobody Wed Feb 15 16:43:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/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 16:48:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH3tt4sFqz3qXxb for ; Wed, 15 Feb 2023 16:48:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 4PH3tt4R8Tz3rDD for ; Wed, 15 Feb 2023 16:48:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52f.google.com with SMTP id d40so21948776eda.8 for ; Wed, 15 Feb 2023 08:48:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=f9HHNSj0BJ9JJz02WdH58PNIqR0yq8mvHeKrTOnr3UM=; b=l/BS+zbuxy8h7kw10/QUitLsuuhQPjo7db2BtzdEmIouaC6pOSqM5BMeDONgYrb0Gy VOuY1qOBe64Gh8Wej6r2b4M41WegTTZBMrJKe83PvtJfhekwdiD+mXd7TS9e7XJKbyYb 7aOQuDaWDinRDNxOfARImdfWtoErE6Xz0iolYbBOUUAlvLQib+RkU8z6tIftJDLdOOW1 ooAmxs47cNLfnA+ad+4VGok8fsug9oUP7e4Qxhk47lXbQmmhZG3hANA7Eq0l09b0ScLt BojbwgQNQZ3RTk+DZgr4er7+LH/2Vf409pFXR3x8oezMpx4Lbsmvn1ltclZd6era1B5J JMDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f9HHNSj0BJ9JJz02WdH58PNIqR0yq8mvHeKrTOnr3UM=; b=yrkgx6uBxI3r546LJYHImROjryLFMlBJSHN879rOibFUGGcN9ax4OBFDN1UbXxBu5c 7/DQkpBxGfY1RE7LAdD3ZPAAHgdmzwdZj2lSWxmms/lwoXXvu2DgBRxQesIQPVu6jElj efHMCxg7lj00VxmmqABmO+xtQdMY2gD1A+ko/XbmuJ8jMWMgIMPziF0l7i/31SNw/WG5 04HJfyGNqAya78woiHjBcE2yd44T2MqPAiqKZUDrS9DBAiQ4gb9iGE6HW4Ni+YuPVbAI Q37KBknyuIyFZgWAsgpilarDaLau6o4x+uTWmQyGsFX8P/Oe7Yk8YrMNSVYFlP/5PIHV xuDg== X-Gm-Message-State: AO0yUKWoH4cJ+HIDEbEFh0XJ5yQ5zgoM5Mr0shjlT0j6GKNOsuMznHoS r+afP4Pgmllvk05egpJImTGhk8gxQktlxttWh+JY5w== X-Google-Smtp-Source: AK7set/wwQhLk4T1b+YQO9iy1D1+t1fW+CrZvk3uMGjcWmAFCh+J9r+z0lsgsFzjygKRQbhDOqAv+4kFMIhTjoLH/kY= X-Received: by 2002:a17:906:a409:b0:8b1:2d36:a58e with SMTP id l9-20020a170906a40900b008b12d36a58emr1435934ejz.2.1676479733296; Wed, 15 Feb 2023 08:48:53 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202205241917.24OJHipu099732@gitrepo.freebsd.org> <20230215103139.c66c65a80b9be787deaa36a2@bidouilliste.com> In-Reply-To: From: Warner Losh Date: Wed, 15 Feb 2023 09:48:42 -0700 Message-ID: Subject: Re: git: 7919c76dbdd2 - main - bsdinstall: use gpt/efiboot0 label in /etc/fstab To: Alan Somers Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000fa048e05f4bfda11" X-Rspamd-Queue-Id: 4PH3tt4R8Tz3rDD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000fa048e05f4bfda11 Content-Type: text/plain; charset="UTF-8" On Wed, Feb 15, 2023 at 9:35 AM Alan Somers wrote: > On Wed, Feb 15, 2023 at 2:31 AM Emmanuel Vadot > wrote: > > > > > > Hello Alan, > > > > On Tue, 24 May 2022 19:17:44 GMT > > Alan Somers wrote: > > > > > The branch main has been updated by asomers: > > > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=7919c76dbdd20161247d1bfb647110d87ca5ee0f > > > > > > commit 7919c76dbdd20161247d1bfb647110d87ca5ee0f > > > Author: Alan Somers > > > AuthorDate: 2022-05-24 18:24:12 +0000 > > > Commit: Alan Somers > > > CommitDate: 2022-05-24 19:17:10 +0000 > > > > > > bsdinstall: use gpt/efiboot0 label in /etc/fstab > > > > > > Otherwise, boot will hang if the numbering of disks has changed > since > > > initial install. > > > > > > MFC after: 2 weeks > > > Sponsored by: Axcient > > > Reviewed by: brd > > > Differential Revision: https://reviews.freebsd.org/D35309 > > > > So, I understand the initial problem but this causes a new one. > > efibootmgr is now confused when you ask to print the unix path of the > > ESP because the device resolved is still ada0p1 (for example) and since > > it's not mounted anymore as the label is used we can't discover the > > path to the mounted ESP. > > Since it's now in 13.2 we've just noticed that at work. > > We will parse glabel but it's really horrible to parse and it be good > > to have efibootmgr -E -p working again on a fresh install. > > > > Cheers, > > > > -- > > Emmanuel Vadot > > Annoying. Could you please open a bugzilla PR so we don't lose track of > this? > Yea, when I wrote the code I kinda gave up after needing to walk backwards in the geom mesh for places there were no back pointers. I've left more details on the bug that corvind@ filled. Likely a little brute force is all that's needed to find what we need... Warner --000000000000fa048e05f4bfda11 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Feb 15, 2023 at 9:35 AM Alan = Somers <asomers@freebsd.org&g= t; wrote:
On Wed= , Feb 15, 2023 at 2:31 AM Emmanuel Vadot <manu@bidouilliste.com> wrote:
>
>
>=C2=A0 Hello Alan,
>
> On Tue, 24 May 2022 19:17:44 GMT
> Alan Somers <asomers@FreeBSD.org> wrote:
>
> > The branch main has been updated by asomers:
> >
> > URL: htt= ps://cgit.FreeBSD.org/src/commit/?id=3D7919c76dbdd20161247d1bfb647110d87ca5= ee0f
> >
> > commit 7919c76dbdd20161247d1bfb647110d87ca5ee0f
> > Author:=C2=A0 =C2=A0 =C2=A0Alan Somers <asomers@FreeBSD.org>= ;
> > AuthorDate: 2022-05-24 18:24:12 +0000
> > Commit:=C2=A0 =C2=A0 =C2=A0Alan Somers <asomers@FreeBSD.org>= ;
> > CommitDate: 2022-05-24 19:17:10 +0000
> >
> >=C2=A0 =C2=A0 =C2=A0bsdinstall: use gpt/efiboot0 label in /etc/fst= ab
> >
> >=C2=A0 =C2=A0 =C2=A0Otherwise, boot will hang if the numbering of = disks has changed since
> >=C2=A0 =C2=A0 =C2=A0initial install.
> >
> >=C2=A0 =C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 2 weeks
> >=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Axcient
> >=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 brd
> >=C2=A0 =C2=A0 =C2=A0Differential Revision: https://review= s.freebsd.org/D35309
>
>=C2=A0 So, I understand the initial problem but this causes a new one.<= br> >=C2=A0 efibootmgr is now confused when you ask to print the unix path o= f the
> ESP because the device resolved is still ada0p1 (for example) and sinc= e
> it's not mounted anymore as the label is used we can't discove= r the
> path to the mounted ESP.
>=C2=A0 Since it's now in 13.2 we've just noticed that at work.<= br> >=C2=A0 We will parse glabel but it's really horrible to parse and i= t be good
> to have efibootmgr -E -p working again on a fresh install.
>
>=C2=A0 Cheers,
>
> --
> Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

Annoying.=C2=A0 Could you please open a bugzilla PR so we don't lose tr= ack of this?

Yea, when I wrote the code= I kinda gave up after needing to walk backwards in
the geom mesh= for places there were no back pointers. I've left more details on the<= /div>
bug that corvind@ filled. Likely a little brute force is all that= 's needed to find what
we need...

Wa= rner
--000000000000fa048e05f4bfda11-- From nobody Wed Feb 15 17:10:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 18:30:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH68Q2gcfz3r9QF; Wed, 15 Feb 2023 18:30: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 4PH68Q2FGLz46rJ; Wed, 15 Feb 2023 18:30:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676485846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uj1hrVdNocxhYJnprfviHUNXfecL32fld4w6LNYPnj0=; b=D3BTk4Q/RDgG96YrDP2cgvlsAY62rNcvBgubF9vCkZWy2Umqm7DHgBAfeoB9HZ1Jh0lX6F wRVZFVkBZfw+sSGf5lR95k2kd0UexA3INM853LqbhwFnCuRX4D9bKFzvxYpts7XflKlcKS HCEiVt1wZ5q3yK/vWAE8so0cRTNYOLpGq49I/R/KWKQXGRqzX4Z3rcem7tGEZeh+BuDu7V NMqzICNsfKVmxu2xi0vPp13BjTScfDjtoNLGkZLhMgPw0EGk4v1CUBVlGOhbfxFPIQJtUR sK6r6mpBSJU8I5Rvw2p2du5EVRd4o4EqJ2hHWS7zgct56zkeziv+JXGob11bCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676485846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uj1hrVdNocxhYJnprfviHUNXfecL32fld4w6LNYPnj0=; b=sQIde9t4ROSQl6aP2MP16AJFWUS8kMIknKk9Kuh+UAtJfX9y1RBedGNx9Z2s0Mt0INhDHI 6O0iJDHtNpf/WdraasoH0I9BrLvq2y/SqzZH7xlnzaFXXO/SEhwL6MUItJP+nHCkcQ5sAt 4GlFFHyOn8gcieLhWIvnqiky0XUNgTeb9Av73kjOyUM3xWZSERUES09lV9XC8Fm7YdSbr2 BpteOFzYSMlde4OhoAqgshF/zmomhYw0+ObLmgG2ljzUF+mQVXVnDY1KBSd5B7YuNKTwfG t1XXn7N6gxWBqBYGWiCtSvTV2HlqYK0tpYXpalGPjtxwbFLWGNoHapVGN+lh6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676485846; a=rsa-sha256; cv=none; b=gHsGAB9qN07yHcCtw8XjaQbw7eK4fApmHCXIiSpi6YFRwvnaHA10yr/KLqWMZOxLeMsrH1 kwxJuMvPr87ntOm2otZYjvLn4ZWOpANXbPmew7XKYwVTbyaRhyOAp/B2k87QNZKDmMmMCQ gZxDwcLaVX7kXYNdJTuULuH99mfDKWAYDyBkcfROZS91vD+OmWs7mKUjLqG+zH7czQwIss Hd7cJ5pFnsiJZtNLWmoTlyw7+PUSzK7Vo9p/OnUwYKWXxxO+Osu18UX7WqQfF+Pe8JvaNr luTMU4GHRk03Owsu7QtfZuYFUqkinWZkkX3tvXyAJ8nzEutXgKd+tn9kBAAuPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH68Q1JGvzZPG; Wed, 15 Feb 2023 18:30: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 31FIUkp1055876; Wed, 15 Feb 2023 18:30:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FIUk9m055875; Wed, 15 Feb 2023 18:30:46 GMT (envelope-from git) Date: Wed, 15 Feb 2023 18:30:46 GMT Message-Id: <202302151830.31FIUk9m055875@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 96871af01382 - main - inpcb: use family specific sockaddr argument for bind functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96871af01382ecaec59ccbf6999ba8ad76a5f9e9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=96871af01382ecaec59ccbf6999ba8ad76a5f9e9 commit 96871af01382ecaec59ccbf6999ba8ad76a5f9e9 Author: Gleb Smirnoff AuthorDate: 2023-02-15 18:30:16 +0000 Commit: Gleb Smirnoff CommitDate: 2023-02-15 18:30:16 +0000 inpcb: use family specific sockaddr argument for bind functions Do the cast from sockaddr to either IPv4 or IPv6 sockaddr in the protocol's pr_bind method and from there on go down the call stack with family specific argument. Reviewed by: zlei, melifaro, markj Differential Revision: https://reviews.freebsd.org/D38601 --- sys/netinet/in_pcb.c | 22 ++++++++++------------ sys/netinet/in_pcb.h | 4 ++-- sys/netinet/tcp_usrreq.c | 7 +++---- sys/netinet/udp_usrreq.c | 6 +++--- sys/netinet6/in6_pcb.c | 7 ++----- sys/netinet6/in6_pcb.h | 2 +- sys/netinet6/udp6_usrreq.c | 12 +++++------- 7 files changed, 26 insertions(+), 34 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index ad889f29de55..a23c89fe8033 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -655,21 +655,21 @@ out: #ifdef INET int -in_pcbbind(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred) +in_pcbbind(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred) { int anonport, error; - KASSERT(nam == NULL || nam->sa_family == AF_INET, - ("%s: invalid address family for %p", __func__, nam)); - KASSERT(nam == NULL || nam->sa_len == sizeof(struct sockaddr_in), - ("%s: invalid address length for %p", __func__, nam)); + KASSERT(sin == NULL || sin->sin_family == AF_INET, + ("%s: invalid address family for %p", __func__, sin)); + KASSERT(sin == NULL || sin->sin_len == sizeof(struct sockaddr_in), + ("%s: invalid address length for %p", __func__, sin)); INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY) return (EINVAL); - anonport = nam == NULL || ((struct sockaddr_in *)nam)->sin_port == 0; - error = in_pcbbind_setup(inp, nam, &inp->inp_laddr.s_addr, + anonport = sin == NULL || sin->sin_port == 0; + error = in_pcbbind_setup(inp, sin, &inp->inp_laddr.s_addr, &inp->inp_lport, cred); if (error) return (error); @@ -901,11 +901,10 @@ in_pcbbind_check_bindmulti(const struct inpcb *ni, const struct inpcb *oi) * On error, the values of *laddrp and *lportp are not changed. */ int -in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp, +in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, u_short *lportp, struct ucred *cred) { struct socket *so = inp->inp_socket; - struct sockaddr_in *sin; struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct in_addr laddr; u_short lport = 0; @@ -925,15 +924,14 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp, INP_HASH_LOCK_ASSERT(pcbinfo); laddr.s_addr = *laddrp; - if (nam != NULL && laddr.s_addr != INADDR_ANY) + if (sin != NULL && laddr.s_addr != INADDR_ANY) return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT|SO_REUSEPORT_LB)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL) { + if (sin == NULL) { if ((error = prison_local_ip4(cred, &laddr)) != 0) return (error); } else { - sin = (struct sockaddr_in *)nam; KASSERT(sin->sin_family == AF_INET, ("%s: invalid family for address %p", __func__, sin)); KASSERT(sin->sin_len == sizeof(*sin), diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index c450685affcb..f15fd0db4dfb 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -739,8 +739,8 @@ int in_pcbbind_check_bindmulti(const struct inpcb *ni, void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); -int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); -int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, +int in_pcbbind(struct inpcb *, struct sockaddr_in *, struct ucred *); +int in_pcbbind_setup(struct inpcb *, struct sockaddr_in *, in_addr_t *, u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr_in *, struct ucred *, bool); diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 5c98e969c5ce..1dbf4659ad00 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -245,7 +245,7 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) tp = intotcpcb(inp); #endif INP_HASH_WLOCK(&V_tcbinfo); - error = in_pcbbind(inp, nam, td->td_ucred); + error = in_pcbbind(inp, sinp, td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); out: TCP_PROBE2(debug__user, tp, PRU_BIND); @@ -309,14 +309,13 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) } inp->inp_vflag |= INP_IPV4; inp->inp_vflag &= ~INP_IPV6; - error = in_pcbbind(inp, (struct sockaddr *)&sin, - td->td_ucred); + error = in_pcbbind(inp, &sin, td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); goto out; } } #endif - error = in6_pcbbind(inp, nam, td->td_ucred); + error = in6_pcbbind(inp, sin6, td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); out: if (error != 0) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index f911a79519b6..f039675b1e55 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1206,8 +1206,8 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, goto release; } INP_HASH_WLOCK(pcbinfo); - error = in_pcbbind_setup(inp, (struct sockaddr *)&src, - &laddr.s_addr, &lport, td->td_ucred); + error = in_pcbbind_setup(inp, &src, &laddr.s_addr, &lport, + td->td_ucred); INP_HASH_WUNLOCK(pcbinfo); if (error) goto release; @@ -1546,7 +1546,7 @@ udp_bind(struct socket *so, struct sockaddr *nam, struct thread *td) INP_WLOCK(inp); INP_HASH_WLOCK(pcbinfo); - error = in_pcbbind(inp, nam, td->td_ucred); + error = in_pcbbind(inp, sinp, td->td_ucred); INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); return (error); diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 2b8e48090f28..92a1ea840af2 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -153,11 +153,9 @@ in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) } int -in6_pcbbind(struct inpcb *inp, struct sockaddr *nam, - struct ucred *cred) +in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) { struct socket *so = inp->inp_socket; - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)NULL; struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; u_short lport = 0; int error, lookupflags = 0; @@ -176,12 +174,11 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr *nam, return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT|SO_REUSEPORT_LB)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL) { + if (sin6 == NULL) { if ((error = prison_local_ip6(cred, &inp->in6p_laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) return (error); } else { - sin6 = (struct sockaddr_in6 *)nam; KASSERT(sin6->sin6_family == AF_INET6, ("%s: invalid address family for %p", __func__, sin6)); KASSERT(sin6->sin6_len == sizeof(*sin6), diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index 800d26e8b3d6..91131d1968bc 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -73,7 +73,7 @@ void in6_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); void in6_losing(struct inpcb *); -int in6_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); +int in6_pcbbind(struct inpcb *, struct sockaddr_in6 *, struct ucred *); int in6_pcbconnect(struct inpcb *, struct sockaddr_in6 *, struct ucred *, bool); void in6_pcbdisconnect(struct inpcb *); diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 3e6c57a8c6ff..8a95e1623f9c 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1020,6 +1020,7 @@ udp6_attach(struct socket *so, int proto, struct thread *td) static int udp6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { + struct sockaddr_in6 *sin6_p; struct inpcb *inp; struct inpcbinfo *pcbinfo; int error; @@ -1034,16 +1035,14 @@ udp6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) if (nam->sa_len != sizeof(struct sockaddr_in6)) return (EINVAL); + sin6_p = (struct sockaddr_in6 *)nam; + INP_WLOCK(inp); INP_HASH_WLOCK(pcbinfo); vflagsav = inp->inp_vflag; inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) { - struct sockaddr_in6 *sin6_p; - - sin6_p = (struct sockaddr_in6 *)nam; - if (IN6_IS_ADDR_UNSPECIFIED(&sin6_p->sin6_addr)) inp->inp_vflag |= INP_IPV4; #ifdef INET @@ -1053,14 +1052,13 @@ udp6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) in6_sin6_2_sin(&sin, sin6_p); inp->inp_vflag |= INP_IPV4; inp->inp_vflag &= ~INP_IPV6; - error = in_pcbbind(inp, (struct sockaddr *)&sin, - td->td_ucred); + error = in_pcbbind(inp, &sin, td->td_ucred); goto out; } #endif } - error = in6_pcbbind(inp, nam, td->td_ucred); + error = in6_pcbbind(inp, sin6_p, td->td_ucred); #ifdef INET out: #endif From nobody Wed Feb 15 18:57:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH6lY0cXSz3rC1P; Wed, 15 Feb 2023 18:57: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 4PH6lX74nnz49sP; Wed, 15 Feb 2023 18:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676487465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+fUdq0PDXwS+rTT6mo/7rmHZN86YpTM6hwj/DSlUNk=; b=qHIwjFHccWW5UrAjLkT3CvZoMPnGGiVlJqmrcQaYJRM0+741MH4zldIyGHngIzGJJ5fbUu s6sVVIaQBfDKlPtT6CnsaZY2Px4xsvF/hIDBS7EWQ1CXX3pN86cUJ1/caMrCk7ch0wEdnt MmlI5mfj5TZ1cr92wK9Ef5pYbcaMXNsb5+9hzm+zTPdyQEjKBW5khRsaaOxuvzdcgd9I4T bHxzD7XfBl44JvDdemIRR5wVKDjE2xBN5b5GK4Ejnu6I+Py6OknTBKV2KsQ20HdlH7iei9 vtTlX9Pz2CI7HT9tLxh5W2RLyRB3qDa/hH5UIpgnrN3IAhZhXMWBjhW8McJrZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676487465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+fUdq0PDXwS+rTT6mo/7rmHZN86YpTM6hwj/DSlUNk=; b=ZzD2g/OlREy+JduLjpZr5k6NbNosAfs9XPQ10QOXnR6rav4uLPABrReXopeiiVPxXEBXYk dkzTG8k8VZdwETfhH07xwt2h92lBPYbtCtWHDyrVxpjvI/VaHoxA2mMjtzbD3qNa2ZgO+q wT/FDvMcI4xDxsuOWbqlB88fWIt0rMU54a4owbwci3pFTZ8ZIhp/UCwWWOxPnOIXB5njqU gOEQ6uesD6Jr5+inxIs2eCmaJwNhBM03S9E5VWfcoHI9cdoV6XJ9qi5Gk9J+pmosDu+eu+ IbsWl6V3CHjcJvhkgGD24p65omJDEB9xNXihy3Ib0OKYuIxbEi5x8tLwdc08uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676487465; a=rsa-sha256; cv=none; b=GuD29hBL7KXK/CRM6wrrbwDuoLbPRExpiT2HbN4U7luOn/0bsBCcYyC+DCgSNXC1KQX5tD bDR71WhpEuLu6C/r0bjyGSKveMiouS40cT2cGLBD31CMVLUi2w5kg/KWA8uwea2h+u3Weg FUmmyA4AkflS1nmEMcs4GindIzCscmad6v1ku7czIYLbiNWp4hKvrcvA10cKcBxee1s8Ka aNed6Uj4vP3WGQUgxelyAGtch4p2jWZTyIc+fN7CvbWrV36mSpl1e7BcT1pjLap2J8mgab QlPnIN3XX9eI2PFO6q1o1sG9JoBgIgSt+Fc33La7uwCMlkQinM7BvrQ+nALvyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH6lX61z6zZmr; Wed, 15 Feb 2023 18:57: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 31FIvi7b088712; Wed, 15 Feb 2023 18:57:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FIviE9088711; Wed, 15 Feb 2023 18:57:44 GMT (envelope-from git) Date: Wed, 15 Feb 2023 18:57:44 GMT Message-Id: <202302151857.31FIviE9088711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 40734fc57ec0 - main - aio: Fix a test and set race in aio_biowakeup. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40734fc57ec0158690e9f03284229553b050b8ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=40734fc57ec0158690e9f03284229553b050b8ea commit 40734fc57ec0158690e9f03284229553b050b8ea Author: Keith Reynolds AuthorDate: 2023-02-15 18:56:39 +0000 Commit: John Baldwin CommitDate: 2023-02-15 18:56:39 +0000 aio: Fix a test and set race in aio_biowakeup. Use atomic_fetchadd in place of separate atomic_subtract / atomic_load. Reviewed by: markj Sponsored by: HPE TidalScale Differential Revision: https://reviews.freebsd.org/D38559 --- sys/kern/vfs_aio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 43e54e1ad9bf..34671f67191f 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -2493,10 +2493,9 @@ aio_biowakeup(struct bio *bp) atomic_add_int(&job->outblock, nblks); else atomic_add_int(&job->inblock, nblks); - atomic_subtract_int(&job->nbio, 1); - if (atomic_load_int(&job->nbio) == 0) { + if (atomic_fetchadd_int(&job->nbio, -1) == 1) { if (atomic_load_int(&job->error)) aio_complete(job, -1, job->error); else From nobody Wed Feb 15 18:57:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH6lZ0f8xz3rBdS; Wed, 15 Feb 2023 18:57: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 4PH6lZ0CtMz4B43; Wed, 15 Feb 2023 18:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676487466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CmqW5SEbTScAZusDpbVDDs/4/GSLr8zbqmXPxAU3j8g=; b=QWHFnYmFt6uSnDxFzcSOxavnjiMapvehwMx6dxzeXbf3sbWbgYw2lJuhTw2GI+M6SB0Mki puu1KWYyVgkuBNrc7ACofbF06YAgZmpkSsJ2AYU4Q8+FIn7THZocJzycbAiDkqVVndPBQt hUd6p7+7KJ+iqGCNtWRpg4TQ5gHLxGdYImcOevoHLyaelAnGotDm5mHAQDbpnWijhbsNm3 E2cZaWinoojRCGjCmpSpStSS88yVQWeBs6nFr1J1N2nL4rGQNFQmLWAUpicenoX6EpVhos OMSmIa3M/R6Ynbq40zs0/D/NY7USXWfwK7ZgqEDQXOQi3h4aTokA/eQVPfPiIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676487466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CmqW5SEbTScAZusDpbVDDs/4/GSLr8zbqmXPxAU3j8g=; b=tvZZunj5RFZ7+/DkZZynVy8d48wSrNURwosIx3KKNuBWTH15HTai+/tvX/ff0UoBZYs+f5 eIM7conqmGgL0Kkhidsuj+uGsuSWMW9AqYC3EH689fxjvf+BPCJlX73Vmex1k0Y5aizwGA o36Ke75X3xMvGLggHB0rKvKbzSogaao8RRUicd/DgzVSNG/E2w9p6/4zQXGUgvHAMe6UNu ZH69hqhO54VvLlKAmFu31430NfR7cIpV8HWNyfr+CvzotPdB5zFh77z+Pik/9ELt/doPhu af0c0p34mP0i26Ba2bxuEX05MVdDMA38IDEBOt4jYeY8thQ8SPLpJ2XTJsjA8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676487466; a=rsa-sha256; cv=none; b=UdMEhBLxUq8Nq3PAgqHG014EnDkL1up90mJFEJDJhwAr4HTUGeOBuxjtthZ8icr69ot3Mp 2XybFPFKWnSNleFMvzv7HF/jMQ8+voBRubWVOrR4/wGz17MKjA8pbaHSW0l+etvSIfLMfC VhfR7rEMjQ8KBAsj+UvLobwC7QUESYX1HNPV+8VDR28Sd1f7p53LRnv/WhX4mBOkGZHdOh +IoU0+omkH6BUa9Ft47YsdaaDQ1Jdvfm29jjoTMwpncdwF1N1mc63cgBlujVHxUOiLdItg gghgsDlsJKB5iy5QS1pv0UoSMAF6Kb6s/urAgJM5zmKwpfoLAA8TsxZgbD85pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH6lY68M4zZr7; Wed, 15 Feb 2023 18:57: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 31FIvjsD088741; Wed, 15 Feb 2023 18:57:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FIvjsM088740; Wed, 15 Feb 2023 18:57:45 GMT (envelope-from git) Date: Wed, 15 Feb 2023 18:57:45 GMT Message-Id: <202302151857.31FIvjsM088740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: cca6d6160f14 - main - aio_biowakeup: Various style fixes. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cca6d6160f14a6a8dcb1e3caa0759ddbd0f68555 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cca6d6160f14a6a8dcb1e3caa0759ddbd0f68555 commit cca6d6160f14a6a8dcb1e3caa0759ddbd0f68555 Author: John Baldwin AuthorDate: 2023-02-15 18:57:08 +0000 Commit: John Baldwin CommitDate: 2023-02-15 18:57:08 +0000 aio_biowakeup: Various style fixes. --- sys/kern/vfs_aio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 34671f67191f..9868b8770747 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -2480,9 +2480,10 @@ aio_biowakeup(struct bio *bp) aio_biocleanup(bp); - nbytes =bcount - resid; + nbytes = bcount - resid; atomic_add_acq_long(&job->nbytes, nbytes); nblks = btodb(nbytes); + /* * If multiple bios experienced an error, the job will reflect the * error of whichever failed bio completed last. @@ -2494,7 +2495,6 @@ aio_biowakeup(struct bio *bp) else atomic_add_int(&job->inblock, nblks); - if (atomic_fetchadd_int(&job->nbio, -1) == 1) { if (atomic_load_int(&job->error)) aio_complete(job, -1, job->error); From nobody Wed Feb 15 19:45:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH7pp6gXQz3rGBt; Wed, 15 Feb 2023 19:45: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 4PH7pp65c2z4LQ6; Wed, 15 Feb 2023 19:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676490338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JR6yln5Y09vkYtpZBV1qUwD/1hwPJiS30EMU7Yi+U9E=; b=j2YSrru1t5pGtUtUBAKZi0DbV3BRgLb4/myQJMojUmxNbr8QXbnEVuRcCMbXQgUKgQCSKw M0pzUbs4l/uZVmul87Mdmy6RkmhOwkDuRsHjzjKL5M0DioUoV55c4HjuhYbVU+HpD5lBlY tiyRXpA8Zm7onlmGOrW3A4CO4ytRVbReNxDvq14PzVIPb6ib7N4rER8/zcJm1qz93+DYdN /OjHGjEymBUtBELlaMzguNQtncPdY0nXb1XY8zzj7emC5Rb1NiVvC/r7mQpSUTbCqVjVi/ HZ4SkhE0gXXEn5W+4vOFC0DHClbtdQFJ0ug/J8fGU3iRa3xm8Ahg2wuVFJZYmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676490338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JR6yln5Y09vkYtpZBV1qUwD/1hwPJiS30EMU7Yi+U9E=; b=ctnHyXuLAO+O0Eemj5JDzw02so41k/PxpTNHXYtaS+YUIDdTEciE5sv3M4/cO0eo03tg0W KZCh9ouCbvljp4Dgns0+T+AAHDZkdtXTIcqIg1h+T6UUC6MFQDrdHORJVTFfCk1ojgVOI5 DINkEO8U9UqWAkQe91oHJBFvkNFGURYDuDfxH0tkN7kFTOKyZSNB89RUpZqatbrBRYcFI2 J63RAP9tDZDHlmRpj/Y2P3lC/uSHMoJzK7uM4IlulBTvou+I8yJWLWgE4qovSzsejow964 Pj4wMS+xzEi5pa7uNZk2vnttBCvhkMobFgrrWzDnGyXsr8A1MJ6zPMC12fJaQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676490338; a=rsa-sha256; cv=none; b=m7SmZ7Cu08FpqSQp+H1iZbxUCAipvGaqL7f3ZTcH0wsf7YgFppqATf75/xNUDdaSAdwMrU tnf2nyroiN97Yy/wf5GRYy5cueimnh3elO+dwe0fJS6k9AZLtUVf/ttb/WjvpBl1ZzIuf3 7hv0w6FYbmXIupdckoMp5LVLuw51A20Thhok8nDTAL6j7v3Wa0of+B7xQs0VwH1cFwz5bS /KZoNPexj04huLgT77reK7/dbkuPNhmaOJKommBreJ+gJG4TdifHDE6gFF3QegJEi8NidF tBx8GY37iLa+C+kfdc772RA/WaXY65U21GWNc+1b3yZf6pdzlTnyb6pdqFpFMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH7pp56gFzc8B; Wed, 15 Feb 2023 19:45: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 31FJjc5G061668; Wed, 15 Feb 2023 19:45:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FJjccV061667; Wed, 15 Feb 2023 19:45:38 GMT (envelope-from git) Date: Wed, 15 Feb 2023 19:45:38 GMT Message-Id: <202302151945.31FJjccV061667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5f044c4e055a - main - profil(2): profil(II) was in the v3 sources List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f044c4e055a387e4db5a899ea17705cc1a542e2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5f044c4e055a387e4db5a899ea17705cc1a542e2 commit 5f044c4e055a387e4db5a899ea17705cc1a542e2 Author: Warner Losh AuthorDate: 2023-01-04 16:41:16 +0000 Commit: Warner Losh CommitDate: 2023-02-15 19:44:32 +0000 profil(2): profil(II) was in the v3 sources profil(II) is in the scanned 3rd edition manual that we have. We don't have the 3rd edition sources, nor do we have the 4th edition souces. We have a mostly complete (missing pipes) 4th edition C rewrite where profil system call number is reserved, but it's not implemented (it's in the manx section for things that apeared to have been in 3rd edition but weren't yet part of the reimplemented 4th edition). The 5th edition sources we have do have it, however. For other items that have appeared in earlier manuals, we've added the simple verbage to the manual and relegated the rest of the data for that file to the commit message. --- lib/libc/sys/profil.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/profil.2 b/lib/libc/sys/profil.2 index cdaa32a7f939..b2d1d9663ad8 100644 --- a/lib/libc/sys/profil.2 +++ b/lib/libc/sys/profil.2 @@ -108,8 +108,8 @@ contains an invalid address. .Sh HISTORY The .Fn profil -function appeared in -.At v6 . +functionality first appeared in +.At v3 . .Sh BUGS This routine should be named .Fn profile . From nobody Wed Feb 15 20:30:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH8pR4mMcz3rJSn; Wed, 15 Feb 2023 20:30: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 4PH8pR2xYqz3F0s; Wed, 15 Feb 2023 20:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676493023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DnrPyMGSSjqbXC4tAGTD4BaU3Cvmh7o9VLQpXeIOd+M=; b=RTPYuYIIzPN3j4tXAPXK1n009607TgBblppdZRK4UJ12xwWHF1SkKG+68pXT0xbzbvkhCa 3ufy1jP/yvedmfsOm8fllLFeRvJDmmeG1vDhPxoTaJOx83/ZPKYVWk5otR80A6U0qGlhoF wE5jJPv3KyXjaXj6azbJ03tJWwXH487wQTAjWzn0/QtLeG7QYedQ2SZP7h0BRIbMuMB5Kq 9/7H4BL4exOWWAcyvJ5l0jzwWIpJ7Q0L+IymFP8dli+TlANx1Sa1oDuf2Ce4MTZJpBYsas +2ucMDQMoh+xyp5ksm6mbhf/xY2MKtvXK1toVj4Dw2a96GehK7zN6/On3eGDfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676493023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DnrPyMGSSjqbXC4tAGTD4BaU3Cvmh7o9VLQpXeIOd+M=; b=gV19yWGwSYzVG4irevwKMGLRXPKcm0hrMDrDLRIfZUuXjfovvI+juLjk1kzmqc0vmuGAS/ YoJ/hP+9dUuIbKrUMCQalybz5wjY3H6KAb9ezC/NeLDn3syYl4Sghfldsu6EpK0717hFRU HokCQQeACL5dPtJGfV6ooIxYSW2k2aTdwBOeESmwvhawHGczK5b+5A9I/cPq0ICB9VFDAF go2bMM5z9+pWtTufHWOaTOTKNxQE0ekuUMcyxQnaqAZ/06h+TJCbX5zQL8pLXV+i65ceVf +TX2sr+46/CV7DfxB3cdK3Z5Za9Fb8DuhF0QmwOgdYj3GW5aHuDUgtQni+21Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676493023; a=rsa-sha256; cv=none; b=xj23gk3YchwutASpLefMNhX0LZglNImf8yYZxx+8kjAQMURXmw0if4R71fjuTqiZtZybRH BJBcHnnUMLBX7c7c6/Qs16mK+V0UM7dLqev4zyPJM6wr6ZCKrmugqAyQjvod/WhVPLKvGr Y+sKJJv2meQqt0y8hYLCSCNdC5RlzCW91Q8dqF6GhA9Q3ItTLXhAv3n3pyGuuDwOoJfYi0 7oQYUs/9krCf9D0XlW7qJ3rIrwlqmi7N8jYPYEVd7n/8qFlJu53s7DHmTLL9cH4ImANmks QjA4kM1LYTij78QTlgwT3P8IPWWmWK+ubtg6SeGxPtRib2b2Ahax1QmKPqHbsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH8pR21LTzd6v; Wed, 15 Feb 2023 20:30: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 31FKUNLu027802; Wed, 15 Feb 2023 20:30:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FKUN21027801; Wed, 15 Feb 2023 20:30:23 GMT (envelope-from git) Date: Wed, 15 Feb 2023 20:30:23 GMT Message-Id: <202302152030.31FKUN21027801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 5dd48f718433 - main - netlink: use ifmedia to provide vlan interface operstate. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 5dd48f718433959c283a8a4d6e46512426f1e200 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=5dd48f718433959c283a8a4d6e46512426f1e200 commit 5dd48f718433959c283a8a4d6e46512426f1e200 Author: Alexander V. Chernikov AuthorDate: 2023-02-15 20:22:47 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-15 20:22:47 +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 --- 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 Wed Feb 15 20:44:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH96P0ywbz3rKCW; Wed, 15 Feb 2023 20:44: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 4PH96P0Sywz3GkR; Wed, 15 Feb 2023 20:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676493853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vny/ySr7G3LJXKzURhLbB7R8lez6wZ3qKv5i49ddkU=; b=sOpNAYnhTdr0SZXq64EkvU1TCGSGmo33UbqL6wF+g4IuoeH+TYxzwfWvTgcAXyu0ja/HIl YTbfsmKLouPfjdZ4sDQCrQtRwyK60Wee1u0xOBQevKoM4VXsx+ar6XCBWU/sIsZbQuD9FB pE2/O2Y6jnzZSx7yFHYYHSj/r4BRSq07MsWexxKVZ89G/YZF8gfhe4Pbje8mvqwxH9EHab zwnUF6mX5sw6VS20El/OUeL57dH/hygFx8mcwp18XlDEQEs76oQpbQZlN5GCaalEFuY+sl 3L3FuGK2m29L0v5MhqFBfSt+7adn9VadLslbQN4MyqqDtmOM8clBvTDgBhDkJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676493853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vny/ySr7G3LJXKzURhLbB7R8lez6wZ3qKv5i49ddkU=; b=pq59MOcBnhB/qSmX430Iwn2CkqhTYJDGZ46sLyOoG/9KTU5Jt9A/y+im+/Hnbi6nt344nY YsVAsPHoDHEnK9TdqICi39wZfEqEm45CdstJnfijleED+FO0fsFoisVfR2d2/kgqydwOUg dRsOLDHg5Amk7bkudDPbVD/Dn7a+Bi3cJdVV7DLQrS1jFpic+hDzPuNMHl2RSyWwc53c2K uJo05oCqxvs1/UT39kDSFJt7I1OCu7YNR3SkWdIPxo8ncws0RpKXSCsjpkDPHdy2rG4Wgo 5DySa+c4E8RzlhZogZ4K5EPSE34/bX4a28MIhSa1hFo3pdEgBjogh3KmzpOI3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676493853; a=rsa-sha256; cv=none; b=Wvx/lu5i4n3Acr5AkOM/pby66NXcKm7J09RNtmt6LpYlCn7GDTx9NtIdZ6MjeX8EBqxM0Q X0U3Ld6BbeJawaNRPOq2OqwZwFAlUEl3s4qiS8pi2nUU7gXqQG2Ey/SbcsnUCnoAQOVHRb 0jFVyEyjNuak22qQ4qN5t4x60feMaNAtHc7SK1cco2kcXZMXhR6aJGa+x1dATU7JxufccX 44sVeyU72OC/I9wPMgvsWXakxvLLJSKy/O2hkJlNmEIFAyxMQWTFBq3+5xIU5k87EPVljN glLpiMEvZSS8EevXwbN1Gt2CHpSIAr6E9ULUg7odxBB8O2EG5L8Dpu2yAVaSaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH96N6dqnzdYt; Wed, 15 Feb 2023 20:44: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 31FKiCbs047983; Wed, 15 Feb 2023 20:44:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FKiCCa047982; Wed, 15 Feb 2023 20:44:12 GMT (envelope-from git) Date: Wed, 15 Feb 2023 20:44:12 GMT Message-Id: <202302152044.31FKiCCa047982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 059320b8c8de - main - nproc: denote an incompatiblity with Linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 059320b8c8de73a90514879cd1e2da397584cfde Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=059320b8c8de73a90514879cd1e2da397584cfde commit 059320b8c8de73a90514879cd1e2da397584cfde Author: Mateusz Guzik AuthorDate: 2023-02-15 20:17:27 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-15 20:43:46 +0000 nproc: denote an incompatiblity with Linux On Linux _NPROCESSORS_CONF reports CPU threads disabled by the kernel, while it does not on FreeBSD. Flip _NPROCESSORS_ONLN to _NPROCESSORS_CONF. While it keeps reporting the same value, it will automagically unbreak should someone change the above. --- bin/nproc/nproc.1 | 7 ++++++- bin/nproc/nproc.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/nproc/nproc.1 b/bin/nproc/nproc.1 index 91a87b1ca048..8ebe94a21049 100644 --- a/bin/nproc/nproc.1 +++ b/bin/nproc/nproc.1 @@ -3,7 +3,7 @@ .\" .\" * SPDX-License-Identifier: BSD-2-Clause .\" -.Dd February 5, 2023 +.Dd February 15, 2023 .Dt NPROC 1 .Os .Sh NAME @@ -40,6 +40,11 @@ Print usage information and exit. .El .Sh COMPATIBILITY This program is intended to be compatible with nproc as found in GNU coreutils. +.Sh BUGS +If HyperThreading is enabled in BIOS and disabled in the kernel, the +.Fl -all +option on Linux will still report all possible CPU threads. +On FreeBSD only active threads will be reported. .Sh SEE ALSO .Xr cpuset 1 .Sh HISTORY diff --git a/bin/nproc/nproc.c b/bin/nproc/nproc.c index 9037c74dbfff..c2ab75826ce1 100644 --- a/bin/nproc/nproc.c +++ b/bin/nproc/nproc.c @@ -110,7 +110,7 @@ main(int argc, char *argv[]) usage(); if (all_flag) { - cpus = sysconf(_SC_NPROCESSORS_ONLN); + cpus = sysconf(_SC_NPROCESSORS_CONF); if (cpus == -1) err(1, "sysconf"); } else { From nobody Wed Feb 15 21:33:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHBBy3CVMz3rMf1; Wed, 15 Feb 2023 21:33: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 4PHBBy2kYLz3LjT; Wed, 15 Feb 2023 21:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676496794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7SIOT1vHEXkBjnhdvFssQGMMEuAV7YlOZXu+wwvOP+A=; b=ItsT8Imn40Bi8HuAcwiEDR3l1WonpWd7zPfgAUvFDwBb5q+0Bn1E8g5oqrVgZ070wOl381 EH3vB4FHmqnDglAJB8QFjKbUEhRgX8kuA1v5Ssy6GIXf/ro1acFgpDiUBgZz1n/1SgGQVC gKwVdN3ZlkLfw08p8qY6RDvq1UXFqasvD1dvm98iD1xPloM46o6ZIj/KMK4Cp8ePKJzCON ksar7LX5vSl+L1Vrz8Q9SswjliBnWwiZmoIztjzdtc2Vgej3lcBVTKJkvhOufOd5YkscV1 nYwiApB2A1PRDS4iACQslJp16YkxY+eJyu7c7JLsOZbEc9EpB2omTjUky1Ff2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676496794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7SIOT1vHEXkBjnhdvFssQGMMEuAV7YlOZXu+wwvOP+A=; b=GzP0CmaBwZeD4QC64YmaUfCwg5zsq0ZNiNq6gj0E40T5yY/xWKFnB3gp59YdNx3GGZuqm1 8WcKXcqtrn1EmsenPQMFal8lTYhyLFL7ddJSJ3LiF6R3lrKWyAIAfgbRZLcdIFKt8ugA2g XKj7kxhe6wTOCoNG+e1TBgoYbDvThXY6OqePupo4MR1/r149kCz2/kvqwuwvGKQ7WGM4nl yrtDXGrKF3yresktzqRZ6Pn1nSMa3iv/IKneTNn0ycjrvFISXkAUoWyhQgDIOxecQvBnJ7 jA1vqxsKuSFbsLFHF3mdvkogwyro961+AZo7WgjckeV/QTlteE1Agg2I6KJXmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676496794; a=rsa-sha256; cv=none; b=L9dmD6mgcS71muMuJZL2hbNgXdXPnWjWPW5IoFVxuZ4h9hAZ6xFw+jfWqtuPoGjHtoEq+R /BKC4LvDm+tcLeEkWxVPz19cwEm+g74WhREXstGZBLVuf3J5/HULL8BzMwCD8Uo0bev8Nu 9y6VOuGak9d5B6gDl5MlHg3iiGYqa0Z5+HxvPtoWTRPLP5f4Ae3L8NNMCI62eKWTQBzJTx EIB9huRVARIRbG5CZIuFgLba3xnwyYNoEFUdd4U7wKLj7ZplZ9p14729nMLbebJOpkV9EQ gJhwt6YliGfq7GNrpbACD/spmFdapl1Zoy9ppXuBV83smb4OLlQXutdenSaDQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHBBy1n4MzfgF; Wed, 15 Feb 2023 21:33: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 31FLXErE021522; Wed, 15 Feb 2023 21:33:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FLXEep021521; Wed, 15 Feb 2023 21:33:14 GMT (envelope-from git) Date: Wed, 15 Feb 2023 21:33:14 GMT Message-Id: <202302152133.31FLXEep021521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 98844e99d40a - main - aio: Fix more synchronization issues in aio_biowakeup. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98844e99d40a90ae89d84762e07150af3a8f89bd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=98844e99d40a90ae89d84762e07150af3a8f89bd commit 98844e99d40a90ae89d84762e07150af3a8f89bd Author: John Baldwin AuthorDate: 2023-02-15 21:32:52 +0000 Commit: John Baldwin CommitDate: 2023-02-15 21:32:52 +0000 aio: Fix more synchronization issues in aio_biowakeup. - Use atomic_store to set job->error. atomic_set does an or operation, not assignment. - Use refcount_* to manage job->nbio. This ensures proper memory barriers are present so that the last bio won't see a possibly stale value of job->error. - Don't re-read job->error after reading it via atomic_load. Reported by: markj (1) Reviewed by: mjg, markj Differential Revision: https://reviews.freebsd.org/D38611 --- sys/kern/vfs_aio.c | 11 ++++++----- sys/sys/aio.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 9868b8770747..d32e6fea15ca 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -1281,7 +1281,7 @@ aio_qbio(struct proc *p, struct kaiocb *job) } bios = malloc(sizeof(struct bio *) * iovcnt, M_TEMP, M_WAITOK); - atomic_store_int(&job->nbio, iovcnt); + refcount_init(&job->nbio, iovcnt); for (i = 0; i < iovcnt; i++) { struct vm_page** pages; struct bio *bp; @@ -2489,15 +2489,16 @@ aio_biowakeup(struct bio *bp) * error of whichever failed bio completed last. */ if (flags & BIO_ERROR) - atomic_set_int(&job->error, bio_error); + atomic_store_int(&job->error, bio_error); if (opcode & LIO_WRITE) atomic_add_int(&job->outblock, nblks); else atomic_add_int(&job->inblock, nblks); - if (atomic_fetchadd_int(&job->nbio, -1) == 1) { - if (atomic_load_int(&job->error)) - aio_complete(job, -1, job->error); + if (refcount_release(&job->nbio)) { + bio_error = atomic_load_int(&job->error); + if (bio_error != 0) + aio_complete(job, -1, bio_error); else aio_complete(job, atomic_load_long(&job->nbytes), 0); } diff --git a/sys/sys/aio.h b/sys/sys/aio.h index 7b931d04febc..272132acf91e 100644 --- a/sys/sys/aio.h +++ b/sys/sys/aio.h @@ -151,7 +151,7 @@ struct kaiocb { aio_handle_fn_t *handle_fn; /* (c) backend handle function */ union { /* Backend-specific data fields */ struct { /* BIO backend */ - int nbio; /* Number of remaining bios */ + volatile u_int nbio; /* Number of remaining bios */ int error; /* Worst error of all bios */ long nbytes; /* Bytes completed so far */ }; From nobody Wed Feb 15 21:41:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHBNz2tZFz3rMhd; Wed, 15 Feb 2023 21:41: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 4PHBNz2QBxz3Mtk; Wed, 15 Feb 2023 21:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676497315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8YidbFYu6UlCk8WJSpCuTtRlJ69yXLkx6W85XDqUFI=; b=sMnge4jM96YCZqGI6A2c5VnVezCIxGOGR5uT0QACWj367A1UH75HZylqs6k9HF+XMSB8Tm /uX/k8a/pY/qH32uTlbmEstX4z0W2MHpnaJJpqvvpTfSll1AfxnjgBtXWOIKpxY34T5qpi kxJXGTkdFCbxeadC/Y31xqPb6NMhQpiTcEE4jBuTbWm9tkGGhOOB3hdUUM6lINysF3tnRG m+Wd8CB9ZBrJ0EgsqGGkXusU1dCeB4AJakhWH1NY5BqeodDaFsqAU7Bn03IXnWgmWvOfAJ fbsMXncF4eopPHBQpwNkelhXjJnkHgZXW9KrKcR7MCrCi1qMSb4UWiNVWotXig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676497315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8YidbFYu6UlCk8WJSpCuTtRlJ69yXLkx6W85XDqUFI=; b=darTdEYc0NDyQJyl38Zj1GBtyLJAv88HzLNUTQ5CURhAmk5OVTSP1QTuAc929wAIlM3AgN sG4qy1SJ5bQiFiCfmMPmWjOQSYtZEvnGTj/ALXiBY5p/3HLo1kj+bo2MFl/1VuhpxsY1V/ AbAMOzRRA29G4y7tNZwESmDnNlUeCUMvisgb7J6rbqAWKIxtpi+6fVCe81VEtu8qJ/B7WC Q2dxEVebkKAJGxGPeLIdNuS78Rd9N6FE51J07Xc8qWF2upOhJKCnenSzLbYSGzounuFQt2 dor3VIKZ7FYW+3s/6/1TVEY1vWahjLdnRMIxaAUCX3jYrIXq1+T+92rlX3s3rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676497315; a=rsa-sha256; cv=none; b=tJ7ea3opTTbZSJxEJOprglys8MOh5cai8HKLWCRHOawm1tDBSQRIqO8c543baugMRoPJZK pv5g92gn5pgJhC+vOMBwQICoFwKD5p4PE8boP44qOmkEQL2z06pv5HsaUQdnvXeMmDw1I0 cAV8Luf3b32RcNj5l4D0gVHMy7cO5dhmQJCET6l1AVOhQark+KAwmJRMpVYpl26HsxowvQ GFthp0o2XR9kfuDjprn+ZrOYiypXIvSpa3QSn/57YX2bhtAWQGhMxMzMlkXNYulEj4Y/uH Ke+u5CN4/2ASsHeE2+VX71pSJszWiIXFBS+zlXFitT8dj01Fg/J/EwtyjV5ZPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHBNz1TTszfwd; Wed, 15 Feb 2023 21:41: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 31FLfths035124; Wed, 15 Feb 2023 21:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FLft1Q035122; Wed, 15 Feb 2023 21:41:55 GMT (envelope-from git) Date: Wed, 15 Feb 2023 21:41:55 GMT Message-Id: <202302152141.31FLft1Q035122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d2070e5fa983 - main - cxgbe: Don't leak memory resource if t4iov attach fails. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2070e5fa983281e94a338d6e87eb29c7dd28505 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d2070e5fa983281e94a338d6e87eb29c7dd28505 commit d2070e5fa983281e94a338d6e87eb29c7dd28505 Author: John Baldwin AuthorDate: 2023-02-15 21:34:00 +0000 Commit: John Baldwin CommitDate: 2023-02-15 21:34:00 +0000 cxgbe: Don't leak memory resource if t4iov attach fails. Co-authored by: np Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D38580 --- sys/dev/cxgbe/t4_iov.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_iov.c b/sys/dev/cxgbe/t4_iov.c index d3796d300947..ce9a97c69ed4 100644 --- a/sys/dev/cxgbe/t4_iov.c +++ b/sys/dev/cxgbe/t4_iov.c @@ -194,6 +194,7 @@ t4iov_attach(device_t dev) { struct t4iov_softc *sc; uint32_t pl_rev, whoami; + int error; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -217,10 +218,18 @@ t4iov_attach(device_t dev) sc->sc_main = pci_find_dbsf(pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), 4); - if (sc->sc_main == NULL) + if (sc->sc_main == NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, sc->regs_rid, + sc->regs_res); return (ENXIO); - if (T4_IS_MAIN_READY(sc->sc_main) == 0) - return (t4iov_attach_child(dev)); + } + if (T4_IS_MAIN_READY(sc->sc_main) == 0) { + error = t4iov_attach_child(dev); + if (error != 0) + bus_release_resource(dev, SYS_RES_MEMORY, sc->regs_rid, + sc->regs_res); + return (error); + } return (0); } From nobody Wed Feb 15 22:05:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHBw40hgsz3rPbW; Wed, 15 Feb 2023 22:05:24 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHBw35h0Zz3h1g; Wed, 15 Feb 2023 22:05:23 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vs1-f52.google.com with SMTP id g8so21477045vso.3; Wed, 15 Feb 2023 14:05:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sh/3W2j3Vi3xwdCuH6FBvuLI2LBw4t/ud6xTLE4HBAE=; b=G6EJVT4YaUTNX9gqZTggyknq91BhXTqoCiqA0DUs7gOuAFyBiDJg4k70Nl4OMQkThI U3SbvCi2bS96oLAAX3XlZFa0iXvLSsAnGe2rq/3GJvCqKBu1UlirC2J6Y0/ykC/RMr5k MSMjQ2FerdKhOV6/JFwnOHRA2L3MkDBsbHnMek5KoHRgDED7HNNsFLhCsoxJtMv30FVj WwMRKr5+P3nye8iTTtqD5TLfUWoPIigqbqRbQdMiAna2k3q0t8Xe8d67AmZXDjR3r0RE 0YLG7YA5YkEgMK9d5ivfTjSZ/q+O9pRVvenEoKOsM/k78YoZcCIwwIj/nhAPqUWR0gmj 2UNw== X-Gm-Message-State: AO0yUKVQAetqZGDQHVtuyiFV69hmdKZgz9xlrXeFgpLzfd0MDSqsrFjN JvSKGYIcpuNJVthRYocDpdIkCBfQuBnL0IXKFU1APBH9 X-Google-Smtp-Source: AK7set/TE2g/d9xiTWhudo3ZChi0/FXh1yvOn1h46sUkndx2iaeCRGXUI8FtF9gUAk//GufEztOKoEnP96x+RbGq44k= X-Received: by 2002:a05:6102:20c1:b0:3f7:93c4:9e56 with SMTP id i1-20020a05610220c100b003f793c49e56mr733110vsr.85.1676498722539; Wed, 15 Feb 2023 14:05:22 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202302152133.31FLXEep021521@gitrepo.freebsd.org> In-Reply-To: <202302152133.31FLXEep021521@gitrepo.freebsd.org> From: Alan Somers Date: Wed, 15 Feb 2023 15:05:11 -0700 Message-ID: Subject: Re: git: 98844e99d40a - main - aio: Fix more synchronization issues in aio_biowakeup. To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PHBw35h0Zz3h1g 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 Wed, Feb 15, 2023 at 2:33 PM John Baldwin wrote: > > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=98844e99d40a90ae89d84762e07150af3a8f89bd > > commit 98844e99d40a90ae89d84762e07150af3a8f89bd > Author: John Baldwin > AuthorDate: 2023-02-15 21:32:52 +0000 > Commit: John Baldwin > CommitDate: 2023-02-15 21:32:52 +0000 > > aio: Fix more synchronization issues in aio_biowakeup. > > - Use atomic_store to set job->error. atomic_set does an or > operation, not assignment. > > - Use refcount_* to manage job->nbio. > > This ensures proper memory barriers are present so that the last bio > won't see a possibly stale value of job->error. > > - Don't re-read job->error after reading it via atomic_load. > > Reported by: markj (1) > Reviewed by: mjg, markj > Differential Revision: https://reviews.freebsd.org/D38611 Thanks for fixing these subtle problems in aio_(read|write)v. Will you MFC too? From nobody Wed Feb 15 22:26:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHCNK6w03z3rQj3; Wed, 15 Feb 2023 22:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHCNK6SZYz3kV9; Wed, 15 Feb 2023 22:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676499985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2CAi60OeKdx+6hBFgBwb0Tdjl2tQx0C+SfS3cwCU6Zw=; b=HBxnc4XC2Ia4mc5113c7OVtHOxLElsokLHUwbQwcEHE8kStvewyxSKfacFvorYA7CQzEqe 3MZKeAHyLQRLOZE3OmCQVolZokxRCP+2TifBwbfJOnRAvvAn6wwpw+kQhinoWeLpOtueZT RKqt+KDYpkp3zUEBkUnRqn5gpJ+jLKr7v2ORwl2MFAeTmrtiDOrKu6nTe2DQE7pK0m9lnj ct8BrKNorfeVqWsUPcMuHCA0i5G0pKX5a2+KnL0MxcyAM6GTxPUBQZgh9wdZLuQ0wWJ2tl 4e9J/hmHWMW6B6ihydjXS1LTks8AFBfgyod3sQxnlcjSu/NarYxo0P+tz7ER9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676499985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2CAi60OeKdx+6hBFgBwb0Tdjl2tQx0C+SfS3cwCU6Zw=; b=K4zWb8RX0i3H6FQYvFxOf+19XXP8hpr6yQ86tknNPIuWYIDytR9YXdqyXrw5SOttYFU7N0 wlY7+VlfYmNJ8NWLcAElMiq7JcQnJI8o7J1ce0+yZaaqbU07gtpuiRdNsFBJcxEhvoEqGt PgGg8JX3/BxnNQa7MtCzJH72BBiSvINcH+5oV37GKkbgiPFlWMxjXoJD5YWFIAkhmmQ7NS 7loDtVBn0t9rJhGGFhem3JhgW4WrdRwKP6m2oKAvZrorsMLfMxk4slGDK+w6Jt8YzZYhGe AQQyw7rqhh0Fe2/5pPN1oT+Qcc0SLqofatx32UDeG96iJ06J/bSwgx8wg1Kyfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676499985; a=rsa-sha256; cv=none; b=FDdDSH3asDRLurJsCFwDhoHcEvfLtsS4bMGquJ8ZHuUDwUms7cqoRnhNFmjj0MCtKnlGna 6BrBo5yKNUdpozKqoTzvry8SzdqKLkANiw+WzVa+ApGnLTIpliHmxG0ZPAMYDQcJnFgOeC U8ApSmCm35Z1B/uhUewm+mDfGrI2n9LSJEnCDxeHgKhbO5lBa/oUkn9nQKBRPhrkn/Rdj7 sDbdE+BCjzcR+fsBKIBdcgrEVRFB0xDfZIeDOuUr62REftvHMK2QdHDA0NZvnHpyXWvKa4 QsTWZKAY1GhPUzAmh+gnbk3mmRpm8gN43MbyhvXPRYZXgQVpvT18oBlH0SIP0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHCNK5QX5zh8j; Wed, 15 Feb 2023 22:26: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 31FMQPMd093687; Wed, 15 Feb 2023 22:26:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FMQPQc093686; Wed, 15 Feb 2023 22:26:25 GMT (envelope-from git) Date: Wed, 15 Feb 2023 22:26:25 GMT Message-Id: <202302152226.31FMQPQc093686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 4dac88cd150b - main - linuxkpi: Define `debugfs_initialized()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4dac88cd150b444cf67a09f7c0c8af795e9c1bd6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=4dac88cd150b444cf67a09f7c0c8af795e9c1bd6 commit 4dac88cd150b444cf67a09f7c0c8af795e9c1bd6 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-14 23:38:59 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-15 22:19:41 +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 --- 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 Wed Feb 15 22:26:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHCNM0p0xz3rQc0; Wed, 15 Feb 2023 22:26: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 4PHCNM08Wbz3kpG; Wed, 15 Feb 2023 22:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676499987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x/WqZF17giMwnTnoYvUj9M9y716r8kAlqjMu+eBKI8c=; b=es+5OPijLI9r+U34WU7IweEm7LhpQjkHR9v3y/sNZ9t//ayEUaYDYQNSbNcLNV9cARTPJV XG35ZoxWyFS4Hcu22VD6Nsdtm3N5C+c4C5ADin55r4fGRpRI+hE6lC5wsdbPdiaumTkkkS Prg03CZLxlMIxlVp1os8lA9iOSlZH6cv197bolJmeQya57/idmFrITUPcD8Nrr+QJ53qcU bdX7V3fJvCc4lu/KSQKd9/Kj6H1gYHYBwfTHbYMsTy8su8+qgfJkPyppB7nmSKcE2K67sX 0MhiblttwXpQ1G8OpQvLP0RWjO3DLqTWjqd+laebb1Z956Aql5hDl8P3/LItFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676499987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x/WqZF17giMwnTnoYvUj9M9y716r8kAlqjMu+eBKI8c=; b=QgAtEFU31kfNpeLrtQw1QHpk1MilcaL2E1CmIGZeq6IHrY8dHwhMkFHsKtCLtblX//2Ghp fX7DLGPar4Yglz/nHISlWElkKTuu+SvfWpEbCoaQvwrBmpFNYnstmwHbDIayDUtcQdhxTv o62/6a7lKXIVLdmf8lrHXrUb0wpP/t9bYwCutC/Wt5BdMz8C49BZTNd3Pkb+yzS/Bb+D6G Kpj69mtAPCkYGuAvSfoFLriS3ZYZufwQNfukARp1SdukOwSYgJo4lDd05xlokvr987regB ay4K6yIjvRR57V8zesNMcuANsYov9E2mb2pJ6WO75fBZ/Wq1u7a7OZugbb04tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676499987; a=rsa-sha256; cv=none; b=oSd8LjWrizG+9AwQzsFbrp623QKkDhReyU3i8oWlWozDCuIVdBcc671nRW8krwzOpWmPnJ dodeSYjoD8QO/9YfLsHVd4g/tPKNOuk6gU+ZToE9LTR8eouwOmE+W8qNps5OoAX0PEWF8+ 5u0OvghhLYqK7W3ed/jJafMJMEfnZopU3xzK9uCEp89skGgbq51kNa9TXqXCfP4hkl4l+s wdUzxdGqN7tZ5kWXvlZCetPA+HIcVCTRKw7lFW8+yHKoNBPrtwJvgkTZzKl7v6ZuRE1/KY e0MyGHIxdp4ByLRkpuBTE8xN/YvCEK1QKxI0xA6depi5wlpQFdaEpCWZNUVPLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHCNL6KzQzh1j; Wed, 15 Feb 2023 22:26: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 31FMQQAG093716; Wed, 15 Feb 2023 22:26:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FMQQV8093715; Wed, 15 Feb 2023 22:26:26 GMT (envelope-from git) Date: Wed, 15 Feb 2023 22:26:26 GMT Message-Id: <202302152226.31FMQQV8093715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: b1a9e570fe2d - main - linuxkpi: Add `strscpy_pad()` to List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b1a9e570fe2da0a43c41327d7ce21b27bf8257b8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b1a9e570fe2da0a43c41327d7ce21b27bf8257b8 commit b1a9e570fe2da0a43c41327d7ce21b27bf8257b8 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-14 23:46:13 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-15 22:19:41 +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 --- 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 Wed Feb 15 22:27:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHCPf18rbz3rR3s for ; Wed, 15 Feb 2023 22:27:34 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 4PHCPd6L40z3lJf for ; Wed, 15 Feb 2023 22:27:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f48.google.com with SMTP id m14so123642wrg.13 for ; Wed, 15 Feb 2023 14:27:33 -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=uBWELykY8nj6srXchoZCxtuuR0AKu8bKtGkyKn8igsY=; b=KYOZIcCHxm2eq5MvPSGE/XcvrruUoWvPHUg3rI+qFJ36xJ4LrxO4SRxeE4b2GPhQVS VX5K/Sa5phtUUSrR3Ux+KBL/s/VVbinrkcHVZlP9/wXDKRCUvdESsMOtnOmMWtU0rU4W 8GyXRp3ltH7hMh/AMNWPfixmuOkhg0PzMVbyMp6FquozJyPbeARZ1Ds7cMXXLTTMfmoX MRQGtIDKKzXpNlUvrwQPwWLouQR2ttaBWKW2d9FQqYaAe5CvGosmX6lJI74+/xCeen2f wFRSSqRe+Ub4msJiEyPVIEGME1L+X3Nrr9cnsQOc33QnkrkSF1xZ72OVmtPvmYKEkARP 24Dg== X-Gm-Message-State: AO0yUKU4xuLMdnDQQ1ZlfkSUoIo3mW333J8zsXrynU0sRLGKmocLK6E0 6LXURwfBra3CPIgYzRx88GzXG+O5FM/ekP1Huq8= X-Google-Smtp-Source: AK7set/0NXORV0jtdvI76ykIc3grsDSlkrDnjz2Ytb0J9f0AHunD07eH85wDcTMdWv8JEi8+Md7cVA== X-Received: by 2002:a05:6000:1152:b0:2c5:52f5:c63b with SMTP id d18-20020a056000115200b002c552f5c63bmr3047283wrx.11.1676500052370; Wed, 15 Feb 2023 14:27:32 -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 b17-20020a5d4b91000000b002c55de1c72bsm7304016wrt.62.2023.02.15.14.27.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Feb 2023 14:27:31 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: b1a9e570fe2d - main - linuxkpi: Add `strscpy_pad()` to From: Jessica Clarke In-Reply-To: <202302152226.31FMQQV8093715@gitrepo.freebsd.org> Date: Wed, 15 Feb 2023 22:27:31 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202302152226.31FMQQV8093715@gitrepo.freebsd.org> To: =?utf-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4PHCPd6L40z3lJf 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 15 Feb 2023, at 22:26, Jean-S=C3=A9bastien P=C3=A9dron = wrote: >=20 > The branch main has been updated by dumbbell (ports committer): >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Db1a9e570fe2da0a43c41327d7ce21b27= bf8257b8 >=20 > commit b1a9e570fe2da0a43c41327d7ce21b27bf8257b8 > Author: Jean-S=C3=A9bastien P=C3=A9dron > AuthorDate: 2023-02-14 23:46:13 +0000 > Commit: Jean-S=C3=A9bastien P=C3=A9dron > CommitDate: 2023-02-15 22:19:41 +0000 >=20 > linuxkpi: Add `strscpy_pad()` to >=20 > It's the same as `strscpy()` except that it fills the rest of the > destination buffer with zeroes if the source buffer is shorter. >=20 > Reviewed by: manu > Approved by: manu > --- > sys/compat/linuxkpi/common/include/linux/string.h | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > 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); > } >=20 > +static inline ssize_t > +strscpy_pad(char* dst, const char* src, size_t len) > +{ > + style(9) doesn=E2=80=99t need this blank line any more, please stop = including them in your commits. Jess > + bzero(dst, len); > + > + return (strscpy(dst, src, len)); > +} > + > static inline void * > memset32(uint32_t *b, uint32_t c, size_t len) > { From nobody Wed Feb 15 22:28:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHCRH1crGz3rQyT for ; Wed, 15 Feb 2023 22:28:59 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from smtp-8fab.mail.infomaniak.ch (smtp-8fab.mail.infomaniak.ch [IPv6:2001:1600:3:17::8fab]) (using TLSv1.3 with cipher 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 "relay.mail.infomaniak.ch", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHCRG63tpz3lRH for ; Wed, 15 Feb 2023 22:28:58 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Authentication-Results: mx1.freebsd.org; none Received: from smtp-2-0000.mail.infomaniak.ch (unknown [10.5.36.107]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4PHCRC1MSSzMqZ4g; Wed, 15 Feb 2023 23:28:55 +0100 (CET) Received: from unknown by smtp-2-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4PHCRB6FjkzMs95b; Wed, 15 Feb 2023 23:28:54 +0100 (CET) Message-ID: Date: Wed, 15 Feb 2023 23:28:54 +0100 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: git: b1a9e570fe2d - main - linuxkpi: Add `strscpy_pad()` to To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202302152226.31FMQQV8093715@gitrepo.freebsd.org> Content-Language: en-US From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Organization: The FreeBSD Project In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha X-Rspamd-Queue-Id: 4PHCRG63tpz3lRH X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29222, ipnet:2001:1600::/32, country:CH] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 15/02/2023 23:27, Jessica Clarke wrote: >> +static inline ssize_t >> +strscpy_pad(char* dst, const char* src, size_t len) >> +{ >> + > > style(9) doesn’t need this blank line any more, please stop including > them in your commits. Thank you for the reminder, I will in the future! -- Jean-Sébastien Pédron The FreeBSD Project From nobody Wed Feb 15 22:34:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHCYz6yYjz3rRJr; Wed, 15 Feb 2023 22: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 4PHCYz6NTnz3nBF; Wed, 15 Feb 2023 22: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=1676500487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5CSapGXg9AIGPc2d+iR3StK8mnZsuY2m3wR+3IZgYw8=; b=EP5JKgNdJUUFyqHFul9YFWJyCaTW0GCmW5rCw9zMJrZzKtCBqqxzz8nfrsluNULtVnzz+I nGQAxzbLUDTFR4oQS4pl2JF1buepi5gAwss2xZD7PuLhXKdKfv4E3nNmE7k+jmkU6fSZIW 6VmbHXmVgz5ukMn6DVE8Y8rK93MQw8aDPgm3Y857C0z5ANcTYjrlSfPZ+xsfACIsmw6r// yfRJ7ozLKVRhUSLYppVGLGbBE+Xuxp2V633baShBHzMbgwy/Fx98E9rT1Dyko5i117MKne ky0xruJZnU86fxRZrdIWRSwr0an1afq4MB6SAPSo17/TX31rgv90reaTDNsm6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676500487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5CSapGXg9AIGPc2d+iR3StK8mnZsuY2m3wR+3IZgYw8=; b=fF72eyHgpzxjOU4LU7kmTiw4YZlwXnEcbBZi6Hkp+9pq7DFu6SaYegwa1clcBnTZMpbJpz cQRdVcMb9Is45va87MuN8tDvpvpSvEkOZXxpI2VSQPMI9VX0vx1iomQBER1O033FaBWEJH MNj+SCpMryRaVorv4QjaaKd3v2hlUa4EYiK5DybKesT2nnfb0g2WmjI7Fw5otYTbLnYXn+ G3NdnLl/NnSzKOIPWvKk4r934jbDXZEWNKG1SVVCeP4OBqJvu9oooiRd7OfrtibMVoi8Nj cBXbvOUCWsHFtVuqM/9pZfdrGMKugoZiff6Teqw+I3tB0IahMv/vlUdTsrIWmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676500487; a=rsa-sha256; cv=none; b=AXGcpe2P9SL28PkjRBK95L9MjGDYW8D1q7LGmfe3qMOGHS7nteE/Rw59VePB21puwLwvAd J05N7rRrDxOTWn4PW9qNP21Nicx5N54JDMSxH/5t5G8/DrqZjfRLPjovO97UQUFrqqf0Nf S8lZb9mPVQBRtbvjoBslqsP4mCqrEZhg/N+4gRR6sdVd0eYX+dl/4cf/F/kvUlbGJNSy7a DCAG6/iXKpUC2etsvaWctBaWBV7gaAKr+AVBw71XB1iHo3gnhHQ1myXlLwNNvveIA8uteS MvEr09vVgY/4hRAAyOyRygpi70CMm5uy6BkYzgroVSGKLJ9DZK/78GddFCMHYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHCYz5GTtzgr3; Wed, 15 Feb 2023 22: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 31FMYlWa007748; Wed, 15 Feb 2023 22: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 31FMYlsT007747; Wed, 15 Feb 2023 22:34:47 GMT (envelope-from git) Date: Wed, 15 Feb 2023 22:34:47 GMT Message-Id: <202302152234.31FMYlsT007747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 1d02c6b1b859 - main - ixl(4): Fix MAC/VLAN filters accounting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1d02c6b1b859e9f611bc8fe27ca3d2c16ec128c1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=1d02c6b1b859e9f611bc8fe27ca3d2c16ec128c1 commit 1d02c6b1b859e9f611bc8fe27ca3d2c16ec128c1 Author: Krzysztof Galazka AuthorDate: 2023-02-15 22:28:01 +0000 Commit: Eric Joyner CommitDate: 2023-02-15 22:34:25 +0000 ixl(4): Fix MAC/VLAN filters accounting - Account for a filter required to enable reception of untagged frames while registering and unregistering VLANs to avoid trying to add more filters than HW supports - While adding MAC/VLAN filters, pre-set matching method field in the Admin Queue Command response buffer to expected error value to work around an issue with some FW versions, which do not update that field if operation fails, and be able correctly track which filters were configured in HW. - Remove unused IXL_MAX_FILTERS macro definition - Update number of available MAC/VLAN filters as in newer FW versions it was decreased by one. - Simplify i40e_dma_mem structure Signed-off-by: Krzysztof Galazka Signed-off-by: Eric Joyner Reviewed by: erj@ Tested by: Gowtham Kumar Ks MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D37457 --- sys/dev/ixl/i40e_osdep.c | 1 - sys/dev/ixl/i40e_osdep.h | 3 --- sys/dev/ixl/if_ixl.c | 7 ++++--- sys/dev/ixl/ixl.h | 5 +---- sys/dev/ixl/ixl_pf_main.c | 5 +++++ 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/sys/dev/ixl/i40e_osdep.c b/sys/dev/ixl/i40e_osdep.c index 20eb02c85d67..b3fd53af9e23 100644 --- a/sys/dev/ixl/i40e_osdep.c +++ b/sys/dev/ixl/i40e_osdep.c @@ -109,7 +109,6 @@ i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem, "error %u\n", err); goto fail_2; } - mem->nseg = 1; mem->size = size; bus_dmamap_sync(mem->tag, mem->map, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/ixl/i40e_osdep.h b/sys/dev/ixl/i40e_osdep.h index e7a1c1226a0e..1146ece279b5 100644 --- a/sys/dev/ixl/i40e_osdep.h +++ b/sys/dev/ixl/i40e_osdep.h @@ -160,10 +160,7 @@ struct i40e_dma_mem { u64 pa; bus_dma_tag_t tag; bus_dmamap_t map; - bus_dma_segment_t seg; bus_size_t size; - int nseg; - int flags; }; struct i40e_virt_mem { diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index 8b7d132db7b7..ca71edd9bd9e 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -49,7 +49,7 @@ *********************************************************************/ #define IXL_DRIVER_VERSION_MAJOR 2 #define IXL_DRIVER_VERSION_MINOR 3 -#define IXL_DRIVER_VERSION_BUILD 2 +#define IXL_DRIVER_VERSION_BUILD 3 #define IXL_DRIVER_VERSION_STRING \ __XSTRING(IXL_DRIVER_VERSION_MAJOR) "." \ @@ -1720,9 +1720,10 @@ ixl_if_vlan_unregister(if_ctx_t ctx, u16 vtag) if ((if_getcapenable(ifp) & IFCAP_VLAN_HWFILTER) == 0) return; - if (vsi->num_vlans < IXL_MAX_VLAN_FILTERS) + /* One filter is used for untagged frames */ + if (vsi->num_vlans < IXL_MAX_VLAN_FILTERS - 1) ixl_del_filter(vsi, hw->mac.addr, vtag); - else if (vsi->num_vlans == IXL_MAX_VLAN_FILTERS) { + else if (vsi->num_vlans == IXL_MAX_VLAN_FILTERS - 1) { ixl_del_filter(vsi, hw->mac.addr, IXL_VLAN_ANY); ixl_add_vlan_filters(vsi, hw->mac.addr); } diff --git a/sys/dev/ixl/ixl.h b/sys/dev/ixl/ixl.h index 6b94732fd44e..30e8ce40126b 100644 --- a/sys/dev/ixl/ixl.h +++ b/sys/dev/ixl/ixl.h @@ -164,9 +164,6 @@ #define IXL_VF_MAX_HDR_BUFFER 0x840 #define IXL_VF_MAX_FRAME 0x3FFF -/* ERJ: hardware can support ~2k (SW5+) filters between all functions */ -#define IXL_MAX_FILTERS 256 - #define IXL_NVM_VERSION_LO_SHIFT 0 #define IXL_NVM_VERSION_LO_MASK (0xff << IXL_NVM_VERSION_LO_SHIFT) #define IXL_NVM_VERSION_HI_SHIFT 12 @@ -195,7 +192,7 @@ #define IXL_VLAN_ANY -1 /* Maximum number of MAC/VLAN filters supported by HW */ -#define IXL_MAX_VLAN_FILTERS 256 +#define IXL_MAX_VLAN_FILTERS 255 #define CSUM_OFFLOAD_IPV4 (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) #define CSUM_OFFLOAD_IPV6 (CSUM_TCP_IPV6|CSUM_UDP_IPV6|CSUM_SCTP_IPV6) diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 7e9ad20b157b..25ced54e79e1 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -1396,6 +1396,11 @@ ixl_add_hw_filters(struct ixl_vsi *vsi, struct ixl_ftl_head *to_add, int cnt) b->flags = 0; } b->flags |= I40E_AQC_MACVLAN_ADD_PERFECT_MATCH; + /* Some FW versions do not set match method + * when adding filters fails. Initialize it with + * expected error value to allow detection which + * filters were not added */ + b->match_method = I40E_AQC_MM_ERR_NO_RES; ixl_dbg_filter(pf, "ADD: " MAC_FORMAT "\n", MAC_FORMAT_ARGS(f->macaddr)); From nobody Wed Feb 15 22:41:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHCjZ0V3pz3rRTw; Wed, 15 Feb 2023 22:41: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 4PHCjY53bkz3nvj; Wed, 15 Feb 2023 22:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676500881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ax2pTv67IRLMyboB+1nrwK30bdilsgbyn2ALAP8N7wM=; b=Dcz8FiBRYHRajyoed/0pe/zlJz7z2S7ewNhOVF4/EXOnvKCOaf0kwL24aHN25OgES8byN2 jpcFm7yeckhbEfBAT9NrJkyTSQibCCekkyF7Yn7IQbznmhOBrK9LJO9I9EZ1+UWaokDtjb X+6BBnGLMJlPZOwrcXdMhTDLM+tbmDVibPbyQqmdoazBsFcLlkxG7PFy3LxeyfHTylk3k9 mpz91Z5thZLMGTbFYOB9zAYRdKhLKjP6hhT4KorgSOOIIG3vOPjVouavyb61gp+euxFvHE CHH2j/S3GcmehtPTNPzuV1jDgSTcLkOR+GEH3i6ndztqc/QLpw7bR7wZxoWxZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676500881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ax2pTv67IRLMyboB+1nrwK30bdilsgbyn2ALAP8N7wM=; b=aTFFqt95bEsf7KFc6gpY9b2Hf9rMuspJpfIKGgk+8/DURT4JD0/oGLyXxuvNrBca+p3imt qrsAN0d+3OIJEMgJ0c4bAaiIOHikzeXExrzPgeDG4bNPSnjvr5cAmQuX7m+/93m6o45xgc SdpnK6rcjrwWWRK8hNrTzooH3/5tSM0whKCw/K7iSlxRFUYI++UCDSpjU7xjIgZLq47aGb 400r5CN4m/JyjF5uyjV3A5iGa5iLiBpAu3/vWV53avoGlKdkIXseZ7RSnU4mL0ks2f+oMM zQQB9GNhlKvHdQNNSOC41yfUf72cxHgAsv9eiajcBJr3FUQ5hxfAE8UZEJRvpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676500881; a=rsa-sha256; cv=none; b=oRUxZlR4lG9/ck/KU8sETiNkWl9u4jmHWUlJjl1OPSY1YLDDh8YUymAP3Q/AVnEQEWymIk 7GhF2Kia+B0RigOXUb/kOCm0WuTSwo4S2q3UvrYoq2CeGdLNhurUbYdg3ARzl3i6kZi1lA Z8/JoxzrlkNIrMJb5zOyH3QRNYirGwGs/WyV0/QEMUiDBiuYowdpmULJm6IjYvW9BAQakL yeEuxo0G9air8ONWgY3g9loxTRgvV0pXP1EX+NXbOBcuo+Q+ZNswzplzW+zvCDXRYKgoWW yJSkDo+9z5ZtnU8K/flMGXatS/G1L1IdIMuZMfBqXuDa+ofWx4jvWIO315/L/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 4PHCjY46JXzh39; Wed, 15 Feb 2023 22:41: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 31FMfLv2017010; Wed, 15 Feb 2023 22:41:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FMfLJ5017009; Wed, 15 Feb 2023 22:41:21 GMT (envelope-from git) Date: Wed, 15 Feb 2023 22:41:21 GMT Message-Id: <202302152241.31FMfLJ5017009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 04a5e6d7cadd - main - ixgbe(4): Filter out spurious link up indication List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 04a5e6d7cadd06b10169c3c3a560649e7dc7444c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=04a5e6d7cadd06b10169c3c3a560649e7dc7444c commit 04a5e6d7cadd06b10169c3c3a560649e7dc7444c Author: Krzysztof Galazka AuthorDate: 2023-02-15 22:35:40 +0000 Commit: Eric Joyner CommitDate: 2023-02-15 22:38:05 +0000 ixgbe(4): Filter out spurious link up indication Extend SFP+ cage crosstalk fix by re-checking link state after 5ms delay to filter out spurious link up indication by transceiver with no fiber cable connected. Signed-off-by: Krzysztof Galazka Signed-off-by: Eric Joyner Reviewed by: erj@ Tested by: Gowtham Kumar Ks MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D38395 --- sys/dev/ixgbe/ixgbe_common.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 3f38f5e27123..86301dab80ed 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -4232,10 +4232,25 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS); } } else { - if (links_reg & IXGBE_LINKS_UP) + if (links_reg & IXGBE_LINKS_UP) { + if (ixgbe_need_crosstalk_fix(hw)) { + /* Check the link state again after a delay + * to filter out spurious link up + * notifications. + */ + msec_delay(5); + links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS); + if (!(links_reg & IXGBE_LINKS_UP)) { + *link_up = false; + *speed = IXGBE_LINK_SPEED_UNKNOWN; + return IXGBE_SUCCESS; + } + + } *link_up = true; - else + } else { *link_up = false; + } } switch (links_reg & IXGBE_LINKS_SPEED_82599) { From nobody Wed Feb 15 22:46:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 Wed Feb 15 23:04:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHDDG3bLPz3rSjM; Wed, 15 Feb 2023 23:04: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 4PHDDG34Yfz3rGq; Wed, 15 Feb 2023 23:04:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676502270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yIqfe075wQc8ZC7A1C2GRVcHnNlMqzKFY8Ww7k1RVJ0=; b=FudkN5fdMaUJZvJSqalYUZlrJew68upuPRG1FBKJlnXVpNkeuuOOn7PFAy6WKbH8AmJdlL V3MHiNtwBjDSOJr/hI3jtFf6xQZ4ID60wRbQeYYXg8q96weJ8g31hlKg3AufKFmuw3bf3o 1gjqb29MN9Rv4W9vHisJEKESmS85LRR9VjXqYY2Kpha/9I1VHV2fji/BRwLpJDxhBbJ0Or T8KJ2aVLgZLjruah1+r6L5FQKVpLxGgsDpQq4xBhoZlADx0BlgbuGWWQpZbnX9L+YYgc24 o7WDwhViwJGbqPvB/vCTfMpxAVYbudrN2QHQkzTgOkOZYOTG8BtHKamNyZDzfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676502270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yIqfe075wQc8ZC7A1C2GRVcHnNlMqzKFY8Ww7k1RVJ0=; b=tP1od5B+bX4bpdWI8aB509QTo+oo9FekyTeCS2Y223a40scOHNy3KR2m6Kguwlj4B/5BW1 gnY9DQRdQqQynvmnLeIVzK4OcwYjnAd4MhnBELPw0TzG7cguXwaBlNH/E7t9uWRakf53lY gM6y1zsrAcSTOxZRfVMyOXSXzguzSJ7LARysCAaOZR1S52K2/6suF1t2ceRZJjq01oqwsi GiSYO6PDRsjaZ3E0GFNpRywsoEI2S7IUUy9hhlyX275wWOi0OgUGUXhXdjDEv1KtbV20kH vNSobhORw/2pC/TdNPNORrsWYHP3T7CHvP94kIzZXrd8ZAGVTR3D34wq9/SVAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676502270; a=rsa-sha256; cv=none; b=b9skrFyTcCMBHBCATI2DkqkMf5JY9T5sorB4ceL7PRkyGvpZUL67zUmMw/FgQ6U62c9Mqp HG+fUuJxLZ6VQwDFJShep5RVf6/8sxL4+ZEEfZ9R6kpXcS51RnJboRx2KF2GRbAznK8+ea I1mvI57LsuyqTgSUBL+zOhKCh45gypwRJ6d08eqScrb0XI2olUvC2DIVACcmotijCkgZDt f7OZtdmXrkPcpoZA79JumGgx3h2qOJZ18S5JkzBEnGNW1eHRF0dsDIEMxcdrmb58jqrjjv r+WqjJQckUyjBsmbX9bJx33yuG9rNGjj6nq15/7SeA0m8gfOi7tmjc0EVMspgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHDDG26Hzzhcv; Wed, 15 Feb 2023 23:04: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 31FN4UJ7051286; Wed, 15 Feb 2023 23:04:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FN4USG051285; Wed, 15 Feb 2023 23:04:30 GMT (envelope-from git) Date: Wed, 15 Feb 2023 23:04:30 GMT Message-Id: <202302152304.31FN4USG051285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 942815c54820 - main - libefivar: Add note about extra compiler flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 942815c54820783d3d4f7f6faa71ab7919b5f0e5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=942815c54820783d3d4f7f6faa71ab7919b5f0e5 commit 942815c54820783d3d4f7f6faa71ab7919b5f0e5 Author: Warner Losh AuthorDate: 2023-02-15 23:02:56 +0000 Commit: Warner Losh CommitDate: 2023-02-15 23:03:54 +0000 libefivar: Add note about extra compiler flags Add a note about why we need these extra compiler flags to suppress warnings. EDK2 upstream code is being used verbatim and as of the last update these issuse persist, but are benign. Sponsored by: Netflix Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D38613 --- lib/libefivar/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libefivar/Makefile b/lib/libefivar/Makefile index 5a6077d4b8f8..d38d7906af20 100644 --- a/lib/libefivar/Makefile +++ b/lib/libefivar/Makefile @@ -64,9 +64,10 @@ WARNS?= 9 .include +# We use UEFI parsing and formatting code from upstream EDK2 project. +# They still have issues that require us to susppress some warnings. CWARNFLAGS+= -Wno-cast-align CWARNFLAGS+= -Wno-unused-parameter - .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 CWARNFLAGS+= -Wno-unused-but-set-variable .endif From nobody Wed Feb 15 23:04:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHDDH4f0Mz3rSjQ; Wed, 15 Feb 2023 23:04: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 4PHDDH3w2Gz3r9k; Wed, 15 Feb 2023 23:04:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676502271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlt4Zkeshkf+IIUF9JjJuRhlMLa9P5lmgceraV2BzLk=; b=yc/NgdfVaxJyww1MrMy6NJG1vU+lt2xDUwdV+NlzvV8AVQZxq0l8ycohXirA1Y+WUE97r4 BrdOdtGDiwudWZr+AS2tgnXi7vn+bd86vLBckiBLEYtwdnDtsHDESEDiCEq/ewa0wfUBDx 22GlhJlf/ZvWeUpvxQyb8LtuAeh1OdH8akIr+dmxHIQgfhsGtcJ+LQBxlChBy2NDD8zy8J faiF8sRJnhnDUqi5EsEQDi5KZ5/V9zk2tJNqNC90ZQPUxIeoDzsR+g4BRHUC9csRgteFTm xVoCer1tTBpG+KZOUQKqRBCnioHmw0RzWWleGX8vQ+41FIqgfRxflfzBpgTf8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676502271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlt4Zkeshkf+IIUF9JjJuRhlMLa9P5lmgceraV2BzLk=; b=awVIjRijNCLbmvZcdi+6sF1ixoSaRkciNzLC6rye4iumWl9cOorjFD44/7H4fBbnYaeqpW /uP4kDUmHNntewX2jn9InZcpU61mQdKK5G9tjTVDbKo0yMZEx1+JaEe3lmTn1UWED561Ze qomnr3E4OW+sPm0wYIPWyW0KHhmiIWJXJQ7S/k55nRhMPDjV8qwvBQDjaDFL/QjRiWPDPf Ep0ofxfgj4xmJAcoaIgy8rNlBENqWwyiMxjQPNiitn/eWSh/ktkT0a8RYffMHYYOkFPWZj bqXrA5j7Rq4AI1KNZ26yMQPJgbLnOVgPJyiJA6Rs+ZBUP0vrREzfsl+BJN2ovA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676502271; a=rsa-sha256; cv=none; b=xzx1oGJtx/kDXL2Q2NI3eJwvqv6y0SNFm00nG75dqxXNkStI5rJ+hTVIyPDRZv/GvH3Mue 8uHVM7hV+VVhPEH3wTtvDY0DR3ztKXlQcfF87aneVOxNu7XDJwppa/C80+kMeQZ3pwJ2mQ u/xl1nEFuNwXcMLeoHCJPcIp/RPcuvh3GXvjeFTO6sEOcn0s2thcOcSpyNF+g3Vu5W0w3/ m2MAukI805bsn30CygdBaw4WiK8hhDPiYB7knzgs7TN3gXFtTD3tsmWRxRpg8tXOURuVuT 9BA260YKK37e7L5QZKQV2rVE+3YelIFcAUHAEx+LAQ7Rb5ZetmRfOBSSMvMi/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 4PHDDH2rbmzhRG; Wed, 15 Feb 2023 23:04: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 31FN4VkU051315; Wed, 15 Feb 2023 23:04:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FN4VgX051314; Wed, 15 Feb 2023 23:04:31 GMT (envelope-from git) Date: Wed, 15 Feb 2023 23:04:31 GMT Message-Id: <202302152304.31FN4VgX051314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 547fb1426cec - main - efidp: Remove write only variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 547fb1426cecf097a7eae023eb8a0fbde733178b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=547fb1426cecf097a7eae023eb8a0fbde733178b commit 547fb1426cecf097a7eae023eb8a0fbde733178b Author: Warner Losh AuthorDate: 2023-02-15 23:03:02 +0000 Commit: Warner Losh CommitDate: 2023-02-15 23:03:54 +0000 efidp: Remove write only variable Sponsored by: Netflix --- usr.sbin/efidp/efidp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/efidp/efidp.c b/usr.sbin/efidp/efidp.c index aef154112d66..967694024380 100644 --- a/usr.sbin/efidp/efidp.c +++ b/usr.sbin/efidp/efidp.c @@ -169,14 +169,13 @@ efi_to_unix(void) char buffer[MAXSIZE]; char dpbuf[MAXSIZE]; efidp dp; - size_t dplen; char *walker, *dev, *relpath, *abspath; int rv; dp = (efidp)dpbuf; while (fgets(buffer, sizeof(buffer), stdin)) { walker= trim(buffer); - dplen = efidp_parse_device_path(walker, dp, sizeof(dpbuf)); + efidp_parse_device_path(walker, dp, sizeof(dpbuf)); rv = efivar_device_path_to_unix_path(dp, &dev, &relpath, &abspath); if (rv == 0) printf("%s:%s %s\n", dev, relpath, abspath); From nobody Wed Feb 15 23:20:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHDZv0prpz3rTPl; Wed, 15 Feb 2023 23:20: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 4PHDZv0bf4z3sSM; Wed, 15 Feb 2023 23:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676503239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LpBAXJdm+jp592nWcSxgc/RntHB5RbSSrXvh13iCYOk=; b=KUuPKE4mBfpu17WKQPwrsYfo8SJzDUUTtnzEZntQR5pDgclTZj4G6DDHAcIhke1F7fzhCe A1QBcIZs7lKpx87Wc5yWOMvu1zxB9l6KTTR9gfMlBMtmf49wYeSf9PZ3dDvF03/WPhzED1 oy8WJt1xZbR3NamaNlVuecdG0MXgQt2SHLtyYb4NyaJN8kXTxT8ef60cgJA7FUujkaX7XO qL9eYLM2Qr4Mfyy2Xv6hKj28duz8sBwUtz3/SCEX41l9/8Zo/0bHW/Rt41cBkB2BPsM5ci I4KSh4dbyUK8INVrVwwbtBioGnGPMHDAsuTLTbLhDm4RChS7ukeUVNw/lY6sdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676503239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LpBAXJdm+jp592nWcSxgc/RntHB5RbSSrXvh13iCYOk=; b=lLPOHQfZz2ZG5Pgzy8pgvNJAk3aicGFUGumTPNdzx4lm1Rycv8eZWktFEjRI0drrm7AQ9Y 1T9nKDInO+6UmWhnXv5mTsHMl3jBzk3mrVAbcZwwqPbn+Md+zjRLf2Vs9ZA6ZSo6boqY7r g7lwRmFTrqXxjumRGgYNxWweE5PXSIXKqIqqN/675Y+zYY+ypmV0WWsBVk5cXGNgWWLms8 cycnz9nVp09Z4IsRQZyOcCS1lBapn5m85kubYt7vFBlJq4ULJZ5gBp518dkOeK8gzni/Xu gBekBxdhkm3II9dTAYlm7oD/VuY+RP25iiMc98Ly1M342a4f5QvXBV7dHsOo3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676503239; a=rsa-sha256; cv=none; b=B9OY0nefQ1jy6rXeUfi5/8/OUsfsqGmeYDIS1/BBAqOKKkHeYvR3HT2jLqhl4ud2EVxaoy UgmmfQqAPGtvZW70vrtmemPjq3OGNP2iDrlKLwGEFMB9A6Y5Yld13sbB055VGs6agAtkXX IMgTR0BrG74ks5YdB87a9f0hPkiiFkCKAUA4UbiOtA3eOb+0JclwSBOBoMRsibv8ZmCfdB rvmKaR76Dc8kbUjLXFDFvThbsbGfoBdiA+xqsEPh7pj+XUSgeN5wOjsfDzteiHKWN6y0/F VHvV4ylIhTTVOZ3Bkfkud87P/blOzpA3Dz+y3DRnKAyLj7cUKEeZllXWPf9lwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHDZt6mc2zhrp; Wed, 15 Feb 2023 23:20: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 31FNKc4n074262; Wed, 15 Feb 2023 23:20:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FNKcg6074261; Wed, 15 Feb 2023 23:20:38 GMT (envelope-from git) Date: Wed, 15 Feb 2023 23:20:38 GMT Message-Id: <202302152320.31FNKcg6074261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 2894c8c96b9b - main - kgssapi: Add macros so that gssd(8) can run in vnet prison List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2894c8c96b9b94f35aaa27ee5ef3ac11c276fe3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=2894c8c96b9b94f35aaa27ee5ef3ac11c276fe3f commit 2894c8c96b9b94f35aaa27ee5ef3ac11c276fe3f Author: Rick Macklem AuthorDate: 2023-02-15 23:18:46 +0000 Commit: Rick Macklem CommitDate: 2023-02-15 23:18:46 +0000 kgssapi: Add macros so that gssd(8) can run in vnet prison Commit 7344856e3a6d added a lot of macros that will front end vnet macros so that nfsd(8) can run in vnet prison. This patch adds similar macros named KGSS_VNETxxx so that the gssd(8) daemon can run in a vnet prison, once the macros front end the vnet ones. For now, they are null macros. This is the last commit that adds macros. The next step is to change the macros to front end the vnet ones. MFC after: 3 months --- sys/kgssapi/gss_delete_sec_context.c | 7 ++- sys/kgssapi/gss_impl.c | 23 ++++++--- sys/kgssapi/gss_release_cred.c | 7 ++- sys/kgssapi/gss_release_name.c | 7 ++- sys/kgssapi/gssapi_impl.h | 16 +++++- sys/rpc/rpcsec_gss/svc_rpcsec_gss.c | 94 +++++++++++++++++++++--------------- 6 files changed, 104 insertions(+), 50 deletions(-) diff --git a/sys/kgssapi/gss_delete_sec_context.c b/sys/kgssapi/gss_delete_sec_context.c index 4d520feb71b9..82f9e6b8f370 100644 --- a/sys/kgssapi/gss_delete_sec_context.c +++ b/sys/kgssapi/gss_delete_sec_context.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -54,8 +55,12 @@ gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, *minor_status = 0; - if (!kgss_gssd_handle) + KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); + if (!KGSS_VNET(kgss_gssd_handle)) { + KGSS_CURVNET_RESTORE(); return (GSS_S_FAILURE); + } + KGSS_CURVNET_RESTORE(); if (*context_handle) { ctx = *context_handle; diff --git a/sys/kgssapi/gss_impl.c b/sys/kgssapi/gss_impl.c index 9b1277298e32..aa882d9f333b 100644 --- a/sys/kgssapi/gss_impl.c +++ b/sys/kgssapi/gss_impl.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -38,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -62,9 +64,10 @@ static struct syscall_helper_data gssd_syscalls[] = { }; struct kgss_mech_list kgss_mechs; -CLIENT *kgss_gssd_handle; struct mtx kgss_gssd_lock; +KGSS_VNET_DEFINE(CLIENT *, kgss_gssd_handle) = NULL; + static int kgss_load(void) { @@ -134,10 +137,12 @@ sys_gssd_syscall(struct thread *td, struct gssd_syscall_args *uap) } else cl = NULL; + KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); mtx_lock(&kgss_gssd_lock); - oldcl = kgss_gssd_handle; - kgss_gssd_handle = cl; + oldcl = KGSS_VNET(kgss_gssd_handle); + KGSS_VNET(kgss_gssd_handle) = cl; mtx_unlock(&kgss_gssd_lock); + KGSS_CURVNET_RESTORE(); if (oldcl != NULL) { CLNT_CLOSE(oldcl); @@ -249,12 +254,16 @@ kgss_transfer_context(gss_ctx_id_t ctx) enum clnt_stat stat; OM_uint32 maj_stat; - if (!kgss_gssd_handle) + KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); + if (!KGSS_VNET(kgss_gssd_handle)) { + KGSS_CURVNET_RESTORE(); return (GSS_S_FAILURE); + } args.ctx = ctx->handle; bzero(&res, sizeof(res)); - stat = gssd_export_sec_context_1(&args, &res, kgss_gssd_handle); + stat = gssd_export_sec_context_1(&args, &res, KGSS_VNET(kgss_gssd_handle)); + KGSS_CURVNET_RESTORE(); if (stat != RPC_SUCCESS) { return (GSS_S_FAILURE); } @@ -288,11 +297,13 @@ kgss_gssd_client(void) { CLIENT *cl; + KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); mtx_lock(&kgss_gssd_lock); - cl = kgss_gssd_handle; + cl = KGSS_VNET(kgss_gssd_handle); if (cl != NULL) CLNT_ACQUIRE(cl); mtx_unlock(&kgss_gssd_lock); + KGSS_CURVNET_RESTORE(); return (cl); } diff --git a/sys/kgssapi/gss_release_cred.c b/sys/kgssapi/gss_release_cred.c index 70dd3a058ad3..dfd4322a1a33 100644 --- a/sys/kgssapi/gss_release_cred.c +++ b/sys/kgssapi/gss_release_cred.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -52,8 +53,12 @@ gss_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle) *minor_status = 0; - if (!kgss_gssd_handle) + KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); + if (!KGSS_VNET(kgss_gssd_handle)) { + KGSS_CURVNET_RESTORE(); return (GSS_S_FAILURE); + } + KGSS_CURVNET_RESTORE(); if (*cred_handle) { args.cred = (*cred_handle)->handle; diff --git a/sys/kgssapi/gss_release_name.c b/sys/kgssapi/gss_release_name.c index 16050226cc8c..4f7e8db5ae9f 100644 --- a/sys/kgssapi/gss_release_name.c +++ b/sys/kgssapi/gss_release_name.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -53,8 +54,12 @@ gss_release_name(OM_uint32 *minor_status, gss_name_t *input_name) *minor_status = 0; - if (!kgss_gssd_handle) + KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); + if (!KGSS_VNET(kgss_gssd_handle)) { + KGSS_CURVNET_RESTORE(); return (GSS_S_FAILURE); + } + KGSS_CURVNET_RESTORE(); if (*input_name) { name = *input_name; diff --git a/sys/kgssapi/gssapi_impl.h b/sys/kgssapi/gssapi_impl.h index 1b8fb2ff6c30..72f379de4ebf 100644 --- a/sys/kgssapi/gssapi_impl.h +++ b/sys/kgssapi/gssapi_impl.h @@ -54,10 +54,24 @@ struct kgss_mech { }; LIST_HEAD(kgss_mech_list, kgss_mech); -extern CLIENT *kgss_gssd_handle; +/* Macros for VIMAGE. */ +/* Define the KGSS_VNET macros similar to !VIMAGE. */ +#define KGSS_VNET_NAME(n) n +#define KGSS_VNET_DECLARE(t, n) extern t n +#define KGSS_VNET_DEFINE(t, n) t n +#define KGSS_VNET_DEFINE_STATIC(t, n) static t n +#define KGSS_VNET(n) (n) + +#define KGSS_CURVNET_SET(n) +#define KGSS_CURVNET_SET_QUIET(n) +#define KGSS_CURVNET_RESTORE() +#define KGSS_TD_TO_VNET(n) NULL + extern struct mtx kgss_gssd_lock; extern struct kgss_mech_list kgss_mechs; +KGSS_VNET_DECLARE(CLIENT *, kgss_gssd_handle); + CLIENT *kgss_gssd_client(void); int kgss_oid_equal(const gss_OID oid1, const gss_OID oid2); extern void kgss_install_mech(gss_OID mech_type, const char *name, diff --git a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c index f375a184d1cc..d01ca1260a67 100644 --- a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c @@ -102,8 +102,9 @@ struct svc_rpc_gss_callback { SLIST_ENTRY(svc_rpc_gss_callback) cb_link; rpc_gss_callback_t cb_callback; }; -static SLIST_HEAD(svc_rpc_gss_callback_list, svc_rpc_gss_callback) - svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(svc_rpc_gss_callbacks); +SLIST_HEAD(svc_rpc_gss_callback_list, svc_rpc_gss_callback); +KGSS_VNET_DEFINE_STATIC(struct svc_rpc_gss_callback_list, + svc_rpc_gss_callbacks) = SLIST_HEAD_INITIALIZER(svc_rpc_gss_callbacks); struct svc_rpc_gss_svc_name { SLIST_ENTRY(svc_rpc_gss_svc_name) sn_link; @@ -114,8 +115,9 @@ struct svc_rpc_gss_svc_name { u_int sn_program; u_int sn_version; }; -static SLIST_HEAD(svc_rpc_gss_svc_name_list, svc_rpc_gss_svc_name) - svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(svc_rpc_gss_svc_names); +SLIST_HEAD(svc_rpc_gss_svc_name_list, svc_rpc_gss_svc_name); +KGSS_VNET_DEFINE_STATIC(struct svc_rpc_gss_svc_name_list, + svc_rpc_gss_svc_names) = SLIST_HEAD_INITIALIZER(svc_rpc_gss_svc_names); enum svc_rpc_gss_client_state { CLIENT_NEW, /* still authenticating */ @@ -197,23 +199,28 @@ SYSCTL_UINT(_kern_rpc_gss, OID_AUTO, client_count, CTLFLAG_RD, &svc_rpc_gss_client_count, 0, "Number of rpc-gss clients"); -struct svc_rpc_gss_client_list *svc_rpc_gss_client_hash; -struct svc_rpc_gss_client_list svc_rpc_gss_clients; -static uint32_t svc_rpc_gss_next_clientid = 1; +KGSS_VNET_DEFINE(struct svc_rpc_gss_client_list *, svc_rpc_gss_client_hash); +KGSS_VNET_DEFINE(struct svc_rpc_gss_client_list, svc_rpc_gss_clients); +KGSS_VNET_DEFINE_STATIC(uint32_t, svc_rpc_gss_next_clientid) = 1; static void svc_rpc_gss_init(void *arg) { int i; - svc_rpc_gss_client_hash = mem_alloc(sizeof(struct svc_rpc_gss_client_list) * svc_rpc_gss_client_hash_size); + KGSS_VNET(svc_rpc_gss_client_hash) = mem_alloc( + sizeof(struct svc_rpc_gss_client_list) * + svc_rpc_gss_client_hash_size); for (i = 0; i < svc_rpc_gss_client_hash_size; i++) - TAILQ_INIT(&svc_rpc_gss_client_hash[i]); - TAILQ_INIT(&svc_rpc_gss_clients); - svc_auth_reg(RPCSEC_GSS, svc_rpc_gss, rpc_gss_svc_getcred); - sx_init(&svc_rpc_gss_lock, "gsslock"); + TAILQ_INIT(&KGSS_VNET(svc_rpc_gss_client_hash)[i]); + TAILQ_INIT(&KGSS_VNET(svc_rpc_gss_clients)); + if (IS_DEFAULT_VNET(curvnet)) { + svc_auth_reg(RPCSEC_GSS, svc_rpc_gss, rpc_gss_svc_getcred); + sx_init(&svc_rpc_gss_lock, "gsslock"); + } } -SYSINIT(svc_rpc_gss_init, SI_SUB_KMEM, SI_ORDER_ANY, svc_rpc_gss_init, NULL); +SYSINIT(svc_rpc_gss_init, SI_SUB_VNET_DONE, SI_ORDER_ANY, + svc_rpc_gss_init, NULL); bool_t rpc_gss_set_callback(rpc_gss_callback_t *cb) @@ -227,7 +234,7 @@ rpc_gss_set_callback(rpc_gss_callback_t *cb) } scb->cb_callback = *cb; sx_xlock(&svc_rpc_gss_lock); - SLIST_INSERT_HEAD(&svc_rpc_gss_callbacks, scb, cb_link); + SLIST_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_callbacks), scb, cb_link); sx_xunlock(&svc_rpc_gss_lock); return (TRUE); @@ -239,11 +246,11 @@ rpc_gss_clear_callback(rpc_gss_callback_t *cb) struct svc_rpc_gss_callback *scb; sx_xlock(&svc_rpc_gss_lock); - SLIST_FOREACH(scb, &svc_rpc_gss_callbacks, cb_link) { + SLIST_FOREACH(scb, &KGSS_VNET(svc_rpc_gss_callbacks), cb_link) { if (scb->cb_callback.program == cb->program && scb->cb_callback.version == cb->version && scb->cb_callback.callback == cb->callback) { - SLIST_REMOVE(&svc_rpc_gss_callbacks, scb, + SLIST_REMOVE(&KGSS_VNET(svc_rpc_gss_callbacks), scb, svc_rpc_gss_callback, cb_link); sx_xunlock(&svc_rpc_gss_lock); mem_free(scb, sizeof(*scb)); @@ -314,7 +321,7 @@ rpc_gss_set_svc_name(const char *principal, const char *mechanism, } sx_xlock(&svc_rpc_gss_lock); - SLIST_INSERT_HEAD(&svc_rpc_gss_svc_names, sname, sn_link); + SLIST_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_svc_names), sname, sn_link); sx_xunlock(&svc_rpc_gss_lock); return (TRUE); @@ -327,10 +334,10 @@ rpc_gss_clear_svc_name(u_int program, u_int version) struct svc_rpc_gss_svc_name *sname; sx_xlock(&svc_rpc_gss_lock); - SLIST_FOREACH(sname, &svc_rpc_gss_svc_names, sn_link) { + SLIST_FOREACH(sname, &KGSS_VNET(svc_rpc_gss_svc_names), sn_link) { if (sname->sn_program == program && sname->sn_version == version) { - SLIST_REMOVE(&svc_rpc_gss_svc_names, sname, + SLIST_REMOVE(&KGSS_VNET(svc_rpc_gss_svc_names), sname, svc_rpc_gss_svc_name, sn_link); sx_xunlock(&svc_rpc_gss_lock); gss_release_cred(&min_stat, &sname->sn_cred); @@ -478,12 +485,7 @@ rpc_gss_svc_getcred(struct svc_req *req, struct ucred **crp, int *flavorp) cr->cr_uid = cr->cr_ruid = cr->cr_svuid = uc->uid; cr->cr_rgid = cr->cr_svgid = uc->gid; crsetgroups(cr, uc->gidlen, uc->gidlist); -#ifdef VNET_NFSD - if (jailed(curthread->td_ucred)) - cr->cr_prison = curthread->td_ucred->cr_prison; - else -#endif - cr->cr_prison = &prison0; + cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = crhold(cr); @@ -548,7 +550,8 @@ svc_rpc_gss_find_client(struct svc_rpc_gss_clientid *id) if (id->ci_hostid != hostid || id->ci_boottime != boottime.tv_sec) return (NULL); - list = &svc_rpc_gss_client_hash[id->ci_id % svc_rpc_gss_client_hash_size]; + list = &KGSS_VNET(svc_rpc_gss_client_hash) + [id->ci_id % svc_rpc_gss_client_hash_size]; sx_xlock(&svc_rpc_gss_lock); TAILQ_FOREACH(client, list, cl_link) { if (client->cl_id.ci_id == id->ci_id) { @@ -556,9 +559,10 @@ svc_rpc_gss_find_client(struct svc_rpc_gss_clientid *id) * Move this client to the front of the LRU * list. */ - TAILQ_REMOVE(&svc_rpc_gss_clients, client, cl_alllink); - TAILQ_INSERT_HEAD(&svc_rpc_gss_clients, client, + TAILQ_REMOVE(&KGSS_VNET(svc_rpc_gss_clients), client, cl_alllink); + TAILQ_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_clients), + client, cl_alllink); refcount_acquire(&client->cl_refs); break; } @@ -591,7 +595,7 @@ svc_rpc_gss_create_client(void) client->cl_id.ci_hostid = hostid; getboottime(&boottime); client->cl_id.ci_boottime = boottime.tv_sec; - client->cl_id.ci_id = svc_rpc_gss_next_clientid++; + client->cl_id.ci_id = KGSS_VNET(svc_rpc_gss_next_clientid)++; /* * Start the client off with a short expiration time. We will @@ -601,10 +605,11 @@ svc_rpc_gss_create_client(void) client->cl_locked = FALSE; client->cl_expiration = time_uptime + 5*60; - list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; + list = &KGSS_VNET(svc_rpc_gss_client_hash) + [client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; sx_xlock(&svc_rpc_gss_lock); TAILQ_INSERT_HEAD(list, client, cl_link); - TAILQ_INSERT_HEAD(&svc_rpc_gss_clients, client, cl_alllink); + TAILQ_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_clients), client, cl_alllink); svc_rpc_gss_client_count++; sx_xunlock(&svc_rpc_gss_lock); return (client); @@ -658,9 +663,10 @@ svc_rpc_gss_forget_client_locked(struct svc_rpc_gss_client *client) struct svc_rpc_gss_client_list *list; sx_assert(&svc_rpc_gss_lock, SX_XLOCKED); - list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; + list = &KGSS_VNET(svc_rpc_gss_client_hash) + [client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; TAILQ_REMOVE(list, client, cl_link); - TAILQ_REMOVE(&svc_rpc_gss_clients, client, cl_alllink); + TAILQ_REMOVE(&KGSS_VNET(svc_rpc_gss_clients), client, cl_alllink); svc_rpc_gss_client_count--; } @@ -673,7 +679,8 @@ svc_rpc_gss_forget_client(struct svc_rpc_gss_client *client) struct svc_rpc_gss_client_list *list; struct svc_rpc_gss_client *tclient; - list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; + list = &KGSS_VNET(svc_rpc_gss_client_hash) + [client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; sx_xlock(&svc_rpc_gss_lock); TAILQ_FOREACH(tclient, list, cl_link) { /* @@ -704,17 +711,18 @@ svc_rpc_gss_timeout_clients(void) * svc_rpc_gss_clients in LRU order. */ sx_xlock(&svc_rpc_gss_lock); - client = TAILQ_LAST(&svc_rpc_gss_clients, svc_rpc_gss_client_list); + client = TAILQ_LAST(&KGSS_VNET(svc_rpc_gss_clients), + svc_rpc_gss_client_list); while (svc_rpc_gss_client_count > svc_rpc_gss_client_max && client != NULL) { svc_rpc_gss_forget_client_locked(client); sx_xunlock(&svc_rpc_gss_lock); svc_rpc_gss_release_client(client); sx_xlock(&svc_rpc_gss_lock); - client = TAILQ_LAST(&svc_rpc_gss_clients, + client = TAILQ_LAST(&KGSS_VNET(svc_rpc_gss_clients), svc_rpc_gss_client_list); } again: - TAILQ_FOREACH(client, &svc_rpc_gss_clients, cl_alllink) { + TAILQ_FOREACH(client, &KGSS_VNET(svc_rpc_gss_clients), cl_alllink) { if (client->cl_state == CLIENT_STALE || now > client->cl_expiration) { svc_rpc_gss_forget_client_locked(client); @@ -883,7 +891,8 @@ svc_rpc_gss_accept_sec_context(struct svc_rpc_gss_client *client, */ sx_xlock(&svc_rpc_gss_lock); if (!client->cl_sname) { - SLIST_FOREACH(sname, &svc_rpc_gss_svc_names, sn_link) { + SLIST_FOREACH(sname, &KGSS_VNET(svc_rpc_gss_svc_names), + sn_link) { if (sname->sn_program == rqst->rq_prog && sname->sn_version == rqst->rq_vers) { retry: @@ -1137,7 +1146,7 @@ svc_rpc_gss_callback(struct svc_rpc_gss_client *client, struct svc_req *rqst) * See if we have a callback for this guy. */ result = TRUE; - SLIST_FOREACH(scb, &svc_rpc_gss_callbacks, cb_link) { + SLIST_FOREACH(scb, &KGSS_VNET(svc_rpc_gss_callbacks), cb_link) { if (scb->cb_callback.program == rqst->rq_prog && scb->cb_callback.version == rqst->rq_vers) { /* @@ -1273,6 +1282,7 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) int call_stat; enum auth_stat result; + KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); rpc_gss_log_debug("in svc_rpc_gss()"); /* Garbage collect old clients. */ @@ -1282,8 +1292,10 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) rqst->rq_verf = _null_auth; /* Deserialize client credentials. */ - if (rqst->rq_cred.oa_length <= 0) + if (rqst->rq_cred.oa_length <= 0) { + KGSS_CURVNET_RESTORE(); return (AUTH_BADCRED); + } memset(&gc, 0, sizeof(gc)); @@ -1292,6 +1304,7 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) if (!xdr_rpc_gss_cred(&xdrs, &gc)) { XDR_DESTROY(&xdrs); + KGSS_CURVNET_RESTORE(); return (AUTH_BADCRED); } XDR_DESTROY(&xdrs); @@ -1527,6 +1540,7 @@ out: svc_rpc_gss_release_client(client); xdr_free((xdrproc_t) xdr_rpc_gss_cred, (char *) &gc); + KGSS_CURVNET_RESTORE(); return (result); } From nobody Thu Feb 16 00:32:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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 00:41:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHGN93WRKz3rZ4C; Thu, 16 Feb 2023 00:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHGN930khz43X5; Thu, 16 Feb 2023 00:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DSBz0BL1/kPq0qnXqnWZ8boKsZgq/i9c4UMUNZbeIjY=; b=TRe+V0cVbIoxG07JNGHiu7GnXkLMpzidAbe+ZIYuLO7oqI88SWWHNq/eNjWORTQ91oN9jM 0QsK8XsRBFw3fwHWKTDchz4LFf1a9IAGBdpIYq6BOS2F+pBk8vZiwnxbJgppLCrPVem2K4 vsDLtutm0vWfxxIososa4ERgw45JAxr2Sxz3Z5GxsPwAm/S5OrEl5v5Lv1BP3hviNZvBUM Fbkd8lAkFVYfS8qVhIQKqFPnEDErxVhRluavtqnVdn8W8BwuMbcHquOX8vf+E1HGWJGBfG k0WRA3X8HXMikQBmKGPryGHFT+6jo+O6TY/IVzPO1YARM61Ka0t9Y/ViHF0LwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DSBz0BL1/kPq0qnXqnWZ8boKsZgq/i9c4UMUNZbeIjY=; b=STPnY8EtiRUAlWyDK7SZlHiNethbH9CEb7EMtUS9lh/TblpCSywABZhwE6ltsUFsPYB1sK 5VD4w7dnrBxnQsZsonN02LHgD0FROzAvZamga3R1s4U0d5UfskDQfRqHL/c8uXEb9gx2ZH z+qkl3ZpRDazn1lxo6Id0TW8BKpsMMcGpOQUx4kC1Z6zriTint+KLrBbkK1mL7MU7KbzpK zq4f7wmgBammszInWWBZDIecM+qCRQh8P4cz0J7LbCc2pNPb0fbGAWlqrw9xOFTeZFz2xi 5CUzI2N7TKVbeG/nAvvAiq3DWo/JFNYNab9H7QNb4cQsEMZGqKwU1YLp1IdSRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676508089; a=rsa-sha256; cv=none; b=hF3aWqDXDtQ/7uAW4Kgi9JLVSkc64EoIikxtp/X1YXoNu/SM3Qm1h3SXtAI1C4ahFhMAoQ Mlq1N86S8JlJK3IeWiVeOAH3q7+f6n93nnGhxtEme8HtEZa3F4K2WwpWWNFTgVFuwWGwIs unOwDfJanfL68J/wl87IiZJ83jZWwu9HfSWAjtGXExbe9rxsOExFBNh/wNHSGSV6TPuPTO PvE4j7k2D5a9Mw/IC9LOZnNmlUMNfuYldS+EkCBdQcr2Qck9yiygtS/z7lAYviama/URWJ Aqf8ktvx0eKUmWHBt8Py4KSSac9tdyWTJg/7womeuYAP9g4agc+benRL8h1pwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHGN924W8zlFx; Thu, 16 Feb 2023 00:41: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 31G0fTH4098138; Thu, 16 Feb 2023 00:41:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G0fTRE098137; Thu, 16 Feb 2023 00:41:29 GMT (envelope-from git) Date: Thu, 16 Feb 2023 00:41:29 GMT Message-Id: <202302160041.31G0fTRE098137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: bf84156b24ff - main - tarfs: Use a separate debug bit for bounce buffer usage. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf84156b24ffd167b93980a91904fafe84ac7c49 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=bf84156b24ffd167b93980a91904fafe84ac7c49 commit bf84156b24ffd167b93980a91904fafe84ac7c49 Author: Dag-Erling Smørgrav AuthorDate: 2023-02-16 00:40:18 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-16 00:40:45 +0000 tarfs: Use a separate debug bit for bounce buffer usage. Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D38588 --- share/man/man5/tarfs.5 | 3 ++- sys/fs/tarfs/tarfs_dbg.h | 1 + sys/fs/tarfs/tarfs_io.c | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man5/tarfs.5 b/share/man/man5/tarfs.5 index e431e5d1fa1c..29999b8066f7 100644 --- a/share/man/man5/tarfs.5 +++ b/share/man/man5/tarfs.5 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 2, 2023 +.Dd February 14, 2023 .Dt TARFS 5 .Os .Sh NAME @@ -81,6 +81,7 @@ by adding together the relevant values from the table below. .It 0x40 Ta Decompression .It 0x80 Ta Decompression index .It 0x100 Ta Sparse file mapping +.It 0x200 Ta Bounce buffer usage .El .Sh SEE ALSO .Xr tar 1 , diff --git a/sys/fs/tarfs/tarfs_dbg.h b/sys/fs/tarfs/tarfs_dbg.h index 45d11d679719..bedb94b3d602 100644 --- a/sys/fs/tarfs/tarfs_dbg.h +++ b/sys/fs/tarfs/tarfs_dbg.h @@ -45,6 +45,7 @@ extern int tarfs_debug; #define TARFS_DEBUG_ZIO 0x40 #define TARFS_DEBUG_ZIDX 0x80 #define TARFS_DEBUG_MAP 0x100 +#define TARFS_DEBUG_BOUNCE 0x200 #define TARFS_DPF(category, fmt, ...) \ do { \ diff --git a/sys/fs/tarfs/tarfs_io.c b/sys/fs/tarfs/tarfs_io.c index 8837681ac5f0..58f3e7eab03f 100644 --- a/sys/fs/tarfs/tarfs_io.c +++ b/sys/fs/tarfs/tarfs_io.c @@ -391,7 +391,7 @@ tarfs_zread_zstd(struct tarfs_zio *zio, struct uio *uiop) if (uiop->uio_segflg == UIO_SYSSPACE) { zob.dst = uiop->uio_iov->iov_base; } else { - TARFS_DPF(ALLOC, "%s: allocating %zu-byte bounce buffer\n", + TARFS_DPF(BOUNCE, "%s: allocating %zu-byte bounce buffer\n", __func__, len); zob.dst = obuf = malloc(len, M_TEMP, M_WAITOK); } @@ -488,7 +488,7 @@ fail_unlocked: if (uiop->uio_segflg == UIO_SYSSPACE) { uiop->uio_resid = resid; } else if (len > resid) { - TARFS_DPF(ALLOC, "%s: bounced %zu bytes\n", __func__, + TARFS_DPF(BOUNCE, "%s: bounced %zu bytes\n", __func__, len - resid); error = uiomove(obuf, len - resid, uiop); #ifdef TARFS_DEBUG @@ -497,7 +497,7 @@ fail_unlocked: } } if (obuf != NULL) { - TARFS_DPF(ALLOC, "%s: freeing bounce buffer\n", __func__); + TARFS_DPF(BOUNCE, "%s: freeing bounce buffer\n", __func__); free(obuf, M_TEMP); } if (rl != NULL) From nobody Thu Feb 16 00:41:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHGNB514Gz3rZ4H; Thu, 16 Feb 2023 00:41: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 4PHGNB49CSz43jT; Thu, 16 Feb 2023 00:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ThiVv9UPwgEJqTxUFmX8ltfigjH91dSH/OAfOVnrJH4=; b=wUCTd8IbSklk7QEprCwLYfrEkyS58CZhhb2Buog6tF8u2sbLwNTwpD2kL16i1iVaIedqBH 9WOrGIuCb4vuJ+jc4WuH6p85zY1rChEiV4QZHf6hDTLEf9xFngd7FQop3fEJQ6oQH/YYs5 N7sRsw3M7SGda2iDdIBnwN+K6UgW3azIQveMx8N3GLXWGmrBouFm9LEbOaeZx6XOwc3ing Gcmojowd5js/YnOF60yD6OUTWQbXGomcWyqQihPjcRHxP9ywe6H1oHiTGbPTsCf3VwEK3w 97FvLlWTjvv3f+VXdA+oipS2SrLuedsmJV7RxVCC02mSm8dg3A0RfoSGr18FvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ThiVv9UPwgEJqTxUFmX8ltfigjH91dSH/OAfOVnrJH4=; b=xT29iIJ6mPsFgGuAOhr4I+hmnF7sIXIHa0IKBU6f2T0qXzteY9kpEwFPluask345l4n9ML i78vtRRowKDnPIjFpy/6PriQZSoQA2zQJzOr6tl2fiYVNyxDB+OMYOFODRr61jMnxR8Zpz awgekJcaOybz51gVUGdSrD68W21+4cIfgCD1tTuCWudsft0Y0HBIUMnjjvCCkhgZrxoXFa 7XyFZk7R9a8HGJQHrDYm815HAP3fmjw6HUOY4b5lUt1ZXENjHCZqD2C9MSTrgRyp1OJulP UMszqpZUlSdltIciH+iT08yOsdkrD0kJ4vQV2ZpaSwweuO7J6mF16f1IXPVenA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676508090; a=rsa-sha256; cv=none; b=hpqwDpljLXY7ZaPhi1eSfejhmaTiXS/gMmsOkZpSCdPzhgGYqomis4QBaItBrsN9izg7Yq 0uwD00V9BeYXKBgztZlzUhI+E/foM7TPa2f9/9m9thJ2H61IPz0CNsIimZDVQsnQ1nI7hh kExZbLjJDvpe9sttbnjgimTKhwykSnoqu4ZlXxzOlEUAaj58EGgbB3Ymh5Hz96+xbewMhp ZHY064gOSIdzqiyt5ulCHGsxrGiwi9jjFv3ip5ueVd232rDMROZfAHXdoZooNJ2YkQHKYU TaA4JSyYebFrUzRnZwKEShLY9svN4pVvcXtjsIArXEpEzPnH7s9CJ47QDxxjlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHGNB2wLXzkfV; Thu, 16 Feb 2023 00:41: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 31G0fUT8098167; Thu, 16 Feb 2023 00:41:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G0fUi7098166; Thu, 16 Feb 2023 00:41:30 GMT (envelope-from git) Date: Thu, 16 Feb 2023 00:41:30 GMT Message-Id: <202302160041.31G0fUi7098166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 5c870e1b4894 - main - wc: Improve test coverage. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c870e1b48948a283c963ecb88780e4e0406ac1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5c870e1b48948a283c963ecb88780e4e0406ac1e commit 5c870e1b48948a283c963ecb88780e4e0406ac1e Author: Dag-Erling Smørgrav AuthorDate: 2023-02-16 00:40:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-16 00:40:45 +0000 wc: Improve test coverage. * Add a test that causes mbrtowc() to return 0. * Add a test that causes mbrtowc() to return -2. Sponsored by: Klara, Inc. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38605 --- usr.bin/wc/tests/wc_test.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/usr.bin/wc/tests/wc_test.sh b/usr.bin/wc/tests/wc_test.sh index 574f2daacaca..70eb5f5a2b37 100755 --- a/usr.bin/wc/tests/wc_test.sh +++ b/usr.bin/wc/tests/wc_test.sh @@ -11,6 +11,11 @@ export LC_CTYPE=C.UTF-8 export LC_MESSAGES=C +# +# Size of wc's read buffer. +# +MAXBSIZE=65536 + # # Sample text containing multibyte characters # @@ -136,6 +141,50 @@ multiline_repeated_body() atf_check_wc foo $((tvl*c)) $((tvw*c)) $((tvc*c)) $((tvm*c)) } +atf_test_case nul +nul_head() +{ + atf_set "descr" "Input containing NUL" +} +nul_body() +{ + printf "a\0b\n" >foo + atf_check_wc foo 1 1 4 +} + +atf_test_case poop +poop_head() +{ + atf_set "descr" "Multibyte sequence across buffer boundary" +} +poop_body() +{ + local l=0 w=0 c=0 m=0 + # The code below produces a stream of 4-byte UTF-8 sequences + # aligned on 5-byte boundaries, ensuring that the first full + # read of length MAXBSIZE will end in a partial sequence — + # unless MAXBSIZE is a multiple of 5 (not possible since it's + # a power of 2) or one less than a multiple of 5 (e.g. 2^18 = + # 262,144 = (52429 * 5) - 1) in which case we prepend a single + # newline to push our sequence out of phase. + atf_check_not_equal 0 $((MAXBSIZE % 5)) + :>foo + if [ $((MAXBSIZE % 5)) -eq 4 ] ; then + printf "\n" + l=$((l + 1)) + c=$((c + 1)) + m=$((m + 1)) + fi >>foo + while [ $c -le $MAXBSIZE ] ; do + printf "💩.💩.💩.💩.💩.💩.💩.💩.💩.💩.💩.💩.💩.💩.💩.💩\n" + l=$((l + 1)) + w=$((w + 1)) + c=$((c + 80)) # 80 bytes + m=$((m + 32)) # 32 multibyte characters + done >>foo + atf_check_wc foo $l $w $c $m +} + atf_test_case total total_head() { @@ -190,6 +239,8 @@ atf_init_test_cases() atf_add_test_case invalid atf_add_test_case multiline atf_add_test_case multiline_repeated + atf_add_test_case nul + atf_add_test_case poop atf_add_test_case total atf_add_test_case unterminated atf_add_test_case usage From nobody Thu Feb 16 00:41:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHGNC5XzHz3rYw4; Thu, 16 Feb 2023 00:41: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 4PHGNC4tW2z43jv; Thu, 16 Feb 2023 00:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=125znxd02kJM4vpCBoWESOV0NX1uE7Wx+MI3kA6h0+c=; b=x2SHJgLZKC/5XsDpGPwbi7SKCimyaQhC4KxEOPm2MYOPIlJs4om0yEkBMOXNO+WXnEJCpF h/Dxvy6OMg9bn4bnUBYqk3fnslZ+nP1fLfapLA/amObNQ1EBUxr/rRHp1enhl0wkXQxZ2T etfkQOUVCxYra/kIwQH0iJnTVhBGv0KWrx3b4+Go5WiAT87j4r8h5GzmKNWrtUIedieVVN 5UkwYaCfzohpri7AGAU2sZRJQAhO/Zi4LYEgjxrKRe4RkMhoYKBAWSNjtb2dZoXkIhTwtF zG8pPBHsI29ShndFfVhdfIWiVhIMq9IlkN+uDTOzdOCeJNOkcbj+EIl2GgpMOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=125znxd02kJM4vpCBoWESOV0NX1uE7Wx+MI3kA6h0+c=; b=BtFGcPm7/ORX/VasVYZO0kOcGBMDIM0v1wLcKjHvHKlIuJ0K7LayYuMf+lPBx1k6YZOzlE nyg5t3g7UufI5r//njMAuYOAzJHyJ32Zb7jzcjDhbCHTnppg2qz6/Cv3OTpBbr2iXyb0VD fSEKx/7FuWXeHYMBopvOJG0WsPfCVZjpminNVyCHo4Nbug2jFKQ9tlqBHIsckWPfdKGTg8 pzLCLH2GaRZnZSSeQallFeom+aRe2vHn8uVHGiYgVzKrRWuUvYqeZZ1wS/VUfoH0ghmwv7 APcvEnhjQwgdlJCI5TQU+6UJSgLYo8G/megHO2RGUIy9bipFcp3gValHUDoPhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676508091; a=rsa-sha256; cv=none; b=wKSagzo4ISsunXeAQTEryPvORRIpkzCGjCaD47cQDbFyKhV6GMm0LXdr7oaxvLC1q+kZwK UHVo37rXxAI7cQ1O8f2cAN4u7J2RqGlwg8G+0nzKomYYk+jvc8tAl4Ey6IpQaBtjXknu/2 sKQvO4ANROjSllXIuxaAQakOpxg6P2+tLxjV1YOIardTsCmcluNHLkz5eUrLoWOXqWsfg5 woQnnOL/HfJjGLAUE/l70ddjMOVgkXUsPYRX052EqllTSFwweRPq9YRIXwFBw22umqtq1p uzQK6xkf+DD8LT/sIjd6HPefitsZP2QQ+lcC8NIGjjACwK9Wd4wHzGLqi3Y2tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHGNC3spqzkfW; Thu, 16 Feb 2023 00:41: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 31G0fV5s098196; Thu, 16 Feb 2023 00:41:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G0fVIa098195; Thu, 16 Feb 2023 00:41:31 GMT (envelope-from git) Date: Thu, 16 Feb 2023 00:41:31 GMT Message-Id: <202302160041.31G0fVIa098195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 5016d112ad8b - main - wc: Make the read buffer static. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5016d112ad8b259047920f3a2f749c369982de37 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5016d112ad8b259047920f3a2f749c369982de37 commit 5016d112ad8b259047920f3a2f749c369982de37 Author: Dag-Erling Smørgrav AuthorDate: 2023-02-16 00:40:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-16 00:40:45 +0000 wc: Make the read buffer static. The read buffer in cnt() is 64 kB, which is a bit excessive for a stack variable. MAXBSIZE has grown since this code was originally written, and it might grow again in the future. Since the program is single-threaded and cnt() does not recurse, we can safely make the buffer static. While there, constify p since it is only used to read. Sponsored by: Klara, Inc. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38608 --- usr.bin/wc/wc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index 9c129917dd04..6ba827612e3d 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -214,9 +214,10 @@ show_cnt(const char *file, uintmax_t linect, uintmax_t wordct, static int cnt(const char *file) { - char buf[MAXBSIZE], *p; + static char buf[MAXBSIZE]; struct stat sb; mbstate_t mbs; + const char *p; uintmax_t linect, wordct, charct, llct, tmpll; ssize_t len; size_t clen; @@ -259,7 +260,7 @@ cnt(const char *file) * lines than to get words, since the word count requires locale * handling. */ - while ((len = read(fd, buf, sizeof(buf)))) { + while ((len = read(fd, buf, sizeof(buf))) != 0) { if (len < 0) { xo_warn("%s: read", file); (void)close(fd); From nobody Thu Feb 16 01:40:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHHh30r17z3rsTV; Thu, 16 Feb 2023 01:40: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 4PHHh30dl2z49c2; Thu, 16 Feb 2023 01:40:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676511619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6V73aTGR/6ho7utMWG0gWbPDv+yRzj/MhQ0lHm/83F8=; b=lDezm9M4Amfs6g1CSfEL6Qvf35ZVQWKkc7xEDHdVKehxU8VM9odDbAGwNvzDjEhs7BD0yF V3BspFz6WVk8rQEAcyQhBkWUQr1b8VBT2RCNEtbucT4TBzDuh0QZd3BAwpV1EZ4Bhhd3+o InQ/hQTZb/ro4gpxkY8Si882+WiabyrGTzCdDDkQK3JxoFDnB29N7oJmBXTMl4qOb6Y+jx YKljVJAMo/kBiTjwTaYhDjO655H+DBTzSmaWxiTNL1Zk2+QnPbyThHjkQP0dR+MQAa/09I H1tyGG00tCjlx/1Zz5zmLk/7j9CJUeDQamqMelcz7n+70uMVkSCklH/gJNgn0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676511619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6V73aTGR/6ho7utMWG0gWbPDv+yRzj/MhQ0lHm/83F8=; b=AYtS5zsp7eBB4Ceesw/aR8I65eSkdEUAkz4i02wpXCK70/nNQJR8KBgCaqW3kRnpS2apry 4IUvxLT8x6Q97cpCJxs1EkbaPRjc8OdHKZa4zM9nod7HlwLUax+jMa4cIhTYQ1s6vEXvXg nDVId1DaaMFMf705fUb/rXxmJpVC85Cx569Oh4eQKYLH9g1wD92M/aU+eHn32hLK9aVxmu lf8ZQoBjfa+5+efQ05hftO+Xq8c65N2VldkbnKm3Dz2hxZsrbj2AutFmYGK50criu11D0J Iuv3sIq04JzeClSIuLAZruHRmhV/20x9DMgH+84S1VGXyeWI+SkNcGaTyiSMUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676511619; a=rsa-sha256; cv=none; b=EAMp/OxHFWlkEocdM9N08o7IFga+Av9UVsvZHGsW5DbVBMpx/XKq/LJUDuShTcAbCvxRIO csB8rNlsrBUWAF+tGYL0FGRe6HVd6cQ99Gy7oZsPt810MF4prOxEtDxtqmNx0pNVPgWHGp 8cVnHoa++icqLbS8lGjynuOBNqAgfbnEExOQ+m6sWhUNB3FsSja3+17d0K3NcqzKe8asH0 Q1n6h44g+mvLQ31SFXkC4Rs63KNESzfjEmZoSyEM/MIHyNPxm5rWKa0yS0fVRQRkRP/jkw FazTBuFy1XhSwaMcsVmgNdKdDPsPQ0NChaYjH9wuMlWP1CVdHHiJjRybww4lpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHHh26pD7zmTY; Thu, 16 Feb 2023 01:40: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 31G1eI1j080384; Thu, 16 Feb 2023 01:40:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G1eIEs080383; Thu, 16 Feb 2023 01:40:18 GMT (envelope-from git) Date: Thu, 16 Feb 2023 01:40:18 GMT Message-Id: <202302160140.31G1eIEs080383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: b039ca077677 - main - nfsd: Wrap nfsstatsv1_p in the NFSD_VNET() macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b039ca0776774036a9e33aa45f50296a7f6ba547 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=b039ca0776774036a9e33aa45f50296a7f6ba547 commit b039ca0776774036a9e33aa45f50296a7f6ba547 Author: Rick Macklem AuthorDate: 2023-02-16 01:39:07 +0000 Commit: Rick Macklem CommitDate: 2023-02-16 01:39:07 +0000 nfsd: Wrap nfsstatsv1_p in the NFSD_VNET() macro Commit 7344856e3a6d added a lot of macros that will front end vnet macros so that nfsd(8) can run in vnet prison. The nfsstatsv1_p variable got missed. This patch wraps all uses of nfsstatsv1_p with the NFSD_VNET() macro. The NFSD_VNET() macro is still a null macro. MFC after: 3 months --- sys/fs/nfs/nfs_commonkrpc.c | 12 +- sys/fs/nfs/nfs_commonport.c | 290 ++++++++++++++++++++------------------ sys/fs/nfsserver/nfs_nfsdcache.c | 30 ++-- sys/fs/nfsserver/nfs_nfsdport.c | 4 +- sys/fs/nfsserver/nfs_nfsdsocket.c | 25 ++-- sys/fs/nfsserver/nfs_nfsdstate.c | 48 +++---- 6 files changed, 214 insertions(+), 195 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index bf0a9e6e53ef..0d2cb9ec279a 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -783,7 +783,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, procnum = NFSV4PROC_COMPOUND; if (nmp != NULL) { - NFSINCRGLOBAL(nfsstatsv1_p->rpcrequests); + NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcrequests); /* Map the procnum to the old NFSv2 one, as required. */ if ((nd->nd_flag & ND_NFSV2) != 0) { @@ -918,13 +918,13 @@ tryagain: if (stat == RPC_SUCCESS) { error = 0; } else if (stat == RPC_TIMEDOUT) { - NFSINCRGLOBAL(nfsstatsv1_p->rpctimeouts); + NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpctimeouts); error = ETIMEDOUT; } else if (stat == RPC_VERSMISMATCH) { - NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid); + NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid); error = EOPNOTSUPP; } else if (stat == RPC_PROGVERSMISMATCH) { - NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid); + NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid); error = EPROTONOSUPPORT; } else if (stat == RPC_CANTSEND || stat == RPC_CANTRECV || stat == RPC_SYSTEMERROR || stat == RPC_INTR) { @@ -958,11 +958,11 @@ tryagain: if (stat == RPC_INTR) error = EINTR; else { - NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid); + NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid); error = ENXIO; } } else { - NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid); + NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid); error = EACCES; } if (error) { diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 2a2869641d25..3a1f53340cd4 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -478,87 +478,105 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred) if ((uap->flag & NFSSVC_NEWSTRUCT) == 0) { /* Copy fields to the old ext_nfsstat structure. */ oldnfsstats.attrcache_hits = - nfsstatsv1_p->attrcache_hits; + NFSD_VNET(nfsstatsv1_p)->attrcache_hits; oldnfsstats.attrcache_misses = - nfsstatsv1_p->attrcache_misses; + NFSD_VNET(nfsstatsv1_p)->attrcache_misses; oldnfsstats.lookupcache_hits = - nfsstatsv1_p->lookupcache_hits; + NFSD_VNET(nfsstatsv1_p)->lookupcache_hits; oldnfsstats.lookupcache_misses = - nfsstatsv1_p->lookupcache_misses; + NFSD_VNET(nfsstatsv1_p)->lookupcache_misses; oldnfsstats.direofcache_hits = - nfsstatsv1_p->direofcache_hits; + NFSD_VNET(nfsstatsv1_p)->direofcache_hits; oldnfsstats.direofcache_misses = - nfsstatsv1_p->direofcache_misses; + NFSD_VNET(nfsstatsv1_p)->direofcache_misses; oldnfsstats.accesscache_hits = - nfsstatsv1_p->accesscache_hits; + NFSD_VNET(nfsstatsv1_p)->accesscache_hits; oldnfsstats.accesscache_misses = - nfsstatsv1_p->accesscache_misses; + NFSD_VNET(nfsstatsv1_p)->accesscache_misses; oldnfsstats.biocache_reads = - nfsstatsv1_p->biocache_reads; + NFSD_VNET(nfsstatsv1_p)->biocache_reads; oldnfsstats.read_bios = - nfsstatsv1_p->read_bios; + NFSD_VNET(nfsstatsv1_p)->read_bios; oldnfsstats.read_physios = - nfsstatsv1_p->read_physios; + NFSD_VNET(nfsstatsv1_p)->read_physios; oldnfsstats.biocache_writes = - nfsstatsv1_p->biocache_writes; + NFSD_VNET(nfsstatsv1_p)->biocache_writes; oldnfsstats.write_bios = - nfsstatsv1_p->write_bios; + NFSD_VNET(nfsstatsv1_p)->write_bios; oldnfsstats.write_physios = - nfsstatsv1_p->write_physios; + NFSD_VNET(nfsstatsv1_p)->write_physios; oldnfsstats.biocache_readlinks = - nfsstatsv1_p->biocache_readlinks; + NFSD_VNET(nfsstatsv1_p)->biocache_readlinks; oldnfsstats.readlink_bios = - nfsstatsv1_p->readlink_bios; + NFSD_VNET(nfsstatsv1_p)->readlink_bios; oldnfsstats.biocache_readdirs = - nfsstatsv1_p->biocache_readdirs; + NFSD_VNET(nfsstatsv1_p)->biocache_readdirs; oldnfsstats.readdir_bios = - nfsstatsv1_p->readdir_bios; + NFSD_VNET(nfsstatsv1_p)->readdir_bios; for (i = 0; i < NFSV4_NPROCS; i++) - oldnfsstats.rpccnt[i] = nfsstatsv1_p->rpccnt[i]; - oldnfsstats.rpcretries = nfsstatsv1_p->rpcretries; + oldnfsstats.rpccnt[i] = + NFSD_VNET(nfsstatsv1_p)->rpccnt[i]; + oldnfsstats.rpcretries = + NFSD_VNET(nfsstatsv1_p)->rpcretries; for (i = 0; i < NFSV4OP_NOPS; i++) oldnfsstats.srvrpccnt[i] = - nfsstatsv1_p->srvrpccnt[i]; + NFSD_VNET(nfsstatsv1_p)->srvrpccnt[i]; for (i = NFSV42_NOPS, j = NFSV4OP_NOPS; i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) oldnfsstats.srvrpccnt[j] = - nfsstatsv1_p->srvrpccnt[i]; + NFSD_VNET(nfsstatsv1_p)->srvrpccnt[i]; oldnfsstats.reserved_0 = 0; oldnfsstats.reserved_1 = 0; - oldnfsstats.rpcrequests = nfsstatsv1_p->rpcrequests; - oldnfsstats.rpctimeouts = nfsstatsv1_p->rpctimeouts; - oldnfsstats.rpcunexpected = nfsstatsv1_p->rpcunexpected; - oldnfsstats.rpcinvalid = nfsstatsv1_p->rpcinvalid; + oldnfsstats.rpcrequests = + NFSD_VNET(nfsstatsv1_p)->rpcrequests; + oldnfsstats.rpctimeouts = + NFSD_VNET(nfsstatsv1_p)->rpctimeouts; + oldnfsstats.rpcunexpected = + NFSD_VNET(nfsstatsv1_p)->rpcunexpected; + oldnfsstats.rpcinvalid = + NFSD_VNET(nfsstatsv1_p)->rpcinvalid; oldnfsstats.srvcache_inproghits = - nfsstatsv1_p->srvcache_inproghits; + NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits; oldnfsstats.reserved_2 = 0; oldnfsstats.srvcache_nonidemdonehits = - nfsstatsv1_p->srvcache_nonidemdonehits; + NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits; oldnfsstats.srvcache_misses = - nfsstatsv1_p->srvcache_misses; + NFSD_VNET(nfsstatsv1_p)->srvcache_misses; oldnfsstats.srvcache_tcppeak = - nfsstatsv1_p->srvcache_tcppeak; - oldnfsstats.srvcache_size = nfsstatsv1_p->srvcache_size; - oldnfsstats.srvclients = nfsstatsv1_p->srvclients; - oldnfsstats.srvopenowners = nfsstatsv1_p->srvopenowners; - oldnfsstats.srvopens = nfsstatsv1_p->srvopens; - oldnfsstats.srvlockowners = nfsstatsv1_p->srvlockowners; - oldnfsstats.srvlocks = nfsstatsv1_p->srvlocks; - oldnfsstats.srvdelegates = nfsstatsv1_p->srvdelegates; + NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak; + oldnfsstats.srvcache_size = + NFSD_VNET(nfsstatsv1_p)->srvcache_size; + oldnfsstats.srvclients = + NFSD_VNET(nfsstatsv1_p)->srvclients; + oldnfsstats.srvopenowners = + NFSD_VNET(nfsstatsv1_p)->srvopenowners; + oldnfsstats.srvopens = + NFSD_VNET(nfsstatsv1_p)->srvopens; + oldnfsstats.srvlockowners = + NFSD_VNET(nfsstatsv1_p)->srvlockowners; + oldnfsstats.srvlocks = + NFSD_VNET(nfsstatsv1_p)->srvlocks; + oldnfsstats.srvdelegates = + NFSD_VNET(nfsstatsv1_p)->srvdelegates; for (i = 0; i < NFSV4OP_CBNOPS; i++) oldnfsstats.cbrpccnt[i] = - nfsstatsv1_p->cbrpccnt[i]; - oldnfsstats.clopenowners = nfsstatsv1_p->clopenowners; - oldnfsstats.clopens = nfsstatsv1_p->clopens; - oldnfsstats.cllockowners = nfsstatsv1_p->cllockowners; - oldnfsstats.cllocks = nfsstatsv1_p->cllocks; - oldnfsstats.cldelegates = nfsstatsv1_p->cldelegates; + NFSD_VNET(nfsstatsv1_p)->cbrpccnt[i]; + oldnfsstats.clopenowners = + NFSD_VNET(nfsstatsv1_p)->clopenowners; + oldnfsstats.clopens = NFSD_VNET(nfsstatsv1_p)->clopens; + oldnfsstats.cllockowners = + NFSD_VNET(nfsstatsv1_p)->cllockowners; + oldnfsstats.cllocks = NFSD_VNET(nfsstatsv1_p)->cllocks; + oldnfsstats.cldelegates = + NFSD_VNET(nfsstatsv1_p)->cldelegates; oldnfsstats.cllocalopenowners = - nfsstatsv1_p->cllocalopenowners; - oldnfsstats.cllocalopens = nfsstatsv1_p->cllocalopens; + NFSD_VNET(nfsstatsv1_p)->cllocalopenowners; + oldnfsstats.cllocalopens = + NFSD_VNET(nfsstatsv1_p)->cllocalopens; oldnfsstats.cllocallockowners = - nfsstatsv1_p->cllocallockowners; - oldnfsstats.cllocallocks = nfsstatsv1_p->cllocallocks; + NFSD_VNET(nfsstatsv1_p)->cllocallockowners; + oldnfsstats.cllocallocks = + NFSD_VNET(nfsstatsv1_p)->cllocallocks; error = copyout(&oldnfsstats, uap->argp, sizeof (oldnfsstats)); } else { @@ -568,174 +586,174 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred) if (nfsstatver.vers == NFSSTATS_OV1) { /* Copy nfsstatsv1 to nfsstatsov1. */ nfsstatsov1.attrcache_hits = - nfsstatsv1_p->attrcache_hits; + NFSD_VNET(nfsstatsv1_p)->attrcache_hits; nfsstatsov1.attrcache_misses = - nfsstatsv1_p->attrcache_misses; + NFSD_VNET(nfsstatsv1_p)->attrcache_misses; nfsstatsov1.lookupcache_hits = - nfsstatsv1_p->lookupcache_hits; + NFSD_VNET(nfsstatsv1_p)->lookupcache_hits; nfsstatsov1.lookupcache_misses = - nfsstatsv1_p->lookupcache_misses; + NFSD_VNET(nfsstatsv1_p)->lookupcache_misses; nfsstatsov1.direofcache_hits = - nfsstatsv1_p->direofcache_hits; + NFSD_VNET(nfsstatsv1_p)->direofcache_hits; nfsstatsov1.direofcache_misses = - nfsstatsv1_p->direofcache_misses; + NFSD_VNET(nfsstatsv1_p)->direofcache_misses; nfsstatsov1.accesscache_hits = - nfsstatsv1_p->accesscache_hits; + NFSD_VNET(nfsstatsv1_p)->accesscache_hits; nfsstatsov1.accesscache_misses = - nfsstatsv1_p->accesscache_misses; + NFSD_VNET(nfsstatsv1_p)->accesscache_misses; nfsstatsov1.biocache_reads = - nfsstatsv1_p->biocache_reads; + NFSD_VNET(nfsstatsv1_p)->biocache_reads; nfsstatsov1.read_bios = - nfsstatsv1_p->read_bios; + NFSD_VNET(nfsstatsv1_p)->read_bios; nfsstatsov1.read_physios = - nfsstatsv1_p->read_physios; + NFSD_VNET(nfsstatsv1_p)->read_physios; nfsstatsov1.biocache_writes = - nfsstatsv1_p->biocache_writes; + NFSD_VNET(nfsstatsv1_p)->biocache_writes; nfsstatsov1.write_bios = - nfsstatsv1_p->write_bios; + NFSD_VNET(nfsstatsv1_p)->write_bios; nfsstatsov1.write_physios = - nfsstatsv1_p->write_physios; + NFSD_VNET(nfsstatsv1_p)->write_physios; nfsstatsov1.biocache_readlinks = - nfsstatsv1_p->biocache_readlinks; + NFSD_VNET(nfsstatsv1_p)->biocache_readlinks; nfsstatsov1.readlink_bios = - nfsstatsv1_p->readlink_bios; + NFSD_VNET(nfsstatsv1_p)->readlink_bios; nfsstatsov1.biocache_readdirs = - nfsstatsv1_p->biocache_readdirs; + NFSD_VNET(nfsstatsv1_p)->biocache_readdirs; nfsstatsov1.readdir_bios = - nfsstatsv1_p->readdir_bios; + NFSD_VNET(nfsstatsv1_p)->readdir_bios; for (i = 0; i < NFSV42_OLDNPROCS; i++) nfsstatsov1.rpccnt[i] = - nfsstatsv1_p->rpccnt[i]; + NFSD_VNET(nfsstatsv1_p)->rpccnt[i]; nfsstatsov1.rpcretries = - nfsstatsv1_p->rpcretries; + NFSD_VNET(nfsstatsv1_p)->rpcretries; for (i = 0; i < NFSV42_PURENOPS; i++) nfsstatsov1.srvrpccnt[i] = - nfsstatsv1_p->srvrpccnt[i]; + NFSD_VNET(nfsstatsv1_p)->srvrpccnt[i]; for (i = NFSV42_NOPS, j = NFSV42_PURENOPS; i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) nfsstatsov1.srvrpccnt[j] = - nfsstatsv1_p->srvrpccnt[i]; + NFSD_VNET(nfsstatsv1_p)->srvrpccnt[i]; nfsstatsov1.reserved_0 = 0; nfsstatsov1.reserved_1 = 0; nfsstatsov1.rpcrequests = - nfsstatsv1_p->rpcrequests; + NFSD_VNET(nfsstatsv1_p)->rpcrequests; nfsstatsov1.rpctimeouts = - nfsstatsv1_p->rpctimeouts; + NFSD_VNET(nfsstatsv1_p)->rpctimeouts; nfsstatsov1.rpcunexpected = - nfsstatsv1_p->rpcunexpected; + NFSD_VNET(nfsstatsv1_p)->rpcunexpected; nfsstatsov1.rpcinvalid = - nfsstatsv1_p->rpcinvalid; + NFSD_VNET(nfsstatsv1_p)->rpcinvalid; nfsstatsov1.srvcache_inproghits = - nfsstatsv1_p->srvcache_inproghits; + NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits; nfsstatsov1.reserved_2 = 0; nfsstatsov1.srvcache_nonidemdonehits = - nfsstatsv1_p->srvcache_nonidemdonehits; + NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits; nfsstatsov1.srvcache_misses = - nfsstatsv1_p->srvcache_misses; + NFSD_VNET(nfsstatsv1_p)->srvcache_misses; nfsstatsov1.srvcache_tcppeak = - nfsstatsv1_p->srvcache_tcppeak; + NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak; nfsstatsov1.srvcache_size = - nfsstatsv1_p->srvcache_size; + NFSD_VNET(nfsstatsv1_p)->srvcache_size; nfsstatsov1.srvclients = - nfsstatsv1_p->srvclients; + NFSD_VNET(nfsstatsv1_p)->srvclients; nfsstatsov1.srvopenowners = - nfsstatsv1_p->srvopenowners; + NFSD_VNET(nfsstatsv1_p)->srvopenowners; nfsstatsov1.srvopens = - nfsstatsv1_p->srvopens; + NFSD_VNET(nfsstatsv1_p)->srvopens; nfsstatsov1.srvlockowners = - nfsstatsv1_p->srvlockowners; + NFSD_VNET(nfsstatsv1_p)->srvlockowners; nfsstatsov1.srvlocks = - nfsstatsv1_p->srvlocks; + NFSD_VNET(nfsstatsv1_p)->srvlocks; nfsstatsov1.srvdelegates = - nfsstatsv1_p->srvdelegates; + NFSD_VNET(nfsstatsv1_p)->srvdelegates; for (i = 0; i < NFSV42_CBNOPS; i++) nfsstatsov1.cbrpccnt[i] = - nfsstatsv1_p->cbrpccnt[i]; + NFSD_VNET(nfsstatsv1_p)->cbrpccnt[i]; nfsstatsov1.clopenowners = - nfsstatsv1_p->clopenowners; + NFSD_VNET(nfsstatsv1_p)->clopenowners; nfsstatsov1.clopens = - nfsstatsv1_p->clopens; + NFSD_VNET(nfsstatsv1_p)->clopens; nfsstatsov1.cllockowners = - nfsstatsv1_p->cllockowners; + NFSD_VNET(nfsstatsv1_p)->cllockowners; nfsstatsov1.cllocks = - nfsstatsv1_p->cllocks; + NFSD_VNET(nfsstatsv1_p)->cllocks; nfsstatsov1.cldelegates = - nfsstatsv1_p->cldelegates; + NFSD_VNET(nfsstatsv1_p)->cldelegates; nfsstatsov1.cllocalopenowners = - nfsstatsv1_p->cllocalopenowners; + NFSD_VNET(nfsstatsv1_p)->cllocalopenowners; nfsstatsov1.cllocalopens = - nfsstatsv1_p->cllocalopens; + NFSD_VNET(nfsstatsv1_p)->cllocalopens; nfsstatsov1.cllocallockowners = - nfsstatsv1_p->cllocallockowners; + NFSD_VNET(nfsstatsv1_p)->cllocallockowners; nfsstatsov1.cllocallocks = - nfsstatsv1_p->cllocallocks; + NFSD_VNET(nfsstatsv1_p)->cllocallocks; nfsstatsov1.srvstartcnt = - nfsstatsv1_p->srvstartcnt; + NFSD_VNET(nfsstatsv1_p)->srvstartcnt; nfsstatsov1.srvdonecnt = - nfsstatsv1_p->srvdonecnt; + NFSD_VNET(nfsstatsv1_p)->srvdonecnt; for (i = NFSV42_NOPS, j = NFSV42_PURENOPS; i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) { nfsstatsov1.srvbytes[j] = - nfsstatsv1_p->srvbytes[i]; + NFSD_VNET(nfsstatsv1_p)->srvbytes[i]; nfsstatsov1.srvops[j] = - nfsstatsv1_p->srvops[i]; + NFSD_VNET(nfsstatsv1_p)->srvops[i]; nfsstatsov1.srvduration[j] = - nfsstatsv1_p->srvduration[i]; + NFSD_VNET(nfsstatsv1_p)->srvduration[i]; } nfsstatsov1.busyfrom = - nfsstatsv1_p->busyfrom; + NFSD_VNET(nfsstatsv1_p)->busyfrom; nfsstatsov1.busyfrom = - nfsstatsv1_p->busyfrom; + NFSD_VNET(nfsstatsv1_p)->busyfrom; error = copyout(&nfsstatsov1, uap->argp, sizeof(nfsstatsov1)); } else if (nfsstatver.vers != NFSSTATS_V1) error = EPERM; else - error = copyout(&nfsstatsv1, uap->argp, - sizeof(nfsstatsv1)); + error = copyout(NFSD_VNET(nfsstatsv1_p), + uap->argp, sizeof(nfsstatsv1)); } } if (error == 0) { if ((uap->flag & NFSSVC_ZEROCLTSTATS) != 0) { - nfsstatsv1_p->attrcache_hits = 0; - nfsstatsv1_p->attrcache_misses = 0; - nfsstatsv1_p->lookupcache_hits = 0; - nfsstatsv1_p->lookupcache_misses = 0; - nfsstatsv1_p->direofcache_hits = 0; - nfsstatsv1_p->direofcache_misses = 0; - nfsstatsv1_p->accesscache_hits = 0; - nfsstatsv1_p->accesscache_misses = 0; - nfsstatsv1_p->biocache_reads = 0; - nfsstatsv1_p->read_bios = 0; - nfsstatsv1_p->read_physios = 0; - nfsstatsv1_p->biocache_writes = 0; - nfsstatsv1_p->write_bios = 0; - nfsstatsv1_p->write_physios = 0; - nfsstatsv1_p->biocache_readlinks = 0; - nfsstatsv1_p->readlink_bios = 0; - nfsstatsv1_p->biocache_readdirs = 0; - nfsstatsv1_p->readdir_bios = 0; - nfsstatsv1_p->rpcretries = 0; - nfsstatsv1_p->rpcrequests = 0; - nfsstatsv1_p->rpctimeouts = 0; - nfsstatsv1_p->rpcunexpected = 0; - nfsstatsv1_p->rpcinvalid = 0; - bzero(nfsstatsv1_p->rpccnt, - sizeof(nfsstatsv1_p->rpccnt)); + NFSD_VNET(nfsstatsv1_p)->attrcache_hits = 0; + NFSD_VNET(nfsstatsv1_p)->attrcache_misses = 0; + NFSD_VNET(nfsstatsv1_p)->lookupcache_hits = 0; + NFSD_VNET(nfsstatsv1_p)->lookupcache_misses = 0; + NFSD_VNET(nfsstatsv1_p)->direofcache_hits = 0; + NFSD_VNET(nfsstatsv1_p)->direofcache_misses = 0; + NFSD_VNET(nfsstatsv1_p)->accesscache_hits = 0; + NFSD_VNET(nfsstatsv1_p)->accesscache_misses = 0; + NFSD_VNET(nfsstatsv1_p)->biocache_reads = 0; + NFSD_VNET(nfsstatsv1_p)->read_bios = 0; + NFSD_VNET(nfsstatsv1_p)->read_physios = 0; + NFSD_VNET(nfsstatsv1_p)->biocache_writes = 0; + NFSD_VNET(nfsstatsv1_p)->write_bios = 0; + NFSD_VNET(nfsstatsv1_p)->write_physios = 0; + NFSD_VNET(nfsstatsv1_p)->biocache_readlinks = 0; + NFSD_VNET(nfsstatsv1_p)->readlink_bios = 0; + NFSD_VNET(nfsstatsv1_p)->biocache_readdirs = 0; + NFSD_VNET(nfsstatsv1_p)->readdir_bios = 0; + NFSD_VNET(nfsstatsv1_p)->rpcretries = 0; + NFSD_VNET(nfsstatsv1_p)->rpcrequests = 0; + NFSD_VNET(nfsstatsv1_p)->rpctimeouts = 0; + NFSD_VNET(nfsstatsv1_p)->rpcunexpected = 0; + NFSD_VNET(nfsstatsv1_p)->rpcinvalid = 0; + bzero(NFSD_VNET(nfsstatsv1_p)->rpccnt, + sizeof(NFSD_VNET(nfsstatsv1_p)->rpccnt)); } if ((uap->flag & NFSSVC_ZEROSRVSTATS) != 0) { - nfsstatsv1_p->srvcache_inproghits = 0; - nfsstatsv1_p->srvcache_nonidemdonehits = 0; - nfsstatsv1_p->srvcache_misses = 0; - nfsstatsv1_p->srvcache_tcppeak = 0; - bzero(nfsstatsv1_p->srvrpccnt, - sizeof(nfsstatsv1_p->srvrpccnt)); - bzero(nfsstatsv1_p->cbrpccnt, - sizeof(nfsstatsv1_p->cbrpccnt)); + NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits = 0; + NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits = 0; + NFSD_VNET(nfsstatsv1_p)->srvcache_misses = 0; + NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak = 0; + bzero(NFSD_VNET(nfsstatsv1_p)->srvrpccnt, + sizeof(NFSD_VNET(nfsstatsv1_p)->srvrpccnt)); + bzero(NFSD_VNET(nfsstatsv1_p)->cbrpccnt, + sizeof(NFSD_VNET(nfsstatsv1_p)->cbrpccnt)); } } goto out; diff --git a/sys/fs/nfsserver/nfs_nfsdcache.c b/sys/fs/nfsserver/nfs_nfsdcache.c index e94d58481286..2629c795802f 100644 --- a/sys/fs/nfsserver/nfs_nfsdcache.c +++ b/sys/fs/nfsserver/nfs_nfsdcache.c @@ -404,14 +404,14 @@ loop: TAILQ_REMOVE(&NFSD_VNET(nfsrvudplru), rp, rc_lru); TAILQ_INSERT_TAIL(&NFSD_VNET(nfsrvudplru), rp, rc_lru); if (rp->rc_flag & RC_INPROG) { - nfsstatsv1_p->srvcache_inproghits++; + NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits++; mtx_unlock(mutex); ret = RC_DROPIT; } else if (rp->rc_flag & RC_REPSTATUS) { /* * V2 only. */ - nfsstatsv1_p->srvcache_nonidemdonehits++; + NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++; mtx_unlock(mutex); nfsrvd_rephead(nd); *(nd->nd_errp) = rp->rc_status; @@ -419,7 +419,7 @@ loop: rp->rc_timestamp = NFSD_MONOSEC + NFSRVCACHE_UDPTIMEOUT; } else if (rp->rc_flag & RC_REPMBUF) { - nfsstatsv1_p->srvcache_nonidemdonehits++; + NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++; mtx_unlock(mutex); nd->nd_mreq = m_copym(rp->rc_reply, 0, M_COPYALL, M_WAITOK); @@ -434,8 +434,8 @@ loop: goto out; } } - nfsstatsv1_p->srvcache_misses++; - atomic_add_int(&nfsstatsv1_p->srvcache_size, 1); + NFSD_VNET(nfsstatsv1_p)->srvcache_misses++; + atomic_add_int(&NFSD_VNET(nfsstatsv1_p)->srvcache_size, 1); NFSD_VNET(nfsrc_udpcachesize)++; newrp->rc_flag |= RC_INPROG; @@ -489,7 +489,7 @@ nfsrvd_updatecache(struct nfsrv_descript *nd) * Reply from cache is a special case returned by nfsrv_checkseqid(). */ if (nd->nd_repstat == NFSERR_REPLYFROMCACHE) { - nfsstatsv1_p->srvcache_nonidemdonehits++; + NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++; mtx_unlock(mutex); nd->nd_repstat = 0; if (nd->nd_mreq) @@ -529,8 +529,8 @@ nfsrvd_updatecache(struct nfsrv_descript *nd) atomic_add_int(&NFSD_VNET(nfsrc_tcpsavedreplies), 1); if (NFSD_VNET(nfsrc_tcpsavedreplies) > - nfsstatsv1_p->srvcache_tcppeak) - nfsstatsv1_p->srvcache_tcppeak = + NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak) + NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak = NFSD_VNET(nfsrc_tcpsavedreplies); } mtx_unlock(mutex); @@ -688,7 +688,7 @@ tryagain: panic("nfs tcp cache0"); rp->rc_flag |= RC_LOCKED; if (rp->rc_flag & RC_INPROG) { - nfsstatsv1_p->srvcache_inproghits++; + NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -697,7 +697,7 @@ tryagain: /* * V2 only. */ - nfsstatsv1_p->srvcache_nonidemdonehits++; + NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -706,7 +706,7 @@ tryagain: *(nd->nd_errp) = rp->rc_status; rp->rc_timestamp = NFSD_MONOSEC + nfsrc_tcptimeout; } else if (rp->rc_flag & RC_REPMBUF) { - nfsstatsv1_p->srvcache_nonidemdonehits++; + NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -721,8 +721,8 @@ tryagain: free(newrp, M_NFSRVCACHE); goto out; } - nfsstatsv1_p->srvcache_misses++; - atomic_add_int(&nfsstatsv1_p->srvcache_size, 1); + NFSD_VNET(nfsstatsv1_p)->srvcache_misses++; + atomic_add_int(&NFSD_VNET(nfsstatsv1_p)->srvcache_size, 1); /* * For TCP, multiple entries for a key are allowed, so don't @@ -811,7 +811,7 @@ nfsrc_freecache(struct nfsrvcache *rp) atomic_add_int(&NFSD_VNET(nfsrc_tcpsavedreplies), -1); } free(rp, M_NFSRVCACHE); - atomic_add_int(&nfsstatsv1_p->srvcache_size, -1); + atomic_add_int(&NFSD_VNET(nfsstatsv1_p)->srvcache_size, -1); } /* @@ -837,7 +837,7 @@ nfsrvd_cleancache(void) nfsrc_freecache(rp); } } - nfsstatsv1_p->srvcache_size = 0; + NFSD_VNET(nfsstatsv1_p)->srvcache_size = 0; mtx_unlock(&nfsrc_udpmtx); NFSD_VNET(nfsrc_tcpsavedreplies) = 0; } diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 633d31ea6511..3912654515ef 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -1034,7 +1034,7 @@ nfsvno_read(struct vnode *vp, off_t off, int cnt, struct ucred *cred, nh = nfsrv_sequential_heuristic(uiop, vp); ioflag |= nh->nh_seqcount << IO_SEQSHIFT; /* XXX KDM make this more systematic? */ - nfsstatsv1_p->srvbytes[NFSV4OP_READ] += uiop->uio_resid; + NFSD_VNET(nfsstatsv1_p)->srvbytes[NFSV4OP_READ] += uiop->uio_resid; error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred); free(iv, M_TEMP); if (error) { @@ -1159,7 +1159,7 @@ nfsvno_write(struct vnode *vp, off_t off, int retlen, int *stable, nh = nfsrv_sequential_heuristic(uiop, vp); ioflags |= nh->nh_seqcount << IO_SEQSHIFT; /* XXX KDM make this more systematic? */ - nfsstatsv1_p->srvbytes[NFSV4OP_WRITE] += uiop->uio_resid; + NFSD_VNET(nfsstatsv1_p)->srvbytes[NFSV4OP_WRITE] += uiop->uio_resid; error = VOP_WRITE(vp, uiop, ioflags, cred); if (error == 0) nh->nh_nextoff = uiop->uio_offset; diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index 40f3202af93c..6b64b3ff98eb 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -475,15 +475,16 @@ nfsrvd_statstart(int op, struct bintime *now) } mtx_lock(&nfsrvd_statmtx); - if (nfsstatsv1_p->srvstartcnt == nfsstatsv1_p->srvdonecnt) { + if (NFSD_VNET(nfsstatsv1_p)->srvstartcnt == + NFSD_VNET(nfsstatsv1_p)->srvdonecnt) { if (now != NULL) - nfsstatsv1_p->busyfrom = *now; + NFSD_VNET(nfsstatsv1_p)->busyfrom = *now; else - binuptime(&nfsstatsv1_p->busyfrom); + binuptime(&NFSD_VNET(nfsstatsv1_p)->busyfrom); } - nfsstatsv1_p->srvrpccnt[op]++; - nfsstatsv1_p->srvstartcnt++; + NFSD_VNET(nfsstatsv1_p)->srvrpccnt[op]++; + NFSD_VNET(nfsstatsv1_p)->srvstartcnt++; mtx_unlock(&nfsrvd_statmtx); } @@ -506,21 +507,21 @@ nfsrvd_statend(int op, uint64_t bytes, struct bintime *now, mtx_lock(&nfsrvd_statmtx); - nfsstatsv1_p->srvbytes[op] += bytes; - nfsstatsv1_p->srvops[op]++; + NFSD_VNET(nfsstatsv1_p)->srvbytes[op] += bytes; + NFSD_VNET(nfsstatsv1_p)->srvops[op]++; if (then != NULL) { dt = *now; bintime_sub(&dt, then); - bintime_add(&nfsstatsv1_p->srvduration[op], &dt); + bintime_add(&NFSD_VNET(nfsstatsv1_p)->srvduration[op], &dt); } dt = *now; - bintime_sub(&dt, &nfsstatsv1_p->busyfrom); - bintime_add(&nfsstatsv1_p->busytime, &dt); - nfsstatsv1_p->busyfrom = *now; + bintime_sub(&dt, &NFSD_VNET(nfsstatsv1_p)->busyfrom); + bintime_add(&NFSD_VNET(nfsstatsv1_p)->busytime, &dt); + NFSD_VNET(nfsstatsv1_p)->busyfrom = *now; - nfsstatsv1_p->srvdonecnt++; + NFSD_VNET(nfsstatsv1_p)->srvdonecnt++; mtx_unlock(&nfsrvd_statmtx); } diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 7a8527f57068..25fecdf1b2b7 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -363,7 +363,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp, LIST_INIT(&new_clp->lc_stateid[i]); LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, lc_hash); - nfsstatsv1_p->srvclients++; + NFSD_VNET(nfsstatsv1_p)->srvclients++; nfsrv_openpluslock++; nfsrv_clients++; NFSLOCKV4ROOTMUTEX(); @@ -492,7 +492,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp, LIST_INIT(&new_clp->lc_session); LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, lc_hash); - nfsstatsv1_p->srvclients++; + NFSD_VNET(nfsstatsv1_p)->srvclients++; nfsrv_openpluslock++; nfsrv_clients++; NFSLOCKV4ROOTMUTEX(); @@ -557,7 +557,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp, LIST_INIT(&new_clp->lc_session); LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, lc_hash); - nfsstatsv1_p->srvclients++; + NFSD_VNET(nfsstatsv1_p)->srvclients++; nfsrv_openpluslock++; nfsrv_clients++; } @@ -1404,7 +1404,7 @@ nfsrv_zapclient(struct nfsclient *clp, NFSPROC_T *p) free(clp->lc_stateid, M_NFSDCLIENT); free(clp, M_NFSDCLIENT); NFSLOCKSTATE(); - nfsstatsv1_p->srvclients--; + NFSD_VNET(nfsstatsv1_p)->srvclients--; nfsrv_openpluslock--; nfsrv_clients--; NFSUNLOCKSTATE(); @@ -1447,7 +1447,7 @@ nfsrv_freedeleg(struct nfsstate *stp) nfsv4_testlock(&lfp->lf_locallock_lck) == 0) nfsrv_freenfslockfile(lfp); free(stp, M_NFSDSTATE); - nfsstatsv1_p->srvdelegates--; + NFSD_VNET(nfsstatsv1_p)->srvdelegates--; nfsrv_openpluslock--; nfsrv_delegatecnt--; } @@ -1473,7 +1473,7 @@ nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p) if (stp->ls_op) nfsrvd_derefcache(stp->ls_op); free(stp, M_NFSDSTATE); - nfsstatsv1_p->srvopenowners--; + NFSD_VNET(nfsstatsv1_p)->srvopenowners--; nfsrv_openpluslock--; } @@ -1523,7 +1523,7 @@ nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) if (cansleep != 0) NFSUNLOCKSTATE(); free(stp, M_NFSDSTATE); - nfsstatsv1_p->srvopens--; + NFSD_VNET(nfsstatsv1_p)->srvopens--; nfsrv_openpluslock--; return (ret); } @@ -1542,7 +1542,7 @@ nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, if (stp->ls_op) nfsrvd_derefcache(stp->ls_op); free(stp, M_NFSDSTATE); - nfsstatsv1_p->srvlockowners--; + NFSD_VNET(nfsstatsv1_p)->srvlockowners--; nfsrv_openpluslock--; } @@ -1618,7 +1618,7 @@ nfsrv_freenfslock(struct nfslock *lop) if (lop->lo_lckfile.le_prev != NULL) { LIST_REMOVE(lop, lo_lckfile); - nfsstatsv1_p->srvlocks--; + NFSD_VNET(nfsstatsv1_p)->srvlocks--; nfsrv_openpluslock--; } LIST_REMOVE(lop, lo_lckowner); @@ -2395,7 +2395,7 @@ tryagain: LIST_INSERT_HEAD(&stp->ls_open, new_stp, ls_list); *new_lopp = NULL; *new_stpp = NULL; - nfsstatsv1_p->srvlockowners++; + NFSD_VNET(nfsstatsv1_p)->srvlockowners++; nfsrv_openpluslock++; } if (filestruct_locked != 0) { @@ -3047,12 +3047,12 @@ tryagain: LIST_INSERT_HEAD(&new_stp->ls_open, new_open, ls_list); LIST_INSERT_HEAD(&clp->lc_open, new_stp, ls_list); *new_stpp = NULL; - nfsstatsv1_p->srvopenowners++; + NFSD_VNET(nfsstatsv1_p)->srvopenowners++; nfsrv_openpluslock++; } openstp = new_open; new_open = NULL; - nfsstatsv1_p->srvopens++; + NFSD_VNET(nfsstatsv1_p)->srvopens++; nfsrv_openpluslock++; break; } @@ -3113,7 +3113,7 @@ tryagain: NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt) || !NFSVNO_DELEGOK(vp)) *rflagsp |= NFSV4OPEN_RECALL; - nfsstatsv1_p->srvdelegates++; + NFSD_VNET(nfsstatsv1_p)->srvdelegates++; nfsrv_openpluslock++; nfsrv_delegatecnt++; @@ -3153,12 +3153,12 @@ tryagain: LIST_INSERT_HEAD(&new_stp->ls_open, new_open, ls_list); LIST_INSERT_HEAD(&clp->lc_open, new_stp, ls_list); *new_stpp = NULL; - nfsstatsv1_p->srvopenowners++; + NFSD_VNET(nfsstatsv1_p)->srvopenowners++; nfsrv_openpluslock++; } openstp = new_open; new_open = NULL; - nfsstatsv1_p->srvopens++; + NFSD_VNET(nfsstatsv1_p)->srvopens++; nfsrv_openpluslock++; } else { error = NFSERR_RECLAIMCONFLICT; @@ -3230,7 +3230,7 @@ tryagain: new_deleg->ls_stateid), new_deleg, ls_hash); LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, ls_list); new_deleg = NULL; - nfsstatsv1_p->srvdelegates++; + NFSD_VNET(nfsstatsv1_p)->srvdelegates++; nfsrv_openpluslock++; nfsrv_delegatecnt++; } @@ -3252,7 +3252,7 @@ tryagain: new_open, ls_hash); openstp = new_open; new_open = NULL; - nfsstatsv1_p->srvopens++; + NFSD_VNET(nfsstatsv1_p)->srvopens++; nfsrv_openpluslock++; /* @@ -3300,7 +3300,7 @@ tryagain: new_deleg->ls_stateid), new_deleg, ls_hash); LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, ls_list); new_deleg = NULL; - nfsstatsv1_p->srvdelegates++; + NFSD_VNET(nfsstatsv1_p)->srvdelegates++; nfsrv_openpluslock++; nfsrv_delegatecnt++; } @@ -3381,7 +3381,7 @@ tryagain: LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, ls_list); new_deleg = NULL; - nfsstatsv1_p->srvdelegates++; + NFSD_VNET(nfsstatsv1_p)->srvdelegates++; nfsrv_openpluslock++; nfsrv_delegatecnt++; } @@ -3409,9 +3409,9 @@ tryagain: openstp = new_open; new_open = NULL; *new_stpp = NULL; - nfsstatsv1_p->srvopens++; + NFSD_VNET(nfsstatsv1_p)->srvopens++; nfsrv_openpluslock++; - nfsstatsv1_p->srvopenowners++; + NFSD_VNET(nfsstatsv1_p)->srvopenowners++; nfsrv_openpluslock++; } if (!error) { @@ -3887,7 +3887,7 @@ nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop, else LIST_INSERT_AFTER(insert_lop, new_lop, lo_lckowner); if (stp != NULL) { - nfsstatsv1_p->srvlocks++; + NFSD_VNET(nfsstatsv1_p)->srvlocks++; nfsrv_openpluslock++; } } @@ -7455,7 +7455,7 @@ nfsrv_addlayout(struct nfsrv_descript *nd, struct nfslayout **lypp, /* Insert the new layout in the lists. */ *lypp = NULL; atomic_add_int(&nfsrv_layoutcnt, 1); - nfsstatsv1_p->srvlayouts++; + NFSD_VNET(nfsstatsv1_p)->srvlayouts++; NFSBCOPY(lyp->lay_xdr, layp, lyp->lay_layoutlen); *layoutlenp = lyp->lay_layoutlen; TAILQ_INSERT_HEAD(&lhyp->list, lyp, lay_list); @@ -7548,7 +7548,7 @@ nfsrv_freelayout(struct nfslayouthead *lhp, struct nfslayout *lyp) NFSD_DEBUG(4, "Freelayout=%p\n", lyp); atomic_add_int(&nfsrv_layoutcnt, -1); - nfsstatsv1_p->srvlayouts--; + NFSD_VNET(nfsstatsv1_p)->srvlayouts--; TAILQ_REMOVE(lhp, lyp, lay_list); free(lyp, M_NFSDSTATE); } From nobody Thu Feb 16 02:23:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHJdR4FGkz3rvyl; Thu, 16 Feb 2023 02:23: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 4PHJdR2Jgyz4H0R; Thu, 16 Feb 2023 02:23:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676514187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Zn4U+gj2df5y8wE1Ok93E85+rilgIJh+sfT9w8PEVM=; b=Cgu/7z+TILvlELvRMkJu87rNzPCKGZSMC3rUEVrwDTbwsiJLjlze/KonXkgfVVUiRPCW8W vV8Pi6CbCjvzQic7zNRonXckm+SJnkFh62wvG31hE6JIKIjFHCczvvS5bddRiotIocdQLc pFjjsCf7QpUhOED1Xq4dhV6vBOwF0QM4jO0efl+LC7Jq5YPQsfauSi+1lVxuiXXv+QRH2T 7aBZ4VHb7wpbMwzoHKglbo0gW+OdA719e+5w05NFdsaNT3VrhzDCUT/lOLAR7OzIh9ZfMW jO2hZmBsH5x6CCx6orKX6R5GrhCGeuU+P4XdMHIs8aZT0EIdX3w2oGNUrNm7Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676514187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Zn4U+gj2df5y8wE1Ok93E85+rilgIJh+sfT9w8PEVM=; b=CWOxPqjFHU4CPE+ZvNhHVeeo5aX+M1LuNzH2QPhlpntmqzG6pqNkKy1ogcN/ca+hQnJ6QG VWdgy//fhyOFXOvVdj3sVUaqwCmfwQwSA/aRaADrb7dwMsjny8iHtJ3C0YdSY5qd+A7sjn /UkQhEq/16vHOB5LDD9stMibIyB5pCIHVGKh6pA2C9uTaeUBc6I4EXRFh6PkauXcFvvP/d n9ddLgmPfONDMWmB/gjxnc+vfrb545FcQsJW9e5xRyWKvrWvAOC0kQ04hmSlxHBfaPecDF d2UGCj25e5i7xyYwGv1hfDJ/WZYp+aXVC7RrtYUBxMbl7GPo726OY8zEaGYG1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676514187; a=rsa-sha256; cv=none; b=FnQbnSUmPCWFf+wTieH0GUaflS27S1qDoQPAuDQdFVZtqmGviC6QXgRO1xVUbK3FbeDzqQ +I9yyCPPJWsfRLd6m63lZc7Xc8Y9X0v/wW/diTb4IK73WAEIbuzSTWc/xk9dThB62KitbG jWAEwUrYVHaL9jBA+0sJZx6FxVotXpggHZ75lJrT9do5EqYu1oaPW5u4oJ3PI0632DKICt VuCIa/wpRTJx1iuYReCegKFYdA/Mgs5CurF7UA91wXPaLgh4+l3nZedU2vVJiJAt8OKDqH y+De7+JmoTUC0eMBCF0dSgY4meFPY2xj5g6TgGhrDg+zj4baH6iMPsxPMBc4qQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHJdR1NWcznJD; Thu, 16 Feb 2023 02:23: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 31G2N7Lr042527; Thu, 16 Feb 2023 02:23:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G2N7Wl042526; Thu, 16 Feb 2023 02:23:07 GMT (envelope-from git) Date: Thu, 16 Feb 2023 02:23:07 GMT Message-Id: <202302160223.31G2N7Wl042526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: David Bright Subject: git: b086426bc210 - main - hyperv: Fix Coverity issues in the Hyper-V driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dab X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b086426bc210ea567422b7bedaa637f345ad2d7d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dab: URL: https://cgit.FreeBSD.org/src/commit/?id=b086426bc210ea567422b7bedaa637f345ad2d7d commit b086426bc210ea567422b7bedaa637f345ad2d7d Author: Robert Herndon AuthorDate: 2023-02-12 05:09:20 +0000 Commit: David Bright CommitDate: 2023-02-16 00:24:45 +0000 hyperv: Fix Coverity issues in the Hyper-V driver Summary: Coverity reports the use of two uninitialized variables in the hyperv driver. Examination shows the variables can be accessed while uninitialized in error cases. Fix both. CID: 1365235 CID: 1365236 Sponsored by: Dell Technologies MFC after: 1w Test Plan: Changes in use at $WORK Reviewers: robert.herndon_dell.com, vangyzen, bret_ketchum_dell.com Subscribers: imp, badger Differential Revision: https://reviews.freebsd.org/D38551 --- sys/dev/hyperv/utilities/vmbus_ic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/hyperv/utilities/vmbus_ic.c b/sys/dev/hyperv/utilities/vmbus_ic.c index 574670053918..f21a0242a44d 100644 --- a/sys/dev/hyperv/utilities/vmbus_ic.c +++ b/sys/dev/hyperv/utilities/vmbus_ic.c @@ -59,6 +59,9 @@ vmbus_ic_negomsg(struct vmbus_ic_softc *sc, void *data, int *dlen0, uint32_t sel_fw_ver, sel_msg_ver; bool has_fw_ver, has_msg_ver; + has_fw_ver = false; + has_msg_ver = false; + /* * Preliminary message verification. */ @@ -92,7 +95,6 @@ vmbus_ic_negomsg(struct vmbus_ic_softc *sc, void *data, int *dlen0, /* * Find the best match framework version. */ - has_fw_ver = false; for (i = 0; i < nego->ic_fwver_cnt; ++i) { if (VMBUS_ICVER_LE(nego->ic_ver[i], fw_ver)) { if (!has_fw_ver) { @@ -111,9 +113,8 @@ vmbus_ic_negomsg(struct vmbus_ic_softc *sc, void *data, int *dlen0, } /* - * Fine the best match message version. + * Find the best match message version. */ - has_msg_ver = false; for (i = nego->ic_fwver_cnt; i < nego->ic_fwver_cnt + nego->ic_msgver_cnt; ++i) { if (VMBUS_ICVER_LE(nego->ic_ver[i], msg_ver)) { From nobody Thu Feb 16 03:34:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/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 07:15:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHR6P1lsYz3pGbK; Thu, 16 Feb 2023 07:15:09 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher 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 "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHR6N2tQzz3DhC; Thu, 16 Feb 2023 07:15:08 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1676531705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lBeg3bRGOBPQJ33XTpCK/pt/ZEZZQQFl+ecnpBjs+tc=; b=WdMK31hkcvoBdlfrwaY45qxXJOEP3Kx1FiSnwIL7j/KUd3e4aXWZ9X+lqqjnsHgIm76mud evBXv7uu+yrM5iIU7+y9RNwJEzJRVJ5Iv2dExAKS/ZsmhXfiLla8lbJLaW0x7gUEJw6W1W KAew7LWZ6TjCQMJWKcFMDgp7/6Jee0o= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 3cc80d8a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 16 Feb 2023 07:15:05 +0000 (UTC) Date: Thu, 16 Feb 2023 08:15:01 +0100 From: Emmanuel Vadot To: Jessica Clarke Cc: =?ISO-8859-1?Q?Jean-S=E9bastien_P=E9dron?= , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: b1a9e570fe2d - main - linuxkpi: Add `strscpy_pad()` to Message-Id: <20230216081501.506e86584558eeb315a9314f@bidouilliste.com> In-Reply-To: References: <202302152226.31FMQQV8093715@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PHR6N2tQzz3DhC X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, 15 Feb 2023 22:27:31 +0000 Jessica Clarke wrote: > On 15 Feb 2023, at 22:26, Jean-S=E9bastien P=E9dron wrote: > >=20 > > The branch main has been updated by dumbbell (ports committer): > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Db1a9e570fe2da0a43c41327d= 7ce21b27bf8257b8 > >=20 > > commit b1a9e570fe2da0a43c41327d7ce21b27bf8257b8 > > Author: Jean-S=E9bastien P=E9dron > > AuthorDate: 2023-02-14 23:46:13 +0000 > > Commit: Jean-S=E9bastien P=E9dron > > CommitDate: 2023-02-15 22:19:41 +0000 > >=20 > > linuxkpi: Add `strscpy_pad()` to > >=20 > > It's the same as `strscpy()` except that it fills the rest of the > > destination buffer with zeroes if the source buffer is shorter. > >=20 > > Reviewed by: manu > > Approved by: manu > > --- > > sys/compat/linuxkpi/common/include/linux/string.h | 9 +++++++++ > > 1 file changed, 9 insertions(+) > >=20 > > diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/co= mpat/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); > > } > >=20 > > +static inline ssize_t > > +strscpy_pad(char* dst, const char* src, size_t len) > > +{ > > + >=20 > style(9) doesn?t need this blank line any more, please stop including > them in your commits. >=20 > Jess style(9) says that it's optional and we have them in a lot of files (including in some of the functions in this file). If you really hate them you should see how to update style(9) to say that we should never include a blank line. Making something optional is perfect to ensure that you will have both ways of doing thing in the code. > > + bzero(dst, len); > > + > > + return (strscpy(dst, src, len)); > > +} > > + > > static inline void * > > memset32(uint32_t *b, uint32_t c, size_t len) > > { >=20 --=20 Emmanuel Vadot From nobody Thu Feb 16 07:30:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHRSG0DyCz3pHcq; Thu, 16 Feb 2023 07:30: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 4PHRSF6vmSz3Gfq; Thu, 16 Feb 2023 07:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676532638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qDdr6QhOt62mlP1aq1K8YtwZkbO23B4EG92C1NSy3UU=; b=D/dRJAcrL/yX9zdvjlIY8j35V245qy5t0IehAzGmfvP7B2SL8Y7l8kcvHYQiqTbxOzhi+0 61eGEPjTnFPc6upLq0aHBWTKL7vfADakgeFP9edyGcAXAXx7s+HlYQO7K//OW5KiWJaLn/ WPbAeX15XcaJIj0+RwuuJp9xTcQMqbWu2ulQgWtbc4kFEYt5e7a9x4Nl6eM9eJ7so5rkB4 jS7HhFyN8sMpG7Raro6MupOSPt04+04pmESsYOe8+Sz0lOI0fdxc2uF92YXbLtEC/iVOJW CN/mhl9jR0hQdiumEF+zoMCSKPd+9kMUMYFyY38UBgSe7zs1/XaoPeXu4RLnnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676532638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qDdr6QhOt62mlP1aq1K8YtwZkbO23B4EG92C1NSy3UU=; b=Z+NJk7lq6e6SSgO698tTA7NHcHYFwURBFb21VLx10jF50qAq72aEa5Dw2HG8WUkgWzHUqq RsWUH64CU31me4rTCSDFLG+ohnoUuR2ynnnbCEQVWzRnyO5aIRC/hwbAC2q7jhf3oxZb7x VFKOaQPWzcW9XD3Acr5il026aofBoJrND5vr5M+5eCPBekE6y1hjqpfhgHdWzYrT60z6bq 1OQXT1T8Wo3U/IpDorToNd/FA+sdM4mnue28Dz1qJMSIz+AiomnIVfANjUeBO5ljFHxj6R Cgd0A3hvSbkbRIkby6dCMjDmrSngcvGXFJnUmsoY9j/WhWnDZRGWY/Ashfzq+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676532638; a=rsa-sha256; cv=none; b=Kvk16qL80u8mE9Xf+jtJKf1xEQMWmTIFLeUAYXFxsV6NsHmokH7bo8/Sjz6qm7Cqs5DRWz vOSdrEqJI6cM0rvDX9TX5io3/pEdp8p/fuEDpV7auRjmQRk53B0LOkFTs68Eqb56Dj92VN CtwkXhjiQRsDvEk8NB8bn5BtMkh02NUwWWvh49BSlV4rwOJsvHdQ5tYmio04lpdOQnKcSs vCEV+jB8hN/fkptuZDCYu5pFDWwJ/8eOQlv64e6GfebI/K8lWBZgReDgT7N21MVtl676Eb qXS72fs6pFIh90uHJPHpM7cjom3s/ibQlLnoUMJ5R4QHaY2LyVms3C9u6NR8mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHRSF5yPmzw4h; Thu, 16 Feb 2023 07:30: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 31G7Ubnc082244; Thu, 16 Feb 2023 07:30:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G7Ubpr082243; Thu, 16 Feb 2023 07:30:37 GMT (envelope-from git) Date: Thu, 16 Feb 2023 07:30:37 GMT Message-Id: <202302160730.31G7Ubpr082243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 6b9acd1bfba7 - main - Exclude MMCCAM kernels from make universe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b9acd1bfba70c96ac89817fcf8d221d2387be60 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6b9acd1bfba70c96ac89817fcf8d221d2387be60 commit 6b9acd1bfba70c96ac89817fcf8d221d2387be60 Author: Mateusz Guzik AuthorDate: 2023-02-08 22:02:16 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-16 07:29:53 +0000 Exclude MMCCAM kernels from make universe They don't provide any value and are quite arbitrary. Note arm64 GENERIC-MMCCAM was already excluded, just not the NODEBUG variant. The option is already build-tested with arm64 LINT kernel. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D38458 --- sys/amd64/conf/GENERIC-MMCCAM | 2 ++ sys/arm/conf/GENERIC-MMCCAM | 2 ++ sys/arm64/conf/GENERIC-MMCCAM-NODEBUG | 2 ++ 3 files changed, 6 insertions(+) diff --git a/sys/amd64/conf/GENERIC-MMCCAM b/sys/amd64/conf/GENERIC-MMCCAM index 8a5bc7175d68..0aa7a7da1072 100644 --- a/sys/amd64/conf/GENERIC-MMCCAM +++ b/sys/amd64/conf/GENERIC-MMCCAM @@ -2,6 +2,8 @@ # and testing on bhyve # $FreeBSD$ +#NO_UNIVERSE + include MINIMAL ident GENERIC-MMCCAM diff --git a/sys/arm/conf/GENERIC-MMCCAM b/sys/arm/conf/GENERIC-MMCCAM index 20ca990d1c3e..0e36756d2241 100644 --- a/sys/arm/conf/GENERIC-MMCCAM +++ b/sys/arm/conf/GENERIC-MMCCAM @@ -5,6 +5,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + include GENERIC ident GENERIC-MMCCAM diff --git a/sys/arm64/conf/GENERIC-MMCCAM-NODEBUG b/sys/arm64/conf/GENERIC-MMCCAM-NODEBUG index 803b5fd25416..319f31984dd2 100644 --- a/sys/arm64/conf/GENERIC-MMCCAM-NODEBUG +++ b/sys/arm64/conf/GENERIC-MMCCAM-NODEBUG @@ -7,6 +7,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + include GENERIC-MMCCAM include "../../conf/std.nodebug" From nobody Thu Feb 16 07:33:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHRX62Z8hz3pJ6B; Thu, 16 Feb 2023 07:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHRX61vbcz3Gyq; Thu, 16 Feb 2023 07:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676532838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lwgg6vJJMuJg43LWSg/aQjcXmDetQO9ScrojyUUCE6U=; b=QTwXrtXzq+g0TgXzZPGPKMmCw1CWALRov2mFpNqFMWhMSX9AHd0ZRf4qk2cKbQ74pFqSH9 I6pJNnpyS8SQ3rY/T0ZkvfFlJKIOai4Q1oV3MYniu1LoEwrzlalM5qQ0RzdiJgmNbc+kdx tfC6V2XsoFHbE9JTb8GNDCrvKDu8pMKflBqY2zoDAOTYX3hXVN0gyUKt8J0bQyOPa9Khlq yGVg5kykInB9movM9k5l2bKch4ZFW/+L/ljr4K8UpY26iq9TUwhdWxurqC3R6n9YbzhqG/ aY/ZfaRJXA2sPEgUR5B0Aop8wsl9rALwJrBXGWwgrMdeDgMXOl4Ya1Aoi/NjRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676532838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lwgg6vJJMuJg43LWSg/aQjcXmDetQO9ScrojyUUCE6U=; b=FyN1VIvhcLyVLy96XWUOCNVVMDH+2iY0EHokQNVX4aGra5Rk92D751K+6Z0j0jCALKKjp/ HzXYhnjw86ra3/tex/elAOa85A9ZBaTUhmMf9ZV1Dzf/XdsqEh4fFd3/ekSXXNewC7BeBd VjlczCp08qavasaxhhluRFr0ledAlafzmfc7y6AqeJxF//JcLXz7Fsq+qBBelrtJ4LBl8t xyfackXarxd16oqrnxN8CyD0MGy6dkjmj8nmqck1AfJHmh+lFK1hAoGKDRqbWx96Huo3OQ fQdfWp6VchN+h822rQk5lZ0e2UMh2C4qQjeKrcM6tBJRqB89M3s8PXD7f0gdWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676532838; a=rsa-sha256; cv=none; b=muEaNMjpoDsMASpYlO488fO/1w3bPdFgT3LtnRHAK9jS5kGHClilRIqNO0EHGzQA82ddtM 0MMuRgqK9ehrtTkrZnCuldpfDsu7Is9HbDBKrOKAXyEPpTj4Eg2nhf3evUm2Jkwre0LxoH trYiNEGJFYONztStYe2mpWEp0oPLLKpE+7Nbu/7Fu8j+QgkQ7XQbqkdDdx/8gRkVyo+tqs hPYWC8E1+6uDifF59zkBvnW+M8n31gvSInSHG7mS9BGHH5tzdbppViokl9PeebvMTmrWmy uRXsqtwO7zeCQAOwq+jVdn5SOwXrLv+xql4BEVsd8uNRIRwSQyfGgzYEqo9lyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHRX60zhDzwPr; Thu, 16 Feb 2023 07:33: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 31G7Xwca084575; Thu, 16 Feb 2023 07:33:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G7Xww1084574; Thu, 16 Feb 2023 07:33:58 GMT (envelope-from git) Date: Thu, 16 Feb 2023 07:33:58 GMT Message-Id: <202302160733.31G7Xww1084574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 889a9acc5475 - main - ipsec: only update lastused when it changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 889a9acc54758922b3529ea473a2dac159d85fd5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=889a9acc54758922b3529ea473a2dac159d85fd5 commit 889a9acc54758922b3529ea473a2dac159d85fd5 Author: Mateusz Guzik AuthorDate: 2023-02-08 09:53:05 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-16 07:33:51 +0000 ipsec: only update lastused when it changes to limit cache-line bouncing. Note that as there is no atomic_store we are hoping the compiler wont speculatively do the store. It is not employed because the size depends on target arch. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D38433 --- sys/netipsec/key.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 345c302c2a80..62aa99019437 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -917,6 +917,7 @@ key_allocsp(struct secpolicyindex *spidx, u_int dir) struct spdcache_entry *entry, *lastentry, *tmpentry; struct secpolicy *sp; uint32_t hashv; + time_t ts; int nb_entries; if (!SPDCACHE_ACTIVE()) { @@ -969,7 +970,9 @@ key_allocsp(struct secpolicyindex *spidx, u_int dir) out: if (sp != NULL) { /* found a SPD entry */ - sp->lastused = time_second; + ts = time_second; + if (__predict_false(sp->lastused != ts)) + sp->lastused = ts; KEYDBG(IPSEC_STAMP, printf("%s: return SP(%p)\n", __func__, sp)); KEYDBG(IPSEC_DATA, kdebug_secpolicy(sp)); From nobody Thu Feb 16 08:26:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHShc2k1vz3pLwx; Thu, 16 Feb 2023 08:26:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHShc2DlLz3NG5; Thu, 16 Feb 2023 08:26:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676535984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzIOO+xNeZz7Ap3Ey6KETUDWIU6hNvs8LXeIXbW3Z3I=; b=utbhegPCVAxwi94FWNsCNtgQKujoyC0ltSzOrT3raaMy9Mt8gT6VeMRg2Ns1gFMcDdsrAt AcPDzqUtQjbsPQ3izPc8v66xNYYwhpBiR0Vw2+/Bn9DNFGGwddtFeIsQPmZgN6Y+PzmQne +sBOpNZF5mB+KY8lfk7LcuH9ORy5yXKGEXAVASqekFWrURgDP45zuHBrX/L8ZBV0lKpZ9i de44UOBxuHsY6qPo9ID+WH0kkN1D2o3wgTATSELvO91NSF55DSFbXDglILkn0bzlKqiaxe hXDjn4NvNjeD0Wq0c0a3ceFMoD6QCQ9ifALQTR0D7XioT60Y0xYKuy1nOoO2mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676535984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzIOO+xNeZz7Ap3Ey6KETUDWIU6hNvs8LXeIXbW3Z3I=; b=DH082i0/oHq/ueXXx2kO9pQyAg96vfMekczcdQmkkiUQaLnFA6j5ZXNtoZ+dLI4VcbVFwV VcbIs5xoMF4f66SVHi8UDgYS6vZwfyjHkq78VhMVsMCMKKhk1PFlc20WWUv6mkJss5HFq4 NHkhbsIW+P9VSxxn5I6Mx2laBCSvUysShIjsai0MatCRIlFhbmby5sdyNcVUXztI0i5knc pfdt030UZt5891OR7yeqJzz5txj/zis6NtU040mBoRIfgL8Mv+D5j6MrYO/N3Bi/ir18KY YgdvQtvBmJs0EjHpqZkKk0O7mU9kbUHWtf2G7kRvyiwuD4Ygu0PhTQKzubD77A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676535984; a=rsa-sha256; cv=none; b=mnGiHd9Cif/edbcBbnFFmZqmB/gFANRa14t6NtUhrWmgYoTv+S+9RKoD2Kue4znMeRJTip 3YAKqXOdT++UpUIIps5SNV4KxwQywmtN/Rat+J3VCyRAiVfONsOVVPpGVKW3RhGHVmGf72 tVrdaOjd6ugUo3aRb+3+WuCfjufVBkugtIGOqUNVZHxZaKXmbTZFpPXfsVWyMPMC/7J6HE Ruq+B08T8HYXj4dTu3WCeHf/GtzssDxGlA69+O24iIqkM8lU84TL0ozUFjeBTDxZah87/G HTHtIt/gqHW7KVSV0VvXUnmGNkHxjlB3pkxQcvmeE5QZmu0mZsdKQP7Z1TG8KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHShc1J3VzxGy; Thu, 16 Feb 2023 08:26: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 31G8QOsn055941; Thu, 16 Feb 2023 08:26:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G8QO3c055940; Thu, 16 Feb 2023 08:26:24 GMT (envelope-from git) Date: Thu, 16 Feb 2023 08:26:24 GMT Message-Id: <202302160826.31G8QO3c055940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 9a1cab6d79b7 - main - pfsync: support deferring IPv6 packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a1cab6d79b7286e5f650f57ed95625e6ddb8e4b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9a1cab6d79b7286e5f650f57ed95625e6ddb8e4b commit 9a1cab6d79b7286e5f650f57ed95625e6ddb8e4b Author: Kristof Provost AuthorDate: 2023-02-14 06:11:38 +0000 Commit: Kristof Provost CommitDate: 2023-02-16 06:43:04 +0000 pfsync: support deferring IPv6 packets When we send out a deferred packet we must make sure to call ip6_output() for IPv6 packets. If not we might end up attempting to ip_fragment() an IPv6 packet, which could lead to us reading outside of the mbuf. PR: 268246 Reviewed by: melifaro, zlei MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38586 --- sys/netpfil/pf/if_pfsync.c | 91 +++++++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 33 deletions(-) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 2301dc475e27..1c8d8d325346 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -103,9 +103,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include struct pfsync_bucket; +struct pfsync_softc; union inet_template { struct ip ipv4; @@ -171,6 +175,7 @@ static void pfsync_q_ins(struct pf_kstate *, int, bool); static void pfsync_q_del(struct pf_kstate *, bool, struct pfsync_bucket *); static void pfsync_update_state(struct pf_kstate *); +static void pfsync_tx(struct pfsync_softc *, struct mbuf *); struct pfsync_upd_req_item { TAILQ_ENTRY(pfsync_upd_req_item) ur_entry; @@ -187,8 +192,6 @@ struct pfsync_deferral { struct mbuf *pd_m; }; -struct pfsync_sofct; - struct pfsync_bucket { int b_id; @@ -1837,13 +1840,7 @@ pfsync_defer_tmo(void *arg) free(pd, M_PFSYNC); PFSYNC_BUCKET_UNLOCK(b); - switch (sc->sc_sync_peer.ss_family) { -#ifdef INET - case AF_INET: - ip_output(m, NULL, NULL, 0, NULL, NULL); - break; -#endif - } + pfsync_tx(sc, m); pf_release_state(st); @@ -2326,6 +2323,56 @@ pfsync_push_all(struct pfsync_softc *sc) } } +static void +pfsync_tx(struct pfsync_softc *sc, struct mbuf *m) +{ + struct ip *ip; + int error, af; + + ip = mtod(m, struct ip *); + MPASS(ip->ip_v == IPVERSION || ip->ip_v == (IPV6_VERSION >> 4)); + + af = ip->ip_v == IPVERSION ? AF_INET : AF_INET6; + + /* + * We distinguish between a deferral packet and our + * own pfsync packet based on M_SKIP_FIREWALL + * flag. This is XXX. + */ + switch (af) { +#ifdef INET + case AF_INET: + if (m->m_flags & M_SKIP_FIREWALL) { + error = ip_output(m, NULL, NULL, 0, + NULL, NULL); + } else { + error = ip_output(m, NULL, NULL, + IP_RAWOUTPUT, &sc->sc_imo, NULL); + } + break; +#endif +#ifdef INET6 + case AF_INET6: + if (m->m_flags & M_SKIP_FIREWALL) { + error = ip6_output(m, NULL, NULL, 0, + NULL, NULL, NULL); + } else { + MPASS(false); + /* We don't support pfsync over IPv6. */ + /*error = ip6_output(m, NULL, NULL, + IP_RAWOUTPUT, &sc->sc_imo6, NULL);*/ + } + break; +#endif + } + + if (error == 0) + V_pfsyncstats.pfsyncs_opackets++; + else + V_pfsyncstats.pfsyncs_oerrors++; + +} + static void pfsyncintr(void *arg) { @@ -2333,7 +2380,7 @@ pfsyncintr(void *arg) struct pfsync_softc *sc = arg; struct pfsync_bucket *b; struct mbuf *m, *n; - int c, error; + int c; NET_EPOCH_ENTER(et); CURVNET_SET(sc->sc_ifp->if_vnet); @@ -2353,29 +2400,7 @@ pfsyncintr(void *arg) n = m->m_nextpkt; m->m_nextpkt = NULL; - /* - * We distinguish between a deferral packet and our - * own pfsync packet based on M_SKIP_FIREWALL - * flag. This is XXX. - */ - switch (sc->sc_sync_peer.ss_family) { -#ifdef INET - case AF_INET: - if (m->m_flags & M_SKIP_FIREWALL) { - error = ip_output(m, NULL, NULL, 0, - NULL, NULL); - } else { - error = ip_output(m, NULL, NULL, - IP_RAWOUTPUT, &sc->sc_imo, NULL); - } - break; -#endif - } - - if (error == 0) - V_pfsyncstats.pfsyncs_opackets++; - else - V_pfsyncstats.pfsyncs_oerrors++; + pfsync_tx(sc, m); } } CURVNET_RESTORE(); From nobody Thu Feb 16 09:14:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHTmS5Bbhz3pvSh for ; Thu, 16 Feb 2023 09:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHTmS4hJdz3p66; Thu, 16 Feb 2023 09:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676538888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CE+SaOPdESPDhN0Yopsb1TVa8FhkOtdoAD/TpcZs3qo=; b=sVkx19eoD2W9DQV7DdjyGlf1G1dSToInq55WuBDA9rD/6+qg3CYMSQfQA2SbXFhGb3VcEf fvm7nS7ImNLl+QkoYuWp+Uulrk5JsRdqkQtPLTDc13+WwzLgXtTYQULfOUm74iWa8Gqm46 0KMbvoWD6IESM+z/HgPZkO9Gnzbq9UszjJELbSzcyimnIfy3Hz9v8DBQbX4yLhJoZi3O21 TVaAbAlb6QrWIM7D58dFIyaFgIapMnJJ5c0ufdOI5JzM+IWAqBeD2xgus1+T7Mo6u4oFWg hhDctHYZCiYoH/yiJHhgVYFdy3a6/rZyarIgzd6K2fFJqKNt+lhxVhbln1JUdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676538888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CE+SaOPdESPDhN0Yopsb1TVa8FhkOtdoAD/TpcZs3qo=; b=bMIzRjH+qhoC2oMpzw1eCM6bnsRDRd/OEXuYCEUHZgMOlnrfaAKY/J+jzkgA6Wl8M9QRnz vfy6pvB9cuBZjXCX+nA0iv+G7VuR2MjVAEXOmMn7WMM86dwEB7v6ldgkYRwmrvycYkrRuN XA3Jevmqz7OZ+RsI0qDhwdgXcFYJvIzGqvVCBCrSSkj0MI7acRezlSkFWmBqKPFjNnm2dU Iem/JM1IznO/Z7wUofXyjWTW4plPFwCd1E2nzg1ugPcc5Uoa2/LkILdquU7DBiK5B0R3sW 6gDfYsZKWezynlWzKvBON2FqBd83fAgQpf+ZI+V/mTCzz+cgX51u+aeO3t8HNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676538888; a=rsa-sha256; cv=none; b=ydmaXpB7c7vm1FvT+wJcsQ2YrmKOc5RAGNGsevNIP7/8gmUKj693/UmYuuTzp43zA+LfhB 5cub9W1/jQ8yaC4599MffXCHWwDS+edxTKvtiRm0JmsdHYPdABbeXqKr+A9F8JeYEvaWKB 3H/2hMv53IGunC6pB9qiXcnu5Cf4X3huN4yqINxPcWckp8fwYqFpIwF1yxsAZucWmqz4l2 WAFlxITqFMgGAg66PmeOyPOcJPJbQsj3mwd2PrxLKY9Wu32ojS9URY3vLGcVR4D1dSRgT8 XGEzd8IaaRHNJYq3jpGjRzNTMGdV/eagxaY7mlMhBHmZE+0kMlWpQl5k2hzC+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 4PHTmS3QYRzyWP; Thu, 16 Feb 2023 09:14: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 31G9Em58027450; Thu, 16 Feb 2023 09:14:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G9EmZL027449; Thu, 16 Feb 2023 09:14:48 GMT (envelope-from git) Date: Thu, 16 Feb 2023 09:14:48 GMT Message-Id: <202302160914.31G9EmZL027449@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Xin LI Subject: git: 7b495a2a7abf..e188971328b0 - vendor/zlib - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/vendor/zlib X-Git-Reftype: branch X-Git-Commit: e188971328b0961d8778882dcf37ebc5dde5ced9 X-Git-Oldrev: 7b495a2a7abf8dfefb59daa3864767057e054b47 X-Git-Newrev: e188971328b0961d8778882dcf37ebc5dde5ced9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/zlib has been updated by delphij: URL: https://cgit.FreeBSD.org/src/log/?id=7b495a2a7abf..e188971328b0 e188971328b0 Vendor import of zlib 1.2.13. From nobody Thu Feb 16 09:14:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHTmS5k8lz3pvH4 for ; Thu, 16 Feb 2023 09:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHTmS5Bsrz3p8p; Thu, 16 Feb 2023 09:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676538888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DRInX6t+UNEB1WJlyWxVZGc7vuD5q4VoRBE8ESeGCUw=; b=lkpoM8W/nPUsLRJi38SP2zXTqYQ+ha27x1XtqcawNhEUrdqy5WadNvTLBOMnZ0D1antcG4 AdKwvcHUNRrFdfP4q+hMe/30Im/AAJ5jD/Q96V93fRiv0gSVY/JqWAC2ehlFL/dRAkIuw5 sTgr0T7W2hqEmuiQ04y+goXbhSMXuxFpmq2PocZfzz+CsQ23hIYQT/JPGhubyN1ZvSprEo +Iq9hKlvuFwebi37J6vIey0d+P/6pcocqSx9qqvXhltfUv2PulASOwLHyfi+4cYhdnLJyL UcF5ruQg4n0nY15ePgOioNf24bvkKjragtHtvkn3H1PSaW9Psu6YhY1DXoJ7jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676538888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DRInX6t+UNEB1WJlyWxVZGc7vuD5q4VoRBE8ESeGCUw=; b=B7hKFmNHPh//y5PQXWwt2/qxtzG6Wp+aUPdUfoRM6vS3BgeWjdAyEG39lyr1ApeX0m2tbm 3vz3HUZPAq4SWB0IlPlkkFlYi6mAjOxra9yub0yWlI7n2XA3Awn0w0ZXgYCVpbiybGbzZw lGKhp27ousGSMw6r8SQR2m0eAZNBR8HNqMAGQChRM16JiAEH3Gkda/ND6jeq4Z6tsbHC03 cJkVzs8tBrOZ5DIcuIWpyzweXVZBnesTZt2gY+BJAexUMF9tQpOAormAt7+KFAvYd3fwv8 ELlFCwBQsNFUA7w7Yk6XLHwFloWh8f4J7WO/9gUEvuov6U0qoVMIzPm0Ws+kBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676538888; a=rsa-sha256; cv=none; b=tlCnW1Dboa+4uQC4cYs71suQS/lPnkQClFGuFvE9AjVRGtiMv2FGYrVKKrbj9kYAadd4BD WJEKqFpq17Ma/3VQLVxrkEbeB1ESaDZw+KfYQHFsjiwoR9vhFpXzE9d8W1Z056PGWk2fpl zcnTBJ8/zg1PJSisd72oFvDSq4HlVumP7nLHT7Uqj4iZ18lATDuNEw4Sx4fnmP2yIp2cbm 4nOPIHJKFwTzMAfliJOe09KJkHSA/LMmQKG1/qnOEFx5ZTsPFliTdjvRj7rCULb0skKWWu VymjwUb952qqmq155lA5ZT9Zbeyf7ZQM8pefb/m5KQkVlSmZ2rpPtRgVzmd9BQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHTmS45Wvzyjd; Thu, 16 Feb 2023 09:14: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 31G9EmPg027474; Thu, 16 Feb 2023 09:14:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G9Emuv027473; Thu, 16 Feb 2023 09:14:48 GMT (envelope-from git) Date: Thu, 16 Feb 2023 09:14:48 GMT Message-Id: <202302160914.31G9Emuv027473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Xin LI Subject: git: e4caf89f7e0c - Create tag vendor/zlib/1.2.13 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/tags/vendor/zlib/1.2.13 X-Git-Reftype: annotated tag X-Git-Commit: e4caf89f7e0c7cb468a435bf5c2825a07b334f40 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/zlib/1.2.13 has been created by delphij: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/zlib/1.2.13 tag vendor/zlib/1.2.13 Tagger: Xin LI TaggerDate: 2023-02-16 09:13:38 +0000 Tag zlib 1.2.13 import. commit e188971328b0961d8778882dcf37ebc5dde5ced9 Author: Xin LI AuthorDate: 2023-02-16 09:12:35 +0000 Commit: Xin LI CommitDate: 2023-02-16 09:12:35 +0000 Vendor import of zlib 1.2.13. From nobody Thu Feb 16 09:19:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHTsL2mlhz3pvHN; Thu, 16 Feb 2023 09:19: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 4PHTsL2GMzz3pvx; Thu, 16 Feb 2023 09:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676539142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cVF6GX+vUsO+IpQGMsnyWDYqxbCI8q0VHMh1qo7Jxlw=; b=GweqY2AbUliq+DnobVcThtSTPJ6Eh9+6zBYxKxs7Vs+KRs+gbz5F0fOs8I+qfc406TQuIk X5Fvuupsmb4kWbTgghcS5CUNB38gFyBXjYMkXUpbklSh8lNe6oono3x2Nu3apnv3H5TTpn 3gZcA6yQ6zsBZZqsMD/73hw7w7aSMqbjD4USFb6NTKtlgfTAU9x7bN2cj0KULk2Zo5Lak+ 0d72NfvWzuxdATJsx/42v2XVwvoa1UoMEAKwc+IUJL8ShDpMzh9oZ4+QA4w5B4pala18qY EDdSNOMMinIiaua36xPnhaIZ9UZA8AoOrlH17Hwm3jVn45urMl2yb0b56/jPCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676539142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cVF6GX+vUsO+IpQGMsnyWDYqxbCI8q0VHMh1qo7Jxlw=; b=TQVrFi9EN2UTLcumhwkDFdRWTxyrjBmhkE/LKZk4hW+piH1VUptmRV9ODGed9OLe9neCsx 2YLVa27wIulh7Jr517EDhVV2/q08I8n4hC9pHu5soc5uDvXxlUsEhNTpB/wnyOZIjcD2nv nku2hR+25bfrso+axETNEQ00NdOv+JTNF3SCI+iG/sPyOBpnlpTtFZeD5EmWgztVbDQaBh agwenqmLtXutrSV7mJUHZt9f6PxPyu5KlnQoezChxnSJlDxISTMC0rBe+s02X93DHb0BXF CxoYqcvd8Y7hXyaqRc/bAnTXZUNcyRGmM8yt9TYXhr5z0o6mC2NrzWiVZx9Z1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676539142; a=rsa-sha256; cv=none; b=OtGOv42oPaJ7gYGZ5hNn5kRO/aNc0VR4lWl5LpnXw2R4zxxJVNawNgLNLYCWGiEKDBSKp2 MwfjaMughl7JaL9Ocn9ePKwPdtE0hPwRUu8Z7cwPCTopFHLuhfIUgT1zqhC6M5gvZ25dHo lz6jWXG81yEPZggYleb+/mGmRdYyffbWTbKpADf+2vKki5Ra4JuZiXevzUiWMecyVmOcKX Y5iW9yIgMJK16RlbyJg3/7Eel0tudG0WWHFlV1r3Zb3IWM1j4Efn1cj2hPLWolIVGtySeJ Sju4PgpmaddBXjAhpTzEcuAsBC0jCPyzLMI6Pe561bCi1MuLEI5f3WIkfNp0YQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHTsL1BMnzygS; Thu, 16 Feb 2023 09:19: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 31G9J2p5028084; Thu, 16 Feb 2023 09:19:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G9J2md028083; Thu, 16 Feb 2023 09:19:02 GMT (envelope-from git) Date: Thu, 16 Feb 2023 09:19:02 GMT Message-Id: <202302160919.31G9J2md028083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f52ca3dfd552 - main - pfsync: ensure 'error' is always initialised List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f52ca3dfd5520332e8cb8d08eda1b92aca2a159c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f52ca3dfd5520332e8cb8d08eda1b92aca2a159c commit f52ca3dfd5520332e8cb8d08eda1b92aca2a159c Author: Kristof Provost AuthorDate: 2023-02-16 08:16:35 +0000 Commit: Kristof Provost CommitDate: 2023-02-16 08:16:35 +0000 pfsync: ensure 'error' is always initialised Reported by: Herbert J. Skuhra MFC after: 2 weeks --- sys/netpfil/pf/if_pfsync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 1c8d8d325346..f1130ba143f1 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -2327,7 +2327,7 @@ static void pfsync_tx(struct pfsync_softc *sc, struct mbuf *m) { struct ip *ip; - int error, af; + int af, error = 0; ip = mtod(m, struct ip *); MPASS(ip->ip_v == IPVERSION || ip->ip_v == (IPV6_VERSION >> 4)); From nobody Thu Feb 16 10:54:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 13:39:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHbfQ60P6z3qSGJ; Thu, 16 Feb 2023 13:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHbfQ5DDCz3PmZ; Thu, 16 Feb 2023 13:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676554798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCb70ACFU72123PFp+gR6zav2SJ3t3YLHezuXfVjJ9Q=; b=rNDZcOtYIZJYvyKvmiXq0ws7i9ng8unIKqyPFYFbjIniIcN5/+0SbxpryyUCrjpizQctkS 1ksGTejqV+DA45AYYKwhfy+lGG4vJEKAxJLdYKI0dI3q3nfe9kEryx8ODZ1m8fdn+2/0cV qqTDfsgVfL4l6SdzgaBXHU7A+aojGiIwwX/zb+asgP1Pu9urx7VqiGcdWepmjqh6DdxFbA qtz/S1bpNc13Et4Egl8j7lDwRxV7RYTGZwkumRrk7KRvWQF9j2Riviuqw8XUz0Gzqy6lvc 9db7JZNxfVMpFvkv8aDAgWZLgV2MI5fvKhZKlAA3Pdh8ukZHMNNOIoZj73bqVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676554798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCb70ACFU72123PFp+gR6zav2SJ3t3YLHezuXfVjJ9Q=; b=dUUP/MwR7JasCfZWdOA5tn7jtrUyXQDo+knzuoLSSQ+0EZl1HPWTKXBQUXGsaeBaF+XWRa 7wyylwrGIJ35HN8gFWYOuHt5GmSnCkb9TT0siT7F4DXCdvloM2qAjZvN/wEcG/VY+EFOrG glXQ80K0vaOKqEXV4gqDw3JWGUAr+1AGY4CDpMekmaomYXtxk6QAId5SX6alY0bXSQ57no 7anyrbHsCzeqmqYw89nxb4ASKj9fMcc8dl+9NAUY1wDI4l4N5ah41cvLoBX5aMj+aC6ROH HMcKL9rXyhWX/FRx3yFcSOZTf8Byiu2Iti0QZemDYfFs37RniI9rezkvuRe1Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676554798; a=rsa-sha256; cv=none; b=Q3HckYOcTCUTIHrdC27bNy8iIb1h69NUNDGF+mh+X3zyIWOtC678rgL7cbaV1uTus33Ae+ KjjPvurPECCKNsU1V3l1XbyuCC+fVn+Alp2xmqKub11MWpuupN6iMC3mW7nutfLykJ0q6f CCHSkSwFWJamuBauL+scvCjYbum/5rdgKqjviJE9vfDOBjFIkHMKxK1uPMINyeHp8fvm07 71ccwJjN+IRCj0NwYaM26SftmmGs8LIiwOcqSlD4PS+aHzaLfTM9sDKRPobqTKCTEzJ1SN W1U9fDPjYoCQNrPbDO/G3Bl6uucMl6QFH+g4NiP0/Z4l1Wfbr4BLZqeQ2fAAEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHbfQ4J2Tz15RJ; Thu, 16 Feb 2023 13:39: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 31GDdwMN000575; Thu, 16 Feb 2023 13:39:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GDdw2R000574; Thu, 16 Feb 2023 13:39:58 GMT (envelope-from git) Date: Thu, 16 Feb 2023 13:39:58 GMT Message-Id: <202302161339.31GDdw2R000574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 86fd0bdba540 - main - netlink: fix interface dump. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86fd0bdba540132ae298457e160b651f61d1db6b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=86fd0bdba540132ae298457e160b651f61d1db6b commit 86fd0bdba540132ae298457e160b651f61d1db6b Author: Alexander V. Chernikov AuthorDate: 2023-02-16 13:17:58 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-16 13:20:45 +0000 netlink: fix interface dump. The current code missed interface addition when reallocating temporary buffer. Tweak the code to perform the reallocation first and add interface afterwards unconditionally. Reported by: Marek Zarychta MFC after: 3 days --- sys/netlink/route/iface.c | 33 ++++++++++--------- tests/sys/netlink/test_rtnl_iface.py | 61 ++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 17 deletions(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 9cd7e6e80f3c..0eafacff4775 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -449,24 +449,23 @@ rtnl_handle_getlink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *n CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { wa.count++; if (match_iface(&attrs, ifp)) { - if (offset < base_count) { - if (!if_try_ref(ifp)) - continue; - match_array[offset++] = ifp; - continue; - } - /* Too many matches, need to reallocate */ - struct ifnet **new_array; - int sz = base_count * sizeof(void *); - base_count *= 2; - new_array = malloc(sz * 2, M_TEMP, M_NOWAIT); - if (new_array == NULL) { - error = ENOMEM; - break; + if (offset >= base_count) { + /* Too many matches, need to reallocate */ + struct ifnet **new_array; + int sz = base_count * sizeof(void *); + base_count *= 2; + new_array = malloc(sz * 2, M_TEMP, M_NOWAIT); + if (new_array == NULL) { + error = ENOMEM; + break; + } + memcpy(new_array, match_array, sz); + free(match_array, M_TEMP); + match_array = new_array; } - memcpy(new_array, match_array, sz); - free(match_array, M_TEMP); - match_array = new_array; + + if (if_try_ref(ifp)) + match_array[offset++] = ifp; } } NET_EPOCH_EXIT(et); diff --git a/tests/sys/netlink/test_rtnl_iface.py b/tests/sys/netlink/test_rtnl_iface.py index ecc932c6213e..cbe5aed8b8ae 100644 --- a/tests/sys/netlink/test_rtnl_iface.py +++ b/tests/sys/netlink/test_rtnl_iface.py @@ -242,6 +242,67 @@ class TestRtNlIface(NetlinkTestTemplate, SingleVnetTestTemplate): assert rx_msg.is_type(NlMsgType.NLMSG_ERROR) assert rx_msg.error_code == errno.ENODEV + @pytest.mark.require_user("root") + def test_dump_ifaces_many(self): + """Tests if interface dummp is not missing interfaces""" + + ifmap = {} + for ifname in (self.vnet.iface_alias_map["if1"].name, "lo0"): + ifindex = socket.if_nametoindex(ifname) + ifmap[ifindex] = ifname + + for i in range(40): + ifname = "lo{}".format(i + 1) + flags = NlmNewFlags.NLM_F_EXCL.value | NlmNewFlags.NLM_F_CREATE.value + msg = NetlinkIflaMessage(self.helper, NlRtMsgType.RTM_NEWLINK.value) + msg.nl_hdr.nlmsg_flags = ( + flags | NlmBaseFlags.NLM_F_ACK.value | NlmBaseFlags.NLM_F_REQUEST.value + ) + msg.add_nla(NlAttrStr(IflattrType.IFLA_IFNAME, ifname)) + msg.add_nla( + NlAttrNested( + IflattrType.IFLA_LINKINFO, + [ + NlAttrStrn(IflinkInfo.IFLA_INFO_KIND, "lo"), + ], + ) + ) + + rx_msg = self.get_reply(msg) + assert rx_msg.is_type(NlMsgType.NLMSG_ERROR) + nla_list, _ = rx_msg.parse_attrs(bytes(rx_msg.cookie)[4:], rtnl_ifla_attrs) + nla_map = {n.nla_type: n for n in nla_list} + assert nla_map[IflattrType.IFLA_IFNAME.value].text == ifname + ifindex = nla_map[IflattrType.IFLA_NEW_IFINDEX.value].u32 + assert ifindex > 0 + assert ifindex not in ifmap + ifmap[ifindex] = ifname + + # Dump all interfaces and check if the output matches ifmap + kernel_ifmap = {} + msg = NetlinkIflaMessage(self.helper, NlRtMsgType.RTM_GETLINK.value) + msg.nl_hdr.nlmsg_flags = ( + NlmBaseFlags.NLM_F_ACK.value | NlmBaseFlags.NLM_F_REQUEST.value + ) + self.write_message(msg) + while True: + rx_msg = self.read_message() + if msg.nl_hdr.nlmsg_seq != rx_msg.nl_hdr.nlmsg_seq: + raise ValueError( + "unexpected seq {}".format(rx_msg.nl_hdr.nlmsg_seq) + ) + if rx_msg.is_type(NlMsgType.NLMSG_ERROR): + raise ValueError("unexpected message {}".format(rx_msg)) + if rx_msg.is_type(NlMsgType.NLMSG_DONE): + break + if not rx_msg.is_type(NlRtMsgType.RTM_NEWLINK): + raise ValueError("unexpected message {}".format(rx_msg)) + + ifindex = rx_msg.base_hdr.ifi_index + assert ifindex == rx_msg.base_hdr.ifi_index + kernel_ifmap[ifindex] = rx_msg.get_nla(IflattrType.IFLA_IFNAME).text + assert kernel_ifmap == ifmap + # # * # * {len=76, type=RTM_NEWLINK, flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_EXCL|NLM_F_CREATE, seq=1662892737, pid=0}, From nobody Thu Feb 16 15:42:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHfMQ5F63z3qbHv; Thu, 16 Feb 2023 15:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHfMQ4dNXz3vPB; Thu, 16 Feb 2023 15:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676562130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y+rkUfXKbESOvTPkhiGw3D4CqaOxQsYDZDwuAx8sbOA=; b=qc0X3lkx12zDBb67eyeqYQzLe7q1rmzR42069Z0i4ilyZzNyk4cyN8Jo021yCCyydYReVT wM/5zp8K9WOivh0kK6ayZ3gd2xHhuou6ZWW2hEAjkcnszVCQy/IJS/8hlpPayIqpL8oECs P1mGTTWTU3RHmhZOMXV4vebhMckyi6axkB0iAXm4tsvp13xEtEjf6E7Bjg6bQY6M2K86ZG pHqs5lfVnc8rBZW3I/AlwoASj3Y/+WJR9d1dXQJmV4lojSJbpcxjj2HW0fSQlH3IVd23a7 PKl5t0l9kiUBLJ+sqr3KU3pRLLGpfgCkk54YdRYlfuGrdNVtLGS2PVWs8FlqUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676562130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y+rkUfXKbESOvTPkhiGw3D4CqaOxQsYDZDwuAx8sbOA=; b=tvP5N2SiftX2oOrTB7oBsKkGhDndt4HKQFBU1pgFqjrnkj4Z1SgvW0u0EwYAjGsj93yhkW 4Nj/XA7Lrg0VAb/iLttotVwTIiz8SeTotUXiuann7M1J2AHQmHVOrtrBSMJedOznKoNsYv M1tZDRtN6rSFIUS0uL99/qjAYUU9Zr0pfa85NZuwDewTy8QFYMj1JvTyGIvQElma6QSH/U Try8dyqjTmsAAFBY2Z1H29hcMaQPf37QoYHsRB2rldwMZYWXS+kEv3vQ7dWXJyGtSD53ur cvYpycqW1pyPhWKaY2ZX7d5tDvj2itHRXanRCFf3v85KErrNkXttOEQCDlqa+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676562130; a=rsa-sha256; cv=none; b=nZHTBsWWAktBHB3ESkFgHpp/X2VZNcoqf064ssxAbLYoSfaRdG1DL93zkz8GY4Awxs6Yju 2KqwxEligVwCrEFGq1zHRhFhfVVqxjPqHuknI1CUq1VO3nu1ZdoKgpTFqQIA6y0kloQZ8j s8J3UOJff1e5oCcl8A+gYLiypgfd3/f7mhN0p21FWhcqAnDH1XWnBqEigMYQkLRG92eVH0 kxAMvUwkQwXlVQQnYUrBEGXHdyaYdOBMM8JbgY346Ci27cZ7DviJNYGNliNcSXxKJAnAlY df2+bMW0H+1umz/NnvH7u8Mej+gC4wY1aHoOp/sESiZ4Hnc7yNSPi4L/VAS4iA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHfMQ3N1Mz18NN; Thu, 16 Feb 2023 15:42: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 31GFgAad084326; Thu, 16 Feb 2023 15:42:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GFgAFu084325; Thu, 16 Feb 2023 15:42:10 GMT (envelope-from git) Date: Thu, 16 Feb 2023 15:42:10 GMT Message-Id: <202302161542.31GFgAFu084325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: 6d1c946e9168 - main - libpcap: Make pcap/bpf.h a wrapper around system net/bpf.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d1c946e916845d01062e146aad5395410da1e54 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6d1c946e916845d01062e146aad5395410da1e54 commit 6d1c946e916845d01062e146aad5395410da1e54 Author: Joseph Mingrone AuthorDate: 2023-02-13 22:06:51 +0000 Commit: Joseph Mingrone CommitDate: 2023-02-16 15:37:51 +0000 libpcap: Make pcap/bpf.h a wrapper around system net/bpf.h In the past, we modified pcap/pcap.h to include the system net/bpf.h rather than libpcap's own pcap/bpf.h. However, starting around 1.10.2, libpcap requires a few extern functions defined in pcap/bpf.h to build. Simply reverting that local change and pulling in pcap/bpf.h is not a solution, because some ports with '#include ' such as mail/spamd and net/xprobe require the system net/bpf.h to be pulled in. To accommodate both requirements, make pcap/bpf.h a wrapper around the system net/bpf.h, but retain the extern function definitions. This is in preparation for libpcap 1.10.3. Approved by: cy, philip, emaste, delphij (earlier revision) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38575 --- contrib/libpcap/pcap/bpf.h | 16 ++++++++++++++++ contrib/libpcap/pcap/pcap.h | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/contrib/libpcap/pcap/bpf.h b/contrib/libpcap/pcap/bpf.h index 9d748952a0e5..1c9d0f56a01a 100644 --- a/contrib/libpcap/pcap/bpf.h +++ b/contrib/libpcap/pcap/bpf.h @@ -74,6 +74,18 @@ extern "C" { #endif +/* + * In the past, we modified pcap/pcap.h to include the system net/bpf.h, + * rather than this file. However, starting around 1.10.2, libpcap requires + * the extern functions defined here to build. Simply reverting that local + * change is not a solution, because some ports with '#include ' + * such as mail/spamd and net/xprobe require the system net/bpf.h to be + * pulled in. To accommodate both requirements, make this header a wrapper + * around the system net/bpf.h, but keep the extern function definitions. + */ +#if defined(__FreeBSD__) +#include +#else /* BSD style release date */ #define BPF_RELEASE 199606 @@ -244,13 +256,17 @@ struct bpf_insn { #define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } #define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } +#endif /* defined(__FreeBSD__) */ + PCAP_API int bpf_validate(const struct bpf_insn *, int); PCAP_API u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); +#if !defined(__FreeBSD__) /* * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). */ #define BPF_MEMWORDS 16 +#endif #ifdef __cplusplus } diff --git a/contrib/libpcap/pcap/pcap.h b/contrib/libpcap/pcap/pcap.h index a2d6003cdf61..4e30e77812ef 100644 --- a/contrib/libpcap/pcap/pcap.h +++ b/contrib/libpcap/pcap/pcap.h @@ -85,7 +85,10 @@ #endif /* _WIN32/MSDOS/UN*X */ #include /* for SOCKET, as the active-mode rpcap APIs use it */ -#include + +#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H +#include +#endif #include From nobody Thu Feb 16 15:58:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHfkb2PGnz3r6tP; Thu, 16 Feb 2023 15:58: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 4PHfkb1kKnz3xS2; Thu, 16 Feb 2023 15:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oq8NCuPjnb4AtTF56MxM8CQWYgGbO5K319/xPNnTTY0=; b=hk1SZLiF6EnqlO/+QQE0Fj2AxqxPqyf7pP/LYO6eRXSd1dYAFydGyXxe2d+6CjPDcLMZJi Z35rmUtWxbcnSanj+gH/rUob26qKsTDiiZs+wlQJeJDWuWRVY9hsCET5cGZTBQndjL54Bp DrRTTG4dc6RYxcMPWSkKw8eQs71pvtG37NIb/AakRHPGAWzd5czj/k2H6A8laLklv6AZPa SaXAvgrkg1HXJ3pau7PaOUVxBol+ie36cO1DGdmsyrkwVO45wKy/4JSlld2YSLUN3WrNYj PGUV5ktZZq8cOu8V5bVDR8v9HqK2qMGXSmaollpsWxEdCHP4s5lMSoGFCZ1CNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oq8NCuPjnb4AtTF56MxM8CQWYgGbO5K319/xPNnTTY0=; b=wiUPwcAU5GfvHddVIbRXv9l8+kLvY9vbUfmcWz2pattOReOXjtuQUg7K/agvzjXQm8beC5 diMKBheKwX8xHRtZpG8ODwC2I6WwEDA/dlRg4Jh6WyKglU2t/YU4ezMHQz+xTZ3WLPIvtw fyv4+zgeEf3rzaiDN2MgFj6RDUS0WwMauB73rYpPc8MIJSURgLnQPQ3YloIedjQf96+zRh WUiy6G/oaLL86HYvS6QpgTH+SmjDmDWkbe+Rp52bqQd952fMrGGy63tycFYaChuDDtT1bT U8C0L2gDdxus+HLOz8RoSnkhKOCcl07vPtz35rXDIQzG0pLJSe9xBNmzCv/tVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676563127; a=rsa-sha256; cv=none; b=fneaKh2xERkq+2CL5FHXEkUpq/PKI7+iE3PrfvKdBDmSaRjCUVR7VtlkYDIKV6n5MU5Cfs tXu00FS6rGZ6KQUXX0IEoJkGV8k4YnR0YXaYO6d6JuPFm/ETN6X/W+1WsMCAqUhZlBVEz3 pba2Yot08473XHCxNkdO8hsW+Vy+1YycQvFqSJR1gzRly46rg8druCpRk6TXi3Lo5XGDN8 tDgyHbidiRAAcIc/HgceBokrdngDMTGMKzQGDq2/UIhEwBNo58iBUT2kh7TjtMsPwHAXLd nB6db1ulqd/HJuNM2ZIfNomvcjFE/qpCZTZkVOrZQ7VAle2HHC4Ws9DI2dSN5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHfkb0hNtz18dn; Thu, 16 Feb 2023 15:58: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 31GFwkrT099956; Thu, 16 Feb 2023 15:58:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GFwkTS099955; Thu, 16 Feb 2023 15:58:46 GMT (envelope-from git) Date: Thu, 16 Feb 2023 15:58:46 GMT Message-Id: <202302161558.31GFwkTS099955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ccf2121d59ac - main - efivar: Try harder to find label's efimedia List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccf2121d59ac51e1a0287d75262d48018d09cad6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ccf2121d59ac51e1a0287d75262d48018d09cad6 commit ccf2121d59ac51e1a0287d75262d48018d09cad6 Author: Warner Losh AuthorDate: 2023-02-16 15:53:15 +0000 Commit: Warner Losh CommitDate: 2023-02-16 15:54:39 +0000 efivar: Try harder to find label's efimedia If there's no efimedia attribute on the provider, and the provider's a glabel, then find the 'parent' geom. In this case, the provider's name is label-type/name, but the geom's label will that of the underlying device (eg ada0p1). If it is, recurisvely call find_geom_efimedia with the geom's name, which shuold have the efimedia attribute. Sponsored by: Netflix Reviewed by: corvink, manu, asomers Differential Revision: https://reviews.freebsd.org/D38614 --- lib/libefivar/efivar-dp-xlate.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c index 1b30d1dfb143..effc8a2de475 100644 --- a/lib/libefivar/efivar-dp-xlate.c +++ b/lib/libefivar/efivar-dp-xlate.c @@ -527,6 +527,15 @@ find_geom_efimedia(struct gmesh *mesh, const char *dev) if (pp == NULL) return (NULL); efimedia = geom_pp_attr(mesh, pp, "efimedia"); + + /* + * If this device doesn't hav an efimedia attribute, see if it is a + * glabel node, and if so look for the underlying provider to get the + * efimedia attribute from. + */ + if (efimedia == NULL && + strcmp(pp->lg_geom->lg_class->lg_name, G_LABEL) == 0) + efimedia = find_geom_efimedia(mesh, pp->lg_geom->lg_name); if (efimedia == NULL) return (NULL); return strdup(efimedia); From nobody Thu Feb 16 15:58:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHfkc33Vcz3r6lY; Thu, 16 Feb 2023 15:58: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 4PHfkc2Ptlz3xQy; Thu, 16 Feb 2023 15:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oRKtdN9y9oOg8SASwsPg51+2WDa0pzr0fnRaYxfX1Nk=; b=BPspSt70Sb6nphXF9PXQ3Ih1rIKRqQrAODwRieqCMUnaxNiaDVn9w1LtzHw2VqepBr2j3E HdWC3jzGG+WSisVAdvPvgZF785tsWgpQjIRQgs3H9bl0nnWCHuppJVSSz7Lz+yXZ0iH9Us ouEEEMNuQCo2va3F9EDQMugc4Y7zgho5Ht2BwSf1HFiek28SQDbngrHVogR1dBryZ6fFAg FX0ZVSNRUqRhPKtQtWdGaEka6ktXLPl+uUdy6LBkTqTYdUd1MuTF66XcZivxjXdIM7cTxO 0hy7yxU+ThAg+ZfFoywx5PNmwiGlW24jEjSNmNfh+6nhyGfsfRbQTaIbs/bnpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oRKtdN9y9oOg8SASwsPg51+2WDa0pzr0fnRaYxfX1Nk=; b=C0jHAvUgM1EALryUzLQfmzr+Vj/LP0M2Q3PrF5fQoh1I4gB0Z6KoQWitvkd++N1Ui+2v+A JUXREtc2vaFHK38+pa1lhxUw86nMtpAHNAMOJ9K50UEBWgCN9bdrvxYfc5Kw5ZEISyV++V Ra5t5MOfqitBmrKAsU6KeG1S5+pRCjt+poNtQ1Vt8Fa2PdDE25gLy3/3b+t60QapXPp4NU Ge2JGIAcRnsRu0xmcnijI669mR8t6e0C3XAhMNMm8ZUL/n3jBnoKHT+SvPGMn6w8+tvCG/ TMK8gTOCyoIJvrtMer2i3nzMZN2+mNf6Kp5aD+OcbV/hg0YjR3shu+By9Jft8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676563128; a=rsa-sha256; cv=none; b=VUIg4vSfVA5XUFSUea6q0g4KXB0s6g1bEaoxo2IbvQdPIWyQkjkWxFkpgu7gif72bOL5aS oGNO8U681tNat89vVYVrt/PlR+7Qvp2uhPcJWldc5+3XUFpmXTLOknY4pfTdEqcwqy4FMZ to3Qm395K66YyPbwzOoC8ER2G5HZZPXIP1O2ABDiIJ6m0qf6EnkJpFoDfH9RJu1npwr9/0 FMzxk2cyq64W3ipEqOY3nfZNlCL4gLNq1C7+iEj1lPe6uLDR7y50Lvb+IaQ1X0B82IFwAk UQ+menLU1nXnR1XFUY/kj3sE3tHXIlcuTwXERBplV491aJd+CqJdmAZcWY2pnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHfkc1NCQz18Yn; Thu, 16 Feb 2023 15:58: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 31GFwmOV099980; Thu, 16 Feb 2023 15:58:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GFwmDk099979; Thu, 16 Feb 2023 15:58:48 GMT (envelope-from git) Date: Thu, 16 Feb 2023 15:58:48 GMT Message-Id: <202302161558.31GFwmDk099979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 49fd6affdbfe - main - efivar: Allow NULL paths in build_dp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49fd6affdbfe6af53f119ebb27ff5e5e292e1f67 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=49fd6affdbfe6af53f119ebb27ff5e5e292e1f67 commit 49fd6affdbfe6af53f119ebb27ff5e5e292e1f67 Author: Warner Losh AuthorDate: 2023-02-16 15:53:26 +0000 Commit: Warner Losh CommitDate: 2023-02-16 15:54:39 +0000 efivar: Allow NULL paths in build_dp Allow there to be NULL paths in buildp. This lets us return the device path to the partition, as well as to files on the partition. Sponsored by: Netflix Reviewed by: corvink, manu, asomers Differential Revision: https://reviews.freebsd.org/D38615 --- lib/libefivar/efivar-dp-xlate.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c index effc8a2de475..b6adae80fdb4 100644 --- a/lib/libefivar/efivar-dp-xlate.c +++ b/lib/libefivar/efivar-dp-xlate.c @@ -544,23 +544,25 @@ find_geom_efimedia(struct gmesh *mesh, const char *dev) static int build_dp(const char *efimedia, const char *relpath, efidp *dp) { - char *fp, *dptxt = NULL, *cp, *rp; + char *fp = NULL, *dptxt = NULL, *cp, *rp = NULL; int rv = 0; efidp out = NULL; size_t len; - rp = strdup(relpath); - for (cp = rp; *cp; cp++) - if (*cp == '/') - *cp = '\\'; - fp = path_to_file_dp(rp); - free(rp); - if (fp == NULL) { - rv = ENOMEM; - goto errout; + if (relpath != NULL) { + rp = strdup(relpath); + for (cp = rp; *cp; cp++) + if (*cp == '/') + *cp = '\\'; + fp = path_to_file_dp(rp); + free(rp); + if (fp == NULL) { + rv = ENOMEM; + goto errout; + } } - asprintf(&dptxt, "%s/%s", efimedia, fp); + asprintf(&dptxt, "%s/%s", efimedia, fp == NULL ? "" : fp); out = malloc(8192); len = efidp_parse_device_path(dptxt, out, 8192); if (len > 8192) { From nobody Thu Feb 16 15:58:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHfkd3ZH6z3r742; Thu, 16 Feb 2023 15:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHfkd37Psz3xZ1; Thu, 16 Feb 2023 15:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lp4YOAi1p9DCSw+MRn4xpU/61RH8nQZHJNewBz2D8ws=; b=SNoD2We9o1xSsmETZ3flU3uocsfxQOdeeSeb+4teLLq0+/byGpbuj3fL2wrBWuQnJZH7US Zmmn2PJC+OSFp2Hjzc2X5Kf4rPy4C8gnJzjztAg/9QQxZKTeAnEKVurvrnCkffpdHnjILk doENsa8InwVvEp8oX9kIYZNzpT+BIddRuLoi5sOqJ/NKd4d+8fgN4pDX+fF0V+o+QjZbPp 7q9Ez+VPEJdmH8qwQPQMW45MRLjJfXF3qYbcRKSiiessW5fVe0XgNRr4oNhFCcJ6UzAeP6 3uykNlsNUU67RSIt3gSgVBXkaQdbvmgc+6rNoG44Qm+50cKCbvRmgZHDTD6tIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lp4YOAi1p9DCSw+MRn4xpU/61RH8nQZHJNewBz2D8ws=; b=EeOT3hVDHy+gGhug8lIdlzAzexXQ07wfpBvpmssO6kEsPm30BLckSCvyhtdvSgZSYZUxV+ mqOzGhUH9ChLO1sXg4aNfoBmoFotDJmaBKJjkYW8GWIqloo8MftlwKvfeYcmmE71PqeWyN DRwgI30sZo9g5PjcOxaoYM5E7Sz3BjOZvVehfHL4RqGISs67/EWFxp3HAsjL7C3EkRbl++ V6gRBIIUk/tDq8vmD7pOlrwZQtUsDAJIgWU77Zuj4cUqgbUbTvC35slMxoPNXvWThV6LSA 4k4UkfPFRoXjvj36N6ujn+izLAEhMIX0LMt7tgweL7vX5L5uot0uu7n7NA6mZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676563129; a=rsa-sha256; cv=none; b=I8grGzNAaBQVsD8imOq+ugwHooF3rEWKG7uY/HB1lxJOWmWIu4F1ayYbPGy7/Im7or3Whx tUMzs5Qwz18EaXr0wZVSLuKn1OaazOIoBvqkHblgvcjy+iwy2oxRcRvT71ixpAe8MecQu9 gwOfO0YASnbF2s+ZI9gw/tGCFCxYOFA7RAKZdHE5Gk2acKX6XLgGebxuks76NHIO+di/Cn JvKTLuf9iPTsv3+C658o8ovZPzxo856lNwu4vNInx5J7SavAxgEJFUVX93PNJBy5NGlB5Q 5g2yvbpr0BSgjjZWVwy8m7lB/z514y3gwRgRnv18Vki18hVGex/QicucgUy3jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHfkd2FNwz187W; Thu, 16 Feb 2023 15:58: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 31GFwnjG000029; Thu, 16 Feb 2023 15:58:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GFwndd000028; Thu, 16 Feb 2023 15:58:49 GMT (envelope-from git) Date: Thu, 16 Feb 2023 15:58:49 GMT Message-Id: <202302161558.31GFwndd000028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 57d5ca4eeba6 - main - efivar: support device paths as well as mounted paths in path_to_dp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57d5ca4eeba6192e91044aad86fca4429966cfac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=57d5ca4eeba6192e91044aad86fca4429966cfac commit 57d5ca4eeba6192e91044aad86fca4429966cfac Author: Warner Losh AuthorDate: 2023-02-16 15:53:35 +0000 Commit: Warner Losh CommitDate: 2023-02-16 15:54:39 +0000 efivar: support device paths as well as mounted paths in path_to_dp In path_to_dp, allow passing in either the actual device path "eg /dev/foo/bar" or the path where the device is mounted (say /mnt/baz/bing). In the former case we'll assume the path within the device is nothing (the relpath). In the latter, we'll take from the mount point on down as the relpath. Sponsored by: Netflix Reviewed by: corvink, manu, asomers Differential Revision: https://reviews.freebsd.org/D38616 --- lib/libefivar/efivar-dp-xlate.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c index b6adae80fdb4..586ba7d08180 100644 --- a/lib/libefivar/efivar-dp-xlate.c +++ b/lib/libefivar/efivar-dp-xlate.c @@ -648,6 +648,7 @@ errout: } /* Handles /path/to/file */ +/* Handles /dev/foo/bar */ static int path_to_dp(struct gmesh *mesh, char *path, efidp *dp) { @@ -667,9 +668,19 @@ path_to_dp(struct gmesh *mesh, char *path, efidp *dp) } dev = buf.f_mntfromname; - if (strncmp(dev, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) - dev += sizeof(_PATH_DEV) -1; - ep = rp + strlen(buf.f_mntonname); + /* + * If we're fed a raw /dev/foo/bar, then devfs is returned from the + * statfs call. In that case, use that dev and assume we have a path + * of nothing. + */ + if (strcmp(dev, "devfs") == 0) { + dev = rp + sizeof(_PATH_DEV) - 1; + ep = NULL; + } else { + if (strncmp(dev, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) + dev += sizeof(_PATH_DEV) - 1; + ep = rp + strlen(buf.f_mntonname); + } efimedia = find_geom_efimedia(mesh, dev); #ifdef notyet From nobody Thu Feb 16 15:58:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHfkf4X2zz3r6tT; Thu, 16 Feb 2023 15:58: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 4PHfkf3ts7z3xTl; Thu, 16 Feb 2023 15:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1iOlnzkjHFoc4goZ30vV24/FOK3RGZPgzMgTGEoJUHM=; b=aWex3FnIFpqbQ4+qIOENB8qenissjfDRPfmMfJ6ey9Joh2T4edMaAb4GjKIB1+9RDTuOx+ lOui+dwsFe3FshD4p0joFyhQeCQB4e0zg8++T4QUu0Nx3WHADHiHz+0nzzcxAw204140JO WbGkCsIighqVJ3ftX1POV/F3TPIsYHgNKoTaNlJnp+CM7kk3WMkZvVNbdLYwAvjUUQtNlU qUcCS5nabaaTZPvWo8b8BXpkqXMadMDRKZqbbsoRPIcXjc3D9CKxCr1DzKklSFaesD9otz F+ECYewCox//7R/Fae3uJsSKFu645OtH3VjwBPnhncGB2iIZABMASGZ3ZLNB+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1iOlnzkjHFoc4goZ30vV24/FOK3RGZPgzMgTGEoJUHM=; b=Eb6bdyQXIw1OZVPcS38QblvnV3+mezaGQKgC4uV+txG9zN/1bsgn8PwN5wntk04PGZjlwF lknZ7cFGXpcNxWWJpq0NYahwJiVYpBc5qk1jkyxoxuCta17GG9vmxCLaNvIAN9gvG4B0ny s77w74UklnpcCuRw6OZ3MSRELfQ3d6BzPkLQmZGqnczoCzcqrU+T7ifdlpfgkNdujca1fC MtMqRzXKFUlzzlBnrAnGFWKyB2VzeqDtTISSbR2TjWdkXlVBwfzhIlj+27ED3VxYPTMwnv r/GrjEa50ZDxXmT36jKvhbtFECR+chyll691DMjfsLxhUIDkn78hGIRbL9yz/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676563130; a=rsa-sha256; cv=none; b=W5EoZBA39aE37qXigyHjpzjayQPrg9NQBxZnw7bDCilFIDgTP/LFKg6FmlsJy2iVBwyJQA oQx33/yN94q+V0We6IUFjJvP14Lh+lrDSEffovFQ7BpDceB5SlgpvaFrRE3iSzM3hhfnTk kezIFrjiGmoKR81mpsi53St44vLKlGQwV0YC4lPO+Df37+6V67s7JBGLxhRMpl4c6ErE/Y sGDc8K4kW3ZYUhzStUMbYDZohXhtyXbu722rJS6Bh//H0hcU1Czoi4oZdZFaTDGGb9HPUl ++3GQeq5aJ7WgMkGlqynp18UCQLAvnxrQR0YTcEcpA8zGHFeHmzqfAUQ7YD5Dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHfkf30Ghz18B7; Thu, 16 Feb 2023 15: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 31GFwoae000053; Thu, 16 Feb 2023 15: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 31GFwouc000052; Thu, 16 Feb 2023 15:58:50 GMT (envelope-from git) Date: Thu, 16 Feb 2023 15:58:50 GMT Message-Id: <202302161558.31GFwouc000052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9a7915299484 - main - efibootmgr: Add --efidev (-u) to discover UEFI's device path to a dev or file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a7915299484a767fbffc7234b8dc45c29954cca Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9a7915299484a767fbffc7234b8dc45c29954cca commit 9a7915299484a767fbffc7234b8dc45c29954cca Author: Warner Losh AuthorDate: 2023-02-16 15:53:45 +0000 Commit: Warner Losh CommitDate: 2023-02-16 15:54:39 +0000 efibootmgr: Add --efidev (-u) to discover UEFI's device path to a dev or file "efibootmgr --efidev unix-path" will return the UEFI device-path to the file or device specified by unix-path. It's useful for debugging, but may also be useful for scripting. Sponsored by: Netflix Reviewed by: corvink, manu Differential Revision: https://reviews.freebsd.org/D38617 --- usr.sbin/efibootmgr/efibootmgr.8 | 6 +++++- usr.sbin/efibootmgr/efibootmgr.c | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.8 b/usr.sbin/efibootmgr/efibootmgr.8 index 6b53de33db56..0aa70fe63da7 100644 --- a/usr.sbin/efibootmgr/efibootmgr.8 +++ b/usr.sbin/efibootmgr/efibootmgr.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 3, 2022 +.Dd February 15, 2023 .Dt EFIBOOTMGR 8 .Os .Sh NAME @@ -69,6 +69,7 @@ .Fl t Ar timeout .Nm .Fl T +.Nm Fl u Ar unix-path .Sh "DESCRIPTION" The .Nm @@ -174,6 +175,9 @@ Set the bootmenu timeout value. Delete the .Cm BootTimeout variable. +.It Fl u -efidev Ar unix-path +Displays the UEFI device path of +.Ar unix-path . .It Fl v -verbose Display the device path of boot entries in the output. .El diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c index 53bc417c4e07..58d83d28d6e5 100644 --- a/usr.sbin/efibootmgr/efibootmgr.c +++ b/usr.sbin/efibootmgr/efibootmgr.c @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001 typedef struct _bmgr_opts { + char *dev; char *env; char *loader; char *label; @@ -85,6 +86,7 @@ typedef struct _bmgr_opts { bool dry_run; bool device_path; bool esp_device; + bool find_dev; bool fw_ui; bool no_fw_ui; bool has_bootnum; @@ -114,6 +116,7 @@ static struct option lopts[] = { {"dry-run", no_argument, NULL, 'D'}, {"env", required_argument, NULL, 'e'}, {"esp", no_argument, NULL, 'E'}, + {"efidev", required_argument, NULL, 'u'}, {"fw-ui", no_argument, NULL, 'f'}, {"no-fw-ui", no_argument, NULL, 'F'}, {"help", no_argument, NULL, 'h'}, @@ -284,6 +287,9 @@ parse_args(int argc, char *argv[]) opts.set_timeout = true; opts.timeout = strtoul(optarg, NULL, 10); break; + case 'u': + opts.find_dev = true; + opts.dev = strdup(optarg); case 'v': opts.verbose = true; break; @@ -996,7 +1002,7 @@ report_esp_device(bool do_dp, bool do_unix) char *name, *dev, *relpath, *abspath; uint8_t *walker, *ep; efi_char *descr; - efidp dp, edp; + efidp dp; char buf[PATH_MAX]; if (do_dp && do_unix) @@ -1026,7 +1032,6 @@ report_esp_device(bool do_dp, bool do_unix) // Now we have fplen bytes worth of file path stuff dp = (efidp)walker; walker += fplen; - edp = (efidp)walker; if (walker > ep) errx(1, "malformed boot variable %s", name); if (do_dp) { @@ -1068,6 +1073,26 @@ set_boot_to_fw_ui(bool to_fw) errx(1, "failed to set boot to fw ui"); } +static void +find_efi_device(const char *path) +{ + efidp dp = NULL; + size_t len; + int ret; + char buf[1024]; + + ret = efivar_unix_path_to_device_path(path, &dp); + if (ret != 0) + errc(1, ret, + "Cannot translate path '%s' to UEFI", path); + len = efidp_size(dp); + if (len > MAX_DP_LEN) + errx(1, "Resulting device path too long."); + efidp_format_device_path(buf, sizeof(buf), dp, len); + printf("%s -> %s\n", path, buf); + exit (0); +} + int main(int argc, char *argv[]) { @@ -1075,7 +1100,10 @@ main(int argc, char *argv[]) memset(&opts, 0, sizeof (bmgr_opts_t)); parse_args(argc, argv); - if (!efi_variables_supported()) + /* + * find_dev can operate without any efi variables + */ + if (!efi_variables_supported() && !opts.find_dev) errx(1, "efi variables not supported on this system. root? kldload efirt?"); read_vars(); @@ -1107,6 +1135,8 @@ main(int argc, char *argv[]) set_boot_to_fw_ui(true); else if (opts.no_fw_ui) set_boot_to_fw_ui(false); + else if (opts.find_dev) + find_efi_device(opts.dev); print_boot_vars(opts.verbose); } From nobody Thu Feb 16 15:58:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHfkg5Y8Zz3r745; Thu, 16 Feb 2023 15: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 4PHfkg53RRz3xpD; Thu, 16 Feb 2023 15: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=1676563131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MuGyrMoSHJkHKh2dKvHdzhgus1fuTJoYDKhFRRgmobk=; b=PMLDXi96tInetg+1cQDbYY77+OiTmpgtmnxD64KGlg/bO2+DzNtRVpTytHdOMFrrgAQIJr LpG6RCK2E8DTOYxz6j8VbPWIYPozZ9HbBnfDVAFf0fB2iyxgqHn11mbYumXt63wPtZIrRS 99qyVUKnfjBX6B9XLIHMrakYL5fQIkasu6TGNVrIbYND8ZJ94IkcwHliZxE7cZUa6/RgcW l6vhqD7sA4dOe8bSm9PM79nci0CvPDJVbza+Cxnn0xxUfbSXzTxRB0bW1ofBbBuqTG//MP S+BPin7hUCOEXRFHJJC2uTmu/+f3XvkB+QRIZiCYdGjlRnOx3peCTxrBv/Us6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676563131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MuGyrMoSHJkHKh2dKvHdzhgus1fuTJoYDKhFRRgmobk=; b=p9yhDI66lFcvrkOEDFWyyK+faNAs7HNF1BAH1HAhqpg1zB2oJeil4s+mQeXfNt+itoGeaX bbNOCCNXrY2BVeqqU4XlLI6GvcrvC5qnXKLkzye2WJRxN97r5rfT2pv8MHrwdoIQXC8MWq Ykkqw5kuxBoGHurnFIKyoKi2M8Tvb3mFdRvGvAKbye8DW9yONue03+EqTgHey5F0c3BPab ksEYitMmknnU7yO2wKo+JVM70IvU+fJBZ/mLEes2+NGWo7RrW/8DcGly1DCDJuR8BPHQQC oXKTaMrzharLKRO/7sK2mw9qpg/axVmCIF2r8ZkSexIteHXajkwlUGH9mKDRrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676563131; a=rsa-sha256; cv=none; b=dpK6s/V8CyM6ToTugB7mJ9N8B4egFYH2a5cekhDSa1s0m8BWf79Cu+4HXn2TpBUsynULuS l6LLBEPpMU2iIEOR27GkYI/cP8LytGEJ54uVnAgWbVaMPNXpI8xGh3wBHrimjQFps5cTYC QdwwE8qU6rd9o4u4Hl6/sGC5v7JwyZUNReR3xAyVyzw+hM20gxt8kaagD+S9+g2H8wjN4Q b8Rsnfqo0KM2bee3iaenwBNE0olZulnoqUsr6drAqaKfx174cVhZ9JT1lJ4gRYxdO1brn2 Djbd/f1cfv7/fh/irYmAU4RoNn2XYjlxH6qjPp/95pjhec6aKT09G5QdPMOUyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHfkg48vQz18Yp; Thu, 16 Feb 2023 15:58: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 31GFwpnq000078; Thu, 16 Feb 2023 15:58:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GFwpiO000077; Thu, 16 Feb 2023 15:58:51 GMT (envelope-from git) Date: Thu, 16 Feb 2023 15:58:51 GMT Message-Id: <202302161558.31GFwpiO000077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2b460910326c - main - efivar: Really look for labels for the provider with right efimedia List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b460910326c4f39068fe2158a0726dc3d362f68 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2b460910326c4f39068fe2158a0726dc3d362f68 commit 2b460910326c4f39068fe2158a0726dc3d362f68 Author: Warner Losh AuthorDate: 2023-02-16 15:53:53 +0000 Commit: Warner Losh CommitDate: 2023-02-16 15:54:39 +0000 efivar: Really look for labels for the provider with right efimedia The prior code mistakently thought that the g_consumer that hung off the provider we found were the right thing to use to find all the glabel aliases for this node. However, the only way to find that is to iterate through all the geoms that belong to the glabel geom class, looking for those geoms with the same name as the provider with the right efimedia. Do this in a way that caches glabel class, and allows for it to be absent. Tighten the filter for mounted filesystems to only look for the ones that are mounted on /dev/.. since the rest of the code assumes that. MFC After: 3 days Sponsored by: Netflix Reviewed by: corvink, asomers Differential Revision: https://reviews.freebsd.org/D38619 --- lib/libefivar/efivar-dp-xlate.c | 64 ++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c index 586ba7d08180..3d63868dacef 100644 --- a/lib/libefivar/efivar-dp-xlate.c +++ b/lib/libefivar/efivar-dp-xlate.c @@ -134,12 +134,15 @@ efi_hd_to_unix(struct gmesh *mesh, const_efidp dp, char **dev, char **relpath, c const_efidp media, file, walker; size_t len, mntlen; char buf[MAX_DP_TEXT_LEN]; - char *pwalk; + char *pwalk, *newdev = NULL; struct gprovider *pp, *provider; - struct gconsumer *cp; struct statfs *mnt; + struct gclass *glabel; + struct ggeom *gp; walker = media = dp; + *dev = NULL; + *relpath = NULL; /* * Now, we can either have a filepath node next, or the end. @@ -174,12 +177,6 @@ efi_hd_to_unix(struct gmesh *mesh, const_efidp dp, char **dev, char **relpath, c goto errout; } - *dev = strdup(pp->lg_name); - if (*dev == NULL) { - rv = ENOMEM; - goto errout; - } - /* * No file specified, just return the device. Don't even look * for a mountpoint. XXX Sane? @@ -217,6 +214,16 @@ efi_hd_to_unix(struct gmesh *mesh, const_efidp dp, char **dev, char **relpath, c rv = errno; goto errout; } + + /* + * Find glabel, if it exists. It's OK if not: we'll skip searching for + * labels. + */ + LIST_FOREACH(glabel, &mesh->lg_class, lg_class) { + if (strcmp(glabel->lg_name, G_LABEL) == 0) + break; + } + provider = pp; for (i = 0; i < n; i++) { /* @@ -225,30 +232,53 @@ efi_hd_to_unix(struct gmesh *mesh, const_efidp dp, char **dev, char **relpath, c * we'll need to invent one, but its decoding will be handled in * a separate function. */ - if (mnt[i].f_mntfromname[0] != '/') + if (strncmp(mnt[i].f_mntfromname, "/dev/", 5) != 0) continue; /* * First see if it is directly attached */ - if (strcmp(provider->lg_name, mnt[i].f_mntfromname + 5) == 0) + if (strcmp(provider->lg_name, mnt[i].f_mntfromname + 5) == 0) { + newdev = provider->lg_name; break; + } /* - * Next see if it is attached via one of the physical disk's - * labels. + * Next see if it is attached via one of the physical disk's labels. + * We can't search directly from the pointers we have for the + * provider, so we have to cast a wider net for all labels and + * filter those down to geoms whose name matches the PART provider + * we found the efimedia attribute on. */ - LIST_FOREACH(cp, &provider->lg_consumers, lg_consumer) { - pp = cp->lg_provider; - if (strcmp(pp->lg_geom->lg_class->lg_name, G_LABEL) != 0) + if (glabel == NULL) + continue; + LIST_FOREACH(gp, &glabel->lg_geom, lg_geom) { + if (strcmp(gp->lg_name, provider->lg_name) != 0) { continue; - if (strcmp(g_device_path(pp->lg_name), mnt[i].f_mntfromname) == 0) - goto break2; + } + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + if (strcmp(pp->lg_name, mnt[i].f_mntfromname + 5) == 0) { + newdev = pp->lg_name; + goto break2; + } + } } /* Not the one, try the next mount point */ } break2: + /* + * If nothing better was mounted, then use the provider we found as + * is. It's the most correct thing we can return in that acse. + */ + if (newdev == NULL) + newdev = provider->lg_name; + *dev = strdup(newdev); + if (*dev == NULL) { + rv = ENOMEM; + goto errout; + } + /* * No mountpoint found, no absolute path possible */ From nobody Thu Feb 16 16:22:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/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 17:52:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjFr3jxgz3rDwW; Thu, 16 Feb 2023 17:52:32 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjFr2HPYz4Gm0; Thu, 16 Feb 2023 17:52:32 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676569952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nTKambmFjTWuGsJpIfS/Rr4CRgmkEcTlA0sCYtAH1m8=; b=YVtlCO14clPrW812Po4d5UrxenxV96SA2/OpBQdw8HSuCVqoclFYKIks0+Mox1gnmT7Pqw n58kTgbMkLDbdtW7Gaq1+sc0sCGFuE3ha2+CFtIU/FrL+OJmZLWziij9N9n/w0XOpOlJYt gSya7xPBSYnY4d62mMnrChLlfvdix74eLU2tOHQNC4FKnKwPVH89EmKGWYW1PfKlVi8MOZ +4Qziwulq1AqLITpHYVaVnBkAKgINIYiIjH1Pyh3wX4oOJdVWt9BCBAXqlmwLAjkyRFMFW WeGzRSyPHt6rgz3sHi6JN2nbxawq8sOJklmEfhOOiCBM5pLOqhPY71msxpWT8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676569952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nTKambmFjTWuGsJpIfS/Rr4CRgmkEcTlA0sCYtAH1m8=; b=C5wICxNvMGO+CcEWIr1grnPbDL1GX227z757awhaIJX1oXoM0+Fv1PkaGYrUmgpHSqYrjQ H1XsOXDm3GAPvSRkjze46lXbHaZQYPtf/3C2mTvQf9OUMef5Ry/My3rwWY1kE5S7gkiH/C OVBaiXr0FzQVb9BKmUhjm3ua3nMwQAGY8yD1oRLco5igtK99TfzCPmYfxuXd186DuKNQeQ U6e2Q5QCzdo1GxkBhiVXyRByOwIcmWoxrR5BTFwqF5JmITmicApTE93Fpdgn/rnvS8EFDx QcZ0M0Fy4sXXy0OAyrdfQt6bpOEca1WCBZSNtoZmhd3M/HIdNCzBxv4DzgXm/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676569952; a=rsa-sha256; cv=none; b=dRhq0vKqipt6urKOILVs1tnsSZU/6cUSO/QxldL1eBl661TZY2hrAMefq9WB4YWmT4XmMg z3JRFGtNMJ2tmLEOxshPQtRLAjEu5Nxdtc7GjTpo44R+sIqG7upaVo7GvGkUzLtkiFjx56 SXAX0lV9u2Y+6KaW7Sk6H3pupOr3R1QvuFkoQQciTWaiAKV1ZEFcypIL0vjc8zOzWA2mlb J4bSSho8Z3GUz9KIpbHe3dgB4Spe8hFkjw4GOH+kfokTMmyXn3z7fiw1QFoQ1ynZjzR7yi VD5O3RQ2/3uIp7Y+S8W0x6HBT79SBs/vpjMl4Z6+QaZyqxpDt2gYf7HhjyCvTw== Received: by freefall.freebsd.org (Postfix, from userid 1354) id 348F1442F; Thu, 16 Feb 2023 17:52:32 +0000 (UTC) From: Jan Beich To: Mateusz Guzik Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: d9d5f2c042a5 - main - cpuset: add --count In-Reply-To: <202302041751.314HpRrn042970@gitrepo.freebsd.org> (Mateusz Guzik's message of "Sat, 4 Feb 2023 17:51:27 GMT") References: <202302041751.314HpRrn042970@gitrepo.freebsd.org> Date: Thu, 16 Feb 2023 18:52:29 +0100 Message-ID: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-ThisMailContainsUnwantedMimeParts: N Mateusz Guzik writes: > +.Pp > +The long options are as follows: > +.Bl -tag -width ".Fl -count" > +.It Fl -count > +Count the number of hardware threads included in the set. Requires > +.Fl g > +and > +.Fl p > +flags. > +.El --count appears to report total number of "hardware threads" instead of "included in the set". Is this intentional? If so the wording is confusing. $ cpuset -l 1 -- cpuset -g --count -p -1 8 $ cpuset -l 1 -- cpuset -g -p -1 pid -1 mask: 1 pid -1 domain policy: first-touch mask: 0 $ procstat cpuset $$ PID TID COMM TDNAME CPU CSID CPU MASK 1111 7777 zsh - -1 1 0-7 $ cpuset -l 1 yes >/dev/null & $ cpuset -g --count -p $(pgrep yes) 8 $ cpuset -g -p $(pgrep yes) pid 2222 mask: 1 pid 2222 domain policy: first-touch mask: 0 $ procstat cpuset $(pgrep yes) PID TID COMM TDNAME CPU CSID CPU MASK 2222 8888 yes - 1 3 1 From nobody Thu Feb 16 18:01:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjSJ3yWJz3rFvG for ; Thu, 16 Feb 2023 18:01:36 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjSH4VjLz4HtR for ; Thu, 16 Feb 2023 18:01:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f52.google.com with SMTP id j29-20020a05600c1c1d00b003dc52fed235so2354243wms.1 for ; Thu, 16 Feb 2023 10:01:35 -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=N3La6jg3tmlLrBdnmvlcc/v8VU0BaBUAk40M0XZAX40=; b=yBFSlfMxUsZH6dTLUsTkDc9Z5/2k2go+fHGGmdVm4YcHphxcvFZbYU5BgFZ9PRdy5+ tZpyC1U0ekYLx+G5AmEQ5R4ziWBxowMTf82oCZ3eqt//9k/HqW278B580p6IUFlgSJsj zu28vYDsjgG8qYZj960HlWVjwBOtBV5z3dcrPmr6hra/xU3mCtSeB4rLgR0YXc5TF4YL imTAE5q6/bUD3s6surauuFHQ7WFiJHSTOlu3/J3W/f5UnxlIurqYZ/uwIcVqFYJCqTFo Y75wSD5y3gfjQq5BuCT6fSaqAnfOO6WKGMi4b34oLJKaqBqTI7uxMM9gYmG4YLV0c0oC LsAQ== X-Gm-Message-State: AO0yUKVUullSO9OkdzHAls0Hq3UPj8LjQ2I6F0WRoFtVj+EyWL1o+LaJ k5yt0Rj9U1y8Vsm0r0BWVXkY/A== X-Google-Smtp-Source: AK7set9bwvSrmWkQl5RgM03V/e7ZcEytZ7oZoOFe9/l2MPo9L6Qf0k4rUS25ZzJ3/7PkZm9CcMUJng== X-Received: by 2002:a05:600c:198a:b0:3e0:114:62ee with SMTP id t10-20020a05600c198a00b003e0011462eemr5569151wmq.8.1676570493993; Thu, 16 Feb 2023 10:01:33 -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 k1-20020a7bc401000000b003dc47d458cdsm2417923wmi.15.2023.02.16.10.01.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2023 10:01:33 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: d9d5f2c042a5 - main - cpuset: add --count From: Jessica Clarke In-Reply-To: Date: Thu, 16 Feb 2023 18:01:32 +0000 Cc: Mateusz Guzik , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202302041751.314HpRrn042970@gitrepo.freebsd.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spamd-Result: default: False [-2.49 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.52:from]; FREEFALL_USER(0.00)[jrtc27]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.52:from]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-Rspamd-Queue-Id: 4PHjSH4VjLz4HtR X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On 5 Feb 2023, at 17:28, Alexey Dokuchaev wrote: >=20 > On Sun, Feb 05, 2023 at 04:42:16PM +0100, Mateusz Guzik wrote: >> On 2/5/23, Alexey Dokuchaev wrote: >>> On Sat, Feb 04, 2023 at 05:51:27PM +0000, Mateusz Guzik wrote: >>>> commit d9d5f2c042a51a9f0dd69eb1fc349efd81ffa483 >>>>=20 >>>> cpuset: add --count >>>>=20 >>>> Can be used to count the number of hardware threads in the cpu = set. >>>>=20 >>>> For example: [...] >>>>=20 >>>> The intent is to replace calls to sysctl hw.ncpu and kern.smp.cpus >>>=20 >>> Speaking of these two, do we really need both, unless they are not >>> exactly the same? (They do seem so, though.) >>=20 >> They are not, cpuset grabs a pid argument, while nproc only works on = itself. >=20 > cpuset? pid argument? But I was not asking about cpuset, I was = wondering > whether we need both of these sysctls: >=20 > $ sysctl hw.ncpu > hw.ncpu: 2 > $ sysctl kern.smp.cpus > kern.smp.cpus: 2 One prints mp_ncpus, the other smp_cpus. As far as I=E2=80=99m aware = those two are the same for as long as userspace is running, and only differ during early boot before AP bringup (mp_ncpus is how many it will bring up, and smp_cpus counts up as they come online until the two become equal). Jess From nobody Thu Feb 16 18:01:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 18:19:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjrQ4CPjz3rGyf; Thu, 16 Feb 2023 18:19: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 4PHjrQ39MNz4M60; Thu, 16 Feb 2023 18:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676571542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OzGzZtdio9k+Gfrfhc5xZkZ0Dl9sbTqHMWkp/kpgf50=; b=SumkDMjXKmTXis6XoBgKd5b52ztnN5Cp8U/AzH78ZQoBVCoTdyc09n1fWCvCMB93KOLLil nx+IPf0YnKChIpcrAyHP2/D9k1ik4j0EbzgS6ieYBpPmRfv0QNkMeNVS/+0UjM3E3Dn1ZJ ZLnlI/1x+cwcoS8E+ASvZ0zS6SE2+R9nr1OVYzlx9XBbA/H2g0ofRz2smaHvCOqM7ZzDJt WtRM7+2vwevHz4nSZjCKdFfsBNVuD913ucDV14ISEzcfwElKpNf1rJITjhJ9FF87U7VXWY PS7MKELhd0og8DbaLX0iLXx0s/HE4WePWVqD3iXcnv5v2MEIA5uhrgJpX5ZMTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676571542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OzGzZtdio9k+Gfrfhc5xZkZ0Dl9sbTqHMWkp/kpgf50=; b=IgHDiYKIJZopP7SgiWsjfuKMXHmZm/JiviP9u08majTjfTv/q3DtXKyLydGgVdNqPrRHtX 2/fTdOGWI2hUM/OkTzvJsmK+ZURvWTc8IAxI1AAeRTyOJFsvFfU43wE6kA6wIbkyPa8JxZ Pj8+3EWZgX/VZZkD3JQ1lnGr2SmX+lSDB+d3X9mRHot45GKsf8+hj5YGy3Rlgx63gvUd64 bLrOvzJi/zQOrqjSAqj1vuHbriwgCEOgbP8zzsSp0IbQfSbGUAcCK52XZelKgheFiPXIT3 gJrmTDG6P2gvoQ0XpaNgePIncj2kI7w/9B735VSDjAL98IjxtrPwWkrLSImLuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676571542; a=rsa-sha256; cv=none; b=ZVVjLg6k18u74ZUmp2MfU5BfAp5eGuLZxX2o83zvRnuqsV35bc7vlOT267h4qWonSgVtuy 9kYooFFiBxTVXNvri00o749/nmnd+JBmvOR3aX7OSWcPjECNYnWBSfWcIsA8SHMklonK74 IA1Y+NEPqwQd4OROq7s5nzzCF5jMmFreunS/DH0hFbKWl2zqEpwpehzFbXyFwxTZD2VEwT 7dlD7NyRuaCDdbIB+tH5VcStwEdtG7Ber9RKT0DVYQirXZrt/1lmVbvviSkh2HifbAbpB+ b0g2hQTD5sI6RWqHwvpTPQ/TkecynHsyjWmB9WsxG3tDQgCf+brBdgnbRO4cOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHjrQ2DK2z1CcP; Thu, 16 Feb 2023 18:19: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 31GIJ2Du001753; Thu, 16 Feb 2023 18:19:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GIJ2JI001752; Thu, 16 Feb 2023 18:19:02 GMT (envelope-from git) Date: Thu, 16 Feb 2023 18:19:02 GMT Message-Id: <202302161819.31GIJ2JI001752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 2924ae099a1e - main - Revert "cpuset: add --count" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2924ae099a1e8ffc5b6040f3af5645aa54c0f629 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2924ae099a1e8ffc5b6040f3af5645aa54c0f629 commit 2924ae099a1e8ffc5b6040f3af5645aa54c0f629 Author: Mateusz Guzik AuthorDate: 2023-02-16 18:12:46 +0000 Commit: Mateusz Guzik CommitDate: 2023-02-16 18:18:49 +0000 Revert "cpuset: add --count" The patch introduced a behavior change coming from getopt_long, namely the entire argument array would be parsed looking for opts, which affected uses spawning new processes without passing '--' to delimit where cpuset arguments end. [1] Apart from that turns out the change had a bug: using CPU_LEVEL_ROOT instead of CPU_LEVEL_WHICH, returning a different cpuset than intended. [2] The intended functionality is provided with nproc(1), which landed after this change. As such, revert for the time being. This reverts commit d9d5f2c042a51a9f0dd69eb1fc349efd81ffa483. Reported by: Mark Millard [1] Reported by: jbeich [2] --- usr.bin/cpuset/cpuset.1 | 16 +--------------- usr.bin/cpuset/cpuset.c | 51 +------------------------------------------------ 2 files changed, 2 insertions(+), 65 deletions(-) diff --git a/usr.bin/cpuset/cpuset.1 b/usr.bin/cpuset/cpuset.1 index 31a3e45134d7..1d0180c98991 100644 --- a/usr.bin/cpuset/cpuset.1 +++ b/usr.bin/cpuset/cpuset.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 25, 2022 +.Dd July 3, 2018 .Dt CPUSET 1 .Os .Sh NAME @@ -57,10 +57,6 @@ .Fl g .Op Fl cir .Op Fl d Ar domain | Fl j Ar jail | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq -.Nm -.Fl g -.Fl -count -.Fl p Ar pid .Sh DESCRIPTION The .Nm @@ -176,16 +172,6 @@ Specifies a thread id as the target of the operation. .It Fl x Ar irq Specifies an irq as the target of the operation. .El -.Pp -The long options are as follows: -.Bl -tag -width ".Fl -count" -.It Fl -count -Count the number of hardware threads included in the set. Requires -.Fl g -and -.Fl p -flags. -.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES diff --git a/usr.bin/cpuset/cpuset.c b/usr.bin/cpuset/cpuset.c index 528cbc39bbc7..79c6c2b6ca79 100644 --- a/usr.bin/cpuset/cpuset.c +++ b/usr.bin/cpuset/cpuset.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -53,9 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* - * Short opts. - */ static int Cflag; static int cflag; static int dflag; @@ -69,24 +65,12 @@ static int rflag; static int sflag; static int tflag; static int xflag; - -/* - * Long-only opts. - */ -static int count_flag; - static id_t id; static cpulevel_t level; static cpuwhich_t which; -#define OPT_THREADCOUNT (CHAR_MAX + 1) static void usage(void); -static struct option long_opts[] = { - { "count", no_argument, NULL, OPT_THREADCOUNT }, - { NULL, 0, NULL, 0 } -}; - struct numa_policy { const char *name; int policy; @@ -299,18 +283,6 @@ printsetid(void) levelnames[level], setid); } -static void -printcpucount(void) -{ - cpuset_t mask; - CPU_ZERO(&mask); - - if (cpuset_getaffinity(CPU_LEVEL_ROOT, CPU_WHICH_PID, id, - sizeof(mask), &mask) != 0) - err(EXIT_FAILURE, "getaffinity"); - printf("%d\n", CPU_COUNT(&mask)); -} - int main(int argc, char *argv[]) { @@ -328,8 +300,7 @@ main(int argc, char *argv[]) level = CPU_LEVEL_WHICH; which = CPU_WHICH_PID; id = pid = tid = setid = -1; - while ((ch = getopt_long(argc, argv, - "Ccd:gij:l:n:p:rs:t:x:", long_opts, NULL)) != -1) { + while ((ch = getopt(argc, argv, "Ccd:gij:l:n:p:rs:t:x:")) != -1) { switch (ch) { case 'C': Cflag = 1; @@ -388,30 +359,12 @@ main(int argc, char *argv[]) which = CPU_WHICH_IRQ; id = atoi(optarg); break; - case OPT_THREADCOUNT: - count_flag = 1; - break; default: usage(); } } argc -= optind; argv += optind; - - /* - * count requires g and p flags and is incompatible with - * everything else for simplicity. - */ - if (count_flag) { - if (!gflag || !pflag) - usage(); - if (Cflag || cflag || dflag || iflag || jflag || lflag || - nflag || rflag || sflag || tflag || xflag) - usage(); - printcpucount(); - exit(EXIT_SUCCESS); - } - if (gflag) { if (argc || Cflag || lflag || nflag) usage(); @@ -518,7 +471,5 @@ usage(void) fprintf(stderr, " cpuset -g [-cir]\n" " [-d domain | -j jailid | -p pid | -t tid | -s setid | -x irq]\n"); - fprintf(stderr, - " cpuset -g --count -p pid\n"); exit(1); } From nobody Thu Feb 16 18:19:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjsG5kTSz3rGw9; Thu, 16 Feb 2023 18:19:46 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) (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 4PHjsG3bQHz4Mg2; Thu, 16 Feb 2023 18:19:46 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x232.google.com with SMTP id cz14so2502720oib.12; Thu, 16 Feb 2023 10:19:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yAcFh9e221DXzKjyGFEb0RaR72E7gEMT51OAT9JHMTs=; b=E/u8mrMMrOQ5QRMB0LuChYf9gS8pzlg9kHqdCN7ghTPvNAbl3r1J4glmAnKb54X92q JCt4b1SyioVbKHw+uWWOsk1BUnSxfXPS14jVZDmdQanFNFc2BfNRonAZ2CZ7PyG+Am2F tfRApoPJ23wjiIXk3ZR1ln/YyRRy2VwvtPBTJNQOfdPG2PoqRqKwcBrdCUx5hmdcH/Rz c7Zm2uzmsIvhIWp0LVoyaKk4DCqZbSXJhg84HcJI1Hg/DtailWTxEdi8YzLROX7CpivE u8y6sX3r+YQpCyilZbwIVYl3irZ/36PqXVpfRdhC0wH2amBtixtaevcDKvP0IS2E6tU1 H7jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yAcFh9e221DXzKjyGFEb0RaR72E7gEMT51OAT9JHMTs=; b=c+daRH9WcwpOQ4x1tniYbiGd2nlJS8R8Si6/E1FPcOJDCl9xHcj/viJjw09nPu4aKp 8PlIGUY+JTKzHmv2Efly88FcJmKkfpqDJIzKnzl04k508K+/HN0C1hHr6yDkoreZ0m1z D9tnRjH4+HNBMjit38nHn4IFdIzuoX5T7gcqs4DpFC81psjE2jFhPz78uRbSnC71p/tQ davU3eF1QU1j6v61M/A3AFiAKdV4HX8e4AuA4UExb2SRSadnBPfyU1XsDaSzlPc1jpxQ R3lDq3FYOVYEjPS333gyZ685AjcTLfQZOvXS2I3ZRdF889/svGfyBBkXPAJDx+mMMQPz wcfw== X-Gm-Message-State: AO0yUKUuceS7CYu3wox2ri4U/pXK1Rm8bDSXXskCRQelpcClZRm+shPQ BlnfBVHfaukWelHSRDJGiW8ZSmsCPQBJi43szHgpNaNe X-Google-Smtp-Source: AK7set/2s/5kOUVHJeoILWlv5m1rJbG/AYepopYihEx1if1YK+hIrXQWxtkBRX8V4chI3t2oJN1F5eRaTLF2QFTTv9g= X-Received: by 2002:a05:6808:2195:b0:378:348b:9346 with SMTP id be21-20020a056808219500b00378348b9346mr197261oib.81.1676571584911; Thu, 16 Feb 2023 10:19:44 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:4381:0:b0:4b9:9c2d:ce62 with HTTP; Thu, 16 Feb 2023 10:19:44 -0800 (PST) In-Reply-To: References: <202302041751.314HpRrn042970@gitrepo.freebsd.org> From: Mateusz Guzik Date: Thu, 16 Feb 2023 19:19:44 +0100 Message-ID: Subject: Re: git: d9d5f2c042a5 - main - cpuset: add --count To: Jan Beich Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PHjsG3bQHz4Mg2 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2/16/23, Jan Beich wrote: > Mateusz Guzik writes: > >> +.Pp >> +The long options are as follows: >> +.Bl -tag -width ".Fl -count" >> +.It Fl -count >> +Count the number of hardware threads included in the set. Requires >> +.Fl g >> +and >> +.Fl p >> +flags. >> +.El > > --count appears to report total number of "hardware threads" instead of > "included in the set". Is this intentional? If so the wording is confusing. > > $ cpuset -l 1 -- cpuset -g --count -p -1 > 8 > $ cpuset -l 1 -- cpuset -g -p -1 > pid -1 mask: 1 > pid -1 domain policy: first-touch mask: 0 > $ procstat cpuset $$ > PID TID COMM TDNAME CPU CSID CPU MASK > 1111 7777 zsh - -1 1 0-7 > > $ cpuset -l 1 yes >/dev/null & > $ cpuset -g --count -p $(pgrep yes) > 8 > $ cpuset -g -p $(pgrep yes) > pid 2222 mask: 1 > pid 2222 domain policy: first-touch mask: 0 > $ procstat cpuset $(pgrep yes) > PID TID COMM TDNAME CPU CSID CPU MASK > 2222 8888 yes - 1 3 1 > that was a bug not worth fixing, so i whacked the feature: https://cgit.freebsd.org/src/commit/?id=2924ae099a1e8ffc5b6040f3af5645aa54c0f629 -- Mateusz Guzik From nobody Thu Feb 16 20:37:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHmwG1PQWz3rVfr; Thu, 16 Feb 2023 20:37: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 4PHmwG0dCNz3w4j; Thu, 16 Feb 2023 20:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676579854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEwMn7roErqzmtzdsPaIYJ0vaVn+J1ed7l33M7KbH08=; b=xOsOGoCrvYhxPKhxAToeNnIdliML/nyx1R6kmrpgGY0XQMWntLG1uEqPB5Um7SOGdPx2Ke 0O8o6dAd0LnXgPc4CnAb4au533b+vswB7dZo9X9yRtHHxqM78E+YhcGYp3Dv4Lo2EOm9BA si5YQK8yMEc7/XWDc1drJYdCWvWjilSTVkb+XYit/TA/s/icueU4njg2jVrf3lo1FLDTJy 3Ii2ztZivr6rPdj2GUUnUG8jKXoHqmIhaelR1UPkjqRv0QkA6GwV8OsT2iLsTROp0I1ozM bsYW8gRsaJm/xnjpZVH5Od6YZ7UWS3otRxok3AWSJ54UjwllSgqqPDtGtDIiKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676579854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEwMn7roErqzmtzdsPaIYJ0vaVn+J1ed7l33M7KbH08=; b=iaqy5odSrv8Vu6ej2Occxeq1Xqc6AV/eN9iHVN6SRbdl76jwnLD376Z+lkzvGODeBF0O4n cwwobEBbRY7onS8t/oduQmuppcgd7QtQx5X0FHIYwmHY8LXWyznvHp9AQ9N3PoUHayd69W o2MjMOVR5i01X25/42dqqnEaYCJ6q83U4ZvvHbjtBo2fLrosYZxA9v7HQrvcM8um3O7GCT HWX8a1a3GjftJy22cvvf9Mr7Jj6C034vi/hO9WGA56VyV2JK1yuKJVqIBU/iuK2AC83460 nbUyySjyj+BEhI56cDUU8a5H007DcDFSkSjX2t5Z/4+X+MNTEVxmUQF84Kx4lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676579854; a=rsa-sha256; cv=none; b=KBj0SgP1uiAfHxmhXz4BIXlvZb9YMNtHnnUJx9szKu0xYbMSK6ikcS6+jXPQ6POctZNdKC qundYOF57Q0TZIQkzJsyDRPlVPPmax4hTeBGOAD9+jSqJ7UW1n1MOQ87sy30tzVuBPUJzn +2koiipEv+l596n0NlNU+0/uqvHUXXTlsmQTnWpD0cJpxFCDaLVFJtaFDdTXB2toC0AvYv Ttp9B1MMWmKhFIE2dHvsTp65t5fccWUoE0tZipsHYVW5Yd82BrIOIpcXTCLkxniZ9NZqOX NmV3rMcgUewLSK6y76uiIC3fHW2iBe2FvPeZDJzm4MVZbA98XLfIqUgg6UJ9DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHmwF6Sw7zHfB; Thu, 16 Feb 2023 20:37: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 31GKbXVN002475; Thu, 16 Feb 2023 20:37:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GKbX0L002474; Thu, 16 Feb 2023 20:37:33 GMT (envelope-from git) Date: Thu, 16 Feb 2023 20:37:33 GMT Message-Id: <202302162037.31GKbX0L002474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: f518229d5520 - main - config: fix some common issues with path() usage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f518229d552012bfb1129b2bf1d18dfc89a03b58 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f518229d552012bfb1129b2bf1d18dfc89a03b58 commit f518229d552012bfb1129b2bf1d18dfc89a03b58 Author: Kyle Evans AuthorDate: 2023-02-16 20:36:16 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 20:36:16 +0000 config: fix some common issues with path() usage None of the callers check that the allocation in path() failed, so let's check in path() and abort instead of failing. Along those lines, none of the callers seem to acknowledge that the returned string needs to be free()d -- let's do that as well. There are a couple not addressed in this commit that will be addressed in a future commit by pushing the path() call down into moveifchanged() instead and freeing it properly there. CID: 1505271, 1505250, 1505279 Reviewed by: emaste, imp --- usr.sbin/config/main.cc | 8 +++++++- usr.sbin/config/mkoptions.cc | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/usr.sbin/config/main.cc b/usr.sbin/config/main.cc index ef24d373c8b0..f155b7c5387a 100644 --- a/usr.sbin/config/main.cc +++ b/usr.sbin/config/main.cc @@ -457,6 +457,8 @@ path(const char *file) asprintf(&cp, "%s/%s", destdir, file); else cp = strdup(destdir); + if (cp == NULL) + err(EXIT_FAILURE, "malloc"); return (cp); } @@ -553,6 +555,8 @@ configfile(void) fo = fopen(p, "w"); if (!fo) err(2, "%s", p); + free(p); + if (filebased) { /* Is needed, can be used for backward compatibility. */ configfile_filebased(cfg); @@ -673,8 +677,10 @@ cleanheaders(char *p) if (hl) continue; printf("Removing stale header: %s\n", dp->d_name); - if (unlink(path(dp->d_name)) == -1) + p = path(dp->d_name); + if (unlink(p) == -1) warn("unlink %s", dp->d_name); + free(p); } (void)closedir(dirp); } diff --git a/usr.sbin/config/mkoptions.cc b/usr.sbin/config/mkoptions.cc index f45c1026417c..134c09c2d074 100644 --- a/usr.sbin/config/mkoptions.cc +++ b/usr.sbin/config/mkoptions.cc @@ -294,6 +294,7 @@ tooption(char *name) static char hbuf[MAXPATHLEN]; char nbuf[MAXPATHLEN]; struct opt_list *po; + char *fpath; /* "cannot happen"? the otab list should be complete.. */ (void)strlcpy(nbuf, "options.h", sizeof(nbuf)); @@ -305,7 +306,9 @@ tooption(char *name) } } - (void)strlcpy(hbuf, path(nbuf), sizeof(hbuf)); + fpath = path(nbuf); + (void)strlcpy(hbuf, fpath, sizeof(hbuf)); + free(fpath); return (hbuf); } From nobody Thu Feb 16 20:37:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHmwH25vqz3rVg0; Thu, 16 Feb 2023 20:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHmwH1H0tz3vyc; Thu, 16 Feb 2023 20:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676579855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ceWreJTICDSg5+OSZpN/mnzbQlnJrwD3fi0zuSQFjg=; b=sA54yPwQvSm78ZqcIuUdvY9pnRtln6P2T+2XSTAjn9f7QsbUGAUxAhz8nm+r+Z+Ua03tnC RIcujgQoZfujnR+OwL9Dj6WYUQGh54PqzjxYDQy0lqKTG9wGxzjcRpNEbszt9zu3DyMrOu TJ1AMCkUGBNEkzQqUQ1A4hrkwF+kGpwr1fbjWDhpFrlAyLHGTbetgfuAM0TpNC2wGRiCgP d9zcPPEaZJ0pPDvcVTIZ4aqPgfeCnf0x+CxPR+szCRcYVqKdqn0mt5g/sSUFWucDc2vNZk 1jFLFQifnOk6H7tCtwN6IYtuSelvoASBHmbjB7BWIKchgfTZg4SwvpzX+7fz0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676579855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ceWreJTICDSg5+OSZpN/mnzbQlnJrwD3fi0zuSQFjg=; b=kHjYPWhYuLi32NqV393bnl9hg2v97D/YKimLcKGGKhMxwsxHSzjRZ/j2qQjBNm+I6iwy/5 bnFLOJTi6OLW574DUsLvLTgqFcbyjjZKiXtKgGHzuRg7shApcmeFfkPmkjhLhOnOps2dvr id1imgohejOYUBEHK/XD/Mc1yvm57V36p7A8qcLTu59QcqepFiSx0yWO+EzwaL58RQlQYa /pEFguAC934T2cHkaMfK+RlOeqsqzi9yH0p7rWLCjvXkZt5BBts6vxGouRhKRnBXb08SIe RKftPuYIMGhr2h4Y3QloK3g+LYDCHvRJFIbGDCSvgstMk54K+LWacBIBS7LuuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676579855; a=rsa-sha256; cv=none; b=JaHCowjPxdboEO5ifpzVfYR2ddjAkLRDIMaru+dcfJ3mCo46iHb27g5kuCTfh8Leri+Je8 l3gbSFev4FWjG8/0dkEwpoh3qPkmUcZiILFKwL4DZFVvMTD/iteQ6CE+z+MBJ0YNaWLZiK 1z97gPlvSqPE0VcCWQ3Etw8S38w9kmiss+4qMQ0WA0Y3fjUaQ0agmA750DG0qx3pxSDHDs gTYqKRgMnG3Y2/UOrOakhrbDd9wXOvwC10UUwvw8FCculMNigMyDM7QNcsERni2EQakQU2 oEPNjzJoajwzsPSX3IZIW7DiYWPoKOeuOsuy7Mpz+PuoEG4IM/pihJJluFvGiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHmwH0FZMzHqM; Thu, 16 Feb 2023 20:37: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 31GKbYsV002499; Thu, 16 Feb 2023 20:37:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GKbYuq002498; Thu, 16 Feb 2023 20:37:34 GMT (envelope-from git) Date: Thu, 16 Feb 2023 20:37:34 GMT Message-Id: <202302162037.31GKbYuq002498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: b2c5a01722f9 - main - config: push path() into moveifchanged() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2c5a01722f9b18a56ab5459dceba1ae5e50fddd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b2c5a01722f9b18a56ab5459dceba1ae5e50fddd commit b2c5a01722f9b18a56ab5459dceba1ae5e50fddd Author: Kyle Evans AuthorDate: 2023-02-16 20:36:16 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 20:36:42 +0000 config: push path() into moveifchanged() Every caller path()s its arguments anyways, just simplify these and push path() into moveifchanged(). This fixes a number of memory leaks in the process since path() allocates memory, which we will now free(). While we're here, make sure we close from_fd/to_fd appropriately. CID: 1471040, 1471714, 1472045, 1006907, 1006908 Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D38641 --- usr.sbin/config/main.cc | 33 ++++++++++++++++++++++----------- usr.sbin/config/mkmakefile.cc | 6 +++--- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/usr.sbin/config/main.cc b/usr.sbin/config/main.cc index f155b7c5387a..66a071401183 100644 --- a/usr.sbin/config/main.cc +++ b/usr.sbin/config/main.cc @@ -579,7 +579,7 @@ configfile(void) p += strlen(KERNCONFTAG); fprintf(fo, "%s", p); fclose(fo); - moveifchanged(path("config.c.new"), path("config.c")); + moveifchanged("config.c.new", "config.c"); cfgfile_removeall(); } @@ -591,6 +591,7 @@ void moveifchanged(const char *from_name, const char *to_name) { char *p, *q; + char *from_path, *to_path; int changed; size_t tsize; struct stat from_sb, to_sb; @@ -598,17 +599,19 @@ moveifchanged(const char *from_name, const char *to_name) changed = 0; - if ((from_fd = open(from_name, O_RDONLY)) < 0) + from_path = path(from_name); + to_path = path(to_name); + if ((from_fd = open(from_path, O_RDONLY)) < 0) err(EX_OSERR, "moveifchanged open(%s)", from_name); - if ((to_fd = open(to_name, O_RDONLY)) < 0) + if ((to_fd = open(to_path, O_RDONLY)) < 0) changed++; if (!changed && fstat(from_fd, &from_sb) < 0) - err(EX_OSERR, "moveifchanged fstat(%s)", from_name); + err(EX_OSERR, "moveifchanged fstat(%s)", from_path); if (!changed && fstat(to_fd, &to_sb) < 0) - err(EX_OSERR, "moveifchanged fstat(%s)", to_name); + err(EX_OSERR, "moveifchanged fstat(%s)", to_path); if (!changed && from_sb.st_size != to_sb.st_size) changed++; @@ -619,23 +622,31 @@ moveifchanged(const char *from_name, const char *to_name) p = (char *)mmap(NULL, tsize, PROT_READ, MAP_SHARED, from_fd, (off_t)0); if (p == MAP_FAILED) - err(EX_OSERR, "mmap %s", from_name); + err(EX_OSERR, "mmap %s", from_path); q = (char *)mmap(NULL, tsize, PROT_READ, MAP_SHARED, to_fd, (off_t)0); if (q == MAP_FAILED) - err(EX_OSERR, "mmap %s", to_name); + err(EX_OSERR, "mmap %s", to_path); changed = memcmp(p, q, tsize); munmap(p, tsize); munmap(q, tsize); } + if (changed) { - if (rename(from_name, to_name) < 0) - err(EX_OSERR, "rename(%s, %s)", from_name, to_name); + if (rename(from_path, to_path) < 0) + err(EX_OSERR, "rename(%s, %s)", from_path, to_path); } else { - if (unlink(from_name) < 0) - err(EX_OSERR, "unlink(%s)", from_name); + if (unlink(from_path) < 0) + err(EX_OSERR, "unlink(%s)", from_path); } + + close(from_fd); + if (to_fd >= 0) + close(to_fd); + + free(from_path); + free(to_path); } static void diff --git a/usr.sbin/config/mkmakefile.cc b/usr.sbin/config/mkmakefile.cc index 472f85fa4bc2..969d32cf1389 100644 --- a/usr.sbin/config/mkmakefile.cc +++ b/usr.sbin/config/mkmakefile.cc @@ -184,7 +184,7 @@ makefile(void) } (void) fclose(ifp); (void) fclose(ofp); - moveifchanged(path("Makefile.new"), path("Makefile")); + moveifchanged("Makefile.new", "Makefile"); } static void @@ -327,7 +327,7 @@ makehints(void) } fprintf(ofp, "\"\\0\"\n};\n"); fclose(ofp); - moveifchanged(path("hints.c.new"), path("hints.c")); + moveifchanged("hints.c.new", "hints.c"); } /* @@ -369,7 +369,7 @@ makeenv(void) } fprintf(ofp, "\"\\0\"\n};\n"); fclose(ofp); - moveifchanged(path("env.c.new"), path("env.c")); + moveifchanged("env.c.new", "env.c"); } static void From nobody Thu Feb 16 20:37:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHmwJ2HJ5z3rVg3; Thu, 16 Feb 2023 20:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHmwJ1jcnz3vxL; Thu, 16 Feb 2023 20:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676579856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rossOgng60yxtutRLUfCRL88HVrw6+PZjXnslexh3E=; b=J7r/iJdxtvtH0SxUrhLJ6lTjke/iLjVGdoy7KQGnjgqOvSNHct1L3iGQXsP5iuIu1KLp0U oo/L2D2Dr//EZPy8Am4iIiB9SBNnw2gg58mKG20zFGkm09SPp45SPsEYoOYl51TPq2bxtb cN/qrGpX1fe2gqGjMYq1GWBs6VU6JpYqmhS20O32nuUDzZYaVbaTYxR01S2c9VzHKBtpz9 m71lqoue2DcUaTsSHDW3aIknRpNClGepeeJ3f0agpj+WkjRm9tkNuh4g1zHtxhuDLxkNmR y8FC12jKYCzp1cMtEtbo/6qCPvQVIdCvfGCP59rb4Xa+K//nf98RWSJ3GHZIYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676579856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rossOgng60yxtutRLUfCRL88HVrw6+PZjXnslexh3E=; b=aD9e1Xex8QSqfJcRf0Pm3nQAdvlhEPH58sGpOVaf05B+xSj19vB4FrZiSFgRMAVhlWOy4O iTmvVVnfOWKR82MGzFKTJQQdKxQ+v7qzEkebo8pvQtU29bYsSqW2q23GoMnhP5in5nFN+i 9f5h1HyVF0/7LcbExqivnwYLnpM4w8R7N3gULEd3yMA7+mLQEvaFBidJhVMMJuZFwEUO1R TzlEiITHYziJNz+yS75738k0xvbw/SlkCMgz1PBnehAklawQv3DvKAoy2Fg8vkQYWEKEAm DtqcjDgD/eM3d6r8kWuWiMiUG5W4h14UDp0Rm3rEjdY5DdMlOqj2givrVl1q9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676579856; a=rsa-sha256; cv=none; b=ToBRbw4p2vymI+Tn/0LLhROsnI/RZKrNQgRG9+R4pic32OkeZ1srrF3lRb7VSen82s9SV4 w6p7tJjb34C1GbPXw//+gFEpPpz0lK4SX7qcK5uWrRMO3IrYYR/4LsjuzDlIOetROKNB3v a4bzJS8ykM6eJaBOQ5q/ZKsNsUCdOcru/vgIibrS6PUjuoUn01anzWrD+gdoTeO8HzNkcF nNs7FzsqzbPZTXEG5mnTQVNr6692Zw/E990Qdgo/sOvJW3yYzCLECTU7k8xiA2o3rLG9c6 4YSYx6xX5hA01fTHuOPzAQJXre7QzHbyWUTpK08zxxV5fvyc415tdtIeE2FVcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHmwJ0mWqzHHB; Thu, 16 Feb 2023 20:37: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 31GKbaPM002527; Thu, 16 Feb 2023 20:37:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GKba12002526; Thu, 16 Feb 2023 20:37:36 GMT (envelope-from git) Date: Thu, 16 Feb 2023 20:37:36 GMT Message-Id: <202302162037.31GKba12002526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: da8884202940 - main - config: error out on malformed env/hint lines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da8884202940498096a8c37d91d2fbbf471c6e7b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=da8884202940498096a8c37d91d2fbbf471c6e7b commit da8884202940498096a8c37d91d2fbbf471c6e7b Author: Kyle Evans AuthorDate: 2023-02-16 20:36:17 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 20:37:05 +0000 config: error out on malformed env/hint lines We need these to be assignments, error out if they're not. While we're here, tag errout as __printflike so that the compiler will sanity check the format string + args. CID: 1505293 Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D38642 --- usr.sbin/config/mkmakefile.cc | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/usr.sbin/config/mkmakefile.cc b/usr.sbin/config/mkmakefile.cc index 969d32cf1389..2aaed82ce3ee 100644 --- a/usr.sbin/config/mkmakefile.cc +++ b/usr.sbin/config/mkmakefile.cc @@ -69,10 +69,11 @@ static void read_files(void); static void sanitize_envline(char *result, const char *src); static bool preprocess(char *line, char *result); static void process_into_file(char *line, FILE *ofp); -static void process_into_map(char *line, env_map &emap); +static int process_into_map(char *line, env_map &emap); static void dump_map(env_map &emap, FILE *ofp); -static void errout(const char *fmt, ...) +static void __printflike(1, 2) +errout(const char *fmt, ...) { va_list ap; @@ -269,16 +270,20 @@ process_into_file(char *line, FILE *ofp) fprintf(ofp, "\"%s\\0\"\n", result); } -static void +static int process_into_map(char *line, env_map &emap) { char result[BUFSIZ], *s; if (preprocess(line, result)) { s = strchr(result, '='); + if (s == NULL) + return (EINVAL); *s = '\0'; emap[result] = s + 1; } + + return (0); } static void @@ -320,8 +325,11 @@ makehints(void) ifp = fopen(hint->hint_name, "r"); if (ifp == NULL) err(1, "%s", hint->hint_name); - while (fgets(line, BUFSIZ, ifp) != NULL) - process_into_map(line, emap); + while (fgets(line, BUFSIZ, ifp) != NULL) { + if (process_into_map(line, emap) != 0) + errout("%s: malformed line: %s\n", + hint->hint_name, line); + } dump_map(emap, ofp); fclose(ifp); } @@ -360,8 +368,11 @@ makeenv(void) ifp = fopen(envvar->env_str, "r"); if (ifp == NULL) err(1, "%s", envvar->env_str); - while (fgets(line, BUFSIZ, ifp) != NULL) - process_into_map(line, emap); + while (fgets(line, BUFSIZ, ifp) != NULL) { + if (process_into_map(line, emap) != 0) + errout("%s: malformed line: %s\n", + envvar->env_str, line); + } dump_map(emap, ofp); fclose(ifp); } else From nobody Thu Feb 16 20:37:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHmwK3BLqz3rVTQ; Thu, 16 Feb 2023 20:37: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 4PHmwK2k8dz3wG5; Thu, 16 Feb 2023 20:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676579857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ydtejTkSLfsO92GbNB3rG2ZKvQG6rAedFZKOx9yFjEs=; b=knkDMFs+8fMTuyxeiu6Lxl1ul4PzdHGcdXGbpVoWJnLUrzfIv2TFqvdW1rGbF/WvTOGMU1 17TAhvQbp74KFnjOq4Cyf2d/H2sGsnHU8sDasEnNND8Fi/5SmB675Nlv0I6xwTAxv2sk+Q 10A8ULNBt6Qe0LHMr9YzFdjZ58+4FJ1cLc9DjDwKqAqvK22UBXOlo9RNPl3oK9GzoVAK79 hOAi/WPo/pO/T7vUDVekOkaT+30UtbQL8YLjYB7AvD25PxPRWo2KJq3iZElm2JnO8AIygo WCWxelOr6NKbIVSb6wGs4XwFTSpByu2JcJnRq6CN0Hcg5ME+p+erepAa5gNxFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676579857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ydtejTkSLfsO92GbNB3rG2ZKvQG6rAedFZKOx9yFjEs=; b=a0H8bVRDe2+HfvXuvjXSTDsW6MK8rXEV4ZT1hScgrD72xZNLIH8OnPCHOx0eDA2fkYsseL Oqm0ZNx8KK5p8MREaGdlcC21gZh3xot+sx6mVnGi4GujZpy9hwESt1v5+EdiQ4DZTUeb/A zF8fiAaQAC8HlzzCFAuWXGBtaQr9JSHdnIH3pkLJLlGxMKaSRSE03Z3tWbH50pE5wbIbu6 8KyslRJDNu//ISWR9+1lSAlQH4Hhbz3cYJAktwQDFnxXsZcDf6CMc2qeXNRScBvbLCS7ML kl8szHdQ2PPw+cwnJuQHLHfmdKwNf1/W8liRJ7P37Qv2NDdYIWI/UUEtFdTkJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676579857; a=rsa-sha256; cv=none; b=W11NBoxXiTRYTLC3UdpVLhEX7syroPyoy8xUQAd+8T/YofTnQmpYESimStPRJb43uSfTeS ZyiBAMekPtc6AiCTH3Z6LLhJFQiX8KLJUxDZhiwJ/nx8B+OVTjgv9egVa3gN62BwcY3Cy2 0gssLJS35xgXppedOxHQw+GEY/QYqyt6AMzD03YXWAzYcA9qoe3kNzXX8bXCcVD0ig2yyH FsTY80rquQo7fUQIn5m0h/z4de+cDq6UhP5DgNeuSYP6u/ss6jiv8/LrD9W5PqvpJLpy+o zX/tyyXS4slsKO5HlwNvd65JolWGfzmI32RUwHXt1Q3B1KxVqhmRI15eYMoLHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHmwK1k9czHfC; Thu, 16 Feb 2023 20:37: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 31GKbbfB002562; Thu, 16 Feb 2023 20:37:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GKbbAY002561; Thu, 16 Feb 2023 20:37:37 GMT (envelope-from git) Date: Thu, 16 Feb 2023 20:37:37 GMT Message-Id: <202302162037.31GKbbAY002561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: c04ad15ca7db - main - config: address a number of Coverity issues List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c04ad15ca7dbe9034b274e404edc0bcf6a5300e0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c04ad15ca7dbe9034b274e404edc0bcf6a5300e0 commit c04ad15ca7dbe9034b274e404edc0bcf6a5300e0 Author: Kyle Evans AuthorDate: 2023-02-16 20:36:17 +0000 Commit: Kyle Evans CommitDate: 2023-02-16 20:37:06 +0000 config: address a number of Coverity issues Highlights: - Various memory leaks - FILE* leaks - `tsize` in moveifchanged() is only needed if !changed, and `from_sb` is only valid if !changed. - Simplify trivially true expression - Sanity check elfdump size output (+ fix variable sizes) (des@) CID: 1471167, 1006391, 1505333, 1505275, 1505349, 1505306, 1505232 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D38643 --- usr.sbin/config/lang.l | 2 ++ usr.sbin/config/main.cc | 10 ++++++---- usr.sbin/config/mkoptions.cc | 20 +++++++++++++++----- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l index ed0b2aa794b3..243b66666d0e 100644 --- a/usr.sbin/config/lang.l +++ b/usr.sbin/config/lang.l @@ -297,6 +297,8 @@ include(const char *fname, int ateof) return (-1); } cfgfile_add(fnamebuf == NULL ? fname : fnamebuf); + free(fnamebuf); + in = malloc(sizeof(*in)); assert(in != NULL); in->in_prev = inclp; diff --git a/usr.sbin/config/main.cc b/usr.sbin/config/main.cc index 66a071401183..f6c99e32c594 100644 --- a/usr.sbin/config/main.cc +++ b/usr.sbin/config/main.cc @@ -616,9 +616,9 @@ moveifchanged(const char *from_name, const char *to_name) if (!changed && from_sb.st_size != to_sb.st_size) changed++; - tsize = (size_t)from_sb.st_size; - if (!changed) { + tsize = (size_t)from_sb.st_size; + p = (char *)mmap(NULL, tsize, PROT_READ, MAP_SHARED, from_fd, (off_t)0); if (p == MAP_FAILED) @@ -736,7 +736,7 @@ kernconfdump(const char *file) struct stat st; FILE *fp, *pp; int error, osz, r; - unsigned int i, off, size, t1, t2, align; + size_t i, off, size, t1, t2, align; char *cmd, *o; r = open(file, O_RDONLY); @@ -765,8 +765,10 @@ kernconfdump(const char *file) free(cmd); (void)fread(o, osz, 1, pp); pclose(pp); - r = sscanf(o, "%d%d%d%d%d", &off, &size, &t1, &t2, &align); + r = sscanf(o, "%zu%zu%zu%zu%zu", &off, &size, &t1, &t2, &align); free(o); + if (size > SIZE_MAX - off || off + size > (size_t)st.st_size) + errx(EXIT_FAILURE, "%s: incoherent ELF headers", file); if (r != 5) errx(EXIT_FAILURE, "File %s doesn't contain configuration " "file. Either unsupported, or not compiled with " diff --git a/usr.sbin/config/mkoptions.cc b/usr.sbin/config/mkoptions.cc index 134c09c2d074..1ffb9722af8b 100644 --- a/usr.sbin/config/mkoptions.cc +++ b/usr.sbin/config/mkoptions.cc @@ -263,7 +263,7 @@ do_option(char *name) if (op == NULL) err(EXIT_FAILURE, "calloc"); op->op_name = ns(name); - op->op_value = value ? ns(value) : NULL; + op->op_value = ns(value); SLIST_INSERT_HEAD(&op_head, op, op_next); } @@ -383,8 +383,10 @@ read_option_file(const char *fname, int flags) } optname = ns(wd); wd = get_word(fp); - if (wd.eof()) - return (1); + if (wd.eof()) { + free(optname); + break; + } if (wd.eol()) { if (flags) { fprintf(stderr, "%s: compat file requires two" @@ -399,10 +401,18 @@ read_option_file(const char *fname, int flags) } else { val = ns(wd); } - if (flags == 0) + + if (flags == 0) { + /* + * insert_option takes possession of `optname` in the + * new option instead of making yet another copy. + */ insert_option(fname, optname, val); - else + } else { update_option(optname, val, flags); + free(optname); + optname = NULL; + } } (void)fclose(fp); return (1); From nobody Thu Feb 16 21:28:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHp315gm8z3rYvC; Thu, 16 Feb 2023 21:28: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 4PHp3159n4z43Bh; Thu, 16 Feb 2023 21:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676582909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V48vs2RYzVTGZzYuahq9Fb/wjxWes3+auaYrUz15r1U=; b=cG8Ih03iGgSFy13wTnIXjUa/A3TUXH/D6pxMruGqRwmMgwg7AIwl5xklw6WGYlXZtMJ7x2 uCx/Ap0L5lHA2i51OyB4bPC4q5aZFrTHBPCG96HZ+xtALgbl4UunYCQ5eDtxBeUHXLFII1 DzVvpNIH7NKJ81VZ1zmOf16nAExRyUEsdpoSfmMBhfcOer5qGJ0Mia0EyAPY6NhYzNXWhf JZN6UitpVYksOsmg/czmOt3K5MvWAjo9pMANGgn3DyRHRT3OpFBmqJN2zIFQHMH52T98Vb QghbqfaIZl4GOLv3ozMe0xaOD5WXOJAhxZevyRjODgY/adG01E6K37jQWWTKjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676582909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V48vs2RYzVTGZzYuahq9Fb/wjxWes3+auaYrUz15r1U=; b=qmuqaKRQKGvxK5UJTJYYv5JFfm2v0XXXEnzvjwKobv804Q0IYRBNDBv5lJ26CkWIyojxvK dEERiYyk8yFhHiYaFR2aukg5OKkQBiL9AE2tOmtyV5FP2RWqOJ3KKxpRwG23syfxuqVurx 968eLqX2VdJSRMf+8hITu0ec7j7tzm0lMLBHwhjLQffEa5jj2ZrAMRCzfahXKJ1OKK9AKL Ss7FgScuGz7Qbh/mztc39Wj6ytielAqdPfosJSuub9HdMS8NH0pdX9lXnJT+SXqxfM674A CXYauNmfXThtehjFSUqgLRs4r1UCZFNgXw0t4WUwiKFyeG2WE/N81dFiDuxlzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676582909; a=rsa-sha256; cv=none; b=Y2X/C7iYbkQQYUbx6E4PJFZYJAmaYG/E4KoWcYX2awpeuNUi/WDyhvTO8rzg9PFOWyQrAb c8Z26sBGzcBPLmzXFnpv6s/61S7hlz8W+unGorM2347mvg+Tw0zKw3L8XMx/5mzlQw9FqX /L5fy7MkZdwmGUJ+soTq5nRlRSvA/1nxiN2rUVVi2WxMBBzCGwI/ctZf2+WxCACGQHWDzi oRODSifKXGX4DXyVMggPsIJQJIlDkD6ev7SOfSuI+iwfSZPj3hkD8bMOrKHalS7/Ur+upo lnZyxT9RB4VhkVj/MKMWBPmyDGW+W6tOJjc9ztsFfg0BXCMsPXqbLrkmVISAzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHp314DlpzK3t; Thu, 16 Feb 2023 21:28: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 31GLSTet074456; Thu, 16 Feb 2023 21:28:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GLSTqa074455; Thu, 16 Feb 2023 21:28:29 GMT (envelope-from git) Date: Thu, 16 Feb 2023 21:28:29 GMT Message-Id: <202302162128.31GLSTqa074455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 4787d888c31f - main - Clean up additional obsolete MLINKS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4787d888c31fbce84af003bbd4cd4bdce0b1bcd9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4787d888c31fbce84af003bbd4cd4bdce0b1bcd9 commit 4787d888c31fbce84af003bbd4cd4bdce0b1bcd9 Author: Mitchell Horne AuthorDate: 2023-02-13 18:29:12 +0000 Commit: Mitchell Horne CommitDate: 2023-02-16 21:22:35 +0000 Clean up additional obsolete MLINKS Sponsored by: The FreeBSD Foundation Fixes: d1c7405ef68a ("PCBGROUP.9: remove obsolete man page") Fixes: 52f9a2823c64 ("rtalloc.9: remove obsolete man page") --- ObsoleteFiles.inc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 2f676ae41e14..74f0c70c25f1 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -411,9 +411,31 @@ OLD_FILES+=usr/tests/usr.bin/timeout/timeout_test # 20230124: rtalloc.9 removed OLD_FILES+=usr/share/man/man9/rtalloc.9.gz +OLD_FILES+=usr/share/man/man9/rtalloc_fib.9.gz +OLD_FILES+=usr/share/man/man9/rtalloc_ign.9.gz +OLD_FILES+=usr/share/man/man9/rtalloc_ign_fib.9.gz +OLD_FILES+=usr/share/man/man9/rtalloc1.9.gz +OLD_FILES+=usr/share/man/man9/rtalloc1_fib.9.gz +OLD_FILES+=usr/share/man/man9/rtfree.9.gz +OLD_FILES+=usr/share/man/man9/RT_ADDREF.9.gz +OLD_FILES+=usr/share/man/man9/RT_LOCK.9.gz +OLD_FILES+=usr/share/man/man9/RT_REMREF.9.gz +OLD_FILES+=usr/share/man/man9/RT_RTFREE.9.gz +OLD_FILES+=usr/share/man/man9/RT_UNLOCK.9.gz +OLD_FILES+=usr/share/man/man9/RTFREE.9.gz +OLD_FILES+=usr/share/man/man9/RTFREE_LOCKED.9.gz # 20230123: PCBGROUP.9 removed OLD_FILES+=usr/share/man/man9/PCBGROUP.9.gz +OLD_FILES+=usr/share/man/man9/in_pcbgroup_byhash.9.gz +OLD_FILES+=usr/share/man/man9/in_pcbgroup_byinpcb.9.gz +OLD_FILES+=usr/share/man/man9/in_pcbgroup_destroy.9.gz +OLD_FILES+=usr/share/man/man9/in_pcbgroup_enabled.9.gz +OLD_FILES+=usr/share/man/man9/in_pcbgroup_init.9.gz +OLD_FILES+=usr/share/man/man9/in_pcbgroup_remove.9.gz +OLD_FILES+=usr/share/man/man9/in_pcbgroup_update.9.gz +OLD_FILES+=usr/share/man/man9/in_pcbgroup_update_mbuf.9.gz +OLD_FILES+=usr/share/man/man9/in6_pcbgroup_byhash.9.gz # 20221214: TCPDEBUG removed OLD_FILES+=usr/include/netinet/tcp_debug.h From nobody Thu Feb 16 21:28:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHp326L5mz3rZJc; Thu, 16 Feb 2023 21:28: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 4PHp325jjhz43FT; Thu, 16 Feb 2023 21:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676582910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdV1UJDJuHC1USclDSwmwvz7kY6i2sNZiW7Wni4OVgU=; b=m/LFmkoys2Zp06t4rDoECvaWNo3xeqj6im8kO2qceTnD5sVHvnSPUkov8GuSgOIiuV4k/W 0LTV/qeXiMV7P2F+3dTcSeEZZapSM8VW/cZikBrtc2R2PlNmeh7Zbdl5F75gFY321Zmm/F X3ZalbC1YDUIUv+CqDtck7jYnq+hRzqDmFZnCRPbtM71pICLrDC2kIDxl41QGaN5LnLIbV or6zbp3SJ9xHOrx4EXObwJfJ8Pw71dPmFA8c6OxvvMI9lpuJLsP3Y4aH6ClrTM6cfMre7K +/fIgHfBgZppdFCj4OJSKtrl3jZ/Trbq1nA/TG6LAgY3rZxQH7pJzen2yfl9Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676582910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdV1UJDJuHC1USclDSwmwvz7kY6i2sNZiW7Wni4OVgU=; b=YLfuywzDflExhQiHwofDoOwHL0LxUzvrq5WjT5vjgswQTtl5Dl7I8WDpFMHvciEPMD3siL XgZwcvLGqUA1hCThpvcXKBrA2YS/tOJrR+w85nY+EcPbdcW2ARLyCALiu+Tuzi2IplTXgq sorD071vPM0KTmROm6yFDRNVIizRxeUsTMNv/TUSSyYBXBjIKwv+JBy37uUobq55z9zbF6 saoMxki0M6dE6MY3O2mKyVFZAQx0jA5qdR8KZfonZOYBz5UPfvi3+WDqaOhW3asyGiYKE+ DomK/cwJqOh4KMvZDimhoBOazfk4mfG0AB/5APvuOlue9MB9HfFWMtvmHzsR9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676582910; a=rsa-sha256; cv=none; b=U0yGgWUO31h87/c9MOlwb2J8ET6FyyhfZFfxZJUAOuaULMyU4FGQ+/D2Vge1PPa9js2BTC /Fscse8Gnv5bmOYGKtdWWdlCvnUsjkC297O467Ujl8CSm0u/EtqcUFU2gFoY+pxvAHlMKc rHcQ3Pb+pTo19uMGdmiV5kCtc+IqCyvKTFcLdsOX9ZcdEvZeHbqc6D38Ll74AskPUm4VM8 EfFEdgxnwQ/XpKA0NjPps3qhCJcXqixRfAN2yw4ZLuGZ4SrbvXaKWTQHzqrbTS2kTNPwqf +DybzRCBnc/mfz7lB2j3J+xSKH7RT1yckQGD0GSqV12qsJB563DAq1ozcQBkOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHp324q2RzJXh; Thu, 16 Feb 2023 21:28: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 31GLSU6k074480; Thu, 16 Feb 2023 21:28:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GLSUOD074479; Thu, 16 Feb 2023 21:28:30 GMT (envelope-from git) Date: Thu, 16 Feb 2023 21:28:30 GMT Message-Id: <202302162128.31GLSUOD074479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 3aed0ffc1588 - main - kern/clock: remove interrupt reporting from watchdog_fire() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3aed0ffc15881c5cf3fc0824dad037accc960dcb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3aed0ffc15881c5cf3fc0824dad037accc960dcb commit 3aed0ffc15881c5cf3fc0824dad037accc960dcb Author: Elliott Mitchell AuthorDate: 2023-02-16 21:18:54 +0000 Commit: Mitchell Horne CommitDate: 2023-02-16 21:24:29 +0000 kern/clock: remove interrupt reporting from watchdog_fire() The interrupt counts may have been valuable in the past, but now DDB can readily provide them via 'show intrcnt'. This is one of the only consumers of these counter arrays outside of the interrupt code itself, and this should be avoided. Reviewed by: mhorne, fuz Differential Revision: https://reviews.freebsd.org/D37870 --- sys/kern/kern_clock.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index b8122b7d6468..1670b6fde0c4 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -828,30 +828,11 @@ watchdog_config(void *unused __unused, u_int cmd, int *error) } /* - * Handle a watchdog timeout by dumping interrupt information and - * then either dropping to DDB or panicking. + * Handle a watchdog timeout by dropping to DDB or panicking. */ static void watchdog_fire(void) { - int nintr; - uint64_t inttotal; - u_long *curintr; - char *curname; - - curintr = intrcnt; - curname = intrnames; - inttotal = 0; - nintr = sintrcnt / sizeof(u_long); - - printf("interrupt total\n"); - while (--nintr >= 0) { - if (*curintr) - printf("%-12s %20lu\n", curname, *curintr); - curname += strlen(curname) + 1; - inttotal += *curintr++; - } - printf("Total %20ju\n", (uintmax_t)inttotal); #if defined(KDB) && !defined(KDB_UNATTENDED) kdb_backtrace(); From nobody Thu Feb 16 21:30:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHp5F57mdz3rZY3; Thu, 16 Feb 2023 21:30: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 4PHp5F4j1vz43qf; Thu, 16 Feb 2023 21:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676583025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tl+uKTXHcn4AKaj2lnB6ve4a1SLoKsdp9bZWxG6RTzY=; b=FbbybFcQLL6zStExTF7cHcwcy4oZ8R/mTsFo045k0OTYYA3OlTZ6pt0qA38SilILnUmBdE PQjvS74lQb/SRJEEDBt3IB3zsCGXgbC0xJdZZSwwl28+dOLLZHY6WHG4G3X6f+y4TwtEu6 VD1+kKC27uvmBdZGkRiX9L+dsmjRw45v7rUp0aX4+tt59nTIq4XEsexGbhsDkOlfc11Avs kXtgXQ4H3D+Nv7qEzDoYvDGsJnvWOU42OQER44VTDxMPmTPXsHs6mV7D7m6jc6ZREavBJj 2Pl/z8vOys+MIYJknsL6FtArJ6OZeFgZnIZ/JhGP5thUZzYpgLv0CYagyGXnpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676583025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tl+uKTXHcn4AKaj2lnB6ve4a1SLoKsdp9bZWxG6RTzY=; b=sCDJFztVEDH4yjT2UR3XODP+rYB/VvRiJa/GRSkUpQDRm0FmL8/iCcdOjT3u0txqIKwywp U/YI//foONvMRrrCHcFUlX14xmw3uWdMxOkBiKDm7VJNccSAbfoeusRFqGan9menms6OCP s1KzPYPyQLrfBO16v0eHgJY+3AleZbv9GFNeB4JA0TbHb4xFd6ZChQtA/VuK3r5nVlBN1D 33tFk9jiPtur/qLAha/kQ80x8HJ4oVVbKcuAUTjSIlfWmS9MMQIE6B2He9JCITGRDU+uEP EeZ4U990LVpFfdOEnf1Jv4LzF7q+J//Staf7sh8XoJNrtBoooxJxHigm9iTFMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676583025; a=rsa-sha256; cv=none; b=Awe9hgz29hFLu7hMEOJqmbpxfmsXH3keQO5G2z25ashHbagPRxfoUUua8Zl+8uzNWHLJr8 OKpYG2J58vhLdQE/dB+LgH+OehzmMghSVYCJe2od3l2er7uCPIpKYcbBVhwMSQ94puYqqf FOka0TtF+GnMfWqbANIC2UjjR/yRcxmafoOBxS07bmgMNLwyMyraxfRmoJm1t8dy/QrA1e MUVuTEagYuHtnJ7GKmxjDjYQIuY7cNYCgoryTlgnifj81fCus3RJqRRJxA/q1YRlNNO8Fd sqvVrTPtDgH2WXuPADzLEF/c6maI7mNHx5RX8lSl+Zjb+yTlUyKKaYhq8bBRtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHp5F3mvmzJvn; Thu, 16 Feb 2023 21:30: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 31GLUPUG083215; Thu, 16 Feb 2023 21:30:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GLUPls083214; Thu, 16 Feb 2023 21:30:25 GMT (envelope-from git) Date: Thu, 16 Feb 2023 21:30:25 GMT Message-Id: <202302162130.31GLUPls083214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 660609698622 - main - powerpc: remove nexus_get_cpus() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6606096986222bac46e6f97d6ca47fc14978d172 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6606096986222bac46e6f97d6ca47fc14978d172 commit 6606096986222bac46e6f97d6ca47fc14978d172 Author: Mitchell Horne AuthorDate: 2023-02-13 17:38:41 +0000 Commit: Mitchell Horne CommitDate: 2023-02-16 21:29:22 +0000 powerpc: remove nexus_get_cpus() It is identical in functionality to root_get_cpus(). Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38494 --- sys/powerpc/powerpc/nexus.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c index c0d4f8396cfa..3a1e961c743e 100644 --- a/sys/powerpc/powerpc/nexus.c +++ b/sys/powerpc/powerpc/nexus.c @@ -83,8 +83,6 @@ static int nexus_unmap_resource(device_t bus, device_t child, int type, struct resource *r, struct resource_map *map); static bus_space_tag_t nexus_get_bus_tag(device_t, device_t); -static int nexus_get_cpus(device_t, device_t, enum cpu_sets, size_t, - cpuset_t *); #ifdef SMP static bus_bind_intr_t nexus_bind_intr; #endif @@ -112,7 +110,6 @@ static device_method_t nexus_methods[] = { #endif DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag), - DEVMETHOD(bus_get_cpus, nexus_get_cpus), /* ofw_bus interface */ DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), @@ -209,24 +206,6 @@ nexus_get_bus_tag(device_t bus __unused, device_t child __unused) #endif } -static int -nexus_get_cpus(device_t dev, device_t child, enum cpu_sets op, size_t setsize, - cpuset_t *cpuset) -{ - - switch (op) { -#ifdef SMP - case INTR_CPUS: - if (setsize != sizeof(cpuset_t)) - return (EINVAL); - *cpuset = all_cpus; - return (0); -#endif - default: - return (bus_generic_get_cpus(dev, child, op, setsize, cpuset)); - } -} - #ifdef SMP static int nexus_bind_intr(device_t bus __unused, device_t child __unused, From nobody Thu Feb 16 21:43:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHpWk1Pgyz3qMcQ for ; Thu, 16 Feb 2023 21:49: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 4PHpWk0Tskz472Q; Thu, 16 Feb 2023 21:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676584194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZzjDoVDAvGWpBHD8pb1os/ECSxkGvRiNocL+0zduULw=; b=wV9ouiEuOLGyKhhh8GNdBWQwQYnh5OFq8o3VM5fFmMW6e8ERLBoJgabZeAG9mu3mY4Wjju bz2ELlEC/+/p1nwluQB5n6yIU6HOuYYZpm9hkMPMO79af6wE7sRFYk8eBjXe1ETqIrY6Ro SlCleYZ7YDyBNXNZtGU9zneS8a6VlSjC/yGggaKIzupmmroN7ZwDEp7oyEvV25dAI1bK+T 0LWhKYcYfgLLdnz30jdl9++NIpPkXsF57yx2DGVxIx6i1nwxa46uLBmW9JECqDMrclDCSG 361QRFSuKtThjwdpZk55/QVKlNKEjSI+Tkp0TAjlQFV0OLnZdWOWsjC2tfCTOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676584194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZzjDoVDAvGWpBHD8pb1os/ECSxkGvRiNocL+0zduULw=; b=DfI2zcIQghOF88ta8f5CPoRf6mP3vtuqWJk80ExYj0UgBpr9Oghye8iQpWh5QzrP6twBGq bOT2EufnoNf+572DJCNfOzXcwUcuDBPrrdjYY5DalFbNG4rGD/Y+93RDZLk6oX7dCPqds3 co0Y4XwJGbEYuEgcKA+8MusrR1/laA3TaDlgK+G0yRsJb65hAneKFXRZcWOxGsLF2ss/3r Lmw4RS29XMaCkNUpvFUQDbigVgg2X6ZY1F65fmZ4bYGsr559b5kh5mr4bhkocULfGsRRdE cKTH8ZbUoaf8phYrJ+lbgBwyXcJKbYJYEf5vazud49LSCbs4NtBpI5/vWr1MMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676584194; a=rsa-sha256; cv=none; b=WOe+JM2nqcN6ivqUwwR9xyZxHqD30pAeo/SsGfdsbMlGU6gdYVt81tsvrzNO+qSggszVOx C7kYbKQBi7w+MPi6fXo6x8GeSIHwebPHlQo6rz7hKxZ6JmFb5Tb0JQCikzAKgTdgQNdzYq O+ltkg3auThCMcojIe6SL18/QVpwfy6kkzH2cNZgAIv+LS1SWO9hY68ERK/ODE0utEoP7Y 58kPWTZcTnCCEkLQxNqU32Ob+58VrGSereUz/HshDOz/zBE5ju9R/8pPW8B2Wt+LTEF3D1 J8FYTm5lw8IftZI2dOAB3O6CdF0C2Q/DaMRHmPHuFMKbSPjQA38ovErz/ygqFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHpMt15MNzK06; Thu, 16 Feb 2023 21: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 31GLh6EZ002102; Thu, 16 Feb 2023 21: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 31GLh6GU002101; Thu, 16 Feb 2023 21:43:06 GMT (envelope-from git) Date: Thu, 16 Feb 2023 21:43:06 GMT Message-Id: <202302162143.31GLh6GU002101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 9cd71c8604d5..57cfae4a2f04 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8 X-Git-Oldrev: 9cd71c8604d52def22ffaddc35755712f0fb9349 X-Git-Newrev: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=9cd71c8604d5..57cfae4a2f04 c85ac731a0ec Improve resilver ETAs dc5c8006f684 Prefetch on deadlists merge c0aea7cf4e86 Increase default zfs_scan_vdev_limit to 16MB 973934b96526 Increase default zfs_rebuild_vdev_limit to 64MB 05b72415d16e Fix console progress reporting for recursive send f18e083bf8ce rootdelay on zfs should be adaptive c799866b970b Resolve WS-2021-0184 vulnerability in zstd 326f1e3d88da zfs_main.c: fix unused variable error with GCC ac2038a19c3b Teach zdb about DMU_OT_ERROR_LOG objects 90f4e01f8ab8 Prevent error messages when running tests with no timeout 6017fd9377b2 Fix variable shadowing in libzfs_mount dffd40b3b618 Unify assembly files with macOS 0a5b942d4aad Restore FreeBSD to use .rodata 14872aaa4f90 EIO caused by encryption + recursive gang 3a7d2a0ce0b7 zfs_get_temporary_prop() should not pass NULL to strcpy() cfb49616cdeb Cleanup: spa vdev processing should check NULL pointers 66953686c059 Add assertion and make variables unsigned in abd_alloc_chunks() eb823cbc76d2 initramfs: Make mountpoint=none work ac7648179c85 zdb: zero-pad checksum output 7883ea2234fa rpm: Use libtirpc-devel and /usr/lib on SUSE 87a4dfa56190 Improve arc_read() error reporting 13312e2fa107 Reduce need for contiguous memory for ioctls 34ce4c42ffdc Fix a race condition in dsl_dataset_sync() when activating features cfd57573ffea quick fix for lingering snapdir unmount problems ab672133a9bd Give strlcat() full buffer lengths rather than smaller buffer lengths 3fc92adc409a Linux: use filemap_range_has_page() f04cb31e7c17 Suppress Clang static analyzer complaint in zfs_replay_create() 57cfae4a2f04 zdb: zero-pad checksum output follow up From nobody Thu Feb 16 21:43:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHpWk6DfBz3qMjW; Thu, 16 Feb 2023 21:49: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 4PHpWk57Pxz476w; Thu, 16 Feb 2023 21:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676584194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c7THzebfo+wwXtu/TQwPjQG5GaVM3V6DTVhGrDlzV6I=; b=EnKAGiYXXTJWteRmpBfsei0apr0PSG5AZfqcvtcTfxqhwIleA3wrxz5WgRkWWGEo63WVUg k7pmoizzZmcYaQe0lKrNx6Yeg0FWx/b4TBEnCH6CE+VZJQOlUQEz+rbVOmSzx6h8vq+6qQ hDV/QSQhhHFQW//YMMFoWHVIF+v62pUlOpqV0SbB8e10SrHt/gbF09GYDb7Lw22nSpu6AW YDBGH/QJpao6muGioyKlL7Z9QaJeW1Pkrs1KVeNo0YHBPGYL53AwXJ0JUOzgJd34XuzPEu llUJf7iB6CjpHQcPc1I4xRQ2hTjB0coId7XIcozWapagDJnAWchccG43l9rwrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676584194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c7THzebfo+wwXtu/TQwPjQG5GaVM3V6DTVhGrDlzV6I=; b=kYYQOGWCKdTvHzVuobd98IBvU9eGd7tzGnMPfaVNrRa0wrg4SPddgFmCpsHcFakRBqNgF4 YwUFLNMu1vXAs5aMGvFydEfrRJfuQDrBGy6b3v5VO0CC4a3Fejv1ziyQTJM0OiWtt0BKd5 Uyv+rIStiGTZA4fmAgxYbE8S4ZAEo0jXHEK6VPhbb22l2hNXsscNJ+YuUThsShv2vCJulJ ZdfdNG0ulN+oYxjShVGDwr9G4khb+Mo/2ulqL5vBX61MNnYzqOmhqnkz6K7WwSqQGpckvp ep2Rb+77gbpKLok9x18wtifDoEfSonkxP0IEL6CILTd+Q48vHuRpmd/m1BgATQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676584194; a=rsa-sha256; cv=none; b=C2r1fQ3Bwpxc4oXhWx2I95QZQUWim1sMjTJOkdmCiqdWBgQv5k4EX70nb51RBuKWlNjImV /MAd4ztT4pJ+Vqo6nwSk+UMB6lY0znz+dTW5Ebn3tvMfPeQZcCmog1R5ZynzTVVnRl9ayO jJXJUfSw9KJDc2YCqPUiYq9rt6q9Ktm2JIchK1iP4ovFJPmHKnGsLLM5Sox94jfAl0Z3Dy V44JpscWLoKoENZz6mDzh3o1NZKA5OeqYy+H4Uxx5xC5ng9QugSlrpKZA0IzX96KzwCdmA bfDC0fpNKSMAS6gbiKbf7dIh/1BM9YOHEyr4lBa0MwEuoUEyO+U897J9OlW7Fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHpNc0MfnzK08; Thu, 16 Feb 2023 21:43: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 31GLhhIY002444; Thu, 16 Feb 2023 21:43:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GLhcMH002433; Thu, 16 Feb 2023 21:43:38 GMT (envelope-from git) Date: Thu, 16 Feb 2023 21:43:38 GMT Message-Id: <202302162143.31GLhcMH002433@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: c9539b890109 - main - zfs: merge openzfs/zfs@57cfae4a2 (master) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9539b89010900499a200cdd6c0265ea5d950875 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=c9539b89010900499a200cdd6c0265ea5d950875 commit c9539b89010900499a200cdd6c0265ea5d950875 Merge: 660609698622 57cfae4a2f04 Author: Martin Matuska AuthorDate: 2023-02-16 21:38:51 +0000 Commit: Martin Matuska CommitDate: 2023-02-16 21:38:51 +0000 zfs: merge openzfs/zfs@57cfae4a2 (master) Notable upstream pull request merges: #13816 Fix a race condition in dsl_dataset_sync() when activating features #14402 Prefetch on deadlists merge #14410 Improve resilver ETAs #14428 Resilver performance tuning #14439 Resolve WS-2021-0184 vulnerability in zstd #14440 EIO caused by encryption + recursive gang #14448 Fix console progress reporting for recursive send #14454 Improve arc_read() error reporting #14460 Restore FreeBSD to use .rodata #14474 Reduce need for contiguous memory for ioctls Obtained from: OpenZFS OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8 sys/contrib/openzfs/cmd/zdb/zdb.c | 26 ++++++- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 3 +- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 33 ++++++--- sys/contrib/openzfs/config/kernel-filemap.m4 | 26 +++++++ sys/contrib/openzfs/config/kernel.m4 | 2 + sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 58 ++++++++++----- sys/contrib/openzfs/include/libzutil.h | 1 + .../include/os/freebsd/spl/sys/ia32/asm_linkage.h | 2 +- .../include/os/freebsd/zfs/sys/zfs_znode_impl.h | 3 +- .../openzfs/include/os/linux/zfs/sys/trace_acl.h | 9 +-- .../include/os/linux/zfs/sys/zfs_znode_impl.h | 16 +++- sys/contrib/openzfs/include/sys/bpobj.h | 1 + sys/contrib/openzfs/include/sys/dsl_dataset.h | 1 + sys/contrib/openzfs/include/sys/spa.h | 2 +- sys/contrib/openzfs/include/sys/zfs_znode.h | 1 - sys/contrib/openzfs/lib/libshare/nfs.c | 2 +- .../include/os/freebsd/sys/ia32/asm_linkage.h | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_mount.c | 6 +- sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 12 ++- sys/contrib/openzfs/man/man4/zfs.4 | 11 ++- .../module/icp/asm-x86_64/blake3/blake3_avx2.S | 1 - .../module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S | 5 ++ .../module/icp/asm-x86_64/modes/gcm_pclmulqdq.S | 2 +- .../module/icp/asm-x86_64/sha2/sha256_impl.S | 2 +- .../module/icp/asm-x86_64/sha2/sha512_impl.S | 3 +- .../openzfs/module/os/freebsd/zfs/kmod_core.c | 10 +-- .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 3 +- sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 14 ++-- .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 17 ++++- .../openzfs/module/os/linux/zfs/zfs_ioctl_os.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 3 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 5 +- .../openzfs/module/os/linux/zfs/zfs_znode.c | 4 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 6 +- sys/contrib/openzfs/module/zfs/arc.c | 24 ++++-- sys/contrib/openzfs/module/zfs/bpobj.c | 65 +++++++++++++++- sys/contrib/openzfs/module/zfs/dmu_send.c | 4 +- sys/contrib/openzfs/module/zfs/dsl_dataset.c | 23 +++--- sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 71 +++++++++++++++++- sys/contrib/openzfs/module/zfs/dsl_scan.c | 76 ++++++++++++++++--- sys/contrib/openzfs/module/zfs/spa.c | 58 ++++++++------- sys/contrib/openzfs/module/zfs/spa_misc.c | 1 - sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 27 ++++--- sys/contrib/openzfs/module/zfs/zfs_replay.c | 6 +- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 8 +- sys/contrib/openzfs/module/zfs/zio.c | 16 ++-- .../module/zstd/lib/compress/zstd_double_fast.c | 4 +- .../openzfs/module/zstd/lib/compress/zstd_fast.c | 6 +- .../openzfs/module/zstd/lib/compress/zstd_lazy.c | 12 ++- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 8 +- sys/contrib/openzfs/tests/runfiles/common.run | 2 +- .../tests/test-runner/bin/test-runner.py.in | 2 +- .../openzfs/tests/zfs-tests/tests/Makefile.am | 1 + .../tests/functional/no_space/enospc_ganging.ksh | 86 ++++++++++++++++++++++ sys/modules/zfs/zfs_config.h | 7 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 56 files changed, 614 insertions(+), 191 deletions(-) diff --cc sys/contrib/openzfs/config/kernel-filemap.m4 index 000000000000,745928168f92..745928168f92 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-filemap.m4 +++ b/sys/contrib/openzfs/config/kernel-filemap.m4 diff --cc sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c index e4c6cf7d097d,f4c87013dbf0..9a268573528c --- a/sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c @@@ -141,8 -141,8 +141,8 @@@ zfsdev_ioctl(struct cdev *dev, ulong_t if (len != sizeof (zfs_iocparm_t)) return (EINVAL); - uaddr = (void *)zp->zfs_cmd; + uaddr = (void *)(uintptr_t)zp->zfs_cmd; - zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP); + zc = vmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP); #ifdef ZFS_LEGACY_SUPPORT /* * Remap ioctl code for legacy user binaries diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/no_space/enospc_ganging.ksh index 000000000000,1d35fba5dbfa..1d35fba5dbfa mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/no_space/enospc_ganging.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/no_space/enospc_ganging.ksh diff --cc sys/modules/zfs/zfs_config.h index 5c30abf047f4,000000000000..0d4fea6ea856 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1024 -1,0 +1,1027 @@@ +/* + * $FreeBSD$ + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + ++/* filemap_range_has_page() is available */ ++/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ ++ +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAPPED */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->read/write_iter() are available */ +/* #undef HAVE_VFS_RW_ITERATE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* yes */ +/* #undef HAVE_WAIT_ON_BIT_ACTION */ + +/* wait_queue_entry_t exists */ +/* #undef HAVE_WAIT_QUEUE_ENTRY_T */ + +/* wq_head->head and wq_entry->entry exist */ +/* #undef HAVE_WAIT_QUEUE_HEAD_ENTRY */ + +/* xattr_handler->get() wants dentry */ +/* #undef HAVE_XATTR_GET_DENTRY */ + +/* xattr_handler->get() wants both dentry and inode */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->get() wants xattr_handler */ +/* #undef HAVE_XATTR_GET_HANDLER */ + +/* xattr_handler has name */ +/* #undef HAVE_XATTR_HANDLER_NAME */ + +/* xattr_handler->list() wants dentry */ +/* #undef HAVE_XATTR_LIST_DENTRY */ + +/* xattr_handler->list() wants xattr_handler */ +/* #undef HAVE_XATTR_LIST_HANDLER */ + +/* xattr_handler->list() wants simple */ +/* #undef HAVE_XATTR_LIST_SIMPLE */ *** 168 LINES SKIPPED *** From nobody Thu Feb 16 22:34:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHqVq687mz3qRcC; Thu, 16 Feb 2023 22:34: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 4PHqVq5dK6z4Gsw; Thu, 16 Feb 2023 22:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676586851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z75Q9n+CeBMjAJ2Jlwi5Unjb1w1XgGXJ3x10kMPYd/Y=; b=tUdCjoTd/KxTB4GwkOLJYOGcVrN89ebIoxq6RsW+WjkV28v4oRkN1nSx8HToAfVDuDNTj5 iW3wy5gNnHMVNjcHRv3aXf/9+w3KkeZaVWWBMooDpQ9uFc45zZOmESXSOHrim/Bk11SUfc Q5x9RdXoWmRVgyHpm2pNn0WfhNgnoXQagrQYaXNwfsnS24+Bge/e0ibV5hQaNVVHv6KZCS aeK0S4dhIjgcl6ZvfY4cFxX28v4eCjtrA6I7k23lUffWy4x7p7t2jBgYX3AwFA6RN5hFSG 4DSThm38nXWfGWvL6azGROkqp29KqmZdx18pxLUIMNl+vmYg7VkjV+v3IaVnSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676586851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z75Q9n+CeBMjAJ2Jlwi5Unjb1w1XgGXJ3x10kMPYd/Y=; b=hI7mYYSuQ8l+Sz6hdAHvlOO+ZB2KY9aW+mQv4Mw7fghOgxVNvn4U1NjNPhMm3joFzYVwSZ xuBIfDcWNOP3UGeEKEn+dM+Go5uxtko8osXZR0EeQRTY9hTPXYRefwWMjC58eBfT2FObJ3 5krdaMlOZZs7U0bZacbu0K1X2pTOW+7EC6Lbm3ZSj6Z7YJRmIXGUARicDUKYMDxHRW5+Ck TeERxhL4UISdYNX+HU9RrSMXFmqIwqONE4TiQAyErt+w9a781YovM/uD+Q/MGmSc6xq11A ypbMfsFshz7scMRNF9JFpzAZxZAX0rb6CX4aNKawqdXs03hHaIgH6Xo9LwtTVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676586851; a=rsa-sha256; cv=none; b=VRzSHvMS29dMnMiTwHQaKJUBpOz2UqZ/49dNXH54OviWmIFmrBjBccmAyXru2wpx5B0IcN qWvxRJKvsJcCfBh3tcGm7IoA4BbwpsgFJPWZqJypldkujgmFbIzcns+zVFeno3TZRD4b0L aOFb94gN3/6crRV+G3SKXwQ+baxvQ1vDBas/MInv/1w2zfT0lrXRmPUsVgbc7xFcyK9yjr XOizjnM/LViCXYLNEYd4vrH+6n1LIHHTs6l499L6Kx8lCPP4uku9ZJLlq/IghNWJLE8RJT y0vUiB8DEGXzbiR9ReyhcVhGSEVLfD9zZsHaZKTvi/B+fncAFgMltl0SibK37A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHqVq4hQlzLVH; Thu, 16 Feb 2023 22:34: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 31GMYBJG074270; Thu, 16 Feb 2023 22:34:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GMYBWH074269; Thu, 16 Feb 2023 22:34:11 GMT (envelope-from git) Date: Thu, 16 Feb 2023 22:34:11 GMT Message-Id: <202302162234.31GMYBWH074269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 780bae23b8e6 - main - krpc: Replace !jailed() with IS_DEFAULT_VNET() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 780bae23b8e6c386e4b2f971eb27fa3bd1a6edd1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=780bae23b8e6c386e4b2f971eb27fa3bd1a6edd1 commit 780bae23b8e6c386e4b2f971eb27fa3bd1a6edd1 Author: Rick Macklem AuthorDate: 2023-02-16 22:32:50 +0000 Commit: Rick Macklem CommitDate: 2023-02-16 22:32:50 +0000 krpc: Replace !jailed() with IS_DEFAULT_VNET() Since svcpool_create() is now called from an initialization function, !jailed() no longer works. Replace it with IS_DEFAULT_VNET(). MFC after: 3 months --- sys/rpc/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c index 065da0cc23a4..5ebf1f5a48b3 100644 --- a/sys/rpc/svc.c +++ b/sys/rpc/svc.c @@ -127,7 +127,7 @@ svcpool_create(const char *name, struct sysctl_oid_list *sysctl_base) pool->sp_space_low = (pool->sp_space_high / 3) * 2; sysctl_ctx_init(&pool->sp_sysctl); - if (!jailed(curthread->td_ucred) && sysctl_base) { + if (IS_DEFAULT_VNET(curvnet) && sysctl_base) { SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO, "minthreads", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, pool, 0, svcpool_minthread_sysctl, "I", From nobody Thu Feb 16 22:39:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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 06:26:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJ1zW326Sz3rZWD; Fri, 17 Feb 2023 06:26:15 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJ1zV67Yqz3h4p; Fri, 17 Feb 2023 06:26:14 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676615174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pkhGxxKB353mVskIAU7ElhAjeJmoAaTV+iFA2efZ2zk=; b=AyMGzUhFRyFDK2WIFHHHDLNXTggVfr3gujX3NK7qZ7VuoyFVjJTEGfgzj+KmJvk0X3m092 LKiXgkQEcIHBMkEjNbm1L0AlPCcl1ULSSXtG05UcyA/2c0IVUKj0pFRsLfZUdWy5gtWF2H leo2iAHQ9zyeOecZdEeuuRcMqaOGRon29abfXZeXIMqYQdCeW+ICnlHIZ4NEBfcPXDNjD2 utv7PVk/eATE9wkwk8YZD1uxwgJ3BH0Flsq6VXz+Z5AAVjIzF9i4LKpbVQK3sANkbVS8sd QLB6b9GwYfFkuJrMSIA5o2qklcrlCpo/toMVw+uLRk3Vr2efeQnskK/gpFltzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676615174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pkhGxxKB353mVskIAU7ElhAjeJmoAaTV+iFA2efZ2zk=; b=jWBXfqktwW1h6knA5u44fEGdpq3QvgH/zgfK6e6of8qhuhFE09XODnuGuFWOJEDrfg+Bm0 +yzSoPJ9nsK8tPCnzNFk6iNoY+d4X/VkMT9Pby0TbKRxBaB9rUa0Zw5TL2AiS4MM5uaQB7 FGkrq3r6antUkZnTKfBJnCbUo3120CN/RKjREtzQNAhQqQHJLcQCxp5QzM4XD13da0UWDO /bk02fm9aN3o/jfHh3mCmM91xaHVkYeVI3sGIGKC2DIxOOywAoqrgMJ4HIAuu5FSAaPDDD /XpdY1+wcwDlI7IZg818igzXKX/zTpTB8FDo7KjioYz/tKZnzCCi/qgxF9ho/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676615174; a=rsa-sha256; cv=none; b=hD3hFZZVNm98cbvklsCsj6CivlIbFFE2yl+CkkqPGxyIQzHkyVsVrwLI6x6pLxV59rwhRs DtEhjhAVi3zNUG2iP3zgIX5OtYb1ZnHrwx6bEWIeFwjHTdLG1x8yKMeLGOTblVMxWdA+iq Ablb8gHmSEGNn7ASPIPbOAH8Jkg0TRybQqV6stqoh39C5n4nDkkGjJsjNWdJgsb5ICK7K6 JMcUVBZtXECw6+M0urm+iruBsKps3FdOfy3mWvyUsTVGCBQyr12n6bWcOdTTGXXBnHSs48 FfO6JcOwvYz2LeMa71Ew6s4a1Mq+CVUkRY7edrQfLcDjeIOF6FRcEyTiyuYV3g== Received: by freefall.freebsd.org (Postfix, from userid 1033) id A50C9599A; Fri, 17 Feb 2023 06:26:14 +0000 (UTC) Date: Fri, 17 Feb 2023 06:26:14 +0000 From: Alexey Dokuchaev To: Jessica Clarke Cc: Mateusz Guzik , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d9d5f2c042a5 - main - cpuset: add --count Message-ID: References: <202302041751.314HpRrn042970@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N On Thu, Feb 16, 2023 at 06:01:32PM +0000, Jessica Clarke wrote: > On 5 Feb 2023, at 17:28, Alexey Dokuchaev wrote: > > ... > > I was wondering whether we need both of these sysctls: > > > > $ sysctl hw.ncpu > > hw.ncpu: 2 > > $ sysctl kern.smp.cpus > > kern.smp.cpus: 2 > > One prints mp_ncpus, the other smp_cpus. As far as I'm aware those > two are the same for as long as userspace is running, and only differ > during early boot before AP bringup (mp_ncpus is how many it will > bring up, and smp_cpus counts up as they come online until the two > become equal). Thank you, makes sense. I guess it would be nice to have this piece of knowledge documented somewhere (as these sysctl's own descriptions are kind of vague) but I can't think of where should it belong. ./danfe From nobody Fri Feb 17 13:18:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJC6t0bMrz3sLDb; Fri, 17 Feb 2023 13:18: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 4PJC6s746sz4H5h; Fri, 17 Feb 2023 13:18:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676639894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bu+myK4tZ0/3bclC4ye6HwMO8FfHt5NUIOHunKB+OXg=; b=RTE+3YPoFhVqVxCR13p0tx5wAs9WaEchfHxFQxsa6heOT2EuZtyO1otEYQx+dhDSH1fuFA HuzeXJc4jhgbipljJ9SfbA2pAgD2smkPjHl1Wiv2PMGGKwsVmW3ap09N0eEFczc4ffD66P be+QC0ok25Nrn6CqfO6/+Gyy5+9s/5CHJ0huN4X21d7r6DApwH4mI8bwkCiCtkHYcsjDPZ 9CArUw/fwRZzmoHqG7BYTQxkfP7+3vrZC8ur+3UZR7rm5IJw5ZExvGNGCzXxoo6Y69CUcQ P5Y3WX17zTxXieWgnTAOAdQC5NySaGHFqc3QJZgzZ/ItZHsAQeicHOxNGm9a7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676639894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bu+myK4tZ0/3bclC4ye6HwMO8FfHt5NUIOHunKB+OXg=; b=OHg+sImKbSctJwew6Z+oq1U0QDHgnKWwl+gPLcdb927XlJIMnqNwtiAclpj00xVFr7FlVd dnkNAs01gxb/xmlNklLjeN8PEXmr1J2kehBNnAio90lL/hi6ZnllgN+/4pnNzYaWHnS9BH oZygJTfhA38Gnat2HdZQf0vwAgeFC4V4np2JN2dl2E93303fmTgkz4EAVqxHJrTredUrWb AXee4uYUh3pJ5toqvk9fQLJF4VSqcZdbSV8tymFSH0CfEFFVJuUvDsynDv1+ON8RjcqZ92 xXAOSn5KJcgXzu5w19jpjRGQ3Dcxd1fxQabtYZ6GB+mAPX+j7vPrE7n+yj718Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676639894; a=rsa-sha256; cv=none; b=aFjqGXhClpSd6JDKrd1QU36jx55mOOJ8eQz71KgbFMtWSPGK8K99p4WxnOhhlnrGk3k0OR 1qxSZXQ4UG0tvNvOf7fw5IhIycev4i3J5w2NJU6khDzEtlaR6rt55NM51ThjXEnK7aXZzD rIeavhSdeG4jNEGxSMRlpWtnQDDOVD2wkpFZ7w0pj82xRyrIvGSSUv9DDUhTYvs8bvcPbm J88/GqR2Qivwb/NmgGHnE5BZxKODZwhhxBJwX/vlueaa4MOxN1lg9J/aTz+A1GKpkYY49S RmQUHHD5CDc2qPU+NZhXKwWGuuvXnn1jmeJl6wFTOrY/eVEH29z7YDxzMPTjag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJC6s5t1TzkLh; Fri, 17 Feb 2023 13:18: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 31HDIDrf027353; Fri, 17 Feb 2023 13:18:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HDIDlo027352; Fri, 17 Feb 2023 13:18:13 GMT (envelope-from git) Date: Fri, 17 Feb 2023 13:18:13 GMT Message-Id: <202302171318.31HDIDlo027352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Fernando=20Apestegu=C3=ADa?= Subject: git: 9e0d41c8f063 - main - rc.conf.5: clarify source directories List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e0d41c8f063111803c36e5aaff1126c99e8c7ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/src/commit/?id=9e0d41c8f063111803c36e5aaff1126c99e8c7ea commit 9e0d41c8f063111803c36e5aaff1126c99e8c7ea Author: Jamie Landeg-Jones AuthorDate: 2023-02-16 11:55:01 +0000 Commit: Fernando Apesteguía CommitDate: 2023-02-17 12:17:54 +0000 rc.conf.5: clarify source directories In 454adf0fa4d787bf6e6ff7be0aa6c27a91d2be8e some of the issues reported in the PR where addressed. This commit adds a clarification about how the prefix of the directories to be sourced actually behave. PR: 197152 Reported by: jason.mann+freebsd@gmail.com Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D38627 --- share/man/man5/rc.conf.5 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index c979ffe6cae1..0080e5f8d075 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 12, 2023 +.Dd February 17, 2023 .Dt RC.CONF 5 .Os .Sh NAME @@ -80,8 +80,13 @@ script in the .Pa /etc/rc.conf.d directory or .Ao Ar dir Ac Ns Pa /rc.conf.d -directories specified in -.Va local_startup , +directories (where +.Ao Ar dir Ac +is each entry specified in + .Va local_startup , +but with any trailing +.Pa /rc.d +stripped), which will be included by the .Va load_rc_config function. From nobody Fri Feb 17 13:51:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJCrl3d54z3qQ2x; Fri, 17 Feb 2023 13:51: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 4PJCrl3B7rz4M2K; Fri, 17 Feb 2023 13:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676641863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oBxutzsLi9uguWrgIoANWP3P7Oklr3JArBkK78WSJ9I=; b=iLeBhI0OiTEkPQ1+nWiP1S/aYc9MpyCgxaFJesKRP7u8x13iEFlXtyKTQlLjvqOHV9Tc9r BRMBjuD3yVgWEsESt414Awf8j9Vq8YznyY/yy+JDSQkqzibfc24mzuXVMAS3W43I9LY3dF BHnCXtH2NfGttslpTu9BgiZx0WulwFzS0GmW31FnjdWtaiNoIwatl1E+djxEvPsJO1qnhG Gm+xA+U2S1IO6So2CstOiO1ajaXurbtQQI6UT+H9JzqbjnENOCuWGT4t74xtCVtYogDQs/ KjvK/qt15Qw6Z+A6BaSARvPejbzbJSsWeTiJDM7Cbaikq6lkjjZ+ku+iGqj6Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676641863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oBxutzsLi9uguWrgIoANWP3P7Oklr3JArBkK78WSJ9I=; b=aoLDPyrqecX/NCLEln+IUTjPedi5XfaChw43XVNcepdf8ucxWCIQ6KUUhPUlviLGv3qjHp yZZWvSAb7IFBac4Jj5nunpc2RivHqG4DrtjI7fmAG0AZ2u6xnEfLwGa/x5AQzZ+86vTZsM V2mBlUnckt2BZHve9N2+aiJu40evwxSGCdY/EKshAoVMNcamjXFvSWRYEtTdOGMqwh+3JG VBu7PuR97zImrro7Fl85zXAqv+GNFqKntixbX8l6Sa3p/OsOFLQcHRsCVYuMDAgXzD7bMN 7NPKchx2urskXTN9ijXLkuCV6dZF5KJwHfpiWTyft98hoqHrpK9cAtDtfHjJaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676641863; a=rsa-sha256; cv=none; b=oc/Vyq/B3++8vCk6BZvlLtXINIlZcJ9e2zjArXqmd6WWAmF4rlCn1HP1tvklMqDEti5NYU xgctPoVGQSpMzNiq/inhQEqJGfskUzjyj/nXmPKm6o131V+eFr4URlDO4zpy19ttlYfhC8 gCR+ILd2GY/XA8fXoZ34OV0UXNKJluoxV/X+ARkqR3LIjX5R+63oB4I4kjo0KFPEsi1fFm K5cD/t7gDTBMBd0J3voGuBX1tEKNiWdR0N1YwhVmqQRJzDSTw5qjQZrkfgd3eg1vpqkNrW GsTB/pLecI+zNPXbCdTBtBmIWyjJC3hAX8EgIYmL9R4x8iIU2HOMwn1rQ802kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJCrl2DlrzlYS; Fri, 17 Feb 2023 13:51: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 31HDp3h8080877; Fri, 17 Feb 2023 13:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HDp3pB080876; Fri, 17 Feb 2023 13:51:03 GMT (envelope-from git) Date: Fri, 17 Feb 2023 13:51:03 GMT Message-Id: <202302171351.31HDp3pB080876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: a0fdaf9a7b34 - main - linuxkpi: Add more suspend defines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0fdaf9a7b34b6f8fdab747f7a198158e66b57ab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=a0fdaf9a7b34b6f8fdab747f7a198158e66b57ab commit a0fdaf9a7b34b6f8fdab747f7a198158e66b57ab Author: Emmanuel Vadot AuthorDate: 2023-02-17 13:49:52 +0000 Commit: Emmanuel Vadot CommitDate: 2023-02-17 13:50:58 +0000 linuxkpi: Add more suspend defines Needed by drm 5.15-lts Sponsored by: Beckhoff Automation GmbH & Co. KG --- sys/compat/linuxkpi/common/include/linux/suspend.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/suspend.h b/sys/compat/linuxkpi/common/include/linux/suspend.h index 9bd6c2c55875..dacecbebdc08 100644 --- a/sys/compat/linuxkpi/common/include/linux/suspend.h +++ b/sys/compat/linuxkpi/common/include/linux/suspend.h @@ -9,6 +9,10 @@ extern suspend_state_t pm_suspend_target_state; #define PM_SUSPEND_ON 0 #define PM_SUSPEND_TO_IDLE 1 +#define PM_SUSPEND_STANDBY 2 +#define PM_SUSPEND_MEM 3 +#define PM_SUSPEND_MIN PM_SUSPEND_TO_IDLE +#define PM_SUSPEND_MAX 4 static inline int pm_suspend_via_firmware(void) From nobody Fri Feb 17 13:57:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJD0m0y3Wz3qQMK; Fri, 17 Feb 2023 13:58: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 4PJD0m0RmXz4NNL; Fri, 17 Feb 2023 13:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676642280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1xYkUJDfGfPaLKYYPIN4LLOetUxQ7rudFh73eMGvlA=; b=dd/rGY1G0vBvVWSyZ2QAK8zvCCa5qx5/DVgtiDFbZlFECU3L16/3P3P0FSoFTARfT4QVA0 cbkcRRWtLTpZsvlOCWWuuwWiPOyiofvh6E6BytV5jDbRz7YzF2FG5H0cRlV6nLIv8sLU/C 1fMcT6464BO6dFR2Ue7rXHtSYMMu05PPKGEkrdaSUaw/Pe4MBgPxjbKmfHsr1dB81roJt2 tx1617lfPoq9XRWKi44mDYlD6CNVuwSoiUG2q3JzjlSeudcyKPL1tEsloTQHZCT8Dss0no tZWIUw1DclCodGeX3eVLz+IwKFMv532FAIQ3JUaGfUj1z4bo4Qea1T4LKpILTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676642280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1xYkUJDfGfPaLKYYPIN4LLOetUxQ7rudFh73eMGvlA=; b=e2cazT+63gjzrPxoBtR2LYRY+aXg+SnpI0MOQxpZHPQ6ix4XNADZfs+ddFkFSMkRa8m6pE 7EC7vHcD2p+AnjyuaTjnFSBORQZ4xxbSUhpaKz8wPJgE10kOV3XlHwjc00xaX9W7irRkwy vVHerbjF0Wh4bjjD7ESK7LivxRbzxEkJeVsW0qJnfAb4ZSlWTqcgxONKWMwX28Ak4LNVX7 3HR+6y5/jzTbBffPVKwf+r7fRTnIWJxdhI7sfSqwpVXn6EEImt0wF4IMmSS+mUCvcYTaR3 Ond2AjuomwFByzSwMbWyb8nBVY6Vu2ZGjtD0LMUBLf8nKe25s39fsdSgPezx+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676642280; a=rsa-sha256; cv=none; b=TfC2ADE62KscWk4WNNUgmGhHZqIgfCPg4sUFhi+BNclsAQEsZi4SapIcMR9cC3GKbGhcFp RMFApOG5RkytLNGdlPAA3vs79wtzIN+jUfqLkrIwtexnjtOXdq/FUKQu4SFWeQxNEBoAK/ U6iyWoYU9zBDQoxQzq+G2/GmmfKag/DgeCoEHld4nLPgZbhjSsHcSkYcM1KvMxFAV1Woeu OXB7H36rJT9V9hYPtHzRTZGEILOdDlsiTzloYhf9/miM74VyQtUHnDW72fqc6b48iuMLkP WEg3VI+viWbhRaWSgBnE0u+sG7/2Ynj0s8QncMFGOtYyQgw1OmUz2sPJbdN6WQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJD0l6dJXzlNy; Fri, 17 Feb 2023 13:57: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 31HDvxvG083648; Fri, 17 Feb 2023 13:57:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HDvxAp083647; Fri, 17 Feb 2023 13:57:59 GMT (envelope-from git) Date: Fri, 17 Feb 2023 13:57:59 GMT Message-Id: <202302171357.31HDvxAp083647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 545c5c40767c - main - Bump __FreeBSD_version after linuxkpi changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 545c5c40767c84d73fe732fe7fe75f6471f30c00 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=545c5c40767c84d73fe732fe7fe75f6471f30c00 commit 545c5c40767c84d73fe732fe7fe75f6471f30c00 Author: Emmanuel Vadot AuthorDate: 2023-02-17 13:57:24 +0000 Commit: Emmanuel Vadot CommitDate: 2023-02-17 13:57:24 +0000 Bump __FreeBSD_version after linuxkpi changes Needed to add a graphics/drm-515-kmod port. Sponsored by: Beckhoff Automation GmbH & Co. KG --- 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 e0808609447d..bdc73475b8e9 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400080 +#define __FreeBSD_version 1400081 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Fri Feb 17 15:35:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJG9k0thHz3qYDs; Fri, 17 Feb 2023 15:35: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 4PJG9k0Dffz3KWc; Fri, 17 Feb 2023 15:35:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676648154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z3TJguVmP5h6h8gdiXfr14fNX+we/W2HsiUUdc8bqVg=; b=vvfvpCumAGll81fYyNr/4Qxe2hk9xFwAk6PUfzp3R6Y4oc2aWKnWRUnQoVorLb3wdJOY6I qKcXfzR8FKeGrFBB5pM3xEZfjMGPaAGs8ZY9jCMealhpY5+ZIPf3duTXiCQyJ8Ax/q6vGM FR3/mXKym1rEZM68RpMz8d/S98VQiZOUU3+OHKSwAiPCb9rQ4NkhHg+B6clfQbp1TUJMuq /fA4SzLd0Kt3eT58opbUX0qokYSb2i/TCEs/xLx2E25AMfsY2n3VCdJmJM3Cx5GoQMiwE2 9Eq+qz1/Eqe/RltJgFvJJPghiVWe6ZGheHeE5YNUBJxGPtMohYrojGuwI0OlDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676648154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z3TJguVmP5h6h8gdiXfr14fNX+we/W2HsiUUdc8bqVg=; b=OMUQJJzN+iHV0nWVYPbDoMC4FdmeeeuwFw2xBapcBEctAAlF3/+RYVPawH1BjONyuuz7e2 byXz7sK7PtMtLBf/zzucG+gNfmmw3mbwBe8NOjceJVh1+OlZB+Onn6jK01N+vyk9PU0Oz3 gmVpyBK29IWVp8EddDZ8cbLxtpKsrR5yuLM2q+5LrVt5NRc8j1P87V8J9tBUeKEjM0RLl6 p1iV5x1nRqMbXoWexjlbxqa1Y7pgWIdQeM33wxCsA4sqkgDewT5vjsSimEsAtQqHNifpxC NgYSlm3bppFViy9tiPVLzZS/1JA3/5iMLS1zOIAr5yap0HB2SyxaA054frRy+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676648154; a=rsa-sha256; cv=none; b=ZTqATpZcVM8I++gqY1BO0UJ7W0BVteVIDY32gFa1OOrG74HHtjGZFeUBXPd6mv21AoGhWa 7o9Iipm3BXJIn6Gxeh9qexvsIgn8tvEFORufFl2ew+n5Hm4Avw+pyFI1bf53XE0kROjjfX 854DWf6Z46Cre0igtiNmoeNrRWHd3UMMZExUBqAlRlJZecz8i94BkrF18br5Y1UMJHDUkB dSQZNZY44GTIAUmjWNxdYZbhVH/sxJXfi5zbVMU8BoPMPk1QcTB4A7ord2FKJ5I9KrF+zo SnID4tVO4Bsbr797GPuOstlCX2ci1OAdSlpcJdwUmwQAQU81tApiuu8eU+FM1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJG9j6MHCznbb; Fri, 17 Feb 2023 15:35: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 31HFZrrn026272; Fri, 17 Feb 2023 15:35:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HFZr7n026271; Fri, 17 Feb 2023 15:35:53 GMT (envelope-from git) Date: Fri, 17 Feb 2023 15:35:53 GMT Message-Id: <202302171535.31HFZr7n026271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: b99c419587db - main - nfsd: Get rid of useless "pool" field in nfs_fha_new.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b99c419587db2ac75b929637f61ec3b845d7b5f6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=b99c419587db2ac75b929637f61ec3b845d7b5f6 commit b99c419587db2ac75b929637f61ec3b845d7b5f6 Author: Rick Macklem AuthorDate: 2023-02-17 15:34:40 +0000 Commit: Rick Macklem CommitDate: 2023-02-17 15:34:40 +0000 nfsd: Get rid of useless "pool" field in nfs_fha_new.c Since svcpool_create() is now called from an initialization function, the pool field of fha_params is always non-NULL, so just get rid of it and the useless check for it being NULL. MFC after: 3 months --- sys/fs/nfsserver/nfs_fha_new.c | 9 --------- sys/fs/nfsserver/nfs_fha_new.h | 1 - 2 files changed, 10 deletions(-) diff --git a/sys/fs/nfsserver/nfs_fha_new.c b/sys/fs/nfsserver/nfs_fha_new.c index 59933ef01bd4..05a03bee5d1c 100644 --- a/sys/fs/nfsserver/nfs_fha_new.c +++ b/sys/fs/nfsserver/nfs_fha_new.c @@ -62,8 +62,6 @@ SYSCTL_DECL(_vfs_nfsd); extern int newnfs_nfsv3_procid[]; -NFSD_VNET_DECLARE(SVCPOOL *, nfsrvd_pool); - SYSINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_init, NULL); SYSUNINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_uninit, NULL); @@ -80,8 +78,6 @@ fhanew_init(void *foo) snprintf(softc->server_name, sizeof(softc->server_name), FHANEW_SERVER_NAME); - softc->pool = &NFSD_VNET(nfsrvd_pool); - /* * Initialize the sysctl context list for the fha module. */ @@ -656,11 +652,6 @@ fhenew_stats_sysctl(SYSCTL_HANDLER_ARGS) sbuf_new(&sb, NULL, 65536, SBUF_FIXEDLEN); - if (!*softc->pool) { - sbuf_printf(&sb, "NFSD not running\n"); - goto out; - } - for (i = 0; i < FHA_HASH_SIZE; i++) if (!LIST_EMPTY(&softc->fha_hash[i].list)) break; diff --git a/sys/fs/nfsserver/nfs_fha_new.h b/sys/fs/nfsserver/nfs_fha_new.h index 7d437e7a0853..08f52539450e 100644 --- a/sys/fs/nfsserver/nfs_fha_new.h +++ b/sys/fs/nfsserver/nfs_fha_new.h @@ -99,7 +99,6 @@ struct fha_params { struct sysctl_oid *sysctl_tree; struct fha_ctls ctls; char server_name[32]; - SVCPOOL **pool; }; SVCTHREAD *fhanew_assign(SVCTHREAD *this_thread, struct svc_req *req); From nobody Fri Feb 17 17:08:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJJDJ6kn5z3r9gH; Fri, 17 Feb 2023 17:08: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 4PJJDJ6HRYz3lrP; Fri, 17 Feb 2023 17:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676653696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=brXXyyxypg75ADlxP1qptJUaervDmqpbqNdHL+9KioE=; b=P8NsMhCT08JFLx9w2Hkq9RV9DJlQrKcjIQ+RqGt6VymTA711owoMUykmQEkzepjvyw1+MI EyUexW57cCnN05nK7u86XvuA86JtGtEgl3zCBZCxnAxjv3+zWAdp2rr6gzFhhwEFantfPo XLYlFCTLwM2VkRTlxn4N6OBIdcJIFu7VwnUegrLlRAgeIfl8+Hyk+6dvpLgESOUPEkum2u V2vhCWtcR2ZP9TrpxfDRQBFrzzqnENiDKOTHr1hx5aWEd7rJa3sb1kZY/vH7F3cmSQAko3 B/ki1s7KgOhxASXfCkeZRhOlRkvV88ejCtXRT6hL1vDGJTJf+y2ifdeSOz1FFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676653696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=brXXyyxypg75ADlxP1qptJUaervDmqpbqNdHL+9KioE=; b=v8q4Ugf5f0WjJzDtPkYoQz+lkFJZqwEdXQlPWvXZ/xq7pPFRZFOqKod6nI+zFm3zm00j/s WX4lMACbweWstb1I81/oW3XyJUQ0NZIKVKrC3hO98h/D1RyOmx6QeG5yWwotEh+u9bcNcm jK0jTbFUL/YPalwtOcllpfoqUQNquU4iGvfLVSLQvEC/pvpceaGvVrC7zDiOkAH0HMkGid MS/nlKiOTlO/q+cXVpwN1aZ2GxEL3mRv5UWDiVJrOJ/jJexU5rhHavTDuMuLS2YH46snAP ZhouVWazHHQ0XDANfwDS1DMJidUjxpuXF5s0TCgtYxbxC1RJSMPDhjYPWVsfZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676653696; a=rsa-sha256; cv=none; b=SbF3Ni6DAuvYi1miSJAvHEjXSyugXHhC8fr4x0zxV77rDC8SHjoVMmGXAW4nVFsLRnmWaC rx8Xz/pEsr385gQXcsTm9Sm5uYi5T9kTNCaJOCheCuz4XoMt/rTQPoxzdU60M5Wlb4eDne LGN/BMWIxpmpl8GhIjMbeqXFzTF0KyZ2yo3xf3Mdd0SYWqECVVd82HCCSBwLMrKT2UbDwu r5px4+fYOWAmPk6mXJ4A/wWIPRb195IcIiaebOQz0i4vJrgm/cqOF0b3+9jFzwf9ZJVtlD CXY+9ShpMMcO12NiKaiXJIJ6kzNv1krpcR4Zqu6akWwoQw5AA1+UsZoNZPkkNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJJDJ5Kq2zr7l; Fri, 17 Feb 2023 17:08: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 31HH8GZ0054931; Fri, 17 Feb 2023 17:08:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HH8GCO054930; Fri, 17 Feb 2023 17:08:16 GMT (envelope-from git) Date: Fri, 17 Feb 2023 17:08:16 GMT Message-Id: <202302171708.31HH8GCO054930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8afd23de9276 - main - cxgbe: Allow parse_pkt to internally queue a packet. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8afd23de92768ed4c80f0c3913bf30f72635d13d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8afd23de92768ed4c80f0c3913bf30f72635d13d commit 8afd23de92768ed4c80f0c3913bf30f72635d13d Author: John Baldwin AuthorDate: 2023-02-17 17:03:23 +0000 Commit: John Baldwin CommitDate: 2023-02-17 17:03:23 +0000 cxgbe: Allow parse_pkt to internally queue a packet. If parse_pkt returns EINPROGRESS, return from cxgbe_transmit without queueing the packet in a txq. Use this to move the call to ethofld_transmit for packet pacing into parse_pkt. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D38577 --- sys/dev/cxgbe/adapter.h | 1 - sys/dev/cxgbe/t4_main.c | 12 ++++++------ sys/dev/cxgbe/t4_sge.c | 9 ++++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 5460462c5f51..b470d1a6461c 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1404,7 +1404,6 @@ void t4_register_fw_msg_handler(int, fw_msg_handler_t); void t4_register_cpl_handler(int, cpl_handler_t); void t4_register_shared_cpl_handler(int, cpl_handler_t, int); #ifdef RATELIMIT -int ethofld_transmit(struct ifnet *, struct mbuf *); void send_etid_flush_wr(struct cxgbe_rate_tag *); #endif diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 33d372f575d0..71ee366e04e0 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -3062,16 +3062,16 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) rc = parse_pkt(&m, vi->flags & TX_USES_VM_WR); if (__predict_false(rc != 0)) { + if (__predict_true(rc == EINPROGRESS)) { + /* queued by parse_pkt */ + MPASS(m != NULL); + return (0); + } + MPASS(m == NULL); /* was freed already */ atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is ok */ return (rc); } -#ifdef RATELIMIT - if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) { - if (m->m_pkthdr.snd_tag->sw->type == IF_SND_TAG_TYPE_RATE_LIMIT) - return (ethofld_transmit(ifp, m)); - } -#endif /* Select a txq. */ sc = vi->adapter; diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 88a7f44cadb7..ad3cb63dade4 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -345,6 +345,7 @@ static inline u_int txpkt_eo_len16(u_int, u_int, u_int); #endif static int ethofld_fw4_ack(struct sge_iq *, const struct rss_header *, struct mbuf *); +static int ethofld_transmit(struct ifnet *, struct mbuf *); #endif static counter_u64_t extfree_refs; @@ -2960,6 +2961,10 @@ restart: set_mbuf_eo_nsegs(m0, nsegs); set_mbuf_eo_len16(m0, txpkt_eo_len16(nsegs, immhdrs, needs_tso(m0))); + rc = ethofld_transmit(mst->ifp, m0); + if (rc != 0) + goto fail; + return (EINPROGRESS); } #endif #endif @@ -6847,7 +6852,7 @@ ethofld_tx(struct cxgbe_rate_tag *cst) } } -int +static int ethofld_transmit(struct ifnet *ifp, struct mbuf *m0) { struct cxgbe_rate_tag *cst; @@ -6903,8 +6908,6 @@ ethofld_transmit(struct ifnet *ifp, struct mbuf *m0) done: mtx_unlock(&cst->lock); - if (__predict_false(rc != 0)) - m_freem(m0); return (rc); } From nobody Fri Feb 17 17:08:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJJDL0fJyz3r9gK; Fri, 17 Feb 2023 17:08: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 4PJJDK6qGfz3lv4; Fri, 17 Feb 2023 17:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676653698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXfg7E/e8jx9M+WSZqRff1hEac1QihxxCQIlJw/WXXQ=; b=miBfvivi9B3IrCH2v4SmrVAYtb5xiLj2Zxnuh3vm4eZK7P7F5Ett3PyfUgcews1S2FLGEv EIegP/OQn1xrMmp6Xl6+q7Trxs04qeyFoJQ2Oi6IYOPCuay84OLZN7azgWFQi9dOf/EIx2 A18blXgzMJReFmOtRxDAJuwkmS0eRC+O7+tW0rDb0qwf3XsT70IvUKmepHiXetjirvWzci R3BCXsdF/j1yMVTlkoAqtRqMTGG/4vlLUUclJv18MEiQznhNhQc7bLoB4SHPXF4bj9ykQV aVLftPyEq6YsFkHGbtJ7f0/N1u3hsBuQAFIMHTW70UknLkdOIBI//j8RQKS6lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676653698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXfg7E/e8jx9M+WSZqRff1hEac1QihxxCQIlJw/WXXQ=; b=tPimqfCtCFBxyv6vV33PtZZ4WdLZHhXpHl+KW7/zYp+t6nIac0DSmbmvZCAGbnE3+c6PQZ mEWtZM0tqBpMG77Rsr4kxOEkk6K2UkJSjfa9jpzMLZZReF4c3wHhGuCBKc826BHvgxGyf8 dyeM8C+nodjTZNa7klnKTDV+HKBJXY9omWFZdjvs4bjmTPdUj1cWToEDb4oP4rKO4Gdxn6 f2TKcCsCIPKa0HPS/zDAFPZFhT4fG+V007Ckyax2PFwxrRBhTxGE9MANU8ejutO8hjLf3j muM+4/XPS8+iXmUzpGFeLuT5tHZ1KSrapDOyAb85iaSGmR1Lh6iKIdxlOMQ/Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676653698; a=rsa-sha256; cv=none; b=sJ5EO8Ipt1U+OwawpMYoYY4W8lufap7IHQUO35+KN0KLdBM9Goa/Drj3D50CHyD7pMOJO+ v5Zf/dLPDqilCaOnGLrfYts5PAQdDQrVKccyqlN+rlaPeGBiR4OP4m2aP5QaKnTC+JkFUr 5E1zVXNBWyXDmdydFHM5tOOLSTAzxpERUx9M3U4cBREvlOZvG2PWVwjtdakpGhJgOhPUAq dqwr/IPY/MCU8UVZbJU35mn9pERvvuhpVVbNBm9errIXlC/GyghcQZ+c79LRLJDISWlCtI xneuu4HY2ubHHu0gWxv8WRm4W5Q5lE7ffejpuel0UV6vqC/mKPyXix1mbcc7xA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJJDK5tx2zr7m; Fri, 17 Feb 2023 17:08: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 31HH8Hlm054956; Fri, 17 Feb 2023 17:08:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HH8H9I054955; Fri, 17 Feb 2023 17:08:17 GMT (envelope-from git) Date: Fri, 17 Feb 2023 17:08:17 GMT Message-Id: <202302171708.31HH8H9I054955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b919bf05966c - main - cxgbe: Move helper functions for mbuf metadata to adapter.h. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b919bf05966c34cef8e02451ff1dfe9eec0f9cbd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b919bf05966c34cef8e02451ff1dfe9eec0f9cbd commit b919bf05966c34cef8e02451ff1dfe9eec0f9cbd Author: John Baldwin AuthorDate: 2023-02-17 17:06:12 +0000 Commit: John Baldwin CommitDate: 2023-02-17 17:06:12 +0000 cxgbe: Move helper functions for mbuf metadata to adapter.h. Previously private to t4_sge.c, this allows other parts of the driver (such as NIC TLS) to use these helpers directly. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D38578 --- sys/dev/cxgbe/adapter.h | 58 +++++++++++++++++++++++++++++++++++++++++++++ sys/dev/cxgbe/t4_sge.c | 63 ------------------------------------------------- 2 files changed, 58 insertions(+), 63 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index b470d1a6461c..7076b1cf781a 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1118,6 +1118,64 @@ hw_off_limits(struct adapter *sc) return (__predict_false(off_limits != 0)); } +static inline int +mbuf_nsegs(struct mbuf *m) +{ + M_ASSERTPKTHDR(m); + KASSERT(m->m_pkthdr.inner_l5hlen > 0, + ("%s: mbuf %p missing information on # of segments.", __func__, m)); + + return (m->m_pkthdr.inner_l5hlen); +} + +static inline void +set_mbuf_nsegs(struct mbuf *m, uint8_t nsegs) +{ + M_ASSERTPKTHDR(m); + m->m_pkthdr.inner_l5hlen = nsegs; +} + +/* Internal mbuf flags stored in PH_loc.eight[1]. */ +#define MC_NOMAP 0x01 +#define MC_RAW_WR 0x02 +#define MC_TLS 0x04 + +static inline int +mbuf_cflags(struct mbuf *m) +{ + M_ASSERTPKTHDR(m); + return (m->m_pkthdr.PH_loc.eight[4]); +} + +static inline void +set_mbuf_cflags(struct mbuf *m, uint8_t flags) +{ + M_ASSERTPKTHDR(m); + m->m_pkthdr.PH_loc.eight[4] = flags; +} + +static inline int +mbuf_len16(struct mbuf *m) +{ + int n; + + M_ASSERTPKTHDR(m); + n = m->m_pkthdr.PH_loc.eight[0]; + if (!(mbuf_cflags(m) & MC_TLS)) + MPASS(n > 0 && n <= SGE_MAX_WR_LEN / 16); + + return (n); +} + +static inline void +set_mbuf_len16(struct mbuf *m, uint8_t len16) +{ + M_ASSERTPKTHDR(m); + if (!(mbuf_cflags(m) & MC_TLS)) + MPASS(len16 > 0 && len16 <= SGE_MAX_WR_LEN / 16); + m->m_pkthdr.PH_loc.eight[0] = len16; +} + static inline uint32_t t4_read_reg(struct adapter *sc, uint32_t reg) { diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index ad3cb63dade4..94fc705bd1d4 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -87,11 +87,6 @@ __FBSDID("$FreeBSD$"); #define RX_COPY_THRESHOLD MINCLSIZE #endif -/* Internal mbuf flags stored in PH_loc.eight[1]. */ -#define MC_NOMAP 0x01 -#define MC_RAW_WR 0x02 -#define MC_TLS 0x04 - /* * Ethernet frames are DMA'd at this byte offset into the freelist buffer. * 0-7 are valid values. @@ -2284,64 +2279,6 @@ t4_update_fl_bufsize(struct ifnet *ifp) #endif } -static inline int -mbuf_nsegs(struct mbuf *m) -{ - - M_ASSERTPKTHDR(m); - KASSERT(m->m_pkthdr.inner_l5hlen > 0, - ("%s: mbuf %p missing information on # of segments.", __func__, m)); - - return (m->m_pkthdr.inner_l5hlen); -} - -static inline void -set_mbuf_nsegs(struct mbuf *m, uint8_t nsegs) -{ - - M_ASSERTPKTHDR(m); - m->m_pkthdr.inner_l5hlen = nsegs; -} - -static inline int -mbuf_cflags(struct mbuf *m) -{ - - M_ASSERTPKTHDR(m); - return (m->m_pkthdr.PH_loc.eight[4]); -} - -static inline void -set_mbuf_cflags(struct mbuf *m, uint8_t flags) -{ - - M_ASSERTPKTHDR(m); - m->m_pkthdr.PH_loc.eight[4] = flags; -} - -static inline int -mbuf_len16(struct mbuf *m) -{ - int n; - - M_ASSERTPKTHDR(m); - n = m->m_pkthdr.PH_loc.eight[0]; - if (!(mbuf_cflags(m) & MC_TLS)) - MPASS(n > 0 && n <= SGE_MAX_WR_LEN / 16); - - return (n); -} - -static inline void -set_mbuf_len16(struct mbuf *m, uint8_t len16) -{ - - M_ASSERTPKTHDR(m); - if (!(mbuf_cflags(m) & MC_TLS)) - MPASS(len16 > 0 && len16 <= SGE_MAX_WR_LEN / 16); - m->m_pkthdr.PH_loc.eight[0] = len16; -} - #ifdef RATELIMIT static inline int mbuf_eo_nsegs(struct mbuf *m) From nobody Fri Feb 17 17:08:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJJDM3vcSz3r9jr; Fri, 17 Feb 2023 17:08: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 4PJJDM11J5z3lsG; Fri, 17 Feb 2023 17:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676653699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuNsrn01CpijSrOmUipwFjzFIPeDxGJiXbQPAZuxA/0=; b=C2dGofuxA9C4XPC+URPNylEv/Mlyz2YNTtm8z7g+KwGrR27pekWYpzxKmjp+PLqhV3Gg0e TrTWTeHF+F6b5DbgswXcwU8pi87BsCgJ+/5iUEFR9ZBhSwCgXVOlMyO8O38q1xQxNc3F4o Kkg+Xh9qJ+KmVePW/P6vcnkjzpE1nD/1nCz58Kv1JZ51LpELi3fL5DfFCEHhef8BJqfKD2 f9gIK0SnVByHJpbJvYLUaIp+pvn9q+zSFA9NQAsTtV7jVulC0QSk7jA2u7zdxIZ5cqiCs3 TiJWc1pQkVYcYGEFzLT73gF7u58OBvXdrdkfNjEIZfrq5kibO92WaCH3UobGMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676653699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuNsrn01CpijSrOmUipwFjzFIPeDxGJiXbQPAZuxA/0=; b=BBMwkatTCJOKh59gGF3rB2vO7AFiWiUgT8+p7P4XotCZi1YJvqQ7IXei9MCeVecQUj8ijP rSOCGNS1e945dJfOkkBGK3xYBVZjG6v+ciibCMVaFUJcmQgwVuqI/5E/oHm7nh9x1SNBZJ NoFyChoTRSQljhsD1f7VrcmF6rRadCqE2f1e/wzESjoZF44M5hifhwc7lNDhpJc6hd9GH/ 1p7/jyJaRuFm6UMU0Uv7hjEUMsJfI9FPC0DKzNgxi23tlWufeuc4H1Xga0g5QC79LyY0T2 bk7BodN3zeLwwdAQGTO6T/oGO6CJ/tbGz+/djJk/yEPLqOMToF4yQPER+KOxnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676653699; a=rsa-sha256; cv=none; b=a9ZJBQFNgKY2BLDo69Rh43DsvH+LNMP3UJBpUS9jM3RlVRQQ2td1YGWJHYpTbPbWkt1+I4 3ZWfCkjNiNix6mxgdoFrZYmVDr3OFl9QCwsdL2JUdTqQv8cEuQhEEH8f2yzAA+FDHY8Ikr NxIHm/Z8NMm/klc5T4QPzGdc/St20r9yNKgpYUmq1Cqxy+ozbd1Km8k0JBabjzRxnhARX9 ltOJ89Xca5k7Q8/7GnojwE/yML1MjPLqoHkchDRQnIyGSyKonjq2mEOAlbTfr5Jv6tc0xN XOgU/JPxB3E8KCzL2zoFNjYJ3VQ+tevSd5SxVH5AfdhHdfWKPJZ9x5WKL5JSAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJJDM008mzqry; Fri, 17 Feb 2023 17:08: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 31HH8I0R054978; Fri, 17 Feb 2023 17:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HH8IGq054977; Fri, 17 Feb 2023 17:08:18 GMT (envelope-from git) Date: Fri, 17 Feb 2023 17:08:18 GMT Message-Id: <202302171708.31HH8IGq054977@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ca457729cc7b - main - cxgbe: Queue NIC TLS mbufs internally. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca457729cc7bee218ce4d001a39306687c433d39 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ca457729cc7bee218ce4d001a39306687c433d39 commit ca457729cc7bee218ce4d001a39306687c433d39 Author: John Baldwin AuthorDate: 2023-02-17 17:07:17 +0000 Commit: John Baldwin CommitDate: 2023-02-17 17:07:17 +0000 cxgbe: Queue NIC TLS mbufs internally. Set internal mbuf properties and queue NIC TLS mbuf chains to the connection's TX queue directly. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D38579 --- sys/dev/cxgbe/adapter.h | 4 +-- sys/dev/cxgbe/crypto/t6_kern_tls.c | 66 ++++++++++++++++---------------------- sys/dev/cxgbe/t4_sge.c | 11 ++----- 3 files changed, 33 insertions(+), 48 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 7076b1cf781a..4206bca95cdf 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1379,8 +1379,8 @@ int t6_tls_tag_alloc(struct ifnet *, union if_snd_tag_alloc_params *, void t6_ktls_modload(void); void t6_ktls_modunload(void); int t6_ktls_try(struct ifnet *, struct socket *, struct ktls_session *); -int t6_ktls_parse_pkt(struct mbuf *, int *, int *); -int t6_ktls_write_wr(struct sge_txq *, void *, struct mbuf *, u_int, u_int); +int t6_ktls_parse_pkt(struct mbuf *); +int t6_ktls_write_wr(struct sge_txq *, void *, struct mbuf *, u_int); #endif /* t4_keyctx.c */ diff --git a/sys/dev/cxgbe/crypto/t6_kern_tls.c b/sys/dev/cxgbe/crypto/t6_kern_tls.c index 0be0c092d7e0..f1302d063051 100644 --- a/sys/dev/cxgbe/crypto/t6_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t6_kern_tls.c @@ -72,6 +72,7 @@ struct tlspcb { struct vi_info *vi; /* virtual interface */ struct adapter *sc; struct l2t_entry *l2te; /* L2 table entry used by this connection */ + struct sge_txq *txq; int tid; /* Connection identifier */ int tx_key_addr; @@ -95,7 +96,6 @@ struct tlspcb { /* Fields only used during setup and teardown. */ struct inpcb *inp; /* backpointer to host stack's PCB */ - struct sge_txq *txq; struct sge_wrq *ctrlq; struct clip_entry *ce; /* CLIP table entry used by this tid */ @@ -785,12 +785,7 @@ ktls_wr_len(struct tlspcb *tlsp, struct mbuf *m, struct mbuf *m_tls, /* This should always be the last TLS record in a chain. */ MPASS(m_tls->m_next == NULL); - - /* - * XXX: Set a bogus 'nsegs' value to avoid tripping an - * assertion in mbuf_nsegs() in t4_sge.c. - */ - *nsegsp = 1; + *nsegsp = 0; return (wr_len); } @@ -893,7 +888,7 @@ ktls_find_tcp_timestamps(struct tcphdr *tcp) } int -t6_ktls_parse_pkt(struct mbuf *m, int *nsegsp, int *len16p) +t6_ktls_parse_pkt(struct mbuf *m) { struct tlspcb *tlsp; struct ether_header *eh; @@ -901,6 +896,7 @@ t6_ktls_parse_pkt(struct mbuf *m, int *nsegsp, int *len16p) struct ip6_hdr *ip6; struct tcphdr *tcp; struct mbuf *m_tls; + void *items[1]; int nsegs; u_int wr_len, tot_len; @@ -976,7 +972,6 @@ t6_ktls_parse_pkt(struct mbuf *m, int *nsegsp, int *len16p) * Each of the remaining mbufs in the chain should reference a * TLS record. */ - *nsegsp = 0; for (m_tls = m->m_next; m_tls != NULL; m_tls = m_tls->m_next) { MPASS(m_tls->m_flags & M_EXTPG); @@ -993,8 +988,8 @@ t6_ktls_parse_pkt(struct mbuf *m, int *nsegsp, int *len16p) * Store 'nsegs' for the first TLS record in the * header mbuf's metadata. */ - if (*nsegsp == 0) - *nsegsp = nsegs; + if (m_tls == m->m_next) + set_mbuf_nsegs(m, nsegs); } MPASS(tot_len != 0); @@ -1035,12 +1030,13 @@ t6_ktls_parse_pkt(struct mbuf *m, int *nsegsp, int *len16p) tot_len += roundup2(wr_len, EQ_ESIZE); - *len16p = tot_len / 16; + set_mbuf_len16(m, tot_len / 16); #ifdef VERBOSE_TRACES CTR4(KTR_CXGBE, "%s: tid %d len16 %d nsegs %d", __func__, - tlsp->tid, *len16p, *nsegsp); + tlsp->tid, mbuf_len16(m), mbuf_nsegs(m)); #endif - return (0); + items[0] = m; + return (mp_ring_enqueue(tlsp->txq->r, items, 1, 256)); } /* @@ -1316,10 +1312,9 @@ _Static_assert(W_TCB_SND_UNA_RAW == W_TCB_SND_NXT_RAW, "SND_NXT_RAW and SND_UNA_RAW are in different words"); static int -ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, - void *dst, struct mbuf *m, struct tcphdr *tcp, struct mbuf *m_tls, - u_int nsegs, u_int available, tcp_seq tcp_seqno, uint32_t *tsopt, - u_int pidx, bool set_l2t_idx) +ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, void *dst, + struct mbuf *m, struct tcphdr *tcp, struct mbuf *m_tls, u_int available, + tcp_seq tcp_seqno, uint32_t *tsopt, u_int pidx, bool set_l2t_idx) { struct sge_eq *eq = &txq->eq; struct tx_sdesc *txsd; @@ -1335,7 +1330,7 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, u_int auth_start, auth_stop, auth_insert; u_int cipher_start, cipher_stop, iv_offset; u_int imm_len, mss, ndesc, offset, plen, tlen, twr_len, wr_len; - u_int fields, tx_max_offset, tx_max; + u_int fields, nsegs, tx_max_offset, tx_max; bool first_wr, last_wr, using_scratch; ndesc = 0; @@ -1457,7 +1452,7 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, out = (void *)(wr + 1); fields = 0; if (set_l2t_idx) { - KASSERT(nsegs != 0, + KASSERT(m->m_next == m_tls, ("trying to set L2T_IX for subsequent TLS WR")); #ifdef VERBOSE_TRACES CTR3(KTR_CXGBE, "%s: tid %d set L2T_IX to %d", __func__, @@ -1469,7 +1464,7 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, fields++; } if (tsopt != NULL && tlsp->prev_tsecr != ntohl(tsopt[1])) { - KASSERT(nsegs != 0, + KASSERT(m->m_next == m_tls, ("trying to set T_RTSEQ_RECENT for subsequent TLS WR")); #ifdef VERBOSE_TRACES CTR2(KTR_CXGBE, "%s: tid %d wrote updated T_RTSEQ_RECENT", @@ -1485,7 +1480,7 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, } if (first_wr || tlsp->prev_seq != tx_max) { - KASSERT(nsegs != 0, + KASSERT(m->m_next == m_tls, ("trying to set TX_MAX for subsequent TLS WR")); #ifdef VERBOSE_TRACES CTR4(KTR_CXGBE, @@ -1504,7 +1499,7 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, * reset SND_UNA_RAW to 0 so that SND_UNA == TX_MAX. */ if (tlsp->prev_seq != tx_max || mtod(m_tls, vm_offset_t) != 0) { - KASSERT(nsegs != 0, + KASSERT(m->m_next == m_tls, ("trying to clear SND_UNA_RAW for subsequent TLS WR")); #ifdef VERBOSE_TRACES CTR2(KTR_CXGBE, "%s: tid %d clearing SND_UNA_RAW", __func__, @@ -1524,7 +1519,7 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, tlsp->prev_seq = tcp_seqno + tlen; if (first_wr || tlsp->prev_ack != ntohl(tcp->th_ack)) { - KASSERT(nsegs != 0, + KASSERT(m->m_next == m_tls, ("trying to set RCV_NXT for subsequent TLS WR")); write_set_tcb_field_ulp(tlsp, out, txq, W_TCB_RCV_NXT, V_TCB_RCV_NXT(M_TCB_RCV_NXT), @@ -1536,7 +1531,7 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, } if (first_wr || tlsp->prev_win != ntohs(tcp->th_win)) { - KASSERT(nsegs != 0, + KASSERT(m->m_next == m_tls, ("trying to set RCV_WND for subsequent TLS WR")); write_set_tcb_field_ulp(tlsp, out, txq, W_TCB_RCV_WND, V_TCB_RCV_WND(M_TCB_RCV_WND), @@ -1547,8 +1542,10 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, tlsp->prev_win = ntohs(tcp->th_win); } - /* Recalculate 'nsegs' if cached value is not available. */ - if (nsegs == 0) + /* Use cached value for first record in chain. */ + if (m->m_next == m_tls) + nsegs = mbuf_nsegs(m); + else nsegs = sglist_count_mbuf_epg(m_tls, m_tls->m_epg_hdrlen + offset, plen - (m_tls->m_epg_hdrlen + offset)); @@ -1948,7 +1945,7 @@ ktls_write_tcp_fin(struct sge_txq *txq, void *dst, struct mbuf *m, } int -t6_ktls_write_wr(struct sge_txq *txq, void *dst, struct mbuf *m, u_int nsegs, +t6_ktls_write_wr(struct sge_txq *txq, void *dst, struct mbuf *m, u_int available) { struct sge_eq *eq = &txq->eq; @@ -2043,18 +2040,11 @@ t6_ktls_write_wr(struct sge_txq *txq, void *dst, struct mbuf *m, u_int nsegs, } ndesc = ktls_write_tls_wr(tlsp, txq, dst, m, tcp, m_tls, - nsegs, available - totdesc, tcp_seqno, tsopt, pidx, - set_l2t_idx); + available - totdesc, tcp_seqno, tsopt, pidx, set_l2t_idx); totdesc += ndesc; IDXINCR(pidx, ndesc, eq->sidx); dst = &eq->desc[pidx]; - /* - * The value of nsegs from the header mbuf's metadata - * is only valid for the first TLS record. - */ - nsegs = 0; - /* Only need to set the L2T index once. */ set_l2t_idx = false; } @@ -2126,13 +2116,13 @@ t6_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, } int -t6_ktls_parse_pkt(struct mbuf *m, int *nsegsp, int *len16p) +t6_ktls_parse_pkt(struct mbuf *m) { return (EINVAL); } int -t6_ktls_write_wr(struct sge_txq *txq, void *dst, struct mbuf *m, u_int nsegs, +t6_ktls_write_wr(struct sge_txq *txq, void *dst, struct mbuf *m, u_int available) { panic("can't happen"); diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 94fc705bd1d4..8cd9be275126 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -2691,16 +2691,12 @@ restart: #endif #ifdef KERN_TLS if (mst != NULL && mst->sw->type == IF_SND_TAG_TYPE_TLS) { - int len16; - cflags |= MC_TLS; set_mbuf_cflags(m0, cflags); - rc = t6_ktls_parse_pkt(m0, &nsegs, &len16); + rc = t6_ktls_parse_pkt(m0); if (rc != 0) goto fail; - set_mbuf_nsegs(m0, nsegs); - set_mbuf_len16(m0, len16); - return (0); + return (EINPROGRESS); } #endif if (nsegs > max_nsegs_allowed(m0, vm_wr)) { @@ -3260,8 +3256,7 @@ skip_coalescing: #ifdef KERN_TLS } else if (mbuf_cflags(m0) & MC_TLS) { ETHER_BPF_MTAP(ifp, m0); - n = t6_ktls_write_wr(txq, wr, m0, mbuf_nsegs(m0), - avail); + n = t6_ktls_write_wr(txq, wr, m0, avail); #endif } else { ETHER_BPF_MTAP(ifp, m0); From nobody Fri Feb 17 17:14:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJJMb0fNlz3rB06; Fri, 17 Feb 2023 17:14: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 4PJJMb07m4z3n3D; Fri, 17 Feb 2023 17:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676654075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8v7hFyHvPFkSMKhKJqupJM7x2SAAc6Blk0pq/hPpGU=; b=pGb4lNjSp8JbxxTi8gnBb9Eo1FIGdms9wRpmf0XXGdTEXtd4ggrU35NnbQ5KUCZK363pGG filC9e6z6DC7ccKbyPwZ1TmEMPXNdKpLKQw1idQcRryAuvgXnhmII/jbbWxDkM1vJrAGnO ay2PrsvTYA0Daqt9DBhJ2kjV5x0ZvIE/zwH80GlZwDX6/pP6KUwZWB7UL2bmsbfT2EjeqO yw/yn8jPpWB/xxDuh6jry7flu9BdHUqroxbK7Fr47mVVkZOAFTBvShiQBhls6U3Np6zPfw +vzxHXKslAVgCLsNwjpU0k7qWzLV82QhAs9DduPzPJui1XyOIlJThlAgfrx3vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676654075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8v7hFyHvPFkSMKhKJqupJM7x2SAAc6Blk0pq/hPpGU=; b=yTlsq8WdffrKLLlRUMUxN3grm4lklUjLxPYqs+GZf+YnoAnjLUDg1sKpqJFft13J2Zf6Pl WxvY3hBLhFjo9EIfZnfSlk2zbrfIaTUBYzPnTUhUm+eZfQYjdLyl5Q81oVkXUStIZSKbye yA5smS79B8joOSZbBz1TuVoLVb/fQE+AmcK34lUlwTJrrDvIM32C85m0AEu4eD2TtWO6I4 b4WU+HACBuhriwNHR75ZYFmLf2IOpboCY5qq+zuklDd2v38OlJInZvlmfqZXCepO9TUr5P ru7BGALCR9BT/JC19UWxX9Qrrtck5olO5Mk+nVoDvBjjJFqBmrQh05/US/iSHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676654075; a=rsa-sha256; cv=none; b=KP24Vf9l667OEt4NSGxbCu6MA8pcXMRGN4Oz+BdRqPTxXX+sLtMDh+sqClykqGkI0sQOX9 plSZyWMbZtve2FFFVsl0g9FAPC0RQqElHpA8Ia7ZEZZkpc6S4bcxh1UeRSaK/ARIx7yvTX 2W/OgqvLd+5LTIiePSQrZ9yycPMPXp/YSI86/O4AHyi3F0mm1ttdF2h/FogTFKflDF8pnc u+c4mvMpILNYnlfuxS9WcmwSdGuhI16s/tspicHpqGWAplOoJOyIIED+MmCRuaSSp95+BR ++3s+y2lIxHFbNMCVBgNuVMoNR2ZYh6AsqlSKQFvjIdoRz42Agv27O2Lrw9PGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJJMZ6GCXzqq2; Fri, 17 Feb 2023 17:14: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 31HHEYlW068974; Fri, 17 Feb 2023 17:14:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HHEYAT068973; Fri, 17 Feb 2023 17:14:34 GMT (envelope-from git) Date: Fri, 17 Feb 2023 17:14:34 GMT Message-Id: <202302171714.31HHEYAT068973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: cda6bdbaa15e - main - tcp: Don't try to disconnect a socket multiple times. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cda6bdbaa15e04857e2c0ae7ac06e9dbabac9835 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cda6bdbaa15e04857e2c0ae7ac06e9dbabac9835 commit cda6bdbaa15e04857e2c0ae7ac06e9dbabac9835 Author: John Baldwin AuthorDate: 2023-02-17 17:13:53 +0000 Commit: John Baldwin CommitDate: 2023-02-17 17:13:53 +0000 tcp: Don't try to disconnect a socket multiple times. When the checks for INP_TIMEWAIT were removed, tcp_usr_close() and tcp_usr_disconnect() were no longer prevented from calling tcp_disconnect() on a socket that was already disconnected. This triggered a panic in cxgbe(4) for TOE where the tcp_disconnect() on an already-disconnected socket invoked tcp_output() on a socket that was already in time-wait. Reviewed by: rrs, np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D37112 --- sys/netinet/tcp_usrreq.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 1dbf4659ad00..0c36e4281010 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -654,6 +654,8 @@ tcp_usr_disconnect(struct socket *so) goto out; } tp = intotcpcb(inp); + if (tp->t_state == TCPS_TIME_WAIT) + goto out; tcp_disconnect(tp); out: TCP_PROBE2(debug__user, tp, PRU_DISCONNECT); @@ -1248,14 +1250,16 @@ tcp_usr_close(struct socket *so) ("tcp_usr_close: inp_socket == NULL")); /* - * If we still have full TCP state, and we're not dropped, initiate + * If we are still connected and we're not dropped, initiate * a disconnect. */ if (!(inp->inp_flags & INP_DROPPED)) { tp = intotcpcb(inp); - tp->t_flags |= TF_CLOSED; - tcp_disconnect(tp); - TCP_PROBE2(debug__user, tp, PRU_CLOSE); + if (tp->t_state != TCPS_TIME_WAIT) { + tp->t_flags |= TF_CLOSED; + tcp_disconnect(tp); + TCP_PROBE2(debug__user, tp, PRU_CLOSE); + } } if (!(inp->inp_flags & INP_DROPPED)) { soref(so); From nobody Fri Feb 17 17:49:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJK7M4l04z3rDPK; Fri, 17 Feb 2023 17:49:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJK7M4Cnbz3qDG; Fri, 17 Feb 2023 17:49:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676656143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TqVPO7GnClqIdyts5m8v2qtx3wNKVhXk/v2F/efJRTY=; b=hVQoX59q2W/d4ckYIptB8Z5WvmhxG9X/KNNmqk2cX9qFIhRDBwOsb5eBkb/FBWOou0HRK3 kbw5oycap/NkBDtTvSmNfYhWEvy9XFrUBaZyeQ9z0lC99JM8sgt5LCfEFVhEBsXgvgkJW+ aeiSWrGUMfJS4hbKJIWE6EmwC4hCSBMTE4qSDhDba/3WucRjMAtnJ1THPOe72qjt/qlVQA xmck64H+2N3HXwa+LL+6///GZhtNzU1uiGiEIX4lsFOK+y+J/EkJRXN6Iu+hxAzGTEB3u1 hE5ldqBRqIy94pV6IoaKlgxQjSAOXKkycUThQeS0yv7F38cZatXC7Uzh8jNgCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676656143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TqVPO7GnClqIdyts5m8v2qtx3wNKVhXk/v2F/efJRTY=; b=pg3xRhpUNQBgAoL1fW88r/sQUIrwMP78t3HuBvu9IssDOUDTws/QsPTRWuNJVvdef3Ki/7 U6O92HCnAoIEHecQgwrnRqV4exk+jkfiII6TE893FqM0ALrzXU+aarHy+49Ut5cozHJXQw 8/jnz50/uECzeP3J8nlvrRCdqtnU+PlFUzh9Y+OrK13fNj3rYLabRkR2pWwEOgQoZ7lqub 0Ndqox5q1rPtIlWXcr8dpZ6edPgEWbe3WpiwXz3EEeCuSYNLu6pYIo2VRMF3EcvvCFYeS9 ZyzEwhuDClnhPG8KynFr0no/0NHbMsirPz6YpP3jJkceg+3A2Gg5ZB6KFzGQ2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676656143; a=rsa-sha256; cv=none; b=Lmrv1Z2+bcsQQvaOpnboyAXTFqLyUUzQaDaaco0VLZgTtI9UT0r39/EgACT2yb0ePmVB/O IEep5vchSQmHp2rDggkqEYfeqxm/IJ4ECMSCcwaqJc6KIW2WoML/dTY7hRF30nVL8+4JF2 O/yj7YsTst0sgQDrburPiyxyMMXuCwxt+aRQrKKnLNFsxiTgP+FHtYF1zb5hvwChrDi2vT /i0Tnw6fCok16htkUpg5ytK+s+rFiLplV0jY45a2gyYKFd5cPx8/QjXQ/jVaXBbv+Jc8cK A8/e19UNBgxiqbRX4Xe0+NUkE4Eb/z3KCbmZt4yVN8JflvX7USpkANInuHg9AQ== Received: from [IPV6:2601:648:8680:16b0:10b2:ebc3:c7be:fc24] (unknown [IPv6:2601:648:8680:16b0:10b2:ebc3:c7be:fc24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PJK7L6kj6znM2; Fri, 17 Feb 2023 17:49:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <2fb2622d-8aae-af37-2e52-df7f20e27646@FreeBSD.org> Date: Fri, 17 Feb 2023 09:49:00 -0800 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: git: 98844e99d40a - main - aio: Fix more synchronization issues in aio_biowakeup. Content-Language: en-US To: Alan Somers Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202302152133.31FLXEep021521@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 2/15/23 2:05 PM, Alan Somers wrote: > On Wed, Feb 15, 2023 at 2:33 PM John Baldwin wrote: >> >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=98844e99d40a90ae89d84762e07150af3a8f89bd >> >> commit 98844e99d40a90ae89d84762e07150af3a8f89bd >> Author: John Baldwin >> AuthorDate: 2023-02-15 21:32:52 +0000 >> Commit: John Baldwin >> CommitDate: 2023-02-15 21:32:52 +0000 >> >> aio: Fix more synchronization issues in aio_biowakeup. >> >> - Use atomic_store to set job->error. atomic_set does an or >> operation, not assignment. >> >> - Use refcount_* to manage job->nbio. >> >> This ensures proper memory barriers are present so that the last bio >> won't see a possibly stale value of job->error. >> >> - Don't re-read job->error after reading it via atomic_load. >> >> Reported by: markj (1) >> Reviewed by: mjg, markj >> Differential Revision: https://reviews.freebsd.org/D38611 > > Thanks for fixing these subtle problems in aio_(read|write)v. Will you MFC too? Yes. I only noticed these while reviewing the original fix from the folks at TidalScale FWIW. -- John Baldwin From nobody Fri Feb 17 18:16:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJKlH2R4Fz3rGZf; Fri, 17 Feb 2023 18:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJKlH1hQgz3sb0; Fri, 17 Feb 2023 18:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Uak2lpbos1l05WZlZE36uKu/ZjNPeNOb1rUQfHZQI8=; b=hj/tQfrnWzB3yXXBOC8LRGn8pUB9Ww8OrjoNxSS4d64D1B+0Esstp6DIEz3evKofWgJ4rh NrMwgWD2lBbGDEiTdD/wrfYF7GuWMIBjsfbZFaBwJqjNXKC80OFLUXlqiRn5dBB64RZSm8 5pK4Kn+Uruq7C3YLW6cgZ9pg5P9jEsZMz8/Pvym+eBOjKdW7kq5T3leE9uYk3jMTlGlOa0 fREL/P6ZdFxpe3vh7Q57WaDlSzWq7MDnJ9MkMpsJZf/rwKtWn3wyXEPPv1ihFqNbnR94XV /ctp8TpHIxHuxbrcGLj4TZlezr6bXUg5yUQfSk4wR1gd/m5o1s9WxTqDbbmNtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Uak2lpbos1l05WZlZE36uKu/ZjNPeNOb1rUQfHZQI8=; b=INS3SMvYAzr2HwLC6PsR4NSIP95+mSDh/LcUxhQh6C4x+OWbH121dDVOhOGom4xdBS/neB GHTA7Wn9q99+XBWz/nNqdnIQYzNSG7oqbO96K8gPs8hUmGNq4ywdp7al1NioYj+BrnL4hn qGzgDSQdJftm11iMB1O1mSohvr9SvznupgG/8O+vwxUZP03JGe15caoDnRVuzJ5njTxpv+ RyF9Uw4gq8SX+jHWmvxcC6uohIxHrvY+XjxsKextrdpkcxzrHnQ2pZArW/6wijj4z8sQOk XdHLiOQO8qRm7WGpBHKS9kbOZQ+k7Npq3AkP2hvw0rM1FnFj1EIG6vZ+zBZg8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676657803; a=rsa-sha256; cv=none; b=hbs6DwDIi/tKUK+HZnEira170kQg8Bbr0thaxVXfFGk5gAJOZ8OGgJimL+niLI/CWwd7Ta 0+qLLbjhUNzUJ/WisaANYiFaoCxggVthXrn+UeO0GZvT1OG8CsMuoJ5wHcwjmXgNZF4sH5 cTWM9uPtmH+12wa36zYYvRsHj4jdmT8xk+mLueaQy/ieLLV7i+PStMoNyMIR5XDY/I0V75 ELevYGyCs4Z+qVzjyVvxhGAXRPUNGRYMudOY4a/IeyGKcR8h1GyCFld1sji3G1z7i/FmWl SSSeFr/nPSKCBojmrKZum7GF1bC1qb2yWFVeL6y1YWCFehiZros6yIDJp+m2Og== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJKlG6sTbzscK; Fri, 17 Feb 2023 18:16: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 31HIGgPk054295; Fri, 17 Feb 2023 18:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HIGg18054294; Fri, 17 Feb 2023 18:16:42 GMT (envelope-from git) Date: Fri, 17 Feb 2023 18:16:42 GMT Message-Id: <202302171816.31HIGg18054294@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: a0aa160b6d26 - main - routing: always pass rtentry to add_route_flags(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a0aa160b6d261f67b29a25c7cc5e04668fb6faf7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=a0aa160b6d261f67b29a25c7cc5e04668fb6faf7 commit a0aa160b6d261f67b29a25c7cc5e04668fb6faf7 Author: Alexander V. Chernikov AuthorDate: 2023-02-17 17:20:38 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-17 18:00:37 +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 --- 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 fd374b468b7c..755765869e84 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -455,7 +455,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 @@ -490,6 +490,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)); @@ -766,6 +776,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 Fri Feb 17 18:16:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJKlJ36HBz3rGZj; Fri, 17 Feb 2023 18:16: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 4PJKlJ1yQCz3sXK; Fri, 17 Feb 2023 18:16:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XA9et2vN+9CUA47xz0z9P2tI1aDvru91bBNlXn2G7LU=; b=ZfvueuiV/qrbRfr6hYYn/tT2/puDp+zJg+uUTCVgXcgXg6LX4TMVFD3xbaFFm8OsRSkuYy /rASqr+aVLR3MwcoJRMQIwxqp2Bs+eJL8V6zH6+icAn7FrVWJFMZZopYzSyWjZUwcYvTvT ywD3RY5P9OClTQ7aa9r27mdp6wqIWLQfpC9E0RGVx6dM7KZXzlj4B6s38j/i2Wv4YjbsNG WJbUVxR4eVJwBIykZugD2RERLKYI0jzTUMHscWqoiwb126QqX7JsoHE1dcgL00Y9CdlWbP Cc/Zc+TuxH2xQPwn9UbLBZraNosr5g4fvdDTo1Vt9bKCL0CnmsV0WzLqNoa8dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XA9et2vN+9CUA47xz0z9P2tI1aDvru91bBNlXn2G7LU=; b=rpqlLFRogjeDiblPeQp6rb0INRfrRMFUiVT8KtZOcoRmPfAG8sy5wOc6HqKzDLY4fQIEWN avTVt1X/qR+uh4lWyz9eefwWxDNc5yBiUXr/gOVwgBKGaj8jhxkUMvWku1hk2ezs0C+BON hZDDy8D0aR6NetgCU3+FUsJa8iq0S7lHUgxs0dpCU/ea8h2MmwMGGmBcLLw1hm4jMAXsYq AiNXV/Qv2MRnDlde8gWH2ibPsD4NNIvgiJ4d5gqR1LserQ03CmbIWHm10KnbDY8Zg3lb65 E96x9cuknpa1ZRyv2viChUFsW+tSp2r8bYKvo6H2hhJsE/TbywTWniKtM6/hKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676657804; a=rsa-sha256; cv=none; b=J4MsWFlZ4gW24wJbgcDK7vVpjGEBdqOtWZYbUzVJXDNUtqxlkhL+qABasu3C9RJlupmm+4 FmDylkpwJe6cvnkG0QmDu1MXlxFmkzULtp8GBbBr5xJfXMx+1tKFAjSanQpfc0g4JkXnCQ iDyD+i179gOt3Pta3lEzb1zwOwrjEqDAwiq0h9xh0TngePLJx11No5BAul+kCLUw+Ov8gR 4IDSSal8qxnfLEoLrneAIJ38pesqxRGYbDoMFO5SMuKVtqz2ZQKNTxZJJoWX52/1N0lUXt swgc7iZ/r3RXEEhO0Z1eR8mLIhauq+4AEVNLCqScxL7onYeEQi1OYdSrgjLmDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJKlJ0f5lzsT7; Fri, 17 Feb 2023 18:16: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 31HIGhcf054314; Fri, 17 Feb 2023 18:16:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HIGh5h054313; Fri, 17 Feb 2023 18:16:43 GMT (envelope-from git) Date: Fri, 17 Feb 2023 18:16:43 GMT Message-Id: <202302171816.31HIGh5h054313@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: f2f7911c5513 - main - netlink: validate rtable value in RTM_ROUTE. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: f2f7911c5513096e46422ad7756bc90c13c6e6d8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f2f7911c5513096e46422ad7756bc90c13c6e6d8 commit f2f7911c5513096e46422ad7756bc90c13c6e6d8 Author: Alexander V. Chernikov AuthorDate: 2023-02-17 17:31:40 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-17 18:00:37 +0000 netlink: validate rtable value in RTM_ROUTE. Reported by: Stefan Grundmann MFC after: 1 day --- 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 From nobody Fri Feb 17 18:16:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJKlK2z7Rz3rGkp; Fri, 17 Feb 2023 18:16: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 4PJKlK29Qfz3sXY; Fri, 17 Feb 2023 18:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b/FG1gGOIFUgiIhIY1ucZPpt4EFUcRL4o5cI4aP8LRE=; b=opvFUDtdREfMJDcL/oKEWR84LwToVhrYHRq7pPhDuSkZtKsJ9vhqbjGO3S/kA1PII9T4iS TyfsJPTp8Whd4WA3VfORd9f/DDiaTAH/oB4xntlWbk5yx5embM/GhY8ohi56CNE5N5+7RK A4ySVUD/dHTcbmgSrt3nFfBzviuYzke2M+ZMO4Onpb7+BAnyg6tyQ9LnsSoVU/U3D/0jHy RMGju5QSh7ynA6o5sr3d9QOn+6WdhOpdDmyRaaeTPb5w2NCTmnpTNOUW8kZkxlMOsjD96J 01qLylA4mHd7N6xk5wE9m+9TPlpKoQfO66lGaKUQhEEKoE7PTL3GuLnqnqI+Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b/FG1gGOIFUgiIhIY1ucZPpt4EFUcRL4o5cI4aP8LRE=; b=plyS3XfCFVWxb68u59wMsm5thfLtTAoAJKh6zbVLXCLGYQROejIgphY+fhLq3myFOSmybD L0UHe1dMeZrgSRODaL4mIiL+qlwOByU3r1g2iy/IhxOSr7mO5dvSwfHbg/dyHYwTwsTgZC kOJH0dV8D5p9bUEaJ2p/qCF/mGtHsU+j7VhGYyzYkp26ZMFgRUwPB8tbH9EljG6ccvmRnC OD+II24Fd51Gv1KTdU8//9IxAGYsikBRiipfqmSx2rV+Wip4ua5nvOiXOGuC+I/vIPo93A TpvaYn9nnP/3lP8yS94J6b4MsjKHudf3bc1RgTnOlPBf9BOa6CSJhT9UYKKnRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676657805; a=rsa-sha256; cv=none; b=sPTL1reOCOhlSmaE/rhSq4pRWk1eQ0FLk4t6wqt2H8J9HDjLIIYE0q6s4YotyO53io2DQy gKliGMwcwUFm4m7RnxBQ55iw6auwHmEAsnPejkXJfWpViDRSunix0tmPOdaWIX7PYXqBcd 2czf9ETVLtnybHM6XE/ir3ocufNeEdpJRSrRR9kZC8QxkbZBEAXYVlA4M6aWxNEyGbhOU5 2wOsaTqY/4g2jtekhRRWOUe2+lK8d4SucGvgDHhzSJ6TWmIo7zvAVTak7Okxs2wc6a6aL9 D+EqT8LP+EaR9U2Cie45g+0zmdWCxXB9JYWLYtb0SibJeG1UxLMmxuImKrv01g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJKlK1HF5zrlp; Fri, 17 Feb 2023 18:16: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 31HIGjIC054337; Fri, 17 Feb 2023 18:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HIGj8U054336; Fri, 17 Feb 2023 18:16:45 GMT (envelope-from git) Date: Fri, 17 Feb 2023 18:16:45 GMT Message-Id: <202302171816.31HIGj8U054336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 6694cb1f5784 - main - netlink: fix if_allocdescr() malloc options argument. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6694cb1f5784d6ceacd684d29b3e3012e1e4e4d5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=6694cb1f5784d6ceacd684d29b3e3012e1e4e4d5 commit 6694cb1f5784d6ceacd684d29b3e3012e1e4e4d5 Author: Alexander V. Chernikov AuthorDate: 2023-02-17 17:35:28 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-17 18:00:37 +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 --- 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 e944fe88994e..7cfaa5a6614b 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 Fri Feb 17 18:16:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJKlL3tTBz3rGj5; Fri, 17 Feb 2023 18:16: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 4PJKlL37rrz3sm4; Fri, 17 Feb 2023 18:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gl2Ugm7vC0QjVLZvJN6eoiRbBLW6+elOt8/5WsbEIa4=; b=RduTfNsscgJRpofh2e03G0RGYzzA9BgHyANrbjyg35WPg/2JBeuKraifg9GCuzg6LiybPF oKzwIIu82aW8Pt16LGBx6MKVWubvQCulKl5E6ysOUpd7xBKQO/95gFcJut5bZHM3fuPktI OCpkEA3NTaqRvNKCvjB9yD7lKwS4gm7nQCQz0yf/QlF43BSHZuBZPa+V7s1dQvmDSZIFJT OK8CjKKI0078KRpNkliD+xrbeANCZU+holxtnwPMuUNMbVbMQBtpcXSuIDySjvyFZv/r3f Alsy7bWHdchCaPwAZBYEIBGTQHhqHypKqET/Gi6y/zEFUYkFQ/4qwuV00HPjxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gl2Ugm7vC0QjVLZvJN6eoiRbBLW6+elOt8/5WsbEIa4=; b=xDyiHUZFMd4Da1wgSM0GUaurgL3nVQoYa4FJBO+1mPZO227N9fSOOSFVlMF0qD8mw0jnMp lJ4q9mBLgDSs68I3jbxNQuUc7EJwkqTJ1OegRLX8W0AROnX1NecUq3B9tc2RNUeSCF43an yUX9jUTfcmEl2fIqOID4JbbjS8iWO/2K9Q9cEbH/kaaNUchCpQT/CxKxZjBHTMiqV3fDMz 65qAaqwxauc0a4+ZOw2VtO62lVHZM6ef/ugSrNo5Ns/Nk7wSCK3Ikk+0WZyPAVzC9sXrAl 89YqcH491sfN/sYkdw6zJBrk/JKwTEU8oYpKn6pj5KouzetexWUvtI3htxtX7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676657806; a=rsa-sha256; cv=none; b=sHaJTY3kPOqbNrCnZR64kgot5ts+yyDSU0CWpdv7sSYKHKcWON5/ARtmoGXO50PVya8vW5 FbYHPOYoNnwD2j4Ec1za0eZoRTLQEUxy/x+u8JONJpgy0/FHh4LQwLNjKUcFyQY2UnzaPV ExrnVNy3IMsrZsQrc647O3hyf4tKISlNW43ytmlom9OmGrwgcnZ4q9ldr+v27DlZy2aOew bRt3RahqAgpaN1CwJbTzZI3/GeKsCtx1DjGV68gzKixQnW3Wf+upcCLSn0MYB1RXDNMkp6 x4KdFQ0SsCBCRyPjW+KPqHrvVl6Wx/FVe2yDFuuUxPY8SrnkkZYHwIPsaUD0+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 4PJKlL2BsMzsmM; Fri, 17 Feb 2023 18:16: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 31HIGkWH054359; Fri, 17 Feb 2023 18:16:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HIGkYd054358; Fri, 17 Feb 2023 18:16:46 GMT (envelope-from git) Date: Fri, 17 Feb 2023 18:16:46 GMT Message-Id: <202302171816.31HIGkYd054358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 45356a1864c7 - main - netlink: simplify temporary address allocation in rtnl_handle_getlink(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 45356a1864c79680c6911b48a18b14a88a7d07fa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=45356a1864c79680c6911b48a18b14a88a7d07fa commit 45356a1864c79680c6911b48a18b14a88a7d07fa Author: Alexander V. Chernikov AuthorDate: 2023-02-17 17:57:44 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-17 18:16:07 +0000 netlink: simplify temporary address allocation in rtnl_handle_getlink(). MFC after: 3 days --- sys/netlink/route/iface.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 0eafacff4775..96f21a79a369 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -439,9 +439,8 @@ rtnl_handle_getlink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *n NL_LOG(LOG_DEBUG2, "Start dump"); - struct ifnet **match_array; - int offset = 0, base_count = 16; /* start with 128 bytes */ - match_array = malloc(base_count * sizeof(void *), M_TEMP, M_NOWAIT); + struct ifnet **match_array = NULL; + int offset = 0, base_count = 0; NLP_LOG(LOG_DEBUG3, nlp, "MATCHING: index=%u type=%d name=%s", attrs.ifi_index, attrs.ifi_type, attrs.ifla_ifname); @@ -452,14 +451,14 @@ rtnl_handle_getlink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *n if (offset >= base_count) { /* Too many matches, need to reallocate */ struct ifnet **new_array; - int sz = base_count * sizeof(void *); - base_count *= 2; - new_array = malloc(sz * 2, M_TEMP, M_NOWAIT); + /* Start with 128 bytes, do 2x increase on each realloc */ + base_count = (base_count != 0) ? base_count * 2 : 16; + new_array = malloc(base_count * sizeof(void *), M_TEMP, M_NOWAIT); if (new_array == NULL) { error = ENOMEM; break; } - memcpy(new_array, match_array, sz); + memcpy(new_array, match_array, offset * sizeof(void *)); free(match_array, M_TEMP); match_array = new_array; } From nobody Fri Feb 17 18:16:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJKlM5c8vz3rGZq; Fri, 17 Feb 2023 18: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 4PJKlM4Hw8z3t1Q; Fri, 17 Feb 2023 18: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=1676657807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BCe3GGO6l15Yl20rbyFuGq9MIj0ncERTsoaILWieyQ=; b=aUpiGvCzFsXO2DXIFWVwdo5F4h83kfsQ8Qm0SVr8sZLQkZ88aORC8vK1vRzBeJ5LwE4DJ9 Z0AzO6G63lIa37rfZ3bC0vpq0hTKH0RkPCd8h9SqhXi/XzubwNXgvRJiG7Rb9d18tR63DY cze7w6/+Zf1tMQZYVcYPRuJ295RxoPcMKn3Hj9qh9PQOSKeN80iWzXjoupDvpbirg5yut9 2yboz/zlIAxbmEoXuLyt0YP6fCIlO16bAxbevAPE5hRaGptfjacGAUfT06BTtZC2ymdN9u Bjk62uFAEEBN0v75puViJN4Hx2Ir8ax9S8YfpIVMuoNPKzBLEzDF4B/D1uavNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BCe3GGO6l15Yl20rbyFuGq9MIj0ncERTsoaILWieyQ=; b=ks8jorMmPOdI6vwOT0LJj/ppxamhUm18jwKZhL2gDWs4qzSqEGctB8mg4pZR3EEd35y8bk yZ4siwbFDAuOPyUCX5FuGvqfGMse+qJQ/iVmllL8Pu0rg+fP+cezjhy0YyFj66z+WWWDoK VdY2rWJw+XLzkBgFhopF3Hy21jLdqPx5lUEWmoNoVoOMShiB7Ran+ZdleOw3Mi+q7VgSLf P8lW+GuHVUduNRcsROgaDnQvmQT6JhT13kLpKAJoOujC+0n1mQUYko+qE+0V05L9r5oreH Mx41ziaTOVJ/WHPUJB3+yLXgUX6+9yLZmpIxPh7XKSmNZV3JdqGw+9fW6Yt3/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676657807; a=rsa-sha256; cv=none; b=SZdsmQMJOKIRhF7arXuE1TK4uWbLrlWPFKXPQOT+THDKtAZ1hxArGTj+EKbMIrgMP5JrKL aYD5YawVacuKx9U1nYTxvH+vdTHoM/SUV03s/4/OUvoWJsEX4f6MMIT+2c7FVn1g1DUyNb P2WihrS2hrZmxueZbeyimNOrFKheDcg/KHh35TZurae8UIb4o3wc3r7/YHCIQ8NSCETc/S BVsUMb+MKfinpdTkFYrr0E54X2z119zqgC9S8qdolFkcS0GzEGPYF4xAyPB7+NILWbiMTI K3xD9kbSklI/+PI6UwhIWRlCt5Y53lnV6lXED39rNnc5r0UQKlX5W9pj6ULQpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJKlM35vhzsT8; Fri, 17 Feb 2023 18: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 31HIGlTA054379; Fri, 17 Feb 2023 18: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 31HIGlEJ054378; Fri, 17 Feb 2023 18:16:47 GMT (envelope-from git) Date: Fri, 17 Feb 2023 18:16:47 GMT Message-Id: <202302171816.31HIGlEJ054378@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 7cbe771f013f - main - netlink: call genetlink notification handler upon successful family search. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7cbe771f013f6cf3316910648f6d46641cad7f44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=7cbe771f013f6cf3316910648f6d46641cad7f44 commit 7cbe771f013f6cf3316910648f6d46641cad7f44 Author: Alexander V. Chernikov AuthorDate: 2023-02-17 17:58:53 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-17 18:16:07 +0000 netlink: call genetlink notification handler upon successful family search. MFC after: 3 days --- sys/netlink/netlink_generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index 028ea24fc5e9..066379e2afae 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -160,9 +160,8 @@ genl_unregister_family(const char *family_name) GENL_LOCK(); struct genl_family *gf = find_family(family_name); - nlctrl_notify(gf, CTRL_CMD_DELFAMILY); - if (gf != NULL) { + nlctrl_notify(gf, CTRL_CMD_DELFAMILY); found = true; unregister_groups(gf); /* TODO: zero pointer first */ From nobody Fri Feb 17 18:16:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJKlP1Tjhz3rGZt; Fri, 17 Feb 2023 18:16: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 4PJKlN5443z3swJ; Fri, 17 Feb 2023 18:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKNmo9vqv+APArMm3LQpD3mHKB6OKNK5BgR76ixZxug=; b=R01Om7aIcWB52AP0zoZMHJ85Q3b7O24at0rfIGC2jH5DpETKEFHMZuoPqKZzizB6yBIGMv knD+7ljs6iKdV07NqXJVHt4e23kJyb3uGoSDslvw9+thqFLYiFyWTvV85YLku8au67jEt7 tYx3sUIxFUTkTqs6IGKG1oxoUhImk+j0mZurC0er24/9Mk5vXp+XQycdY1t0wIyzqcI4Pr 2YXWTJr3cByOT14S8jIfo3shXzpyGpF1QhPvSNav0uaVrRx2U6zL7BJWosS75gXDTb9qgA 8B2enwVmViLBQx+r8N7mSOmA06qnLNym862L29XS4hx2B9cfnOFWdXQLI/6mGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676657808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKNmo9vqv+APArMm3LQpD3mHKB6OKNK5BgR76ixZxug=; b=XzY0wOf+x50AFKTPVcub026aYjXUwT5ZO3opPUeCghqSUBs3gEfdfZoJg7saWXd61gSQLT FvIixdywW8Rpy1lVmw8XIWFsNQC8R7azs1wDFjjiqLj+UgR1Kd6NiqqDrW6g53xZ+WwPAg 3vU2BVf+/ilAzXNL2SeqZ6qOaUS9RdUfeJrj72PR9RVCgO3ym9rtx2ezQdc9yN4TTD5jwt SJO9ot2DU0wdtseyO8/7wqpvKvKXCLl2R/iV0bkA6Qo6YlDrikRsrGgiCIdwW98TCvKn5z SLVzVsPo18paD8BlBrif9H9xaaIum7VZ2xx94QaokWGbDpClIZOXID8nAwz/qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676657808; a=rsa-sha256; cv=none; b=RbTt2gWCJ22WDEAmKutgQPQhqcBXW3gCjnOXvpiVDnG9pyuoiBT+ahuQA/LZ7Azcfnqxqd NOa3PMdb7NuXKCMxt1JmKwXzaewOZYfxXhbQ+KgZiYZs4Y49jY/5Xrx5WLTuUeTd9QyjuP kLxTOCG7o+JjGRTdbaDiolwDwnlbkFX87Jrom8kW8Td6+oJfDRHx0b5uC8cP/k19mRFSdB hHxnD7QC1heTPWnXfVYykmNccxBrq031zAtJIxrjW9ZIEci8UvB/IbuAjMdwOtpyFEMItg 7X1T/kWCPZQrYojw8j5JN57YXmk8VFfufZWNncS26WDcuBkDn0lDU2mHSqNGuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJKlN3mK2zscL; Fri, 17 Feb 2023 18:16: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 31HIGmNf054402; Fri, 17 Feb 2023 18:16:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HIGmXg054401; Fri, 17 Feb 2023 18:16:48 GMT (envelope-from git) Date: Fri, 17 Feb 2023 18:16:48 GMT Message-Id: <202302171816.31HIGmXg054401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: ff8da9b2bab4 - main - netlink: improve attribute decoding in python tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ff8da9b2bab43920a19c16855ac3d30b5ccb1df2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=ff8da9b2bab43920a19c16855ac3d30b5ccb1df2 commit ff8da9b2bab43920a19c16855ac3d30b5ccb1df2 Author: Alexander V. Chernikov AuthorDate: 2023-02-17 18:04:53 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-17 18:16:08 +0000 netlink: improve attribute decoding in python tests MFC after: 2 weeks --- tests/atf_python/sys/net/netlink.py | 131 +++++++++++++++++++++++++----------- 1 file changed, 92 insertions(+), 39 deletions(-) diff --git a/tests/atf_python/sys/net/netlink.py b/tests/atf_python/sys/net/netlink.py index ba7d41c7cbf8..16cb746157cc 100644 --- a/tests/atf_python/sys/net/netlink.py +++ b/tests/atf_python/sys/net/netlink.py @@ -72,36 +72,38 @@ class NlErrattrType(Enum): class RtattrType(Enum): RTA_UNSPEC = 0 - RTA_DST = auto() - RTA_SRC = auto() - RTA_IIF = auto() - RTA_OIF = auto() - RTA_GATEWAY = auto() - RTA_PRIORITY = auto() - RTA_PREFSRC = auto() - RTA_METRICS = auto() - RTA_MULTIPATH = auto() - RTA_PROTOINFO = auto() - RTA_FLOW = auto() - RTA_CACHEINFO = auto() - RTA_SESSION = auto() - RTA_MP_ALGO = auto() - RTA_TABLE = auto() - RTA_MARK = auto() - RTA_MFC_STATS = auto() - RTA_VIA = auto() - RTA_NEWDST = auto() - RTA_PREF = auto() - RTA_ENCAP_TYPE = auto() - RTA_ENCAP = auto() - RTA_EXPIRES = auto() - RTA_PAD = auto() - RTA_UID = auto() - RTA_TTL_PROPAGATE = auto() - RTA_IP_PROTO = auto() - RTA_SPORT = auto() - RTA_DPORT = auto() - RTA_NH_ID = auto() + RTA_DST = 1 + RTA_SRC = 2 + RTA_IIF = 3 + RTA_OIF = 4 + RTA_GATEWAY = 5 + RTA_PRIORITY = 6 + RTA_PREFSRC = 7 + RTA_METRICS = 8 + RTA_MULTIPATH = 9 + # RTA_PROTOINFO = 10 + RTA_KNH_ID = 10 + RTA_FLOW = 11 + RTA_CACHEINFO = 12 + RTA_SESSION = 13 + # RTA_MP_ALGO = 14 + RTA_RTFLAGS = 14 + RTA_TABLE = 15 + RTA_MARK = 16 + RTA_MFC_STATS = 17 + RTA_VIA = 18 + RTA_NEWDST = 19 + RTA_PREF = 20 + RTA_ENCAP_TYPE = 21 + RTA_ENCAP = 22 + RTA_EXPIRES = 23 + RTA_PAD = 24 + RTA_UID = 25 + RTA_TTL_PROPAGATE = 26 + RTA_IP_PROTO = 27 + RTA_SPORT = 28 + RTA_DPORT = 29 + RTA_NH_ID = 30 class NlMsgType(Enum): @@ -314,6 +316,32 @@ class NlRtaxType(Enum): RTAX_FASTOPEN_NO_COOKIE = auto() +class RtFlagsBSD(Enum): + RTF_UP = 0x1 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_REJECT = 0x8 + RTF_DYNAMIC = 0x10 + RTF_MODIFIED = 0x20 + RTF_DONE = 0x40 + RTF_XRESOLVE = 0x200 + RTF_LLINFO = 0x400 + RTF_LLDATA = 0x400 + RTF_STATIC = 0x800 + RTF_BLACKHOLE = 0x1000 + RTF_PROTO2 = 0x4000 + RTF_PROTO1 = 0x8000 + RTF_PROTO3 = 0x40000 + RTF_FIXEDMTU = 0x80000 + RTF_PINNED = 0x100000 + RTF_LOCAL = 0x200000 + RTF_BROADCAST = 0x400000 + RTF_MULTICAST = 0x800000 + RTF_STICKY = 0x10000000 + RTF_RNH_LOCKED = 0x40000000 + RTF_GWFLAG_COMPAT = 0x80000000 + + class NlRtGroup(Enum): RTNLGRP_NONE = 0 RTNLGRP_LINK = auto() @@ -496,13 +524,17 @@ class NlHelper: cls = AddressFamilyLinux return cls + @staticmethod + def build_propmap(cls): + ret = {} + for prop in dir(cls): + if not prop.startswith("_"): + ret[getattr(cls, prop).value] = prop + return ret + def get_propmap(self, cls): if cls not in self._pmap: - ret = {} - for prop in dir(cls): - if not prop.startswith("_"): - ret[getattr(cls, prop).value] = prop - self._pmap[cls] = ret + self._pmap[cls] = self.build_propmap(cls) return self._pmap[cls] def get_name_propmap(self, cls): @@ -536,8 +568,8 @@ class NlHelper: def get_rta_name(self, val): return self.get_attr_byval(RtattrType, val) - def get_bitmask_map(self, cls, val): - propmap = self.get_propmap(cls) + @staticmethod + def get_bitmask_map(propmap, val): v = 1 ret = {} while val: @@ -551,7 +583,13 @@ class NlHelper: return ret def get_bitmask_str(self, cls, val): - bmap = self.get_bitmask_map(cls, val) + bmap = self.get_bitmask_map(self.get_propmap(cls), val) + return ",".join([v for k, v in bmap.items()]) + + @staticmethod + def get_bitmask_str_uncached(cls, val): + pmap = NlHelper.build_propmap(cls) + bmap = NlHelper.get_bitmask_map(pmap, val) return ",".join([v for k, v in bmap.items()]) def get_nlm_flags_str(self, msg_str: str, reply: bool, val): @@ -743,6 +781,12 @@ class NlAttrU8(NlAttr): return self._to_bytes(struct.pack("@B", self.u8)) +class NlAttrRtFlags(NlAttrU32): + def _print_attr_value(self): + s = NlHelper.get_bitmask_str_uncached(RtFlagsBSD, self.u32) + return " rtflags={}".format(s) + + class NlAttrIp(NlAttr): def __init__(self, nla_type, addr: str): super().__init__(nla_type, b"") @@ -808,6 +852,11 @@ class NlAttrNhId(NlAttrU32): return " nh_id={}".format(self.u32) +class NlAttrKNhId(NlAttrU32): + def _print_attr_value(self): + return " knh_id={}".format(self.u32) + + class NlAttrMac(NlAttr): def _print_attr_value(self): return ' mac="' + ":".join(["{:02X}".format(b) for b in self._data]) + '"' @@ -956,9 +1005,13 @@ rtnl_route_attrs = prepare_attrs_map( AttrDescr(RtattrType.RTA_SRC, NlAttrIp), AttrDescr(RtattrType.RTA_IIF, NlAttrIfindex), AttrDescr(RtattrType.RTA_OIF, NlAttrIfindex), - AttrDescr(RtattrType.RTA_GATEWAY, NlAttrTable), + AttrDescr(RtattrType.RTA_GATEWAY, NlAttrIp), + AttrDescr(RtattrType.RTA_TABLE, NlAttrTable), + AttrDescr(RtattrType.RTA_PRIORITY, NlAttrU32), AttrDescr(RtattrType.RTA_VIA, NlAttrVia), AttrDescr(RtattrType.RTA_NH_ID, NlAttrNhId), + AttrDescr(RtattrType.RTA_KNH_ID, NlAttrKNhId), + AttrDescr(RtattrType.RTA_RTFLAGS, NlAttrRtFlags), AttrDescr( RtattrType.RTA_METRICS, NlAttrNested, From nobody Fri Feb 17 23:11:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/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 02:31:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJXk65L7Hz3s9JD; Sat, 18 Feb 2023 02:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PJXk64Ttrz3pZv; Sat, 18 Feb 2023 02:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676687486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VTrxk+M/L++LV880HdQgXY9Fp32OINtx1hLoep3phQc=; b=mnhJoZw/j834IYGczAbjIiUR3zOlm+KpqqL8iZwDqDIR9ir4BpW5cZKl35tz7ROeEEnvEA tK4LyI4NN7HF5kAkH8wHgqXYl69Mh4lIz2x94p5Fz8+eYHyEWI0ZhNu+28tP/oRC+KjOvH rTVZRg6eMlYDFWp8rXP+c4umANl1Y51wI+xKZHIM+2jXM39MOC1JcJTMccBv4E0qhbOcQo C/Zq8/4oXGaQ9faYQUYVBpsewLbEMfx8bZvDbL3jj/3TwgZryEa0TOQRxbmr7fwo3xCXZ7 Ys14rwFg86SMt1Q9ckKoX74xutEiCKZJYxG+NYgScr2yKgKXtJznQZzYya20Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676687486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VTrxk+M/L++LV880HdQgXY9Fp32OINtx1hLoep3phQc=; b=Xy7D4nItQDuX1cUhEtWT33NvLv65uB6slp138XwnQif4/X/lJ8Lwzv7Wjepxs/nbhE+Hbw tMfXPlRYyxUI1wjIPwJHaaVtaaNOpKxFv7FNqUOxlRPUoFuONqEYkdUSRxF5OpwWK901La Icz6YtSDT3AAh7lkarCuxp7IutL2HnGVGl+gMX6yds8TptZuESF/ekvejG3EgVoFoXRlfQ O1for20OBhbVOBjpoI9H06EoGBe6PMAg4AutKLF53+c2fwFeviEBO8P6jVCTrzA9g5Ubn6 X9TI/7BePzTDbEaqMG+zvwUM7pjm3XIRMU1xxl3kNe4z8h8r8oZa0NoDmW2+zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676687486; a=rsa-sha256; cv=none; b=YMovsHNh4Tz9fyWsJRgaHagWGWeEmhIuVYU44V4e1EhjIYrtpW7dvK0gfIRwz+UsuZ6iSC qqFGxNshiuvkmszERZdPQmWAaZLuE06fV9z4H2Hpb7TNHwrH1f7k/DzT1DcOoYa6GCleHa AgMVWyDvtRhPvaGYjD0BCNKz5oFoxULfliR7efIxjliFnRGa+gEg25TsWrv1IkmfnfeFyP Ftx7L1qhwKSqt7zccmrFEua0aazb0i+0vnFwsrG4ISHjwLLJ6OOAYLMXRgjD0w7nMfJTVq dHwuIDjttoSrOAVdFcbMAzkirQiSUZdNBDrHAcF3CnlhYb9XxePooHN3qd7H2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJXk63WbJz15SQ; Sat, 18 Feb 2023 02:31: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 31I2VQBD062491; Sat, 18 Feb 2023 02:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31I2VQHb062490; Sat, 18 Feb 2023 02:31:26 GMT (envelope-from git) Date: Sat, 18 Feb 2023 02:31:26 GMT Message-Id: <202302180231.31I2VQHb062490@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: df91d8167d97 - main - mutex(9): correct man page, mtx_trylock_spin returns int not void List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df91d8167d97fcddc5831af923729d000c7f5b45 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=df91d8167d97fcddc5831af923729d000c7f5b45 commit df91d8167d97fcddc5831af923729d000c7f5b45 Author: Allan Jude AuthorDate: 2022-05-22 00:13:16 +0000 Commit: Allan Jude CommitDate: 2023-02-18 02:30:18 +0000 mutex(9): correct man page, mtx_trylock_spin returns int not void Reviewed by: kib, pauamma, debdrup Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D35283 --- share/man/man9/mutex.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man9/mutex.9 b/share/man/man9/mutex.9 index 43d523a56c98..cb207ff4596a 100644 --- a/share/man/man9/mutex.9 +++ b/share/man/man9/mutex.9 @@ -28,7 +28,7 @@ .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd May 24, 2017 +.Dd February 17, 2023 .Dt MUTEX 9 .Os .Sh NAME @@ -74,7 +74,7 @@ .Fn mtx_trylock "struct mtx *mutex" .Ft int .Fn mtx_trylock_flags "struct mtx *mutex" "int flags" -.Ft void +.Ft int .Fn mtx_trylock_spin "struct mtx *mutex" .Ft int .Fn mtx_trylock_spin_flags "struct mtx *mutex" "int flags" From nobody Sat Feb 18 06:09:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJgMB1v2dz3rXKP for ; Sat, 18 Feb 2023 07:30:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 4PJgM91WrMz4BNZ for ; Sat, 18 Feb 2023 07:30:29 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f50.google.com with SMTP id bg35so722287wmb.1 for ; Fri, 17 Feb 2023 23:30:29 -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=64oJpSAdJsZGw4R/7Vul4tbp2nRFr/ZNQ2VJHcTCk966fzUht+fTvVpRCBw2vt06D4 6qIAH598y68qtozxu80AzMw32r98EQSG3yais5atDsOCoawzUo2zDLtII6owj4uFxzqu GtC6QE9SCQ0poktp+B++EYrH507gv+p/kEsO4nzSL+L1gtvgY7T5xcOSI0Um/Cr0IkSX xtV1oZLfsfMmGnrnEZMocCyOeQsVhRMu+rrx6lKPKnv8oW1D83zh5OEZ5QPeDjl78G+v lKq3gjDp7bC5yJZC0vfflL7/1FEuHZsllTaNQ3mGIW3mBh/ZRteAuS18FygslGkAhv1b MchQ== X-Gm-Message-State: AO0yUKXLJcaFGXftFE0snpZRtFXISDZDrrYKxO765MnfL+1hd8D2S9lS kJCx++xDfbFR20jzaTIqhcDDfQ== 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(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: 4PJgM91WrMz4BNZ 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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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 From nobody Sat Feb 18 15:46:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJtN06w5cz3sfWt; Sat, 18 Feb 2023 15:46: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 4PJtN06Rkwz3wZR; Sat, 18 Feb 2023 15:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676735216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ypNKUrYew/3wP+Dz3ZTTejSQ8pPUDy0tNz5TzqjAmXU=; b=Ouh5bTaPRQKz7vV8gxa6KRnFc3jxa1uy3giCjtIBV/5emPkMIldnbK92LojMpBeNgXNBoj X/zg1C8OPXNiZE8tPYbwzagRhW9Io2+Vf1TiCr+iVZCQJVNtjaBV+IzVkN4tDfywfY5D6R VWA8wRR18S/s8dETtY3qqbe7ozK4i+diDz0KPiVuL5hfoiNOt2Z+HJcNOHa91tUGcNNuO4 uCRIXMfQu7OvkF9Y0OSjSAyGDCJluzA6AuChXC47cxV5wJfyrHvN3EDHpSrMRPYOndeqad eUG2+lww9+bvALrWxuanrmhAn5JQp5JU9KPONlfLJfbcVp6jlxZovsT5KcaCUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676735216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ypNKUrYew/3wP+Dz3ZTTejSQ8pPUDy0tNz5TzqjAmXU=; b=jPiB0e87dJbPIH7AfxYdRXi/witt6ctT3zdlJrqSdaxeoUAXTrYWnCiMRf8pjoE5kuR7UV 3eq0RaA7Bmzyq7/d4QbfZAvG/FrOpmKiUctpc39HgdK7cJC1seoDtrWT5fv2bYHCjYhXdV InTZjdVm6BtGx/MG6bIVD9vqWatIc2bkeoSysLnMg3wPGLOYQneARnBStEYyC1GtGm7fsl kUJMTpdhuqzyuV/NUhI01VXb1TcaXqYr8CvziYnZZhNGLK6sOL2IKu/VZqDOPD5bFnrXeh 6qvwJZVvgDCFa5++POOSV/+8digTkF7bRbIMVw36AXVqmWodSEf2XDEKbE+oWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676735216; a=rsa-sha256; cv=none; b=ljs1dQ6+cRb/vkOKCzhJ++A77UNm36JNB1vRAnhGbN6KpQZ8tCWJnBD8qqzgJYv3/Y1fBe WL05hLTJ989RJzS+sWBxCUTv3QmOYWmPAMxiHDy78joFLQWOXtQkhiPdjAPAp558/os434 yqbKX7iEpgyPbm9H+RIh1k0GPIxNPnW2d0G4FldDtVJXKleepX27BJB8X1Dik7iNzgt3cW MXgfdslsifrhvXhIfeOA8QfOyiWlLm3/+JQwgYUM9ECJGYDWLhsgESs3i+0R+Ltl/QBxOn RDGE4NBJPkdOMfm5sSUPUzkARvRbTWQjRQS0uKc/TLT9yaKoy6dBrz153KVEoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJtN05VtxzSg6; Sat, 18 Feb 2023 15:46: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 31IFkuSL098091; Sat, 18 Feb 2023 15:46:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IFkuYl098090; Sat, 18 Feb 2023 15:46:56 GMT (envelope-from git) Date: Sat, 18 Feb 2023 15:46:56 GMT Message-Id: <202302181546.31IFkuYl098090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: cd406ac94d8b - main - nfsd: Add NFSD_VNET() macros to nfs_fha_new.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd406ac94d8beae7f184adb14a3c94e058366b9a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cd406ac94d8beae7f184adb14a3c94e058366b9a commit cd406ac94d8beae7f184adb14a3c94e058366b9a Author: Rick Macklem AuthorDate: 2023-02-18 15:45:38 +0000 Commit: Rick Macklem CommitDate: 2023-02-18 15:45:38 +0000 nfsd: Add NFSD_VNET() macros to nfs_fha_new.c Although it is not 100% obvious if the affinity threads lists need to be vnet'd when nfsd runs in a prison, I think it is necessary for the unusual case where the same file system is exported in multiple prisons. For this case, the affinity code might try to assign the RPC to a svc thread that runs in a different prison. Also, it makes sense to vnet them, since there are separate svc threads for each prison running nfsd(8). This patch adds the macros for vnet'ng to nfs_fha_new.c. The macros are still null, so the only semantics change is malloc'ng the fha_param structure. MFC after: 3 months --- sys/fs/nfsserver/nfs_fha_new.c | 108 +++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 46 deletions(-) diff --git a/sys/fs/nfsserver/nfs_fha_new.c b/sys/fs/nfsserver/nfs_fha_new.c index 05a03bee5d1c..203e98d3ac86 100644 --- a/sys/fs/nfsserver/nfs_fha_new.c +++ b/sys/fs/nfsserver/nfs_fha_new.c @@ -56,14 +56,14 @@ static int fhenew_stats_sysctl(SYSCTL_HANDLER_ARGS); static void fha_extract_info(struct svc_req *req, struct fha_info *i); -static struct fha_params fhanew_softc; +NFSD_VNET_DEFINE_STATIC(struct fha_params *, fhanew_softc); SYSCTL_DECL(_vfs_nfsd); extern int newnfs_nfsv3_procid[]; -SYSINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_init, NULL); -SYSUNINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_uninit, NULL); +SYSINIT(nfs_fhanew, SI_SUB_VNET_DONE, SI_ORDER_ANY, fhanew_init, NULL); +SYSUNINIT(nfs_fhanew, SI_SUB_VNET_DONE, SI_ORDER_ANY, fhanew_uninit, NULL); static void fhanew_init(void *foo) @@ -71,9 +71,9 @@ fhanew_init(void *foo) struct fha_params *softc; int i; - softc = &fhanew_softc; - - bzero(softc, sizeof(*softc)); + NFSD_VNET(fhanew_softc) = malloc(sizeof(struct fha_params), M_TEMP, + M_WAITOK | M_ZERO); + softc = NFSD_VNET(fhanew_softc); snprintf(softc->server_name, sizeof(softc->server_name), FHANEW_SERVER_NAME); @@ -82,12 +82,14 @@ fhanew_init(void *foo) * Initialize the sysctl context list for the fha module. */ sysctl_ctx_init(&softc->sysctl_ctx); - softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, - SYSCTL_STATIC_CHILDREN(_vfs_nfsd), OID_AUTO, "fha", - CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "NFS File Handle Affinity (FHA)"); - if (softc->sysctl_tree == NULL) { - printf("%s: unable to allocate sysctl tree\n", __func__); - return; + if (IS_DEFAULT_VNET(curvnet)) { + softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, + SYSCTL_STATIC_CHILDREN(_vfs_nfsd), OID_AUTO, "fha", + CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "NFS File Handle Affinity (FHA)"); + if (softc->sysctl_tree == NULL) { + printf("%s: unable to allocate sysctl tree\n", __func__); + return; + } } for (i = 0; i < FHA_HASH_SIZE; i++) @@ -106,36 +108,38 @@ fhanew_init(void *foo) /* * Add sysctls so the user can change the tuning parameters. */ - SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "enable", CTLFLAG_RWTUN, - &softc->ctls.enable, 0, "Enable NFS File Handle Affinity (FHA)"); - - SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "read", CTLFLAG_RWTUN, - &softc->ctls.read, 0, "Enable NFS FHA read locality"); - - SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "write", CTLFLAG_RWTUN, - &softc->ctls.write, 0, "Enable NFS FHA write locality"); - - SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "bin_shift", CTLFLAG_RWTUN, - &softc->ctls.bin_shift, 0, - "Maximum locality distance 2^(bin_shift) bytes"); - - SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "max_nfsds_per_fh", CTLFLAG_RWTUN, - &softc->ctls.max_nfsds_per_fh, 0, "Maximum nfsd threads that " - "should be working on requests for the same file handle"); - - SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "max_reqs_per_nfsd", CTLFLAG_RWTUN, - &softc->ctls.max_reqs_per_nfsd, 0, "Maximum requests that " - "single nfsd thread should be working on at any time"); - - SYSCTL_ADD_OID(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "fhe_stats", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, - 0, 0, fhenew_stats_sysctl, "A", ""); + if (IS_DEFAULT_VNET(curvnet)) { + SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "enable", CTLFLAG_RWTUN, + &softc->ctls.enable, 0, "Enable NFS File Handle Affinity (FHA)"); + + SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "read", CTLFLAG_RWTUN, + &softc->ctls.read, 0, "Enable NFS FHA read locality"); + + SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "write", CTLFLAG_RWTUN, + &softc->ctls.write, 0, "Enable NFS FHA write locality"); + + SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "bin_shift", CTLFLAG_RWTUN, + &softc->ctls.bin_shift, 0, + "Maximum locality distance 2^(bin_shift) bytes"); + + SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "max_nfsds_per_fh", CTLFLAG_RWTUN, + &softc->ctls.max_nfsds_per_fh, 0, "Maximum nfsd threads that " + "should be working on requests for the same file handle"); + + SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "max_reqs_per_nfsd", CTLFLAG_RWTUN, + &softc->ctls.max_reqs_per_nfsd, 0, "Maximum requests that " + "single nfsd thread should be working on at any time"); + + SYSCTL_ADD_OID(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "fhe_stats", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + 0, 0, fhenew_stats_sysctl, "A", ""); + } } static void @@ -144,11 +148,12 @@ fhanew_uninit(void *foo) struct fha_params *softc; int i; - softc = &fhanew_softc; + softc = NFSD_VNET(fhanew_softc); sysctl_ctx_free(&softc->sysctl_ctx); for (i = 0; i < FHA_HASH_SIZE; i++) mtx_destroy(&softc->fha_hash[i].mtx); + free(softc, M_TEMP); } static rpcproc_t @@ -556,11 +561,13 @@ noloc: SVCTHREAD * fhanew_assign(SVCTHREAD *this_thread, struct svc_req *req) { - struct fha_params *softc = &fhanew_softc; + struct fha_params *softc; SVCTHREAD *thread; struct fha_info i; struct fha_hash_entry *fhe; + NFSD_CURVNET_SET(NFSD_TD_TO_VNET(curthread)); + softc = NFSD_VNET(fhanew_softc); /* Check to see whether we're enabled. */ if (softc->ctls.enable == 0) goto thist; @@ -602,9 +609,11 @@ fhanew_assign(SVCTHREAD *this_thread, struct svc_req *req) mtx_lock(&thread->st_lock); mtx_unlock(fhe->mtx); + NFSD_CURVNET_RESTORE(); return (thread); thist: req->rq_p1 = NULL; + NFSD_CURVNET_RESTORE(); mtx_lock(&this_thread->st_lock); return (this_thread); } @@ -619,12 +628,15 @@ fhanew_nd_complete(SVCTHREAD *thread, struct svc_req *req) struct fha_hash_entry *fhe = req->rq_p1; struct mtx *mtx; + NFSD_CURVNET_SET(NFSD_TD_TO_VNET(curthread)); /* * This may be called for reqs that didn't go through * fha_assign (e.g. extra NULL ops used for RPCSEC_GSS. */ - if (!fhe) + if (!fhe) { + NFSD_CURVNET_RESTORE(); return; + } mtx = fhe->mtx; mtx_lock(mtx); @@ -638,12 +650,13 @@ fhanew_nd_complete(SVCTHREAD *thread, struct svc_req *req) fha_hash_entry_remove(fhe); } mtx_unlock(mtx); + NFSD_CURVNET_RESTORE(); } static int fhenew_stats_sysctl(SYSCTL_HANDLER_ARGS) { - struct fha_params *softc = &fhanew_softc; + struct fha_params *softc; int error, i; struct sbuf sb; struct fha_hash_entry *fhe; @@ -652,6 +665,8 @@ fhenew_stats_sysctl(SYSCTL_HANDLER_ARGS) sbuf_new(&sb, NULL, 65536, SBUF_FIXEDLEN); + NFSD_CURVNET_SET(NFSD_TD_TO_VNET(curthread)); + softc = NFSD_VNET(fhanew_softc); for (i = 0; i < FHA_HASH_SIZE; i++) if (!LIST_EMPTY(&softc->fha_hash[i].list)) break; @@ -694,6 +709,7 @@ fhenew_stats_sysctl(SYSCTL_HANDLER_ARGS) } out: + NFSD_CURVNET_RESTORE(); sbuf_trim(&sb); sbuf_finish(&sb); error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); From nobody Sat Feb 18 17:08:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJwBG2Rcyz3slyt; Sat, 18 Feb 2023 17:08: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 4PJwBG1tdGz47BC; Sat, 18 Feb 2023 17:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676740118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lmNwpuf7apST5ri6P5DsIj6FvQ+H0bH78gXbmgZj9og=; b=dj2B6iSet+WR780efnc48PjBQVzypk+ivC2X7oRgfXQJUFr70OH6l6RoPOrWo7vzYKghfC egQQb5jd03V1eEldOrEYujP4KOv+1ofGznL7b/s5BxpzOoNtTyvdb4zTsZWe+dnpr0jlVr HfKBW3T4VYXcOOcr9dq3rmTo6ZZojnb4voTpV3yZJt8l2AEXA6XKHrmqmXq9rLJBFBYfBM v4ZwecZGWjJHCtdCSOrxa/17uNcDPwzh8hElc/85IfEwd29z4At3I3pxSLKFHZJM1QNMtb 0BH6tXwGHw4XPdoTwCxDo3cjNXMYJ2C52dlozFYGYw77ShPO+hEAEGSpl2VoMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676740118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lmNwpuf7apST5ri6P5DsIj6FvQ+H0bH78gXbmgZj9og=; b=N+5AXiOey4vtwVXU9qHByIlr41o0xH6h+rrBZMPGCm4DBZLCFFzlEJpXtPTufMUQZvkuT/ Ev6gEoqjtcI5icTLzhpIojFOAyeOSBo3GthOs2jx3J1VlVAFSP7BbHRzwAoeiNH3vjJ6Qr e6k2hh+TcZ2/4T18kFsFr/oEfOIqGb05r2gRJnM2jVI5ZUY7vd5J3NQrshBkKhcx54mDvO QPKgm2YuTUKHn/7t5UxjppatZac5w2mqcU9v/bSyT/TCPuDpa9zzJ/WHSoxaNk7ZrFe1fj e7S7942dz6McrZZ86uXTGK0ZiXacfcVdt+RAZKfX6NPEuF6+5AeAX/JJjZ6Bgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676740118; a=rsa-sha256; cv=none; b=B3GV3OTQLqyQQ92fzJE0pRRG25+hSQlK/mWIvsXPhmI5lKpBeNAfJhmhD3cxqy84RCbyDy 5DqzTpMHI/F83IQw4aBAJBM7rwvLGhQTY+pbAvAZhunJmIFel+hXQgwjZ61s4Yk3ZnWCrY UujBCCUQeOraC3C+bPLnYBU+3fyuYxsmuOYkTS4ZzSjRUz3QLH2LxIkokGoHAZjy701GsT lf7nyVNVBVuitVWMLnQlS1CvaWSHsEdQjkqJOiPTroM9We5KRMlg8ReXoN8mQhWDbraEog a+fWjX+5YDLITMqlpikTJ4VrTZwNqtDwSUt5iFZaoqwKNcTrB6GJm+f9lYWVOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJwBG0vwnzWD1; Sat, 18 Feb 2023 17:08: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 31IH8cab012815; Sat, 18 Feb 2023 17:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IH8c07012814; Sat, 18 Feb 2023 17:08:38 GMT (envelope-from git) Date: Sat, 18 Feb 2023 17:08:38 GMT Message-Id: <202302181708.31IH8c07012814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Fernando=20Apestegu=C3=ADa?= Subject: git: 91706f0d6d97 - main - netstat.1: Clarify -i and -I priorities List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91706f0d6d972c3ff359565e144828dad2a790af Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/src/commit/?id=91706f0d6d972c3ff359565e144828dad2a790af commit 91706f0d6d972c3ff359565e144828dad2a790af Author: Fernando Apesteguía AuthorDate: 2023-02-18 17:00:29 +0000 Commit: Fernando Apesteguía CommitDate: 2023-02-18 17:01:34 +0000 netstat.1: Clarify -i and -I priorities netstat(1) allows to specify both -i (all interfaces) and -I . However, when both are specified, -I always overrides -i. Add a comment where appropriate the same way we do in rm(1) for -f and -i. PR: 202708 Reported by: demon@ Approved by: manpages (pauamma@) Differential Revision: https://reviews.freebsd.org/D38654 --- usr.bin/netstat/netstat.1 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index 819e7c94df74..c57e00d11648 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -28,7 +28,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 27, 2022 +.Dd February 18, 2023 .Dt NETSTAT 1 .Os .Sh NAME @@ -284,6 +284,14 @@ The network addresses of the interface and the maximum transmission unit .Pq Dq mtu are also displayed. +If both +.Fl i +and +.Fl I +are specified, +.Fl I +overrides any instances of +.Fl i . .Bl -tag -width indent .It Fl 4 Show IPv4 only. @@ -432,6 +440,14 @@ See .Ek .Xc Display per-interface statistics for each network protocol. +If both +.Fl i +and +.Fl I +are specified, +.Fl I +overrides any instances of +.Fl i . .Bl -tag -width indent .It Fl 4 Show IPv4 only From nobody Sat Feb 18 17:55:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJxCm6jxHz3spwV; Sat, 18 Feb 2023 17:55: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 4PJxCm6HLkz4Gcc; Sat, 18 Feb 2023 17:55:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DEeQxOl/Xw06FxLIXkk3yUz8/vC0nCqlqIXp+riseKU=; b=aE96uy2Qoeq8yt6C8c+bRzcMpQ9hrRUCzw8p5GagLdPWxNPeb/xEfvVHeJZ73T5SKXhN8d 3MSsafVWp8/3U0MLjGIcTKOIcbTpxRa6VY7vPvrvJ0LJgezQvWyJWW8UkTyEF3Nu5Zj9fO e0V5C3YcgInW9GVgIe3H1m8kNomWcePFu5j0s1PGLxcs7OJqeIbqazC4AHeAeV9Xm27NJk ZUQv6R4zRTNzenG4mGK6ooWZ6RnhrQEy7vZQ7iPAEPvAUlULErJhZyQfXbW6urb02ybF/P KWiCUA4E8iz5wcl1n7iCfwawURBjtMrUiwfh+IdCgXF6f5soW4oI0FkR5zFPTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DEeQxOl/Xw06FxLIXkk3yUz8/vC0nCqlqIXp+riseKU=; b=qDK1Y8ChuLx+UTZJwS94lMw5ESWf/zQdWOcUnY1itSIVK1QeP+gCqei5LGfoI57/p5+LB5 q4w8bZI487Exf4IMnJrl0v4mt+Dn19Z+49d0ytI1SgVzreheMq1YqhjO4KmIZqlS2HMH1z d/qt/wa0ryJXjJqjxDF1Cn1yjJxoRSHviZATHO8Ebse1/BYkxF4Gbb2W5OtLguRuGEqF93 LzGF4fzF1fT17p++qRSYTmORe24wZVWV4Qll4zt/GUkj8R1gDqXkEKmK4Hw1PhqcLIBprr O0+SkmpSn9bApzyhTY48NjTfcTsJVtCkwOT9zLjR9pVSCtZJI5XjmJOLF5Pp3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676742900; a=rsa-sha256; cv=none; b=Qa6z0IpzHvA8aVoT6MPfpyV0hffIUB+OLIRKy81FSb3gsRnolJ2Mt/lnlYsHBq3rxy9f1c mN7RgEIbPSI7xwMe+ckcqvHtEU5VMCMLxfeQOtLh35NxcHi58N4Q7boOjzG5KCIo20W4Th lmh/jES3JwKkvQ0FEjEQKnpp6n6Nik5qJ6g0yMng2U4tHC05SoWukzY7dTpjlz33sefu3M 5N9LhFB/wKgXjc1r2uLJGNUqyE8vTQHOC/pLOziButk6ul0CRE4CG9uCjBIulGFzHVSEjt P1Bcq8wgNW8wYzNTsMVxY5uLqOru1Onm3Txva6St02M26jHDDCcc5JnVe3j0gA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJxCm5LcWzWyG; Sat, 18 Feb 2023 17:55: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 31IHt0ex083424; Sat, 18 Feb 2023 17:55:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IHt0D9083423; Sat, 18 Feb 2023 17:55:00 GMT (envelope-from git) Date: Sat, 18 Feb 2023 17:55:00 GMT Message-Id: <202302181755.31IHt0D9083423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 1ea58b413595 - main - netlink: remove redundant check. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ea58b413595310de43587c609421ede74770f11 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=1ea58b413595310de43587c609421ede74770f11 commit 1ea58b413595310de43587c609421ede74770f11 Author: Alexander V. Chernikov AuthorDate: 2023-02-18 17:10:39 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 17:53:05 +0000 netlink: remove redundant check. MFC after: 2 weeks CID: 1498867 --- sys/netlink/route/iface.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 96f21a79a369..116acd863ba9 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -779,15 +779,11 @@ get_sa_plen(const struct sockaddr *sa) switch (sa->sa_family) { #ifdef INET case AF_INET: - if (sa == NULL) - return (32); paddr = &(((const struct sockaddr_in *)sa)->sin_addr); return bitcount32(paddr->s_addr);; #endif #ifdef INET6 case AF_INET6: - if (sa == NULL) - return (128); paddr6 = &(((const struct sockaddr_in6 *)sa)->sin6_addr); return inet6_get_plen(paddr6); #endif From nobody Sat Feb 18 17:55:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJxCp0chGz3spSd; Sat, 18 Feb 2023 17: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 4PJxCp072hz4H4p; Sat, 18 Feb 2023 17: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=1676742902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fI5ROyz3OYFhzGNiStfjI5KW0iuedrSQPsdFVIXhXJo=; b=nvsp2x1PsdTtFRNRW9xbU3oCzBQ51//vAQEHmqQ6u1C58+foX8uO4LEhfjSeChWqR37Tr8 3Bx/aRyEU6cysd4kREPpc9Y+o+3kVHqsK2vjBgzGk/PlVySq/0pvqZ+qgCQlMF0e0FRpxc b4jjhr1dspEJW2RFJ2NylECGjF+2zetxBnmnVZ4h/zZ1N2dnCkWJdRkxHQFvPyhO4JnoG+ tyPF6zaXO99SuLlNoBBB1PQbLK11iuax78fw2p6UccfK3dTgQiP93AFdP1siFwyFdOT64S a3QeNl9Ext7hz9nQdRpoXcP4DnTaIIbhneQsOYRpf51wNqWAZIWVYFX/Xwe9VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fI5ROyz3OYFhzGNiStfjI5KW0iuedrSQPsdFVIXhXJo=; b=fq/JQvohrI+J5b32hYH3KE7mlmqxaNzRBkM4L4BOcKdto7wYB+Q4eucI6x9uG++tmty7az 2cJNeS6Kj2XAaaW9TDumR91B8Ddfuimjiw4U1u78eo0iReyERIcGOo9yb0DIiFHY6+CNDq JrCR6cXRonU5H3wnrWXFQ8QqALsa9QuXOMt5x4jZ5h3V8ECPyOaeGR0Busqs0hOlc1gaKs jLjRiX7NGRodoyhxnuzlVNRnaQiuVCAYy9xJFpf4OKOmZsmiMhC7TBUW4RwMwgFU+DsXwf 7r2LIPPjb1HvirgmrAhscSVDZZ5FSChBbSckL42CrrxrhVpcY1HBCWyP9ZkuNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676742902; a=rsa-sha256; cv=none; b=QVFFh1mMoJ7ZxTPEgXhdszTGZW9mHV8IwXwOeqALJOFQ9ClHv74vJdhelae5HGO3zx3Uin 1QqLQAqh5n+qkwFXV+ShAf1X4jm0zlw7oiAvrqpcw0YmXWblTa2/fizlX+2P/fLS0ohEOv QCGwq7Dgry8PdYf9KhpdQHeOwS5tiGSjTryhF3oZpD8Y1zebhxzc9x0dxF/aF+vOBU/jZ3 8uXGQBiN8z+NQRjl4KLqkYckMB/ABV3tId+qZ3RrHAN3e80m5ld8IBS5YhO9bSqg5Owkp5 n3g5ZjX7uQSkOS2FYd2qe1sYcorIo6hThNJRI6fm2/J+jCNZCAucGonyPjXRXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJxCn6CjmzWRH; Sat, 18 Feb 2023 17:55: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 31IHt1ln083443; Sat, 18 Feb 2023 17:55:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IHt12T083442; Sat, 18 Feb 2023 17:55:01 GMT (envelope-from git) Date: Sat, 18 Feb 2023 17:55:01 GMT Message-Id: <202302181755.31IHt12T083442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 3f70fca90f9f - main - netlink: check result of sooptcopyin(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3f70fca90f9f1c6a40e55e6edd2dc1b1272f4998 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=3f70fca90f9f1c6a40e55e6edd2dc1b1272f4998 commit 3f70fca90f9f1c6a40e55e6edd2dc1b1272f4998 Author: Alexander V. Chernikov AuthorDate: 2023-02-18 17:15:25 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 17:53:05 +0000 netlink: check result of sooptcopyin(). CID: 1498866 MFC after: 2 weeks --- sys/netlink/netlink_domain.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 4d34fd381c39..630ce47cd228 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -612,7 +612,9 @@ nl_ctloutput(struct socket *so, struct sockopt *sopt) switch (sopt->sopt_name) { case NETLINK_ADD_MEMBERSHIP: case NETLINK_DROP_MEMBERSHIP: - sooptcopyin(sopt, &optval, sizeof(optval), sizeof(optval)); + error = sooptcopyin(sopt, &optval, sizeof(optval), sizeof(optval)); + if (error != 0) + break; if (optval <= 0 || optval >= NLP_MAX_GROUPS) { error = ERANGE; break; @@ -629,7 +631,9 @@ nl_ctloutput(struct socket *so, struct sockopt *sopt) case NETLINK_CAP_ACK: case NETLINK_EXT_ACK: case NETLINK_GET_STRICT_CHK: - sooptcopyin(sopt, &optval, sizeof(optval), sizeof(optval)); + error = sooptcopyin(sopt, &optval, sizeof(optval), sizeof(optval)); + if (error != 0) + break; flag = nl_getoptflag(sopt->sopt_name); From nobody Sat Feb 18 17:55:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJxCq57gXz3spf9; Sat, 18 Feb 2023 17:55: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 4PJxCq0ld3z4H54; Sat, 18 Feb 2023 17:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5kMgFAEQ0OzUoaTrktS23j/Rr0Tv/9eCoKWHVRa0gx0=; b=TgihDJT973o6sTPEsA0otnnMqgWsoT1AsNLvkx8nWQ2+0BT5vWEaKREpmPnQkzPfjxBFjZ KCIVt9c5pUAswMihtVIdeaCWS/W0PGV9PwVrf0yiZQpQfqBkSyqMz2MThIE2UIUd/ZiyWr fK2L6RcnQ4ms3sGOz1mYs1GbXh+XDr3gcJapzFXk2wWxa9z+aDRVZp/m+OXhCtO2YwX+tW UcPCyioV6xD+uJq5hqicDFFIWq4VE9EFYrMK79LCT5xhplkmc3va1/CwIe7YJtpTAKgdNZ soxMHKcFQL0fnKP1/xDc6/R3n5lKkFFx1Di1VRHjjJJ9D4wh/vornqTn7WTjQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5kMgFAEQ0OzUoaTrktS23j/Rr0Tv/9eCoKWHVRa0gx0=; b=mhHsG6gbhdqnfaYDpVn4QrDoN5McDpIP1NgMQxqIe493pg7SpvJ8a0NFCqwBiu0ahxFDhZ ZR7CkuwPRiRN8uycJ15CqOK9OPMG1vXHdtQHE/qOwu7BonYygo2FlJ9jAYYp7Na7h9cFNN CFVacc4aCU2gO93PG+ktVVhbAWlQtLn8Luc5AWxbBfEbBeG+JoCPNae6I+TIEG9Ineuagh RthpBuDYYvd3zFfcDSGVTJ/Ro0fQmoUIplrzYfEcwMlY3xMrExEQC2kEH+ap9aSgtreSUH Pj8bD92mt6+WjaAZrB9nAhtj4pljveTgkF4g6/k9+YPjGvVInW6uRsW+YCqf9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676742903; a=rsa-sha256; cv=none; b=NShq+Bzcy3dADagcwtFGxBfkBDm7O6xQT3J6sPKIG2fM+s0Ih7Vd4bI4LOyimjP9YYM+au 0LrhO0w4wCpwOM64QyXNfpmsBOoQQkLmklGocctUA6/SEC/1GkdzZk4M/sfRHhb8ZCyDpV FnQmB38g2mZbZ8qAol1oVXnGO6bx9sp583rSGzEG1IuhnSlMJWodrxiIzGQ6sc8YoZNGcz Jw7yHEFWo4nPaNupB99RvfQRGjJG+noQ9DWHXEB9xIMLXnaBKTmwww6dquXZ7GahSYPgoA pmtIMYW6rgEZnjWyi3yovI36K9sg3vTrlalILKQj22tlyfblCE+RAeCel4b3pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJxCp6yhvzWyH; Sat, 18 Feb 2023 17: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 31IHt2vJ083464; Sat, 18 Feb 2023 17: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 31IHt25O083462; Sat, 18 Feb 2023 17:55:02 GMT (envelope-from git) Date: Sat, 18 Feb 2023 17:55:02 GMT Message-Id: <202302181755.31IHt25O083462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 4404e840cf3a - main - netlink: initialise error in nl_autobind_port(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4404e840cf3aa8d06d79dc281fffbb32860ab2af Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=4404e840cf3aa8d06d79dc281fffbb32860ab2af commit 4404e840cf3aa8d06d79dc281fffbb32860ab2af Author: Alexander V. Chernikov AuthorDate: 2023-02-18 17:18:57 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 17:53:05 +0000 netlink: initialise error in nl_autobind_port(). CID: 1498877 MFC after: 2 weeks --- sys/netlink/netlink_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 630ce47cd228..5f9120f14308 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -384,7 +384,7 @@ nl_autobind_port(struct nlpcb *nlp, uint32_t candidate_id) uint32_t port_id = candidate_id; NLCTL_TRACKER; bool exist; - int error; + int error = EADDRINUSE; for (int i = 0; i < 10; i++) { NL_LOG(LOG_DEBUG3, "socket %p, trying to assign port %d", nlp->nl_socket, port_id); From nobody Sat Feb 18 17:55:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJxCr59pGz3spwZ; Sat, 18 Feb 2023 17:55: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 4PJxCr1hxlz4H7G; Sat, 18 Feb 2023 17:55:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ETIUijigiWOtSCyhFFLF1+noRXO+Gw3dFH/hxENkQnM=; b=BY8vEyqqrax0vwi7tFo3bK3vrcSsioO6OXrNHflVdBShsyLeCpogk1uSKLYH1OCN8Dh04y otzoVh0nBs4qWNP1Nb+Xm1a4FWpToPCmhnVfEVP1+fmFP7FGWpI/lvzfUKEsQ5FTXPbAs/ m4SkbNHmQfoa9FPprxTEzEz+4sDP5JQ434pSvKBf/mo959IaoOyEb7hM3u6uNljkvYDOhv YuOKwo6k5VnX6kUO76hdAhn5QbWQ9/NjDPmyVIxYHZVpaMEbtmNNv8iBFNXxmkDMBRdAwk NJtLFHzJYZamt2ivtxOQsQz4JXcobNsl7ClbVPgGGrsIP7MgP5sPhZ1Epx1Epw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ETIUijigiWOtSCyhFFLF1+noRXO+Gw3dFH/hxENkQnM=; b=vjJMzWNC7ZvNPdRJz4ZtlXTiJyH6gFBXL1QSAJiF754TpdbO6q9u+Q3LejYSEI4XtqYl+C fuBaSiDE0JcFqe5u5/+wtHBs4bL7rGuedbLVjgrtWBFPaMaVWWf+1vxDw79sEuSwkTm1LV Dz5bA7ye6cYQNIcYNeZ04rG7CyQFuYQXHHSffqnlP0R9Am254QLnm/o9nexyilEwsju4Pz mkPPr/5HAsRSyrHdpvVzP+BryfpPk9nT7+1UIWK3YWSQwXLfJ8C8PI3ZTkJrTnaI3xgxDO dEaC2+ZMz61nSKvsiP57Tnc58nFVN47GEtFwtN+i4CrpZBsogxl0W3R3h2+YmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676742904; a=rsa-sha256; cv=none; b=yk2itpnxcOMX5K4A7cxeCu4GDH6+lrywXOyjPtmyDB2WXTSZYmFLT3nl0K8+Z5h328xraN apkMPTWNmBtuQ9HksMwxjyO7vAllkAsZChRYq2xb4psEo+oPyQ/YIcqR+l5NXK2KTUAA2o gwDnPNAtI1ZHwgvzNE/2wXL2RHG/zGCz5nbNZ6c+4aZYGAjKMQ8dU8trA8JS8bsphbUGV3 PZa1RujoR+xcM56yH+o0RCWssWZDOgODtFNJmbXSjxzqzBcNFiXSGBP8vWLxTm/BxWP/Lu dBh7Zwctxb/pAG/bUL1uj49miXMGQ2rsgtNa/EsRGrsKl1sL7Cb4dQqKZkuSpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJxCr0lkMzXLR; Sat, 18 Feb 2023 17:55: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 31IHt4W5083488; Sat, 18 Feb 2023 17:55:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IHt4WS083487; Sat, 18 Feb 2023 17:55:04 GMT (envelope-from git) Date: Sat, 18 Feb 2023 17:55:04 GMT Message-Id: <202302181755.31IHt4WS083487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 8f7455a9265f - main - netlink: fix OOB read in genetlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 8f7455a9265f4952f885b06c08c57fcce6f16e5c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=8f7455a9265f4952f885b06c08c57fcce6f16e5c commit 8f7455a9265f4952f885b06c08c57fcce6f16e5c Author: Alexander V. Chernikov AuthorDate: 2023-02-18 17:24:59 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 17:53:06 +0000 netlink: fix OOB read in genetlink CID: 1498863 MFC after: 1 day --- sys/netlink/netlink_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index 066379e2afae..a16fdc312daa 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -267,7 +267,7 @@ genl_handle_message(struct nlmsghdr *hdr, struct nl_pstate *npt) int family_id = (int)hdr->nlmsg_type - GENL_MIN_ID; - if (__predict_false(family_id < 0 || family_id > MAX_FAMILIES)) { + if (__predict_false(family_id < 0 || family_id >= MAX_FAMILIES)) { NLP_LOG(LOG_DEBUG, nlp, "invalid message type: %d", hdr->nlmsg_type); return (ENOTSUP); } From nobody Sat Feb 18 17:55:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PJxCt29LPz3spYv; Sat, 18 Feb 2023 17:55: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 4PJxCs2bjcz4Gm7; Sat, 18 Feb 2023 17:55:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HowWIIf5RiFc9heyAErVlnF5M51NubcBy2Pe0hIovKg=; b=XPMIQtlIo/GrTSRdk8XdotR8iYTy13eXik4Q6DBwoJV3VVx5skGuw7HEzg8G3ATVlqZ53L REIx4XRfw3Q4YcjRsZdMUYJxiEDqY7elYqpOD/snL8QitPOorfxfuYzpuwO9HYgQub9e+Z IkOpRy9uiAg6l0J1PgebuLIaocb1B9JUDlRjS7IHaQZZlpcC1i+WZGrgt7oll9H+eZyaqJ gGmbY11su0VgfmuhRZCu/WQVR4mCR1cNuPuwVKZeGuddkN8B/wyQdSNNzmkaRKyFH/08fN k+OWltEryO5kiOKJanIPR3F7+GeX6/lO/hPdbUkpLU0UpBSVYpeCNkKFdoxjuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676742905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HowWIIf5RiFc9heyAErVlnF5M51NubcBy2Pe0hIovKg=; b=Zj67qVKEU88rjbeFFouVokbwn/kfysvdrTWD4QEFl0X+lpCswPNcloOH1vN2ELs0YG74IL n+5IACWkljePu9PWNyLjSJcuJaInJtqewuYz3ILyiDp1QUqyvp/RHQAmA8fdO9E+mqiu+u sucMOvbIxVSWQZsExwrcf1DO2IM4sbXh9DbdCmLCbn778gm1BiuvtIS3EI4oIWQDjx0uZE k5dkYIeSH2Fs16NOshx0E5RP3lcZmfHkmBPOm9II8L9EZRaJpxFMoFbIhSNDFSmKd7vupM 6d0dStZAx9e8F0Xghed0OB9RrKFER/jRQCjV/tVzm20jYhqoJIPf5X/f7ebUIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676742905; a=rsa-sha256; cv=none; b=Xxn6erzZ46rdmQ+HOWyD4SBnzkZ/2OOVLZzRo5yRUEY3xxVOisuCafW4HieUgIEGGd1q5v f76pq4V2dWySJyDiA0iJOFDtzeyLUsOxVbKmVKVXxpEbqvVwthzfpD5/TcykmgIkHxh1Q0 7gdIkwIdDPuyTENzvr/oh9rnVz5L5HEuVUw922Qf15Qjht8O6ka6D0qk29JhsNf2Hja1/6 7syO0l4DK+qMPTCgDU4knCCF4ObxBzXGo+sSJmkBaZIJ+KNu+QRw1Sd/qb92HQIXbsf+Li 5UVMMAosWi21Y/ZePZRxBVQxQru6UmlWeCkxP3BWVZt6HakCH9UrAUBvOzY/5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PJxCs1hmyzWRJ; Sat, 18 Feb 2023 17:55: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 31IHt5uL083507; Sat, 18 Feb 2023 17:55:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IHt5u7083506; Sat, 18 Feb 2023 17:55:05 GMT (envelope-from git) Date: Sat, 18 Feb 2023 17:55:05 GMT Message-Id: <202302181755.31IHt5u7083506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 453c7d6803aa - main - netlink: do not crash when linux message translation fails. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 453c7d6803aa9cbbaec74c7706276736de22f7b4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=453c7d6803aa9cbbaec74c7706276736de22f7b4 commit 453c7d6803aa9cbbaec74c7706276736de22f7b4 Author: Alexander V. Chernikov AuthorDate: 2023-02-18 17:41:48 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 17:53:06 +0000 netlink: do not crash when linux message translation fails. CID: 1498889 MFC after: 2 weeks --- sys/netlink/netlink_io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index fb8006f689e4..509065d04818 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -430,9 +430,11 @@ nl_receive_message(struct nlmsghdr *hdr, int remaining_length, struct nlmsghdr *hdr_orig = hdr; hdr = linux_netlink_p->msg_from_linux(nlp->nl_proto, hdr, npt); if (hdr == NULL) { - npt->hdr = hdr_orig; + /* Failed to translate to kernel format. Report an error back */ + hdr = hdr_orig; + npt->hdr = hdr; if (hdr->nlmsg_flags & NLM_F_ACK) - nlmsg_ack(nlp, EAGAIN, hdr, npt); + nlmsg_ack(nlp, EOPNOTSUPP, hdr, npt); return (0); } } From nobody Sat Feb 18 21:13:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PK1dB1YNvz3rrwP; Sat, 18 Feb 2023 21:13: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 4PK1dB13LDz3NFs; Sat, 18 Feb 2023 21:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676754830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1zlRgeV6Idk8q6AkXVTZFkvxXwGJqxyE8VxrTgiBEo=; b=HmiBljkBDLpQrQuvBS8clZgKpqHBZj1oWP7SvWt6uiPVAgEjtIZavHB0r23V0r/RVlBUDy 5siiVf0vw+JhRvD/0aqSU+8CaMIY15d35OWG64WA2BlJOqBNd2wo0oL9XYhfmUyF86gtqv Zsqzpk2GhHViLgPseLlVBc0mZToQggZoDORKJ9DcyHKionb2RQRNaOv2PHXZSOKWtzPZEU NLv53f7B8DRtiQdmrZxbKSRFz/e7oROpOCTGcE3CPEtbJa+lCKHg3vMbQKH6H3sMe5QQGJ 8476aD8KWbPVvqnY/+70KupqfWCD6Qv8FQArvSX5Ak088TQvl9VKji96MsbNvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676754830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1zlRgeV6Idk8q6AkXVTZFkvxXwGJqxyE8VxrTgiBEo=; b=r7I5A/j58OqtfoU0s+wb4wVpZ6o7mDcM5nngSOuHlyrE6AJNnXauooanLfHtGUSNLD1JRD NR+mVSUcRQBhwQ7JaJTbKf5daA3nM3EFhiibCbQgW5regy7gfdMPvp+YrL5xJxF2qxrCYU cstCtoamkTaUg2FcMVFjkE9JyvTGNRaCKnIMzOpvNUoWAAR/IrUVx49Nx6isufyO3Wif9R sHye6N0u17ZhuAjxRki8Awp9T6k72/gGRJHWrJzJHTzq/g19RRYMoiqMhgciXJmdBcgBeA l1S4ymALacqleiAiLdBLViG33I/DHBEIQvHghOVXqFWxl/sXXhlUQdYFLhnarw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676754830; a=rsa-sha256; cv=none; b=Ep30XSOh9q/quggQAUm2IqX9W5NzXU1hvhVSOvAMAANdpKP9hK5oA8p/bMQ5vYY6tvykYB b4HbFXe3ZH767kthmrztsMz43AFJFYJLnqbrqUuk92zQ+ze8rEBvkVxQV6g7kmLvgY0CdF ACm8w9fzmhAVA/jH6JYdjVFSo9eEwKRhjNcvbcbezzUSYpmZ/fdR2ZNiXNwn14saUIplwe i4xzpnqcW4uBEojSRul5HjSLbYImbu4TGxQ0Sxt8EhdlyZ5mhaBjZRwwBqrA+ErsH+OSLr 01sNPoKWB92+mPM4jS8DRmx6z3dHAEVamhN1lRHdvu4U8BPJW47jIXpWNoYJug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PK1dB06JJzcqW; Sat, 18 Feb 2023 21:13: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 31ILDnFe070391; Sat, 18 Feb 2023 21:13:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31ILDnJs070390; Sat, 18 Feb 2023 21:13:49 GMT (envelope-from git) Date: Sat, 18 Feb 2023 21:13:49 GMT Message-Id: <202302182113.31ILDnJs070390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Koshy Subject: git: 8a3cca0d0862 - main - Sort a list of mentor/mentee relationships. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkoshy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a3cca0d086275c4bbc6ca561a15ce248b4e81ef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jkoshy: URL: https://cgit.FreeBSD.org/src/commit/?id=8a3cca0d086275c4bbc6ca561a15ce248b4e81ef commit 8a3cca0d086275c4bbc6ca561a15ce248b4e81ef Author: Joseph Koshy AuthorDate: 2023-02-17 20:51:27 +0000 Commit: Joseph Koshy CommitDate: 2023-02-18 21:11:59 +0000 Sort a list of mentor/mentee relationships. Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D38658 --- share/misc/committers-src.dot | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 4fa97bb4d76f..2dce9a542a23 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -553,18 +553,18 @@ gibbs -> whu glebius -> mav -gnn -> jinmei -gnn -> rrs -gnn -> ivoras -gnn -> vanhu -gnn -> lstewart -gnn -> np -gnn -> davide gnn -> arybchik +gnn -> davide gnn -> erj -gnn -> kp +gnn -> ivoras +gnn -> jinmei gnn -> jtl gnn -> karels +gnn -> kp +gnn -> lstewart +gnn -> np +gnn -> rrs +gnn -> vanhu gonzo -> jmcneill gonzo -> wulf From nobody Sat Feb 18 22:28:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PK3HD5dc5z3ryD2; Sat, 18 Feb 2023 22:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PK3HD3P8Xz3mmx; Sat, 18 Feb 2023 22:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676759304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekhJHgt8c7mPmV8yD0rBFN5rR7nLK/QXDoae9ZeFDik=; b=H+cx6Tkdx+NRn+gJ8TW8rjrKsavyIJU+vqggnc8OyseApkfMMymX+LWASIJc8vc5LCp8UE h/p8NmmTFstSgLLrO4e6/QdQSTyTzXGW5LV/63jjsMWncMvyi0UdPEwcBoSJClRqjKpnjH XcGRSzY+LyQIMxBL63bTVB8ekbHn5vMqLLPQ6z+VieT2bR8yDFRV8ce9LG27RvMoTSFezi o1Bwe1D/NR0Zlp7sa56WjOe3cKdgAMrfv9y8no9OLYr9Nn4CVK251N3Lr9Rih7PP1wZZ9x dpRgsl6GlFon5WlGZw7U7/R9Q+f64hTD1dstV5AayUQY1YJn9UFlP/S2djqdLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676759304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekhJHgt8c7mPmV8yD0rBFN5rR7nLK/QXDoae9ZeFDik=; b=yeQujFSnbeicJWbiVeZbS/egpAl9VTpHYwf899TkQ31fKpvG/eZvP1PCYn4u9VHP2HGECw IllkeJ0Dd3rK0e3d1zPMPfb9o7cHc7PqfvjFyz7cG3jGIZe0/9MmBueJluL9SyUrzLUcUg 5K9DbLV4B7dGy4Xg0rdW8GWrBGKi/+Lb0kn7WDgvmief5F+h4IBjBCuwDBBwO/HUtBh5Dz JHnfrtdRj/JhBliZR4qtDfMVPVMgpZ9uVFDsELPZDn8gn+nfVzq4TLiAmIBwidngcveXjI Q8/QEGK65Np3NY1q2zx6nu9K4BQqkofC2pJaftZzz2P9j3M8W6ylXsUWYJcLAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676759304; a=rsa-sha256; cv=none; b=c1IRC0h49db4/S1yYd/4Hyi4sOnD3+nz3OVn8GmS8yfXeMF+jf3Zi3qftas2Y2JoseKBgo JsyWgF7Ih90fwA4PtlJpVtq/NJ8YdrQo0GkAG3sV0idEbRBRJOerS149V3inPCLYE/swAm KUfL6HwpUikvcSOY6xAJeBj77Q2hWBNcifcX8nm5ALXg0a2ddx45mcGxsaGrAxCHbItKBM o6SsnAXPrp3TApy5PIcvxz8mEnrF7UpHYhiC3G6aqdZ5bgn5gK3F62qTyBqvFplMtSj5tI 8iYB7fUro1++Gz4WSyFlu1kLhWChd27c5oX+DHw+7OpmNSLWO0RBma9IJnVBJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PK3HD2TPyzf7G; Sat, 18 Feb 2023 22:28: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 31IMSO2I070397; Sat, 18 Feb 2023 22:28:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IMSOE9070396; Sat, 18 Feb 2023 22:28:24 GMT (envelope-from git) Date: Sat, 18 Feb 2023 22:28:24 GMT Message-Id: <202302182228.31IMSOE9070396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 79748cec1f1c - main - tests: fix netlink test_dump_ifaces_many test. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 79748cec1f1c3437e49d7694e95fc7f438336805 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=79748cec1f1c3437e49d7694e95fc7f438336805 commit 79748cec1f1c3437e49d7694e95fc7f438336805 Author: Alexander V. Chernikov AuthorDate: 2023-02-18 22:26:32 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 22:28:01 +0000 tests: fix netlink test_dump_ifaces_many test. Consider only loopback interfaces when counting. Otherwise, if pf is loaded, 'pflog0' gets added to the vnet, breaking the test. MFC after: 2 weeks --- tests/sys/netlink/test_rtnl_iface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sys/netlink/test_rtnl_iface.py b/tests/sys/netlink/test_rtnl_iface.py index cbe5aed8b8ae..35015ea2ec6e 100644 --- a/tests/sys/netlink/test_rtnl_iface.py +++ b/tests/sys/netlink/test_rtnl_iface.py @@ -247,9 +247,7 @@ class TestRtNlIface(NetlinkTestTemplate, SingleVnetTestTemplate): """Tests if interface dummp is not missing interfaces""" ifmap = {} - for ifname in (self.vnet.iface_alias_map["if1"].name, "lo0"): - ifindex = socket.if_nametoindex(ifname) - ifmap[ifindex] = ifname + ifmap[socket.if_nametoindex("lo0")] = "lo0" for i in range(40): ifname = "lo{}".format(i + 1) @@ -300,7 +298,9 @@ class TestRtNlIface(NetlinkTestTemplate, SingleVnetTestTemplate): ifindex = rx_msg.base_hdr.ifi_index assert ifindex == rx_msg.base_hdr.ifi_index - kernel_ifmap[ifindex] = rx_msg.get_nla(IflattrType.IFLA_IFNAME).text + ifname = rx_msg.get_nla(IflattrType.IFLA_IFNAME).text + if ifname.startswith("lo"): + kernel_ifmap[ifindex] = ifname assert kernel_ifmap == ifmap #